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

/* ---------- Fonts ----------
   Moulin (Commercial Type, licensed) is the brand: the logotype, campaign
   lines, titles. Inter in its one weight, Medium, carries the information.
   Only Inter 500 is loaded and font-synthesis is off, so any other weight
   still renders Medium and nothing is ever faked. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 500; font-display: swap; src: url('/fonts/inter/inter-latin-500-italic.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter/inter-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 500; font-display: swap; src: url('/fonts/inter/inter-latin-ext-500-italic.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Moulin'; font-style: normal; font-weight: 250; font-display: swap; src: url('/fonts/moulin/Moulin-Thin.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: italic; font-weight: 250; font-display: swap; src: url('/fonts/moulin/Moulin-ThinItalic.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/moulin/Moulin-Light.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: italic; font-weight: 300; font-display: swap; src: url('/fonts/moulin/Moulin-LightItalic.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/moulin/Moulin-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/moulin/Moulin-RegularItalic.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/moulin/Moulin-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: italic; font-weight: 500; font-display: swap; src: url('/fonts/moulin/Moulin-MediumItalic.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/moulin/Moulin-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: italic; font-weight: 700; font-display: swap; src: url('/fonts/moulin/Moulin-BoldItalic.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: normal; font-weight: 900; font-display: swap; src: url('/fonts/moulin/Moulin-Black.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: italic; font-weight: 900; font-display: swap; src: url('/fonts/moulin/Moulin-BlackItalic.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: normal; font-weight: 950; font-display: swap; src: url('/fonts/moulin/Moulin-Super.woff2') format('woff2'); }
@font-face { font-family: 'Moulin'; font-style: italic; font-weight: 950; font-display: swap; src: url('/fonts/moulin/Moulin-SuperItalic.woff2') format('woff2'); }

/* ---------- Tokens ----------
   The brand's five colours. Beige carries the information, orange the
   energy, burgundy and mauve the emotion. Text goes on a background in one of
   the brand's pairings only: charcoal on beige, orange on bourgogne,
   bourgogne on orange, lilac on mauve, mauve on lilac. Two backgrounds per
   piece at most; orange is never running text; mauve and bourgogne never
   meet. This page is beige and bourgogne, so mauve and lilac stay off it. */
:root {
  /* Brand colours, as in design/src/styles.css (@theme). */
  --beige: #f6efe5;
  --charcoal: #121212;
  --orange: #ff5500;
  --burgundy: #5f1b25;
  --lilac: #d6b6dd;
  --mauve: #392059;

  /* Charcoal on beige is the page's one pairing for information, so every
     softer text colour and rule is charcoal at an opacity, never a new brown. */
  --bg: var(--beige);
  --ink: var(--charcoal);
  --ink-2: rgb(18 18 18 / 0.8);     /* body copy */
  --muted: rgb(18 18 18 / 0.62);    /* secondary lines, eyebrows */
  --mute-line: rgb(18 18 18 / 0.32); /* quiet strokes and separators */
  --line: rgb(18 18 18 / 0.12);     /* hairlines and borders */
  --wash: rgb(18 18 18 / 0.05);     /* hover, selected, and well surfaces */
  --shadow-card: 0 2px 8px rgb(18 18 18 / 0.06);
  --shadow-menu: 0 8px 32px rgb(18 18 18 / 0.1);

  /* Type: two Moulin sizes (the campaign line, titles) and three Inter sizes
     (lead, body, small). Every rule picks one of these five; the sample book
     inside the Reader keeps its own typography. */
  --brand: "Moulin", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-display: clamp(2.5rem, 6.5vw, 4.75rem);
  --text-title: clamp(1.75rem, 4.2vw, 2.85rem);
  --text-lead: clamp(1.2rem, 2vw, 1.5rem);
  --text-body: 1.0625rem;   /* 17px */
  --text-small: 0.875rem;   /* 14px */

  /* Radius (design/src/styles.css): control 10, panel 12, tile 14, pill 20. */
  --radius-control: 10px;
  --radius-panel: 12px;
  --radius-tile: 14px;
  --radius-pill: 20px;

  /* The grid: twelve columns, 60px margins and 24px gutters on a 1920 screen.
     The margin shrinks with the screen below that. Content spans eight
     columns (1192px); a block of text at most five (736px). */
  --grid-margin: clamp(1rem, 4.2vw, 60px);
  --grid-gutter: 24px;
  --container: 1192px;
  --prose: 736px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  font-weight: 500;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-size: var(--text-body);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

/* ---------- Scroll progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 60;
}

@supports (animation-timeline: scroll(root)) {
  .progress-bar {
    animation: progress-grow linear;
    animation-timeline: scroll(root);
  }
}

@keyframes progress-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar { animation: none; }
}

/* ---------- Site sticky top (header + optional banner) ---------- */
/* Wrapping the header + banner in one sticky block means they pin together
   under the viewport, with the banner below the nav row. */
.site-sticky-top {
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-banner {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem var(--grid-margin);
  text-align: center;
  font-size: var(--text-small);
  color: var(--ink-2);
}

.site-banner p {
  margin: 0;
  max-width: 720px;
  margin-inline: auto;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .site-banner {
    padding: 0.5rem 1rem;
    font-size: var(--text-small);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--grid-margin);
  background: rgb(246 239 229 / 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 21px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  width: 28px;
  height: 28px;
  display: block;
}

/* The logotype: charcoal on beige, never narrower than 120px. The gap to the
   icon is its clear space, the height of its V. */
.brand-logotype {
  width: 120px;
  height: auto;
  display: block;
  fill: currentColor;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--text-small);
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 150ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav .nav-signin {
  font-size: var(--text-small);
  color: var(--ink-2);
  white-space: nowrap;
}

.site-nav .nav-cta {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  background: var(--wash);
  color: var(--ink);
}

.lang-switch {
  position: relative;
}

/* Hide the default <details> marker so the summary can be styled as a chip. */
.lang-switch > summary { list-style: none; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary::marker { content: ''; }

/* Chip is flat by default: just the flag + arrow. Border shows on hover so
   it announces itself as an affordance only when the user is near it. */
.lang-switch-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.lang-switch[open] > .lang-switch-button,
.lang-switch-button:hover,
.lang-switch-button:focus-visible {
  background: var(--wash);
  border-color: var(--line);
  color: var(--ink);
}

/* Shared flag styling — every flag is rendered into the exact same 18×12 box
   regardless of its source aspect ratio. `object-fit: cover` crops slightly so
   the three look visually identical in size (Canada 2:1 loses a hair on the
   sides; Quebec 3:2 fits exactly; Haudenosaunee 5:3 loses a hair too). */
.lang-switch-flag {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line);
  object-fit: cover;
  object-position: center;
}

.lang-switch-chev {
  width: 11px;
  height: 11px;
  display: block;
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform 200ms ease, opacity 160ms ease;
}

.lang-switch[open] .lang-switch-chev,
.lang-switch-button:hover .lang-switch-chev,
.lang-switch-button:focus-visible .lang-switch-chev {
  opacity: 1;
}

.lang-switch[open] .lang-switch-chev {
  transform: rotate(180deg);
}

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--bg);
  box-shadow: var(--shadow-menu);
  z-index: 60;
  animation: lang-menu-in 180ms cubic-bezier(.2,.7,.2,1);
  transform-origin: top right;
}

@keyframes lang-menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.lang-switch-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-control);
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--text-body);
  font-weight: 400;
  letter-spacing: 0;
  transition: background-color 150ms ease, color 150ms ease;
}

