/* ==========================================================================
   Find My Words — Marketing v2 (foundation)
   Mobile-first. Two breakpoints: 640 (tablet), 1024 (desktop).
   Each section's reflow is documented inline near its rules.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  /* Surface */
  --paper:        #F7F5F0;
  --paper-warm:   #fcf9f2;
  --card:         #FFFFFF;
  --muted:        #EDE9E3;

  /* Ink */
  --fg:           #2B2624;
  --fg2:          #635E5A;
  --fg3:          #8a847d;

  /* Brand */
  --primary:         #415a47;
  --primary-hover:   #4A5849;
  --primary-display: #1f3e2e;
  --primary-deep:    #162a20;
  --sage:            #6B8F71;

  /* Borders */
  --border:        #D2CDC4;
  --border-soft:   #E5E0D7;

  /* Effects */
  --shadow-sm: 0 2px 6px rgba(0,0,0,.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 36px rgba(0,0,0,.08);
  --shadow-xl: 0 24px 60px rgba(31,62,46,.18);

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 18px;

  /* Layout */
  --container:    1180px;
  --gutter:       clamp(20px, 4vw, 48px);
  /* Standard section padding — used by most content sections.
     Mobile floor stays at 64px so stacked content keeps room to breathe;
     desktop max comes down so adjacent sections don't double up to 240px. */
  --section-y:    clamp(64px, 8vw, 96px);
  /* Emphatic tier — used by the hero (and reserved for moments that genuinely
     need more weight than a standard section). */
  --section-y-lg: clamp(80px, 10vw, 128px);

  /* Type scale (fluid) */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-md:   1.0625rem;
  --text-lg:   clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  --h4:        clamp(1.0625rem, 0.5vw + 1rem, 1.25rem);
  --h3:        clamp(1.5rem,   1.5vw + 1rem, 2.125rem);
  --h2:        clamp(1.875rem, 2.6vw + 1rem, 3rem);
  --h1:        clamp(2.5rem,   5.2vw + 1rem, 4rem);
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
/* Anchored sections breathe at the top of viewport when scrolled into via nav */
section[id] { scroll-margin-top: 24px; }
/* Skip-link target — main is programmatically focused; no visible ring */
main:focus { outline: none; }

/* ---------- Focus rings (global) ----------
   Visible focus on every keyboard-reachable element. Outline follows
   border-radius in modern browsers, so rounded buttons/links read cleanly. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* On the dark close-CTA, the green outline disappears — use a contrasting tone */
.close-cta a:focus-visible,
.close-cta button:focus-visible {
  outline-color: #A8C9B0;
}
/* Solid pill CTAs read better with a slightly larger gap */
.site-nav__cta:focus-visible,
.mobile-menu__cta:focus-visible {
  outline-offset: 3px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--primary-display);
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: 8px;
  transform: translateY(calc(-100% - 24px));
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}
body {
  font-family: 'Lexend', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--fg);
  background: var(--paper-warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; padding: 0; margin: 0; }
p { margin: 0; }
blockquote { margin: 0; }
cite { font-style: normal; }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  color: var(--primary-display);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
h1 { font-size: var(--h1); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: var(--h2); letter-spacing: -0.025em; }
h3 { font-size: var(--h3); letter-spacing: -0.02em; }
h4 { font-size: var(--h4); letter-spacing: -0.005em; line-height: 1.2; }

em      { font-style: italic; font-weight: 500; color: var(--primary); }
em.dim  { color: var(--fg2); }

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left:  var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section--bordered { border-top: 1px solid var(--border); }
.section--paper {
  background: var(--paper);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section--paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 1000px 400px at 90% 20%, rgba(65,90,71,.06), transparent 60%);
  pointer-events: none;
}
.section--paper > .container { position: relative; }

/* Eyebrow tag — small caps with leading rule */
.eyebrow {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: none;
}
.eyebrow--center { justify-content: center; }
.eyebrow--light  { color: #A8C9B0; }

/* Section head: centered eyebrow → h2 → sub, intro for the grid below. */
.section__head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  margin-bottom: clamp(36px, 5vw, 56px);
  max-width: 1024px;
  margin-left: auto;
  margin-right: auto;
}
.section__head .eyebrow { margin: 0; }
.section__head h2 { margin: 0; }

