/* =================================================================
   Georgisme — "literary journal beside a bonfire"
   Design tokens + component styles
   ================================================================= */

:root {
  /* Colors */
  --color-parchment: #fefffc;
  --color-paper: #ffffff;
  --color-linen: #f9faf7;
  --color-ink-black: #171717;
  --color-graphite: #2c2c2c;
  --color-charcoal: #444141;
  --color-ash: #646464;
  --color-fog: #b4b8b4;
  --color-mist: #dee2de;
  --color-twilight: #282834;
  --color-dusk: #1f1f29;
  --color-signal-blue: #41a1cf;
  --color-cerulean: #0081c0;

  /* Typography — families (Fraunces/Inter substitute the proprietary ppmondwest/af) */
  --font-ppmondwest: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-af:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;

  /* Typography — scale */
  --text-caption: 13px;
  --leading-caption: 1.3;
  --tracking-caption: -0.13px;
  --text-body-sm: 15px;
  --leading-body-sm: 1;
  --tracking-body-sm: -0.15px;
  --text-subheading: 18px;
  --leading-subheading: 1.3;
  --tracking-subheading: -0.18px;
  --text-heading-sm: 27px;
  --leading-heading-sm: 1.3;
  --tracking-heading-sm: -1.08px;
  --text-heading: 40px;
  --leading-heading: 1.1;
  --tracking-heading: -0.8px;
  --text-heading-lg: 48px;
  --leading-heading-lg: 1.1;
  --tracking-heading-lg: -0.96px;
  --text-display: 54px;
  --leading-display: 1.1;
  --tracking-display: -1.08px;

  /* Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-48: 48px;
  --spacing-64: 64px;
  --spacing-80: 80px;

  /* Layout */
  --page-max-width: 1200px;

  /* Radii */
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 50px;

  /* Shadows */
  --shadow-sm: rgba(0, 0, 0, 0.15) 0px 2px 6px 0px;
  --shadow-subtle:
    rgba(0, 0, 0, 0.08) 0px 1px 1px 0px, rgba(0, 0, 0, 0.08) 0px 4px 5px 0px;
  --shadow-subtle-2: rgb(222, 226, 222) 0px 0px 0px 1px;
  --shadow-subtle-3:
    rgba(0, 0, 0, 0.06) 0px 2px 2px 0px, rgba(0, 0, 0, 0.04) 0px 0px 0px 5px;
  --shadow-sm-2: rgba(0, 0, 0, 0.05) 0px 1px 8px 0px;
}

/* -----------------------------------------------------------------
   Reset / base
   ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-af);
  font-weight: var(--font-weight-regular);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--color-charcoal);
  background-color: var(--color-parchment);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* -----------------------------------------------------------------
   Typography helpers
   ----------------------------------------------------------------- */
.serif {
  font-family: var(--font-ppmondwest);
  font-weight: var(--font-weight-regular);
  font-optical-sizing: auto;
}

.display {
  font-family: var(--font-ppmondwest);
  font-weight: var(--font-weight-regular);
  font-size: clamp(34px, 6vw, var(--text-display));
  line-height: var(--leading-display);
  letter-spacing: -0.02em;
  color: var(--color-graphite);
}

.heading-lg {
  font-family: var(--font-ppmondwest);
  font-weight: var(--font-weight-regular);
  font-size: clamp(30px, 5vw, var(--text-heading-lg));
  line-height: var(--leading-heading-lg);
  letter-spacing: -0.02em;
  color: var(--color-graphite);
}

.heading {
  font-family: var(--font-ppmondwest);
  font-weight: var(--font-weight-regular);
  font-size: clamp(27px, 4vw, var(--text-heading));
  line-height: var(--leading-heading);
  letter-spacing: -0.02em;
  color: var(--color-graphite);
}

.heading-sm {
  font-family: var(--font-ppmondwest);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-heading-sm);
  line-height: var(--leading-heading-sm);
  letter-spacing: -0.03em;
  color: var(--color-graphite);
}

.subheading {
  font-family: var(--font-af);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  letter-spacing: var(--tracking-subheading);
  color: var(--color-graphite);
}

.lead {
  font-size: var(--text-subheading);
  line-height: 1.5;
  color: var(--color-ash);
}