.lang-switch-item-name {
  flex: 1;
  min-width: 0;
}

.lang-switch-item-price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lang-switch-item-price-symbol {
  font-size: var(--text-body);
}

.lang-switch-item-price-code {
  font-size: var(--text-small);
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  line-height: 1;
}

.lang-switch-item:hover,
.lang-switch-item:focus-visible {
  background: var(--wash);
  color: var(--ink);
}

.lang-switch-item.is-active {
  color: var(--ink);
  font-weight: 500;
  background: var(--wash);
}

@media (max-width: 560px) {
  .site-header { gap: 0.5rem; }
  .site-nav { gap: 0.5rem; }
  .site-nav > a:not(.nav-cta) { display: none; }
  .site-nav .nav-cta { padding: 0.35rem 0.7rem; font-size: var(--text-small); }
  .brand-logo { width: 22px; height: 22px; }
  .lang-switch-button { padding: 0.4rem 0.45rem; }
  .lang-switch-menu { min-width: 220px; right: -8px; }
}

@media (max-width: 360px) {
  .brand-logotype { display: none; }
}

/* ---------- Sections ---------- */
section {
  padding: clamp(4.5rem, 10vw, 9rem) var(--grid-margin);
  scroll-margin-top: 64px;
}

.section-head {
  max-width: var(--prose);
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.eyebrow {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

/* Moulin: Bold for the campaign line (h1), Regular for titles. Leading 1.05
   to 1.15, letter-spacing zero, never capitals. */
.display {
  font-family: var(--brand);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  text-wrap: balance;
  font-variant-ligatures: no-common-ligatures;
}

h1.display {
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0.4rem 0 1rem;
}

h2.display {
  font-size: var(--text-title);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

p {
  text-wrap: pretty;
}

.lede {
  color: var(--muted);
  font-size: var(--text-lead);
  line-height: 1.5;
  max-width: 48ch;
  margin: 0 auto;
}

.prose {
  max-width: var(--prose);
  margin: 0 auto;
  text-align: center;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(3rem, 8vw, 5rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.hero h1 {
  max-width: 16ch;
}

.hero-wave {
  width: clamp(280px, 60vw, 560px);
  margin: clamp(2rem, 5vw, 3rem) auto clamp(2.5rem, 6vw, 4rem);
  color: var(--ink);
}

.hero-wave svg {
  width: 100%;
  height: auto;
}

.wave rect {
  transform: scaleY(0.05);
  transform-origin: 50% 50%;
  transform-box: fill-box;
  animation: wave-grow 720ms cubic-bezier(.2,.8,.2,1) backwards;
  animation-delay: calc(var(--i, 0) * 22ms + 200ms);
}

@keyframes wave-grow {
  0%   { transform: scaleY(0.05); opacity: 0; }
  60%  { transform: scaleY(1.08); opacity: 1; }
  100% { transform: scaleY(1);    opacity: 1; }
}

/* After the load animation, JS drives per-bar transforms each frame
   to simulate speech amplitude. Disable the load animation so JS
   transforms aren't fought by it. */
.wave.is-ready rect {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .wave rect { animation: none; transform: none; }
  .wave.is-ready rect { transform: none; }
}

.cta-row {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.45rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-body);
  font-weight: 500;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
  border: 1px solid transparent;
}

.cta-primary {
  background: var(--orange);
  color: var(--burgundy);
}

.cta-primary:hover,
.cta-primary:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cta-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.cta-large {
  padding: 0.95rem 1.85rem;
  font-size: var(--text-body);
}

/* ---------- Problem (inverted) ---------- */
/* Bourgogne carries orange: the campaign line and its short accent, nothing
   longer. */
.problem {
  background: var(--burgundy);
  color: var(--orange);
  padding-block: clamp(6rem, 14vw, 11rem);
}

.problem .prose { color: var(--orange); }

.problem-line {
  font-family: var(--brand);
  font-weight: 700;
  font-size: var(--text-display);
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

.problem-sub {
  margin-top: clamp(2rem, 5vw, 3rem);
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--orange);
  opacity: 0.8;
  font-weight: 500;
}


/* ---------- How it works (scrollytelling) ---------- */
.how {
  padding-block: clamp(4rem, 8vw, 6rem) 0;
}

.how-scroller {
  position: relative;
  /* 100vh stage + 260vh of "stuck" scroll. Steps 1 and 3 each
     take 80vh; step 2 takes 100vh (25% more). */
  height: calc(100vh + 260vh);
}

.how-stage {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--grid-margin);
  max-width: var(--container);
  margin: 0 auto;
  overflow: hidden;
}

.how-stage > .section-head {
  margin: 0 auto;
  flex-shrink: 0;
}

.how-side {
  position: absolute;
  left: var(--grid-margin);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: auto;
}

.how-head {
  margin: 0;
  text-align: left;
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  --rail-progress: 0;
}

.how-steps::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.95rem;
  bottom: 0.95rem;
  width: 1px;
  background: var(--line);
  opacity: 0.55;
}

.how-steps::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.95rem;
  width: 1px;
  height: calc(var(--rail-progress) * (100% - 1.9rem));
  background: var(--ink-2);
  pointer-events: none;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem 0;
  color: var(--mute-line);
  transition: color 280ms ease;
  position: relative;
}

.how-step + .how-step {
  margin-top: 0.85rem;
}

.how-step-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--mute-line);
  background: var(--bg);
  flex-shrink: 0;
  z-index: 1;
  transition: background 280ms ease, border-color 280ms ease, transform 280ms ease;
}