/* ---------- Image slot pattern ----------
   Every image lives inside a slot element (e.g. .topic__img, .trust__art,
   .phone__card-img). The slot owns aspect ratio / positioning /
   border-radius / overflow:hidden / shadow. The media child fills the slot
   100% × 100% — either a placeholder during foundation, or a real <img> later.

   Foundation markup:
     <div class="topic__img">
       <div class="placeholder-img">IMAGE</div>
     </div>

   Real-image swap (drop-in replacement for the placeholder div):
     <div class="topic__img">
       <img class="media" src="topic-01.jpg"
            srcset="topic-01@1x.jpg 400w, topic-01@2x.jpg 800w"
            sizes="(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw"
            alt="..." loading="lazy" decoding="async">
     </div>

   Use loading="lazy" everywhere except the hero (which is above-the-fold —
   leave its loading attribute off so it loads eagerly).
*/
.placeholder-img,
img.media {
  display: block;
  width: 100%;
  height: 100%;
}
img.media { object-fit: cover; }
.placeholder-img {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.18) 0 14px,
      rgba(0,0,0,0.04) 14px 28px
    ),
    linear-gradient(180deg, #d6d1c5, #c1bbac);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(31,62,46,0.55);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- Site nav ---------- */

.site-nav {
  border-bottom: 1px solid var(--border);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* No outer vertical padding — children carry it. Horizontal padding is the safety rail. */
  padding-left: 12px;
  padding-right: 12px;
  gap: 16px;
}
.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Vertical padding sets the header height; right padding for breathing; zero left so visual sits at rail */
  padding: 16px 12px 16px 0;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--primary-display);
  letter-spacing: -0.01em;
}
.site-nav__brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
/* Right-side group: holds inline links (tablet+), CTA (always), hamburger (mobile) */
.site-nav__end {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Inline links: hidden on phones (replaced by hamburger), revealed at 768+ */
.site-nav__links {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  color: var(--fg2);
}
.site-nav__links a {
  padding: 10px 14px;
  border-radius: 8px;
}
.site-nav__cta {
  padding: 9px 16px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
}
.site-nav__cta:hover { background: var(--primary-hover); }

/* Hamburger button: visible on phones, hidden at 768+ */
.site-nav__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px;            /* expand hit area without shifting layout */
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--primary-display);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.site-nav__menu-btn:hover { background: rgba(0,0,0,0.04); }
.site-nav__menu-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .site-nav__brand { font-size: var(--text-lg); padding: 18px 12px 18px 0; }
  .site-nav__brand img { width: 44px; height: 44px; }
  .site-nav__end { gap: 8px; }
  .site-nav__links { display: flex; }
  .site-nav__links a:hover { color: var(--primary); background: rgba(65,90,71,0.06); }
  .site-nav__menu-btn { display: none; }
}

/* ---------- Mobile menu sheet ----------
   Full-screen overlay shown when the hamburger is tapped. Hidden by
   default via the [hidden] attribute; JS toggles `is-open` to fade in.
   Forced off entirely above the breakpoint where the inline nav appears. */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper-warm);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; }

.mobile-menu__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  padding-top: max(18px, env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.mobile-menu__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--primary-display);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.mobile-menu__close:hover { background: rgba(0,0,0,0.04); }
.mobile-menu__close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mobile-menu__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px var(--gutter) 16px;
}
.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu__list li + li {
  border-top: 1px solid var(--border-soft);
}
.mobile-menu__list a {
  display: block;
  padding: 20px 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-display);
  letter-spacing: -0.01em;
}
.mobile-menu__list--secondary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.mobile-menu__list--secondary li + li {
  border-top: 1px solid var(--border-soft);
}
.mobile-menu__list--secondary a {
  font-size: var(--text-md);
  color: var(--fg2);
  font-weight: 500;
  padding: 16px 4px;
}

.mobile-menu__footer {
  flex: 0 0 auto;
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--paper-warm);
}
.mobile-menu__cta {
  display: block;
  text-align: center;
  padding: 18px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.005em;
  transition: background 0.15s ease;
}
.mobile-menu__cta:hover { background: var(--primary-hover); }

/* Lock body scroll behind the open sheet */
.has-menu-open { overflow: hidden; }