.eyebrow {
  font-family: var(--font-af);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ash);
}

.muted {
  color: var(--color-ash);
}

/* -----------------------------------------------------------------
   Layout primitives
   ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--spacing-24);
}

.section {
  position: relative;
  min-height: 100vh;
  /* dvh tracks the mobile browser's actual visible area as its toolbar
     collapses/expands; without it, section (and therefore scroll-snap)
     boundaries shift under the user mid-scroll. */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(var(--spacing-64), 10vh, 120px);
}

.section--paper {
  background-color: var(--color-paper);
}

.stack > * + * {
  margin-top: var(--spacing-16);
}

/* -----------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  font-family: var(--font-af);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-body-sm);
  line-height: 1;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: transparent;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn__arrow {
  transition: transform 0.25s ease;
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* Primary outlined — Signal Blue border-only. Never filled. */
.btn--primary {
  color: var(--color-signal-blue);
  border-color: var(--color-signal-blue);
  padding: 6px 8px 6px 14px;
}
.btn--primary:hover {
  background-color: rgba(65, 161, 207, 0.08);
}
.btn--primary .btn__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-signal-blue);
}

/* Secondary outlined — Twilight border */
.btn--secondary {
  color: var(--color-twilight);
  border-color: var(--color-twilight);
  padding: 6px 14px;
}
.btn--secondary:hover {
  background-color: rgba(40, 40, 52, 0.06);
}

/* Filled dark — the sole filled button, footer only */
.btn--filled {
  color: #fff;
  background-color: var(--color-dusk);
  border-color: var(--color-twilight);
  padding: 10px 18px;
}
.btn--filled:hover {
  background-color: #14141c;
}

/* Ghost text link */
.link-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  font-size: 16px;
  color: var(--color-charcoal);
  transition: color 0.2s ease;
}
.link-ghost:hover {
  color: var(--color-twilight);
}
.link-ghost svg {
  transition: transform 0.2s ease;
}
.link-ghost:hover svg {
  transform: translateX(3px);
}

/* -----------------------------------------------------------------
   Navigation pill
   ----------------------------------------------------------------- */
.nav {
  position: fixed;
  top: var(--spacing-20);
  left: 0;
  right: 0;
  margin-inline: auto;
  width: fit-content;
  /* Centered via inset+margin rather than left:50%/transform: mobile Safari
     can fail to keep a position:fixed + backdrop-filter element pinned
     during momentum scroll when it also carries a transform, causing it to
     visually clip/hide for a frame. Its own compositing layer (below)
     covers the rest. */
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--spacing-20);
  padding: 8px 8px 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.7);
  /* light frosted pill so the emblem stays legible over the hero */
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: var(--shadow-sm);
  will-change: transform;
  transform: translateZ(0);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
  max-width: calc(100vw - 32px);
}
/* Over white content: raise fill for a more solid pill */
.nav.scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--color-mist);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  color: var(--color-twilight);
  flex-shrink: 0;
}
.nav.scrolled .nav__brand {
  color: var(--color-twilight);
}
.nav__logo {
  width: 30px;
  height: 30px;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav__brand:hover .nav__logo {
  transform: rotate(-8deg) scale(1.08);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--spacing-20);
  list-style: none;
}
.nav__links a {
  font-family: var(--font-af);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-body-sm);
  color: var(--color-charcoal);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav__links a:hover {
  color: var(--color-signal-blue);
}

/* Nav CTA uses the neutral theme ink, not the blue accent */
.nav .btn--primary {
  color: var(--color-twilight);
  border-color: var(--color-twilight);
}
.nav .btn--primary:hover {
  background-color: rgba(40, 40, 52, 0.06);
}
.nav .btn--primary .btn__arrow {
  border-color: var(--color-twilight);
}

.nav__toggle {
  display: none;
}

