/* ==========================================================================
   11 Plus Blocks: page furniture
   ========================================================================== */

/* --- Header ---------------------------------------------------------------
   Glass, like the app's floating menu, and sticky, because the install CTA is
   the point of the site and must never be more than a glance away. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.site-header.is-stuck {
  border-bottom-color: var(--glass-edge);
  box-shadow: 0 4px 24px rgb(78 51 119 / 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  min-height: 68px;
  padding-block: var(--space-2xs);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex: none;
}
.brand:hover { color: var(--purple); }
.brand__mark { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand__name { white-space: nowrap; }
/* 375px is the iPhone SE and mini width, so the wordmark has to survive it.
   Only the very narrowest phones lose it. */
@media (max-width: 340px) { .brand__name { display: none; } }

/* The nav carries .glass because the collapsed mobile panel is a floating
   surface and needs to be one. At desktop width it is just links sitting on
   the header's own glass, so the second frame is stripped off: two nested
   glass panels read as a box drawn round the menu for no reason. */
.site-nav {
  margin-left: auto;
  background: none;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__link {
  display: inline-block;
  padding: 0.55em 0.85em;
  border-radius: var(--radius-pill);
  font-family: var(--font-label);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.site-nav__link:hover { background: var(--wash-strong); color: var(--deep); }
.site-nav__link[aria-current="page"] { color: var(--deep); background: var(--wash-strong); }

.site-header__actions { display: flex; align-items: center; gap: var(--space-2xs); flex: none; }

/* Only the collapsed mobile panel needs its own install button. */
.site-nav__cta { display: none; }

/* Theme toggle: the app offers System / Light / Dark in Settings, so the site
   does too rather than locking a reader into their OS setting. */
.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover { background: var(--wash-strong); color: var(--deep); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: block; }
}

/* Mobile menu ------------------------------------------------------------- */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--deep);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .site-header__cta { display: none; }
  /* Now it IS a floating surface, so the glass goes back on. */
  .site-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    margin: 0;
    padding: var(--space-s) var(--page-pad) var(--space-m);
    background: var(--surface);
    border-bottom: 1px solid var(--glass-edge);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform var(--dur) var(--ease-out), visibility var(--dur);
  }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-nav {
      background:
        linear-gradient(var(--glass-accent), var(--glass-accent)),
        var(--glass-tint);
      -webkit-backdrop-filter: saturate(180%) blur(20px);
      backdrop-filter: saturate(180%) blur(20px);
    }
  }
  .site-nav.is-open { transform: translateY(0); visibility: visible; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav__link { padding: 0.8em 1em; border-radius: var(--radius-row); font-size: 1.05rem; }
  .site-nav__cta { display: block; margin-top: var(--space-xs); }
}

/* --- Hero -----------------------------------------------------------------
   Two columns on desktop, stacked on a phone with the copy first: the
   headline has to land before anything has to load. */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 1.5rem + 6vw, 5.5rem) clamp(3rem, 2rem + 5vw, 5rem);
  overflow: hidden;
}
.hero::before {
  /* A soft lavender bloom behind the copy. Decorative only. */
  content: "";
  position: absolute;
  inset: -30% 40% 30% -20%;
  background: radial-gradient(closest-side, var(--wash-strong), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}
.hero h1 { font-size: var(--step-6); margin-bottom: var(--space-s); }
.hero__lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 32rem; }
.hero__art { display: grid; place-items: center; position: relative; }

/* Trust strip: the three facts a parent needs before they will tap. */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  margin-top: var(--space-m);
  padding: 0;
  list-style: none;
}
.trust li {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0;
  font-family: var(--font-label);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink-soft);
}
.trust svg { width: 18px; height: 18px; color: var(--correct); flex: none; }

/* --- Section headers ------------------------------------------------------ */
.section-head { max-width: 44rem; margin-bottom: var(--space-l); }
.section-head.centred { margin-inline: auto; }

/* --- Steps ---------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps > li { counter-increment: step; margin: 0; }
.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--chrome);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  box-shadow: var(--shadow-sm);
}
.steps h3 { font-size: var(--step-1); margin-bottom: 0.3em; }
.steps p { color: var(--ink-soft); margin: 0; }

/* --- Final call ----------------------------------------------------------- */
.final-cta {
  border-radius: var(--radius-tile);
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  text-align: center;
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--purple) 16%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--hairline-2);
  box-shadow: var(--shadow-md);
}
.final-cta h2 { font-size: var(--step-4); }
.final-cta .lede { margin-inline: auto; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  margin-top: var(--space-2xl);
  padding-block: var(--space-xl) var(--space-m);
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}
.site-footer__grid {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  margin-bottom: var(--space-xl);
}
.site-footer__brand { grid-column: 1 / -1; }
@media (min-width: 720px) { .site-footer__brand { grid-column: auto; max-width: 22rem; } }

.site-footer h2 {
  font-family: var(--font-label);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: var(--space-xs);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5em; }
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-footer a:hover { color: var(--purple); text-decoration: underline; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-m);
  border-top: 1px solid var(--hairline);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Clear the sticky mobile CTA so the footer's last row is never trapped
   underneath it: the app reserves Brand.Metrics.menuClearance for the same
   reason. */
@media (max-width: 859px) {
  body.has-sticky-cta .site-footer { padding-bottom: 6rem; }
}

/* --- Prose (legal pages, blog posts) -------------------------------------- */
.prose { max-width: 42rem; }
.prose h2 { font-size: var(--step-3); margin-top: var(--space-xl); }
.prose h3 { font-size: var(--step-2); margin-top: var(--space-l); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { margin-bottom: var(--space-s); }
.prose img { border-radius: var(--radius-card); margin-block: var(--space-m); }

/* --- Breadcrumbs ---------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  list-style: none;
  margin: 0 0 var(--space-m);
  padding: 0;
  font-family: var(--font-label);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.crumbs li { margin: 0; display: flex; gap: 0.4em; align-items: center; }
.crumbs li + li::before { content: "›"; color: var(--ink-faint); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--purple); text-decoration: underline; }

/* --- Reveal on scroll ----------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