.how-step.is-active {
  color: var(--ink);
}

.how-step.is-active .how-step-dot {
  background: var(--ink);
  border-color: var(--ink);
  transform: scale(1.18);
  box-shadow: 0 0 0 3px rgb(18 18 18 / 0.07);
}

.how-step-label {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 500;
}

.how-deck {
  position: relative;
  width: 100%;
  max-width: 620px;
  flex: 1;
  min-height: 0;
}

.how-progress {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 580px;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 360ms ease;
}

.how-progress.is-visible {
  opacity: 1;
}

.how-progress::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 1px;
  transform: scaleX(var(--within, 0));
  transform-origin: left center;
}

.how-panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms cubic-bezier(.2, .7, .2, 1),
              transform 500ms cubic-bezier(.2, .7, .2, 1);
  pointer-events: none;
}

.how-panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.how-video {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: var(--radius-tile);
  display: block;
  background: var(--wash);
}

.how-panel-stack {
  grid-template-columns: 1fr;
}

.how-panel-stack .how-content {
  max-width: 580px;
  margin: 0 auto;
  min-height: clamp(360px, 52vh, 460px);
  display: flex;
  flex-direction: column;
}

.how-panel-stack .how-video {
  margin: 0.85rem auto 1.1rem;
  max-width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.how-content {
  max-width: 540px;
  text-align: center;
}

.how-content .eyebrow {
  margin-bottom: 0.5rem;
}

.how-content h3 {
  font-family: var(--sans);
  font-size: var(--text-lead);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.how-lede {
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

/* Icon + short text trio shown beneath a step's title/video. As scroll
   progresses through the step, the active item shifts left-to-right;
   only one box is inverted at a time, and a matching blurb shows below. */
.how-features {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 1.25vw, 1rem);
  text-align: center;
}

.how-features li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 0.6rem;
  border-radius: var(--radius-tile);
  background: transparent;
  color: var(--ink);
  opacity: 0.45;
  transition: background-color 380ms ease, opacity 380ms ease, box-shadow 380ms ease;
}

.how-features li.is-active {
  background: var(--wash);
  opacity: 1;
  box-shadow:
    inset 0 2px 4px rgb(18 18 18 / 0.12),
    inset 0 -1px 0 rgb(246 239 229 / 0.6);
}

.how-feature-icon {
  width: 28px;
  height: 28px;
  display: block;
  filter: invert(0.55);
}

.how-features span {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1.3;
}

.how-feature-blurbs {
  margin: clamp(1.25rem, 2.5vw, 1.75rem) auto 0;
  width: 100%;
  max-width: 420px;
  display: grid;
}

.how-feature-blurb {
  grid-area: 1 / 1;
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 380ms ease, transform 380ms ease;
  pointer-events: none;
}

.how-feature-blurb.is-active {
  opacity: 1;
  transform: none;
}

.persona-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 92% 0%, rgb(246 239 229 / 0.10), transparent 55%),
    var(--charcoal);
  color: var(--bg);
  border: 1px solid rgb(246 239 229 / 0.08);
  border-radius: var(--radius-tile);
  padding: 1.1rem 1.25rem;
  max-width: 380px;
  margin: clamp(4rem, 10vh, 6rem) auto 0;
  text-align: left;
  box-shadow:
    0 10px 30px rgb(18 18 18 / 0.16),
    inset 0 1px 0 rgb(246 239 229 / 0.06);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 220ms ease-out,
              transform 380ms cubic-bezier(.16, 1, .3, 1);
}