/* -----------------------------------------------------------------
   Hero
   ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: var(--spacing-24);
  overflow: hidden;
  /* Fallback atmosphere behind the sourced illustration */
  background:
    radial-gradient(
      120% 90% at 70% 10%,
      rgba(65, 161, 207, 0.25),
      transparent 60%
    ),
    linear-gradient(180deg, #1a2740 0%, #24344f 40%, #3a4a63 100%);
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Dark transparent overlay: darker toward the bottom-left where the card sits */
  background:
    linear-gradient(
      180deg,
      rgba(12, 15, 26, 0.45) 0%,
      rgba(12, 15, 26, 0.2) 32%,
      rgba(12, 15, 26, 0.55) 78%,
      rgba(12, 15, 26, 0.82) 100%
    ),
    linear-gradient(
      75deg,
      rgba(12, 15, 26, 0.55) 0%,
      rgba(12, 15, 26, 0) 55%
    );
}
.hero__card {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: var(--spacing-32);
  border-radius: var(--radius-3xl);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
}
.hero__card .display {
  color: #fff;
}
.hero__eyebrow {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--spacing-16);
}
.hero__sub {
  margin-top: var(--spacing-16);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-subheading);
  line-height: 1.5;
}
.hero__actions {
  margin-top: var(--spacing-24);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
}
.hero__card .btn--primary {
  color: #fff;
  border-color: #fff;
}
.hero__card .btn--primary .btn__arrow {
  border-color: #fff;
}

/* -----------------------------------------------------------------
   Section header
   ----------------------------------------------------------------- */
.section__head {
  max-width: 760px;
  margin-bottom: var(--spacing-48);
}
.section__head .eyebrow {
  margin-bottom: var(--spacing-16);
}
.section__head .lead {
  margin-top: var(--spacing-20);
}

/* -----------------------------------------------------------------
   Cards
   ----------------------------------------------------------------- */
.card {
  background: var(--color-paper);
  border: 1px solid var(--color-mist);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-subtle);
  padding: var(--spacing-24);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow:
    rgba(0, 0, 0, 0.1) 0px 14px 30px -10px,
    rgba(0, 0, 0, 0.06) 0px 4px 8px;
  border-color: var(--color-fog);
}

.grid {
  display: grid;
  gap: var(--spacing-24);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Point cards (Le problème) */
.point__title {
  margin-bottom: var(--spacing-8);
}
.point p {
  color: var(--color-charcoal);
}

/* Advantage cards */
.adv {
  position: relative;
  padding-top: var(--spacing-24);
}
.adv__num {
  font-family: var(--font-ppmondwest);
  font-weight: var(--font-weight-medium);
  font-size: 40px;
  line-height: 1;
  color: var(--color-graphite);
}
.adv__rule {
  height: 1px;
  background: var(--color-mist);
  margin: var(--spacing-12) 0 var(--spacing-16);
}
.adv__title {
  margin-bottom: var(--spacing-12);
}
.adv p {
  color: var(--color-charcoal);
  font-size: var(--text-body-sm);
  line-height: 1.6;
}
.adv__cite {
  display: block;
  margin-top: var(--spacing-12);
  font-size: var(--text-caption);
  color: var(--color-ash);
}

/* -----------------------------------------------------------------
   Immersive full-bleed illustrated sections
   ----------------------------------------------------------------- */
.section--immersive {
  position: relative;
  padding: 0;
  overflow: hidden;
  justify-content: center;
  /* fallback atmosphere behind the illustration */
  background: linear-gradient(160deg, #1c2431 0%, #2a3444 60%, #3a4657 100%);
}
.immersive__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.06);
  transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.section--immersive.in-view .immersive__img {
  transform: scale(1);
}
.immersive__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(12, 15, 22, 0.72) 0%,
    rgba(12, 15, 22, 0.35) 55%,
    rgba(12, 15, 22, 0.15) 100%
  );
}
.immersive__scrim--deep {
  background:
    linear-gradient(
      180deg,
      rgba(10, 13, 20, 0.45) 0%,
      rgba(10, 13, 20, 0.3) 45%,
      rgba(10, 13, 20, 0.6) 100%
    ),
    radial-gradient(
      70% 90% at 50% 50%,
      rgba(10, 13, 20, 0.25),
      rgba(10, 13, 20, 0.6) 100%
    );
}
.immersive__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
}
.immersive__inner--center {
  justify-content: center;
  text-align: center;
}