/* Force the sheet off above the breakpoint — defensive for unusual cases
   where it might still be in DOM with state from a narrower viewport */
@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ----------
   Single centered column — eyebrow, title, lede, byline, store badges. */

.hero {
  /* Slightly tighter on top (sits close to nav), full --section-y-lg below
     so the hero settles into a clear pause before the belt. */
  padding-top: clamp(72px, 9vw, 112px);
  padding-bottom: var(--section-y-lg);
  text-align: center;
}
.hero__inner {
  max-width: 1024px;
}
.hero__title {
  margin: 0 auto 18px;
  max-width: 28ch;
}
.hero__lede {
  font-size: var(--text-lg);
  color: var(--fg);
  max-width: 580px;
  margin: 0 auto 14px;
}
.hero__byline {
  margin: 0 0 36px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: calc(var(--text-sm) + 2px);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.01em;
}
.hero .store-badges { justify-content: center; }

/* ---------- Belt (4-up differentiator strip) ----------
   Mobile  : 1-col stack
   Tablet  : 2 x 2
   Desktop : 4 x 1 */

.belt {
  background: var(--primary);
  color: #F0EBDF;
  padding: clamp(36px, 5vw, 48px) 0;
}
.belt__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.belt__item h4 {
  color: #FFFFFF;
  margin: 0 0 6px;
}
.belt__item p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
}
@media (min-width: 1024px) {
  .belt__grid { grid-template-columns: repeat(3, 1fr); gap: 48px; }
}

/* ---------- Trust tile ----------
   Mobile  : stacked [intro → art → body]
   Desktop : 2-col — art spans left column, intro/body stack in right column */

.trust__grid {
  display: grid;
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}
.trust__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.trust__art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 280px;
}
.trust__heading {
  margin: 0 0 18px;
}
.trust__body > p {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 24px;
}
.trust__body > p.trust__sub {
  margin: -4px 0 22px;
  color: var(--fg2);
  font-weight: 500;
  line-height: 1.55;
}
.trust__list {
  list-style: disc;
  padding-left: 22px;
  margin: -8px 0 24px;
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--fg);
}
.trust__list li { margin: 0 0 6px; }
.trust__list li::marker { color: var(--primary); }
.trust__list li:last-child { margin-bottom: 0; }
.trust__caption {
  margin: 0;
  padding: 0 4px;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--fg2);
  text-align: center;
}
.trust__caption em {
  font-style: italic;
  color: var(--primary);
}
@media (min-width: 1024px) {
  .trust__grid {
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas:
      "art intro"
      "art body";
    column-gap: clamp(32px, 5vw, 60px);
    row-gap: 0;
  }
  .trust__art { min-height: 0; aspect-ratio: 5 / 3; }
  .trust__col   { grid-area: art; }
  .trust__intro { grid-area: intro; }
  .trust__body  { grid-area: body; }
}

/* ---------- Walkthrough (steps + phone mockup) ----------
   Mobile  : stacked [intro → phone → steps]
   Desktop : 2-col — intro/steps stack in left column, phone spans right column */

.walkthrough {
  /* Tighter top — the belt above is a lead-in, not a hard break. The belt's
     own bottom padding plus this gives a comfortable connection without
     the section feeling stranded from what introduced it. */
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: var(--section-y);
}
.walkthrough__grid {
  display: grid;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.walkthrough__heading { margin: 0 0 24px; }
.walkthrough__lede {
  font-size: var(--text-lg);
  color: var(--fg);
  margin: 0;
  max-width: 440px;
}
.steps li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 14px;
  font-size: var(--text-md);
  color: var(--fg);
}
.steps li:first-child { border-top: 1px solid var(--border); }
.steps__num {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.06em;
  min-width: 32px;
}
/* Inline flow so the em-dash sits naturally between the bold action and clarifier */
.steps__row strong {
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.005em;
  color: var(--primary-display);
}
.steps__hint {
  color: var(--fg2);
}

/* Phone — fluid, never overflows. Aspect ratio matches a typical phone. */
.walkthrough__phone {
  display: flex;
  justify-content: center;
}
.phone {
  width: 100%;
  max-width: 340px;
  border: 8px solid var(--primary);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.23), 0 18px 40px rgba(0,0,0,0.33);
}
.phone > img {
  display: block;
  width: 100%;
  height: auto;
}
.phone .placeholder-img {
  aspect-ratio: 9 / 16;
}