.persona-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 55%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 55%, #000 100%);
  background: linear-gradient(to bottom, rgb(18 18 18 / 0) 0%, rgb(18 18 18 / 0.45) 100%);
}

.persona-card.is-revealed {
  opacity: calc(1 - var(--leave, 0));
  transform: translateY(calc(var(--leave, 0) * 12px));
}

.persona-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.persona-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: rgb(246 239 229 / 0.08);
  border: 1px solid rgb(246 239 229 / 0.15);
  flex-shrink: 0;
}

.persona-meta { flex: 1; min-width: 0; }

.persona-tagline {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: rgb(246 239 229 / 0.55);
  margin: 0 0 0.15rem;
}

.persona-name {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--bg);
  margin: 0;
}

.persona-quote {
  font-family: var(--sans);
  font-style: italic;
  font-size: var(--text-small);
  color: rgb(246 239 229 / 0.78);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.persona-traits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.persona-traits li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem;
  align-items: center;
}

.trait-label {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: rgb(246 239 229 / 0.55);
}

.trait-bar {
  position: relative;
  height: 6px;
  background: rgb(246 239 229 / 0.18);
  border-radius: 3px;
  overflow: hidden;
}

.trait-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  border-radius: 3px;
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
}

@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .persona-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .trait-bar::after {
    transform: scaleX(var(--level, 0));
    transition: none;
  }
}

.how-emerge {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.story-graph {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: clamp(300px, 40vh, 360px);
  margin: 0.85rem auto 1.1rem;
  text-align: left;
}

.story-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.story-link {
  fill: none;
  stroke: var(--mute-line);
  stroke-width: 1;
  stroke-opacity: 0.55;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-link[data-link="s2-family"] { opacity: var(--draw-s2fam, 0); }
.story-link[data-link="s2-life"] { opacity: var(--draw-s2life, 0); }
.story-link[data-link="s2-ellen"] { opacity: var(--draw-s2ellen, 0); }

.story-tile,
.story-theme,
.story-person {
  position: absolute;
  white-space: nowrap;
}

.story-tile {
  top: var(--top);
  left: var(--left);
  transform: translate(-50%, -50%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 0.5rem 0.85rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  box-shadow: 0 1px 2px rgb(18 18 18 / 0.04);
}

.story-tile-eyebrow {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--muted);
}

.story-tile-title {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--ink);
}

.story-theme {
  top: var(--top);
  left: var(--left);
  transform: translate(-50%, -50%);
  background: var(--bg);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 500;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}

.story-person {
  top: var(--top);
  left: var(--left);
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.3rem 0.75rem 0.3rem 0.32rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

.story-person-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 600;
}

.story-person-name {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--ink);
}

.story-tile[data-tile="s1"] {
  opacity: 1;
  left: calc(50% - 28% * var(--s1-shift, 0));
  transition: none;
}
.story-tile[data-tile="s2"] {
  opacity: var(--story-s2, 0);
  left: calc(65% + 13% * var(--s2-shift, 0));
}

.story-theme[data-theme="family"],
.story-theme[data-theme="food"] { opacity: 1; }
.story-theme[data-theme="food"] {
  left: calc(30% - 8% * var(--s1-shift, 0));
}
.story-theme[data-theme="family"] {
  left: calc(70% - 20% * var(--s1-shift, 0));
}
.story-theme[data-theme="life"] {
  opacity: var(--theme-life, 0);
  transform: translate(-50%, -50%) scale(calc(0.92 + 0.08 * var(--theme-life, 0)));
}

.story-person[data-person="mom"] {
  left: calc(50% - 15% * var(--s1-shift, 0) + 15% * var(--merge, 0));
  transform: translate(-50%, -50%) scale(calc(1 + 0.08 * var(--settle, 0)));
}

.story-person[data-person="ellen"] {
  left: calc(65% - 15% * var(--merge, 0));
  opacity: calc(var(--person-ellen, 0) * (1 - var(--ellen-fade-out, 0)));
  transform: translate(-50%, -50%) scale(calc(1 - 0.25 * var(--ellen-fade-out, 0)));
}

