/* ==========================================================================
   styles-refresh.css — mobile-first modernization layer (2026-06)
   Loaded LAST, after styles.css + styles-v2.css. Purely additive overrides;
   delete this file + its <link> to fully revert. Reuses existing design
   tokens (--accent, --card, --radius-*, etc.) so it stays on-brand.
   ========================================================================== */

/* ── Global: crisp Inter rendering + optical sizing ───────────────────────── */
:root {
  /* Fluid type ramp — scales smoothly from 360px to ~768px phones */
  --fs-display: clamp(34px, 9.5vw, 52px);
  --fs-h1:      clamp(26px, 7vw, 40px);
  --fs-lead:    clamp(15px, 4vw, 18px);
}

html { -webkit-text-size-adjust: 100%; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';   /* Inter: single-story a, stylistic set */
  letter-spacing: -0.011em;                /* Inter reads better slightly tightened */
}

/* Honor the notch / home indicator so nothing hides under system UI */
.hub-inner {
  padding-left:  max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Clip any decorative bleed (glows, gradients) at the viewport edge so the
   hub never shows a stray sliver on the right. */
.hub-overlay { overflow-x: clip; }

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE REFRESH  (≤ 768px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Hub header: bolder display type + soft accent glow ────────────────── */
  .hub-header {
    position: relative;
    margin-bottom: 36px;
  }
  .hub-header::before {                     /* faint radial halo behind the logo */
    content: '';
    position: absolute;
    top: -40px; left: 50%;
    width: 320px; height: 320px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.10) 0%, transparent 65%);
    pointer-events: none;
    z-index: -1;
  }
  .hub-logo {
    font-size: var(--fs-display);
    letter-spacing: -0.03em;
    line-height: 0.98;
    margin-bottom: 10px;
  }
  .hub-tagline {
    font-size: var(--fs-lead);
    letter-spacing: -0.01em;
    max-width: 18em;
    margin: 0 auto;
  }

  /* ── Hub cards: compact, with icon + title on one row ──────────────────── */
  .hub-cards { gap: 12px; }

  .hub-card {
    padding: 18px 18px 20px;
    border-radius: var(--radius-lg);
    /* subtle top-lit gradient gives flat cards depth */
    background:
      linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 40%),
      var(--card);
    /* always-on hairline accent edge for definition on dark bg */
    box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset,
                0 8px 24px rgba(0,0,0,0.28);
  }

  /* icon + title share the first row → kills the tall empty gap */
  .hub-card-icon {
    width: 40px; height: 40px;
    margin-bottom: 0;
    font-size: 19px;
    border-radius: 11px;
  }
  .hub-card-title {
    font-size: 19px;
    letter-spacing: -0.02em;
    margin: 0;
  }
  /* Float the title up beside the icon using a flex header wrapper if present,
     otherwise pull the title up next to the absolutely-sized icon. */
  .hub-card { padding-top: 18px; }
  .hub-card-icon + .hub-card-title {
    margin-top: 14px;
  }
  .hub-card-desc {
    font-size: 14.5px;
    line-height: 1.55;
    margin-top: 6px;
  }

  /* CTA becomes a clear tappable pill (≥44px touch target) */
  .hub-card-cta {
    margin-top: 16px;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.10);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    align-self: flex-start;
    min-height: 40px;
    box-sizing: border-box;
  }
  .hub-card:active {
    transform: translateY(-2px) scale(0.995);
    border-color: rgba(var(--accent-rgb), 0.35);
  }

  /* ── Primary buttons everywhere: bigger targets + accent glow ──────────── */
  .btn,
  button.btn,
  .btn-primary {
    min-height: 48px;
    border-radius: var(--radius-md);
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .btn-primary,
  .btn.primary {
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.28);
  }
  .btn-primary:active,
  .btn.primary:active { transform: translateY(1px); }

  /* ── "My Story" section: tighter rhythm, readable measure ──────────────── */
  .hub-story { margin-bottom: 44px; }
  .hub-story-narrative,
  .hub-story-mission,
  .hub-story-impact { font-size: 14.5px; line-height: 1.65; }

  /* ── Marketing pages (analyzer/, plan/): hero + CTA polish ─────────────── */
  .hero h1 {
    font-size: var(--fs-h1) !important;
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 800;
  }
  .hero .subtitle,
  .hero p {
    font-size: var(--fs-lead);
    line-height: 1.55;
  }

  /* CTA buttons: tall touch target, full-width pill, accent glow */
  .cta-button,
  .cta-button a {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .cta-button:not(.secondary) {
    box-shadow: 0 8px 24px rgba(var(--accent-rgb, 250, 204, 21), 0.30);
  }
  .hero-actions .cta-button,
  .hero .cta-button {
    width: 100%;
    max-width: 340px;
  }
  .cta-button:active { transform: translateY(1px); }
}