@media (min-width: 1024px) {
  .walkthrough__grid {
    grid-template-columns: 1fr 1.1fr;
    grid-template-areas:
      "intro phone"
      "steps phone";
    column-gap: clamp(40px, 6vw, 100px);
    row-gap: 32px;
    align-items: center;
  }
  .walkthrough__intro { grid-area: intro; }
  .walkthrough__grid > .steps { grid-area: steps; }
  .walkthrough__phone { grid-area: phone; justify-content: flex-end; }
}

/* ---------- Across the practice (saved-words beat) ----------
   Mirrors the walkthrough's phone-bezel treatment so two consecutive
   sections both show app screens — but flips columns so the visual
   rhythm alternates [text|art] → [art|text].
   Mobile  : stacked [art → text]
   Desktop : 2-col [art | text] (image-left, text-right) */

.features {
  background: var(--paper-warm);
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.features__grid {
  list-style: none;
  padding: 0;
  /* No margin-top — relies on .section__head's margin-bottom so the gap
     between heading and grid matches topics/pricing. */
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  justify-items: center;
}
.features__item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 320px;
  width: 100%;
}
.features__phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}
.features__copy {
  text-align: center;
  font-size: var(--text-md);
  color: var(--fg2);
  margin: 0;
}
@media (min-width: 768px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
  }
  .features__item--peak {
    transform: translateY(-32px);
  }
}

/* ---------- Pricing ----------
   Three tiers as prose-style cards. Bundle gets a subtle accent — border,
   small badge, strikethrough on the bundle math. Visual register stays
   below the trust tile and walkthrough on purpose: pricing is information
   the buyer needs, not a moment that needs visual weight.
   Mobile : 1-col stack
   Tablet+: 3 x 1 */

.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .pricing__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
}

.pricing__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing__card--feature {
  border-color: var(--primary);
  border-width: 2px;
  padding-top: 30px;
}
.pricing__badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--primary);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
}
.pricing__price {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--h3);
  color: var(--primary-display);
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.pricing__name {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary-display);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.pricing__body {
  font-size: var(--text-sm);
  color: var(--fg2);
  line-height: 1.55;
}
.pricing__cta {
  margin-top: clamp(36px, 5vw, 52px);
  text-align: center;
}
.pricing__cta-line {
  font-size: var(--text-md);
  color: var(--fg);
  margin: 0 0 18px;
}
.pricing__footnote {
  text-align: center;
  margin-top: clamp(20px, 3vw, 28px);
  font-size: var(--text-sm);
  color: var(--fg2);
  font-style: italic;
}

/* ---------- Section head text wrapper ----------
   Wraps h2 + sub paragraph. Centered alongside the eyebrow above. */
.section__head-text {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.section__head-sub {
  font-size: var(--text-lg);
  color: var(--fg);
  max-width: 540px;
  margin: 0;
}

/* ---------- Topics (4-up grid) ----------
   Mobile  : 1-col
   Tablet  : 2 x 2
   Desktop : 4 x 1 */

.topics__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.topic {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease;
}
.topic:hover { transform: translateY(-4px); }
.topic__img {
  aspect-ratio: 5 / 4;
  position: relative;
  overflow: hidden;
}
.topic__body { padding: 18px 20px 22px; }
.topic__body h4 { margin: 0 0 6px; }
.topic__body p {
  font-size: var(--text-sm);
  color: var(--fg2);
  line-height: 1.55;
}
@media (min-width: 640px) {
  .topics__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
  .topics__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- FAQ ----------
   Native <details>/<summary> disclosure. Open by default.
   Single column, centered, max-width 720px.
   Chevron rotates on open; respects prefers-reduced-motion via the global
   transition reset. AI-citation friendly: questions phrased as searches and
   indexed by engines even when collapsed. */

.faq {
  max-width: 840px;
  margin: 0 auto;
}
.faq__heading {
  text-align: center;
  margin: 0 0 clamp(36px, 5vw, 56px);
}
.faq__item {
  border-top: 1px solid var(--border);
}
.faq__item:last-of-type {
  border-bottom: 1px solid var(--border);
}
.faq__question {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.0625rem, 0.6vw + 0.95rem, 1.25rem);
  font-weight: 600;
  color: var(--primary-display);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 4px;
  position: relative;
  transition: color 0.15s ease;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover { color: var(--primary); }
.faq__question::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-75%) rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.55;
}
.faq__item[open] .faq__question::after {
  transform: translateY(-25%) rotate(-135deg);
}
.faq__answer {
  padding: 0 40px 22px 4px;
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--fg);
}
.faq__answer p { margin: 0; }
.faq__answer p + p { margin-top: 12px; }