@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .story-graph {
    height: clamp(240px, 64vw, 300px);
    max-width: 320px;
  }
  /* Place the two stories side by side; themes on top, Mom centered below. */
  .story-theme[data-theme="food"]   { top: 8%;  left: 22%; }
  .story-theme[data-theme="family"] { top: 8%;  left: 50%; }
  .story-theme[data-theme="life"]   { top: 8%;  left: 78%; opacity: 1; transform: translate(-50%, -50%); }
  .story-tile[data-tile="s1"] {
    top: 50%;
    left: 28%;
    transition: none;
  }
  .story-tile[data-tile="s2"] {
    top: 50%;
    left: 72%;
    opacity: 1;
  }
  .story-person[data-person="mom"] {
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .story-person[data-person="ellen"] {
    display: none;
  }
  /* Redraw connectors for the side-by-side mobile layout. The s2-ellen
     path is repurposed to link the second story to Mom. The s2 opacity
     overrides above are tied to scroll-driven custom properties that
     don't run on mobile, so re-assert visibility here at matching
     specificity. */
  .story-link[data-link="s1-food"]   { opacity: 1; }
  .story-link[data-link="s1-family"] { opacity: 1; }
  .story-link[data-link="s1-mom"]    { opacity: 1; }
  .story-link[data-link="s2-family"] { opacity: 1; }
  .story-link[data-link="s2-life"]   { opacity: 1; }
  .story-link[data-link="s2-ellen"]  { opacity: 1; }
}

.how-tags {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.how-tags li {
  position: absolute;
  font-family: var(--sans);
  font-size: var(--text-small);
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 6px));
  transition: opacity 380ms ease, transform 380ms ease;
}

.how-tags-people li {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.how-tags li.is-revealed {
  opacity: 1;
  transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: reduce) {
  .how-tags li {
    transition: none;
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 860px) {
  .how-emerge {
    position: static;
    inset: auto;
    pointer-events: auto;
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }
  .how-tags { display: contents; }
  .how-tags li {
    position: static;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .how-tags-themes li:nth-child(n+4) { display: none; }
  .how-tags-people li:nth-child(n+3) { display: none; }
}

/* Drop sticky scrollytelling on small screens or reduced-motion:
   stack panels vertically and let them flow with the page. */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .how { padding-block: clamp(4rem, 9vw, 6rem); }
  .how-scroller { height: auto; }
  .how-stage {
    position: static;
    height: auto;
    display: block;
    padding: 0;
    overflow: visible;
    max-width: none;
  }
  .how-stage > .section-head {
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  }
  .how-side {
    position: static;
    transform: none;
    display: block;
    text-align: center;
    padding-inline: var(--grid-margin);
    margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
    width: 100%;
  }
  .how-head {
    text-align: center;
  }
  .how-steps { display: none; }
  .how-progress { display: none; }
  .how-deck {
    height: auto;
  }
  .how-panel {
    position: relative;
    inset: auto;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: clamp(3rem, 8vw, 4.5rem);
    padding-inline: var(--grid-margin);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
  }
  .how-panel:last-of-type { margin-bottom: 0; }
  /* Unpinned, the deck is one centred column at any width, not the left
     edge of the desktop stage (the stage stops being a flex column). */
  .how-deck { margin-inline: auto; }
  .how-panel { justify-items: center; }
  .how-video { max-width: 260px; }
  .how-panel-stack .how-video { max-height: none; }
  .how-panel-stack .how-content { min-height: 0; display: block; }
}

/* ---------- Promise (inverted) ---------- */
/* Beige, like the rest of the page: a piece uses two backgrounds at most, and
   this one's second is the bourgogne problem panel. */
.promise {
  background: var(--bg);
  color: var(--ink);
  padding-block: clamp(5rem, 11vw, 9rem);
}

.promise .eyebrow {
  color: var(--muted);
}

.promise .display {
  color: var(--ink);
}

.promise-pillars {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--container);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.promise-pillar {
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.95rem;
  align-items: start;
}

.promise-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: var(--muted);
}

.promise-icon svg,
.promise-icon img {
  width: 28px;
  height: 28px;
}

.promise-icon img {
  opacity: 0.55;
}

.promise-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--text-lead);
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.promise-desc {
  grid-column: 2;
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 30ch;
}