/* Frosted glass card used on immersive sections */
.glass-card {
  max-width: 640px;
  padding: clamp(var(--spacing-24), 4vw, 48px);
  border-radius: var(--radius-3xl);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  box-shadow: rgba(0, 0, 0, 0.18) 0px 8px 40px -12px;
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    background-color 0.4s ease,
    border-color 0.4s ease;
}
.glass-card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}
.glass-card--center {
  max-width: 860px;
  text-align: center;
}
.glass-card .heading,
.glass-card .heading-lg {
  color: #fff;
}
.glass-card p {
  margin-top: var(--spacing-16);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
}
.glass-card--center p {
  font-size: var(--text-subheading);
}

/* -----------------------------------------------------------------
   Mechanism (6+6 split with diagram)
   ----------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--spacing-48);
  align-items: center;
}
.split__text .principe {
  font-family: var(--font-ppmondwest);
  font-size: var(--text-heading-sm);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--color-graphite);
}
.split__text .principe strong {
  font-weight: var(--font-weight-medium);
}
.split__text p {
  margin-top: var(--spacing-16);
  color: var(--color-charcoal);
}
.diagram-card {
  background: var(--color-linen);
  border: 1px solid var(--color-mist);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm-2);
  overflow: hidden;
  transition:
    opacity 0.75s cubic-bezier(0.2, 0.75, 0.3, 1),
    box-shadow 0.35s ease,
    transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.diagram-card:hover {
  transform: translateY(-4px);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 14px 32px -12px;
}
.diagram-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.diagram-card:hover img {
  transform: scale(1.03);
}

/* -----------------------------------------------------------------
   Objections (Q&A)
   ----------------------------------------------------------------- */
.qa {
  border-top: 1px solid var(--color-mist);
  padding: var(--spacing-24) 0;
}
.qa__q {
  margin-bottom: var(--spacing-8);
}
.qa__a {
  color: var(--color-charcoal);
  max-width: 760px;
}

/* -----------------------------------------------------------------
   Resources
   ----------------------------------------------------------------- */
.res-card {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
  height: 100%;
}
.res-card__label {
  margin-top: auto;
}

/* -----------------------------------------------------------------
   Footer
   ----------------------------------------------------------------- */
.footer {
  background: var(--color-paper);
  border-top: 1px solid var(--color-mist);
  padding-block: clamp(var(--spacing-64), 9vw, 80px);
}
.footer__statement {
  max-width: 820px;
  margin-bottom: var(--spacing-48);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--spacing-32);
  align-items: end;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-24);
  list-style: none;
}
.footer__links a {
  font-size: var(--text-body-sm);
  color: var(--color-ash);
  transition: color 0.2s ease;
}
.footer__links a:hover {
  color: var(--color-twilight);
}
.footer__colophon {
  font-size: var(--text-caption);
  color: var(--color-fog);
}

/* -----------------------------------------------------------------
   Cookie banner
   ----------------------------------------------------------------- */
.cookie {
  position: fixed;
  right: var(--spacing-20);
  bottom: var(--spacing-20);
  z-index: 200;
  max-width: 360px;
  background: var(--color-paper);
  border: 1px solid var(--color-mist);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-subtle);
  padding: var(--spacing-16);
  font-size: var(--text-caption);
  color: var(--color-charcoal);
  display: flex;
  align-items: center;
  gap: var(--spacing-12);
}
.cookie[hidden] {
  display: none;
}
.cookie__text {
  flex: 1;
  line-height: 1.4;
}
.cookie__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
}
.cookie__actions .divider {
  width: 1px;
  height: 16px;
  background: var(--color-mist);
}
.cookie__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-af);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-caption);
  color: var(--color-charcoal);
  padding: 2px 4px;
}
.cookie__btn:hover {
  color: var(--color-signal-blue);
}

/* -----------------------------------------------------------------
   Reveal-on-scroll — the elements of each section animate in, one after
   another, as the section enters the viewport. Motion direction varies by
   element type for a livelier feel. Per-element stagger comes from --d,
   assigned in main.js. Hidden state is gated on .js (set before first
   paint) so content stays visible if scripts fail to load.
   ----------------------------------------------------------------- */

/* transition setup for reveal targets (delay driven by --d) */
.section__head > *,
.qa,
.glass-card > *,
.split__text,
.footer__statement,
.footer__grid {
  transition-property: opacity, transform;
  transition-duration: 0.75s;
  transition-timing-function: cubic-bezier(0.2, 0.75, 0.3, 1);
  transition-delay: var(--d, 0ms);
}
/* cards & diagram already carry their own (hover-aware) transitions —
   only add the stagger delay so their hover shadows still animate */