/* ---------- Close CTA (dark) ---------- */

.close-cta {
  background: var(--primary-display);
  color: #F0EBDF;
  padding: var(--section-y) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.close-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 800px 400px at 50% -20%, rgba(168,201,176,0.18), transparent 60%);
  pointer-events: none;
}
.close-cta__inner {
  position: relative;
  max-width: 760px;
  text-align: center;
}
.close-cta__title {
  color: #F0EBDF;
  font-size: var(--h2);
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
.close-cta__sub {
  font-size: var(--text-md);
  color: rgba(240,235,223,0.78);
  /* Mirrors the hero's byline → badges gap (36px) so the closing badges feel
     anchored, not crammed against the line above. */
  margin: 0 0 32px;
}
.close-cta__sub--quiet {
  font-size: var(--text-sm);
  color: rgba(240,235,223,0.62);
  margin-bottom: 28px;
}
.close-cta__disclaimer {
  margin: 48px auto 0;
  font-size: var(--text-xs);
  color: rgba(240,235,223,0.55);
  max-width: 560px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--primary);
  padding: 28px 0;
  font-size: var(--text-xs);
  color: rgba(240, 235, 223, 0.72);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}
.site-footer__links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.site-footer__links a { color: #F0EBDF; }
.site-footer__links a:hover { color: #fff; }
@media (min-width: 640px) {
  .site-footer__inner { flex-direction: row; align-items: center; }
}

/* ---------- Store badges ---------- */

.store-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store-badges--center { justify-content: center; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  background: #000;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-family: 'DM Sans', system-ui, sans-serif;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}
.store-badge svg { flex: none; width: 22px; height: 22px; }
.store-badge__lines {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}
.store-badge__small {
  font-size: 0.625rem;
  opacity: 0.78;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.store-badge__big {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 1px;
}
.close-cta .store-badge {
  background: #F0EBDF;
  color: var(--primary-display);
}

/* ---------- Subpage content (privacy, support) ----------
   Long-form prose used on /privacy and /support. */

.prose {
  max-width: 720px;
}
.prose h1 {
  margin: 0 0 8px;
}
.prose .prose__date {
  color: var(--fg2);
  font-size: 0.94rem;
  margin: 0 0 32px;
}
.prose h2 {
  margin: 32px 0 12px;
  font-size: var(--text-md);
}
.prose h3 {
  margin: 22px 0 10px;
  font-size: 1.05rem;
}
.prose p {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--fg);
}
.prose ul {
  margin: 0 0 1rem;
  padding-left: 24px;
  list-style-type: disc;
}
.prose li {
  margin: 0 0 8px;
  line-height: 1.6;
}
.prose a {
  word-break: break-word;
}

/* ---------- /get redirect page ----------
   Centered icon + tagline + iOS/Android download buttons. */

.get {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 0;
}
.get__icon {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  margin: 0 auto 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.get__title {
  margin: 0 0 12px;
}
.get__tagline {
  color: var(--fg2);
  font-size: 1.06rem;
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.get__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto 24px;
}
.store-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  padding: 12px 22px;
  background: var(--fg);
  color: #fff;
  border-radius: 16px;
  transition: background 120ms ease, transform 120ms ease;
}
.store-button:hover,
.store-button:focus-visible {
  color: #fff;
  background: #000;
  transform: translateY(-1px);
}
.store-button__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.store-button__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.store-button__small {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.85;
  margin-bottom: 3px;
}
.store-button__large {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.1;
}
.get__hint {
  color: var(--fg2);
  font-size: 0.94rem;
  margin: 0;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .topic:hover { transform: none; }
  .store-badge:hover { transform: none; }
}