@media (max-width: 900px) {
  .promise-pillars { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .promise-pillars { grid-template-columns: 1fr; }
}

.promise-privacy {
  max-width: 760px;
  margin: clamp(4rem, 9vw, 6.5rem) auto 0;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.6;
}

.promise-privacy-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.promise-privacy-label {
  display: block;
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

/* ---------- Audience ---------- */
.audience {
  padding-block: clamp(5rem, 11vw, 9rem);
}

.audience-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

.audience-card {
  display: flex;
  flex-direction: column;
}

.audience-video {
  aspect-ratio: 4 / 5;
  background: var(--wash);
  border-radius: var(--radius-tile);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute-line);
  border: 1px solid var(--line);
  overflow: hidden;
}

.audience-video svg {
  width: 42px;
  height: 42px;
}

.audience-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.audience-card h3 {
  font-family: var(--sans);
  font-size: var(--text-lead);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.audience-card p {
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.6;
}

.audience-also {
  max-width: 760px;
  margin: clamp(2.25rem, 4.5vw, 3rem) auto 0;
  padding: clamp(1.1rem, 2vw, 1.5rem) clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  text-align: center;
}

.audience-also-label {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.audience-also-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}

.audience-also-list li {
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--muted);
  line-height: 1.5;
  margin: 0.1rem 0;
}

.audience-also-list li:not(:last-child)::after {
  content: "·";
  color: var(--mute-line);
  margin: 0 0.7rem;
}

@media (max-width: 720px) {
  .audience-grid { grid-template-columns: 1fr; }
  .audience-also { padding: 1.1rem 1.25rem; }
}

/* ---------- Excerpt: inline Kindle-style reader ----------
   The book has its own typographic system — EB Garamond on white,
   black ink — so the inline reader feels like the book itself,
   separate from the rest of the marketing page. */
:root {
  --book-paper: #fefefe;
  --book-ink: #141414;
  --book-ink-soft: rgba(20, 20, 20, 0.6);
  --book-rule: rgba(20, 20, 20, 0.12);
  --book-serif: "EB Garamond", "Garamond", "Sabon", "Adobe Garamond Pro",
                "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --reader-shell: #fbfbf9;
  --reader-shell-deep: #ececea;
}

.founder {
  background: var(--bg);
  padding-block: clamp(5.5rem, 12vw, 10rem);
  text-align: center;
}


.book-author {
  margin: 0;
  max-width: 320px;
  padding: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1rem;
  row-gap: 1.1rem;
  text-align: left;
}

.book-author-photo {
  grid-column: 1;
  grid-row: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.book-author-head {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.book-author-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--text-lead);
  color: var(--ink);
  line-height: 1.05;
}

.book-author-line {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--muted);
  line-height: 1.45;
}

.book-author-bio {
  grid-column: 1 / -1;
  grid-row: 2;
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.6;
}

.reader-stage {
  padding-block: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem);
  padding-inline: var(--grid-margin);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  position: relative;
}

.reader {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  aspect-ratio: 13 / 18;
  background: linear-gradient(155deg, var(--reader-shell) 0%, var(--reader-shell-deep) 100%);
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 -1px 0 rgba(0, 0, 0, 0.05) inset,
    0 38px 70px -22px rgba(0, 0, 0, 0.18),
    0 50px 90px -20px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.reader::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -32px;
  width: 80%;
  height: 24px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.16), transparent 70%);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}

.reader-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--book-paper);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 2px 10px rgba(0, 0, 0, 0.18) inset;
  transition: filter 0ms linear;
}

/* E-ink page refresh — softened flash (dark grey, not full black) then snap to new content. */
@keyframes ink-refresh {
  0%   { filter: invert(0.82); }
  46%  { filter: invert(0.82); }
  50%  { filter: invert(0); }
  100% { filter: invert(0); }
}

.reader-screen.is-flipping {
  animation: ink-refresh 220ms linear forwards;
}

.reader-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem 0.4rem;
  font-family: var(--book-serif);
  font-size: 0.78rem;
  color: var(--book-ink-soft);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(20, 20, 20, 0.05);
}

.reader-status-title {
  font-style: italic;
  color: var(--book-ink);
}

.reader-status-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--book-ink-soft);
}

.reader-wifi {
  width: 14px;
  height: 11px;
  color: currentColor;
}

.reader-battery {
  position: relative;
  width: 20px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.reader-battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 1.5px;
  bottom: 1.5px;
  width: 2px;
  background: currentColor;
  border-radius: 1px;
}

.reader-battery-fill {
  position: absolute;
  inset: 1.5px;
  width: 80%;
  background: currentColor;
  border-radius: 1px;
}

.reader-page-area {
  position: relative;
  flex: 1;
  padding: clamp(1.4rem, 3.5vw, 2.4rem) clamp(2.2rem, 6vw, 3.8rem);
  overflow: hidden;
}

/* The pages container clips the flow; the flow is laid out in CSS columns
   the width of the visible area, and translated horizontally to expose
   one column (= one page) at a time. */