.grid > *,
.diagram-card {
  transition-delay: var(--d, 0ms);
}

/* hidden pre-reveal states — only while JS active and section not in view */
.js .section:not(.in-view) .section__head > *,
.js .section:not(.in-view) .qa,
.js .section:not(.in-view) .glass-card > *,
.js .footer:not(.in-view) .footer__statement,
.js .footer:not(.in-view) .footer__grid {
  opacity: 0;
  transform: translateY(34px);
}
.js .section:not(.in-view) .grid > * {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
}
.js .section:not(.in-view) .split__text {
  opacity: 0;
  transform: translateX(-48px);
}
.js .section:not(.in-view) .diagram-card {
  opacity: 0;
  transform: translateX(48px) scale(0.97);
}

/* cards keep their richer hover transition (defined with .card); we only
   add the stagger delay and cancel it on hover so lifts feel instant */
.card:hover,
.diagram-card:hover {
  transition-delay: 0s;
}

/* -----------------------------------------------------------------
   Scroll snapping — gentle everywhere, including mobile (proximity
   never traps). Sections size with dvh precisely so their snap
   boundaries don't shift as the mobile toolbar collapses mid-scroll.
   ----------------------------------------------------------------- */
html {
  scroll-snap-type: y proximity;
}
.hero,
.section,
.footer {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* Extra hover affordances */
.nav__links a {
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s ease;
}
.nav__links a:hover::after {
  right: 0;
}
.footer__links a {
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}
.footer__links a:hover {
  transform: translateY(-1px);
}

/* -----------------------------------------------------------------
   Scroll cue — a subtle bouncing down-arrow at the bottom of each
   section that smoothly scrolls to the next one (injected in main.js)
   ----------------------------------------------------------------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 2.4vh, 26px);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  color: var(--color-ash);
  opacity: 0.55;
  transition:
    opacity 0.25s ease,
    color 0.25s ease,
    background-color 0.25s ease;
  animation: cueBounce 2.4s ease-in-out infinite;
}
.scroll-cue:hover {
  opacity: 1;
  color: var(--color-twilight);
  background-color: rgba(40, 40, 52, 0.06);
}
.scroll-cue--light {
  color: rgba(255, 255, 255, 0.85);
}
.scroll-cue--light:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.14);
}
@keyframes cueBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue {
    animation: none;
    transform: translateX(-50%);
  }
}

/* -----------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------- */
@media (max-width: 768px) {
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
    gap: var(--spacing-32);
  }
  .nav {
    gap: var(--spacing-12);
    padding: 8px 8px 8px 14px;
  }
  .nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-16);
    padding: var(--spacing-16) var(--spacing-20);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-mist);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-subtle);
  }
  .nav__links.open {
    display: flex;
  }
  .nav__links a {
    color: var(--color-charcoal);
  }
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-mist);
    background: transparent;
    cursor: pointer;
    color: var(--color-twilight);
  }
  .nav__toggle-line {
    transform-box: fill-box;
    transform-origin: center;
    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }
  .nav__toggle--open .nav__toggle-line--top {
    transform: translateY(5px) rotate(45deg);
  }
  .nav__toggle--open .nav__toggle-line--mid {
    opacity: 0;
  }
  .nav__toggle--open .nav__toggle-line--bottom {
    transform: translateY(-5px) rotate(-45deg);
  }
  .hero {
    /* extra clearance so the CTA isn't hidden behind the fixed cookie banner */
    padding-bottom: 154px;
  }
  .hero__card {
    padding: var(--spacing-24);
  }
  .cookie {
    left: var(--spacing-16);
    right: var(--spacing-16);
    max-width: none;
  }
}

/* -----------------------------------------------------------------
   Reduced motion
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  /* never leave reveal content hidden when motion is reduced */
  .js .section .section__head > *,
  .js .section .grid > *,
  .js .section .qa,
  .js .section .split__text,
  .js .section .diagram-card,
  .js .section .glass-card > *,
  .js .footer .footer__statement,
  .js .footer .footer__grid,
  .section--immersive .immersive__img {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--color-signal-blue);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}