.reader-pages {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.reader-flow {
  width: 100%;
  height: 100%;
  text-align: left;
  /* column-width is set by JS to match the visible width. */
  column-gap: 0;
  column-fill: auto;
  will-change: transform;
}

.reader-page-head {
  text-align: center;
  margin-bottom: clamp(1.2rem, 2.4vw, 1.8rem);
}

.reader-page-eyebrow {
  font-family: var(--book-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--book-ink-soft);
}

.reader-page-title {
  font-family: var(--book-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15;
  color: var(--book-ink);
  margin-top: 0.4rem;
}

.reader-page-ornament {
  display: block;
  font-family: var(--book-serif);
  color: var(--book-ink-soft);
  font-size: 0.9rem;
  margin-top: 0.7rem;
  letter-spacing: 0.5em;
  padding-left: 0.5em;
}

.reader-page-prose {
  font-family: var(--book-serif);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.7;
  color: var(--book-ink);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.reader-page-prose p + p { margin-top: 0; text-indent: 1.2em; }

/* Final illustration — flows after the last paragraph, lands on whatever
   page has room (the chapter's last page). Cropped to a portrait window,
   mostly desaturated with a hint of color, like an old family photo. */
.reader-figure {
  break-inside: avoid;
  margin: 1.4em auto 0;
  max-width: 20ch;
  text-align: center;
}

.reader-figure-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  border-radius: 2px;
  filter: saturate(0.32) contrast(1.04);
}

.reader-figure-caption {
  font-family: var(--book-serif);
  font-style: italic;
  font-size: 0.9em;
  color: var(--book-ink-soft);
  margin-top: 0.6em;
  text-indent: 0;
}

.reader-page-prose > p:first-child::first-letter {
  font-family: var(--book-serif);
  font-size: 3.6em;
  line-height: 0.86;
  float: left;
  font-weight: 500;
  padding: 0.04em 0.12em 0 0;
  margin-bottom: -0.06em;
  color: var(--book-ink);
}

.reader-tap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26%;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.reader-tap-prev { left: 0; }
.reader-tap-next { right: 0; }

.reader-tap:focus-visible {
  outline: 1px dashed var(--book-rule);
  outline-offset: -8px;
}

.reader-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem 0.7rem;
  border-top: 1px solid rgba(20, 20, 20, 0.06);
  flex-shrink: 0;
}

.reader-arrow {
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--book-ink);
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.reader-arrow svg { width: 18px; height: 18px; }

.reader-arrow:hover { background: rgba(0, 0, 0, 0.05); }
.reader-arrow:active { transform: scale(0.96); }
.reader-arrow:disabled { opacity: 0.25; cursor: default; }
.reader-arrow:disabled:hover { background: transparent; }

/* First-time hint: pulse the next chevron so visitors notice the pages
   can be turned. Removed on first flip. */
@keyframes reader-next-halo {
  0%   { box-shadow: 0 0 0 0 rgba(20, 20, 20, 0.22); }
  70%  { box-shadow: 0 0 0 10px rgba(20, 20, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 20, 20, 0); }
}

@keyframes reader-next-nudge {
  0%, 100% { transform: translateX(0); }
  55%      { transform: translateX(3px); }
}

.reader.is-hinting .reader-arrow[data-next] {
  animation: reader-next-halo 1.6s ease-out infinite;
}

.reader.is-hinting .reader-arrow[data-next] svg {
  animation: reader-next-nudge 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .reader.is-hinting .reader-arrow[data-next],
  .reader.is-hinting .reader-arrow[data-next] svg {
    animation: none;
  }
}

.reader-indicator {
  font-family: var(--book-serif);
  font-feature-settings: "tnum" 1;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--book-ink);
}

.reader-indicator-sep {
  font-style: normal;
  color: var(--book-ink-soft);
  margin-inline: 0.3rem;
}

@media (max-width: 600px) {
  .reader {
    aspect-ratio: 12 / 18;
    padding: 12px;
    border-radius: 16px;
  }
  .reader-page-area { padding: 1.2rem 1.2rem; }
  .reader-page-prose { font-size: 1.02rem; line-height: 1.65; }
}

@media (prefers-reduced-motion: reduce) {
  .reader-screen.is-flipping { animation: none; }
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 auto;
  width: min(720px, calc(100% - 3rem));
  height: 0;
}

/* ---------- Format ---------- */
.format-section {
  padding-block: clamp(5rem, 11vw, 9rem);
}

/* The photo of the books, and the one card beside it. */
.format-offer {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.25rem;
  align-items: center;
}

.format-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-tile);
}

/* The wallet's format card (CreditsModal), on the page: icon, name, one line,
   the price large with its currency small, three ticks. */
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: clamp(1.25rem, 2.5vw, 1.6rem);
  border: 2px solid var(--line);
  border-radius: var(--radius-tile);
  background: var(--bg);
}

.tier-icon {
  width: 28px;
  height: 28px;
  color: var(--ink);
}

.tier-label {
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: var(--text-lead);
  color: var(--ink);
}

.tier-blurb {
  font-size: var(--text-body);
  color: var(--muted);
}

.tier-price {
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: var(--text-title);
  line-height: 1;
  color: var(--ink);
}

/* The currency sits small after the amount, the way the wallet writes it. */
.tier-currency {
  font-size: var(--text-small);
  letter-spacing: 0;
  color: var(--muted);
}

.tier-points {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tier-points li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-body);
  color: var(--ink);
}

/* Buying starts in the app: the button goes to sign-in. */
.tier-cta {
  align-self: stretch;
  justify-content: center;
  margin-top: 1.4rem;
}

.tier-points svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink);
}

.format-note {
  max-width: var(--prose);
  margin: clamp(2rem, 4vw, 2.75rem) auto 0;
  text-align: center;
  color: var(--muted);
  font-size: var(--text-body);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .format-offer { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.faq {
  background: var(--bg);
  padding-block: clamp(5rem, 11vw, 9rem);
}

.faq-list {
  max-width: var(--prose);
  margin: 0 auto;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--text-lead);
  color: var(--ink);
  line-height: 1.4;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--text-lead);
  color: var(--muted);
  line-height: 1;
  transition: transform 220ms ease, color 220ms ease;
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: "−";
  color: var(--ink);
  transform: rotate(180deg);
}

.faq details > p {
  margin-top: 0.85rem;
  color: var(--ink-2);
  font-size: var(--text-body);
  line-height: 1.65;
  max-width: 60ch;
}

/* An inline link is never underlined: it is full charcoal in softer copy,
   on a faint charcoal wash that deepens under the pointer. */
.faq details > p a,
.legal-prose a,
.footer-note a {
  color: var(--ink);
  text-decoration: none;
  background: var(--wash);
  border-radius: var(--radius-control);
  padding: 0 0.2em;
  margin: 0 -0.05em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color 160ms ease;
}

.faq details > p a:hover,
.legal-prose a:hover,
.footer-note a:hover {
  background: var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ---------- Closing ---------- */
.closing {
  position: relative;
  padding-block: clamp(7rem, 18vw, 12rem);
  padding-inline: var(--grid-margin);
  min-height: min(80vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image:
    linear-gradient(rgb(18 18 18 / 0.45), rgb(18 18 18 / 0.55)),
    url("/assets/trees.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--beige);
  isolation: isolate;
}

.closing .prose { color: var(--beige); }

.closing-line {
  font-size: var(--text-display);
  font-weight: 500;
  color: var(--beige);
  margin-bottom: 2.25rem;
  text-wrap: balance;
  text-shadow: 0 1px 30px rgb(18 18 18 / 0.35);
}

.closing .cta-primary {
  background: var(--orange);
  color: var(--burgundy);
}

.closing .cta-primary:hover,
.closing .cta-primary:focus-visible {
  opacity: 0.9;
  color: var(--burgundy);
}

/* ---------- Footer (inverted) ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: clamp(2.25rem, 5vw, 3.25rem) var(--grid-margin) 1.25rem;
  color: var(--muted);
  font-size: var(--text-small);
}

.footer-cols {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-heading {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.45rem;
}

.footer-col a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-note {
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.5;
  margin: 0.15rem 0 0;
}

.footer-socials {
  display: flex;
  gap: 0.85rem;
  margin: 0.15rem 0 0.3rem;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ink-2);
  transition: color 160ms ease;
}

.footer-social:hover {
  color: var(--ink);
}

.footer-social svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.footer-base {
  max-width: var(--container);
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: var(--text-small);
}

.footer-flag {
  font-style: normal;
  color: initial;
  margin-left: 0.15em;
}

/* ---------- Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    transition: opacity 700ms cubic-bezier(.2,.7,.2,1),
                transform 700ms cubic-bezier(.2,.7,.2,1);
  }
  .tier[data-reveal]:nth-child(2) { transition-delay: 70ms; }
  .tier[data-reveal]:nth-child(3) { transition-delay: 140ms; }
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- Legal page (privacy, etc.) ---------- */
.legal {
  padding: clamp(3rem, 7vw, 5rem) var(--grid-margin) clamp(4rem, 9vw, 6rem);
}

.legal-prose {
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink-2);
}

.legal-head {
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
  text-align: left;
}

.legal-head .eyebrow {
  margin-bottom: 0.65rem;
}

.legal-head h1 {
  color: var(--ink);
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.legal-meta {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--muted);
}

.legal-summary {
  background: var(--wash);
  border-radius: var(--radius-tile);
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.legal-summary-title {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.85rem;
}

.legal-summary ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink-2);
}

.legal-summary li {
  position: relative;
  padding-left: 1.1rem;
}

.legal-summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.legal-prose h2 {
  font-family: var(--sans);
  font-size: var(--text-lead);
  font-weight: 600;
  color: var(--ink);
  margin-top: clamp(2.25rem, 4vw, 3rem);
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.legal-prose h3 {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.4rem;
  margin-bottom: 0.4rem;
}

.legal-prose p {
  font-size: var(--text-body);
  line-height: 1.7;
  margin-bottom: 0.95rem;
}

.legal-prose ul {
  margin: 0.5rem 0 1rem 1.25rem;
  padding-left: 0.25rem;
}

.legal-prose li {
  font-size: var(--text-body);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.legal-prose li::marker {
  color: var(--mute-line);
}


/* The provider table in the privacy policy. Three short columns, ruled rows,
   no fill: it should read as part of the prose, not as a data grid. */
.legal-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.5rem;
  font-family: var(--sans);
  font-size: var(--text-small);
  line-height: 1.5;
}

.legal-prose th,
.legal-prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.legal-prose th {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink);
}

.legal-prose th:last-child,
.legal-prose td:last-child {
  padding-right: 0;
}

@media (max-width: 40rem) {
  .legal-prose table {
    font-size: var(--text-small);
  }

  .legal-prose th,
  .legal-prose td {
    padding: 0.5rem 0.5rem 0.5rem 0;
  }
}

.legal-footnote {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--text-small);
  color: var(--muted);
}

.legal-copyright {
  margin-top: clamp(2rem, 4vw, 3rem);
  text-align: center;
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--muted);
}


/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--radius-control);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Kanien'kéha stub page ---------- */
.stub {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) var(--grid-margin);
}

.stub-inner {
  max-width: 560px;
  text-align: center;
}

.stub-inner .eyebrow {
  margin-bottom: 1.25rem;
}

.stub-greeting {
  font-size: var(--text-display);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.stub-greeting-note {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2rem;
  font-size: var(--text-small);
}

.stub-body {
  color: var(--ink-2);
  font-size: var(--text-body);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.stub-body:last-of-type {
  margin-bottom: 2rem;
}

.stub-ctas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.cta.cta-ghost {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.cta.cta-ghost:hover,
.cta.cta-ghost:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.stub-ack {
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.6;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.stub-ack strong {
  color: var(--ink);
  font-weight: 500;
}


