/* ============================================================
   Leafy — editorial landing
   ============================================================ */

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

:root {
  --bg:           #000000;
  --bg-secondary: #0a0a0a;
  --separator:    rgba(255, 255, 255, 0.10);
  --separator-light: rgba(255, 255, 255, 0.06);

  /* Oil-paint viridian — replaces the old neon-lime "AI" green */
  --green:        #4f9268;   /* accent text / links — lifted for contrast on black */
  --green-ink:    #3f7d57;   /* brush-stroke fill (true viridian) */
  --green-hover:  #5fa67a;
  --green-deep:   #2a5a3d;
  --green-on:     #f3f7f4;   /* light text, for the few remaining green fills */

  --text-primary:   #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary:  #48484a;

  --page-w:      1100px;
  --nav-h:       52px;
  --gutter:      28px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-hover); }

kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  display: inline-block;
  padding: 0.1em 0.45em;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

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

/* ── Grain ── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

/* ============================================================
   NAV
   ============================================================ */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: #000000;
  border-bottom: 1px solid var(--separator-light);
  transition: border-color 0.3s ease;
}
#nav.scrolled {
  border-bottom: 1px solid var(--separator);
}
.nav-inner {
  width: 100%;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo:hover { color: var(--text-primary); }
.nav-mark {
  width: 20px; height: 20px;
  border-radius: 5px;
  background: url("icons/leafy-192.png") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}
.nav-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.nav-cta:hover {
  border-color: rgba(255, 255, 255, 0.72);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* ============================================================
   ① PAIN — full-bleed sticky hero
   ============================================================ */

/* Spacer — keeps content below the viewport-sized hero */
.hero-wrap {
  height: 100vh;
}

/* Hero is nailed to the viewport — never moves */
.pain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 72px;
  overflow: hidden;
}

/* Full-bleed background image */
.pain-shot {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pain-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pain-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.25) 40%,
    rgba(0,0,0,0.72) 100%
  );
  pointer-events: none;
}

/* Copy sits at the bottom of the viewport, over the image */
.pain-copy {
  position: relative;
  z-index: 1;
  max-width: var(--page-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.pain h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.045em;
  max-width: 580px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
}
.pain-sub {
  margin-top: 16px;
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.75);
  max-width: 480px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}

/* One solid block slides over the fixed hero — no gaps possible */
.content {
  position: relative;
  z-index: 1;
  background: var(--bg);
}
footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* ============================================================
   ② PIVOT — the promise
   ============================================================ */
.pivot {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 120px var(--gutter);
}
.pivot-inner {
  max-width: 580px;
}
.pivot h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.pivot-sub {
  margin-top: 18px;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 480px;
}

/* ============================================================
   ③ DEMO — sticky visual + scrolling narrative
   ============================================================ */
.demo {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  margin-bottom: 120px;
  /* Scroll fuel for 3 steps — see scrubDemo() in main.js */
  height: 700vh;
  position: relative;
}

/* ONE sticky pod — scene & text are siblings so they always
   start and stop sticking at exactly the same moment */
.demo-sticky {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 2.6fr 1fr;
  gap: 40px;
  align-items: center;
}

.demo-visual {
  height: 100%;
  display: flex;
  align-items: center;
}

.demo-scene {
  position: relative;
  min-height: 600px;
  width: 100%;
}

.demo-page {
  position: relative;
  width: 100%;
  padding: 40px 0 48px;
  border-radius: 12px;
  background: transparent;
  left: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--page-w)) / 2)) + 8vw);
  will-change: transform;
}
.demo-page p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.5;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
.demo-page mark {
  background: none;
  color: var(--text-primary);
  font-weight: 600;
}

.demo-line {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.demo-off-screen {
  position: absolute;
  right: 100%;
  white-space: nowrap;
  pointer-events: none;
}
.demo-highlight-wrap {
  position: relative;
  display: inline-block;
  margin-left: 0.2em;
}

/* ── Selection-box drawing animation (step 0) ── */
/* clip-path grows from a point at the top-left → full rectangle,
   matching the diagonal drag gesture described in the copy. */
.demo-select-box {
  position: absolute;
  inset: -5px -10px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0);
  pointer-events: none;
  z-index: 2;
  /* clip-path + background driven 1:1 by scroll via JS — no CSS transition */
  clip-path: inset(0 100% 100% 0 round 4px);
  /* only opacity uses a CSS transition (step-1/2 fade-out) */
  transition: opacity 0.35s ease;
}
/* Box fades out the moment popup appears (step 1 & 2) */
.demo-scene[data-active-step="1"] .demo-select-box,
.demo-scene[data-active-step="2"] .demo-select-box {
  opacity: 0;
}

/* ── Crosshair cursor — position + opacity set entirely by JS ── */
.demo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  will-change: transform, opacity;
}
.demo-cursor::before,
.demo-cursor::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 1px;
}
.demo-cursor::before { /* horizontal arm */
  width: 14px; height: 1.5px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.demo-cursor::after {  /* vertical arm */
  width: 1.5px; height: 14px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}

/* Popup — position: fixed so it never contributes to sticky-container
   overflow, which caused the up/down scroll anchor mismatch.
   top & left are set via JS from markWrapEl.getBoundingClientRect(). */
.demo-popup {
  position: fixed;
  width: clamp(340px, 42vw, 500px);
  max-width: none;
  filter: drop-shadow(0 20px 48px rgba(0,0,0,0.55));
  z-index: 50;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-popup.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Text panel: clips steps scrolled outside the visible column */
.demo-text-panel {
  align-self: stretch;
  position: relative;
  overflow: clip;
}
/* Steps fill the panel, stacked; JS drives translateY at scroll speed.
   Anchor at 28 % from panel top — aligns visually with the book text's
   centre of gravity rather than the panel's mathematical centre. */
.demo-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc((100vh - var(--nav-h)) * 0.28);
  will-change: transform;
}
.demo-step h3 {
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.demo-step p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 340px;
}

/* ============================================================
   ④ SLIDES — sticky visual + scrolling narrative
   ============================================================ */
.slides {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  margin-bottom: 120px;
  /* Scroll fuel — sticky pod pins here until this height is consumed */
  height: 540vh;
  position: relative;
}

/* ONE sticky container — video & text are siblings inside it,
   so they always start and stop sticking at the exact same moment */
.slides-sticky {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 2.6fr 1fr;
  gap: 40px;
  align-items: center;
}

.slides-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2144 / 1624;   /* match the source video exactly */
  max-height: calc(100vh - var(--nav-h) - 60px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.05);
}
.slides-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.slides-vid.is-active { opacity: 1; }

/* Text panel: clips steps that are outside the visible column.
   Steps are absolutely stacked; JS drives translateY at scroll speed. */
.slides-text-panel {
  align-self: stretch;   /* fill the full height of the sticky grid row */
  position: relative;
  overflow: clip;        /* hide steps that have scrolled outside the column */
}
/* Each step fills the panel; anchor at 28 % from top — same as demo steps. */
.slides-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc((100vh - var(--nav-h)) * 0.28);
  will-change: transform;
}

.slides-step h3 {
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.slides-step p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 360px;
}

/* ============================================================
   ⑤ DOWNLOAD BUTTON
   ============================================================ */
.dl-wrap {
  margin-top: 32px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #9fd038;
  color: #1e2e0a;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.15s ease;
}
.dl-btn svg { width: 18px; height: 18px; flex: none; }
.dl-btn:hover {
  color: #1e2e0a;
  background: #b3e840;
  transform: translateY(-2px);
}
.dl-btn:active { transform: translateY(0); }
.dl-meta {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}
.dl-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 36px 0 32px;
  color: var(--text-tertiary);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 0.9375rem;
}
.dl-divider::before,
.dl-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--separator);
}

/* ============================================================
   ⑤ SIGNUP + TRUST
   ============================================================ */
.signup-section {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 96px var(--gutter);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
}
.signup-inner {
  position: relative;
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.signup-cols {
  display: flex;
  align-items: center;
  margin-top: 0;
  gap: 0;
}
.signup-col-left {
  flex: 1;
  min-width: 0;
  padding-right: 48px;
}
.signup-col-right {
  flex: 0 0 auto;
  padding-left: 48px;
  border-left: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.reach-heading {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-secondary);
}
.signup-col-right .reach-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.signup-inner h2 {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.signup-note {
  margin-top: 44px;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
}

.signup-row {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}
.field {
  flex: 1;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--separator);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}
.field::placeholder { color: var(--text-tertiary); }
.field:focus { outline: none; border-color: var(--green); }

.signup-btn {
  height: 46px;
  padding: 0 22px;
  border-radius: 10px;
  border: none;
  background: #ffffff;
  color: #000000;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.signup-btn:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
}
.signup-btn:active { transform: translateY(0); }

.consent {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.consent input { margin-top: 2px; accent-color: var(--green); }

.form-msg {
  margin-top: 10px;
  font-size: 0.8125rem;
  min-height: 1.2em;
  color: var(--text-secondary);
  text-align: center;
}
.form-msg.ok { color: var(--green); }
.form-msg.err { color: #ff6961; }

/* ── Manuscript "sign here" signup ───────────────────────────────────────
   No box, no fill — the email is written on a hand-painted brush line, like
   signing a page. The stroke paints in (left→right) on focus / once filled;
   on success a brush checkmark is drawn and the line fades away. */
.sign-prompt {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.sign-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.sign-field {
  position: relative;
  display: inline-block;
}
/* faint resting guide line so the user knows where to write */
.sign-field::before {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 2px;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}
/* the oil-paint swipe, clipped away until focus/fill */
.sign-field::after {
  content: "";
  position: absolute;
  left: -8px; right: -8px; bottom: -7px;
  height: 0.5em;
  pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' preserveAspectRatio='none'><path d='M4,13 C30,8 60,15 95,11 C130,7 165,16 205,10 C222,8 232,11 236,13 C232,19 210,14 182,18 C140,23 100,13 64,18 C36,21 16,15 4,16 Z' fill='%233f7d57'/><path d='M16,15 C62,11 120,18 172,13 C202,11 222,15 230,14' fill='none' stroke='%232a5a3d' stroke-width='1.6' stroke-linecap='round' opacity='0.45'/></svg>") left center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.sign-field:has(.sign-input:focus)::after,
.sign-field:has(.sign-input:not(:placeholder-shown))::after {
  clip-path: inset(0 0 0 0);
}
.sign-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3.4vw, 2.125rem);
  letter-spacing: 0.005em;
  color: var(--text-primary);
  text-align: center;
  width: min(72vw, 340px);
  padding: 4px 6px 12px;
  caret-color: var(--green);
}
.sign-input::placeholder { color: var(--text-tertiary); font-style: italic; }

/* arrow submit — hand-drawn, nudges on hover */
.sign-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}
.sign-go svg { width: 30px; height: 18px; }
.sign-go:hover { color: var(--green); transform: translateX(3px); }

/* success — brush paints a check, the line fades out beneath it */
.sign-check {
  position: absolute;
  left: 50%; top: 50%;
  width: 54px; height: 54px;
  transform: translate(-50%, -56%);
  color: var(--green-ink);
  opacity: 0;
  pointer-events: none;
}
.sign-check path { stroke-dasharray: 70; stroke-dashoffset: 70; }
.sign-form.is-sent .sign-check { opacity: 1; }
.sign-form.is-sent .sign-check path {
  transition: stroke-dashoffset 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  stroke-dashoffset: 0;
}
.sign-form.is-sent .sign-field,
.sign-form.is-sent .sign-go,
.sign-form.is-sent .sign-prompt,
.sign-form.is-sent .consent { opacity: 0; transition: opacity 0.35s ease; }
.signup-col-left .sign-form { margin-top: 0; }
.sign-form .consent { margin-top: 30px; }

/* ── Alternative reach-out — Discord / Reddit, no email needed ────────────
   Quiet secondary option below the signature line. Same manuscript voice:
   an italic serif divider, then two understated pills that warm to green. */
.reach-alt { margin-top: 38px; }
.reach-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 360px;
  margin: 0 auto 18px;
  color: var(--text-secondary);
}
.reach-divider::before,
.reach-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--separator);
}
.reach-divider span {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.0625rem;
  white-space: nowrap;
}
.reach-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.reach-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.reach-pill svg { width: 18px; height: 18px; flex: none; }
.reach-pill:hover { transform: translateY(-1px); }
.reach-pill:active { transform: translateY(0); }

.reach-pill--discord {
  border: 1px solid #5865f2;
  color: #5865f2;
}
.reach-pill--discord:hover {
  color: #5865f2;
  background: rgba(88, 101, 242, 0.1);
}
.reach-pill--reddit {
  border: 1px solid #ff4500;
  color: #ff4500;
}
.reach-pill--reddit:hover {
  color: #ff4500;
  background: rgba(255, 69, 0, 0.1);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--separator-light);
  padding: 24px 0 32px;
}
.footer-inner {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
}
.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }

/* ============================================================
   COOKIE
   ============================================================ */
#cookie {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: min(480px, calc(100% - 32px));
  z-index: 200;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(28,28,30,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--separator);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#cookie.show { transform: translateX(-50%) translateY(0); }
#cookie p {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  flex: 1;
}
#cookie button {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: #ffffff;
  color: #000000;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
#cookie button:hover { background: rgba(255, 255, 255, 0.88); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.hero-reveal {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.13s + 0.1s);
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT — story (for about.html)
   ============================================================ */
.story-hero {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 72px var(--gutter) 56px;
}
.story-hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin: 14px 0 20px;
}
.story-hero-lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 540px;
}

.story-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--gutter) 100px;
}

.story-section {
  padding: 56px 0;
  border-top: 1px solid var(--separator-light);
}
.story-section .topic-label {
  display: block;
  margin-bottom: 14px;
}
.story-section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 22px;
}
.story-section p {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.story-section p:last-child { margin-bottom: 0; }
.story-section p strong { color: var(--text-primary); }
.story-section p em { color: var(--green); font-style: italic; }
.story-section .btn { margin-top: 8px; }

.story-highlight { color: var(--text-primary) !important; }

.story-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0 0;
}
.story-split h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.story-split p { font-size: 0.9375rem !important; }

.story-blockquote {
  margin: 28px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--separator-light);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.nav-links a.is-active { color: var(--text-primary); }

/* Generic button primitives used across pages */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 10px 22px;
  transition: opacity 0.18s ease, transform 0.15s ease, background 0.18s ease;
}
.btn:active { transform: translateY(1px); }

/* Solid white pill — for page-level CTAs on dark backgrounds */
.btn-primary {
  background: #ffffff;
  color: #000000;
}
.btn-primary:hover { background: rgba(255,255,255,0.88); color: #000; }

/* Ghost outline — secondary / inline CTAs */
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.28);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.72);
  color: #fff;
  background: rgba(255,255,255,0.06);
}

/* ── Hand-painted brush accent ───────────────────────────────────────────
   Wrap a keyword in <span class="brush"> to lay a single oil-paint swipe
   behind it. The stroke is an inline SVG (uneven body, frayed tapered ends,
   a darker dry-brush streak) — stretched to the word's width. z-index:-1 in an
   isolated context keeps it behind the glyphs but above the section colour. */
.brush {
  position: relative;
  display: inline-block;
  isolation: isolate;
  white-space: nowrap;
}
.brush::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.16em;
  right: -0.16em;
  bottom: -0.02em;
  height: 0.5em;
  pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' preserveAspectRatio='none'><path d='M4,13 C30,8 60,15 95,11 C130,7 165,16 205,10 C222,8 232,11 236,13 C232,19 210,14 182,18 C140,23 100,13 64,18 C36,21 16,15 4,16 Z' fill='%233f7d57'/><path d='M16,15 C62,11 120,18 172,13 C202,11 222,15 230,14' fill='none' stroke='%232a5a3d' stroke-width='1.6' stroke-linecap='round' opacity='0.45'/></svg>") center / 100% 100% no-repeat;
}
/* Mirror so repeated strokes don't look stamped from one template */
.brush--flip::after { transform: scaleX(-1); }
/* Slightly heavier swipe for big hero words */
.brush--bold::after { height: 0.42em; bottom: 0.0em; }

/* ============================================================
   LEGAL (privacy.html)
   ============================================================ */
.legal { max-width: 600px; margin: 0 auto; padding: 48px var(--gutter) 80px; }
.legal .back { display: inline-block; margin-bottom: 28px; font-size: 0.9375rem; color: var(--green); }
.legal .back:hover { text-decoration: underline; }
.legal h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 8px; }
.legal-intro { font-size: 1rem; color: var(--text-secondary); margin-bottom: 8px; }
.legal .updated { font-size: 0.8125rem; color: var(--text-tertiary); margin-bottom: 28px; }
.legal h2 { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); margin: 32px 0 8px; }
.legal p, .legal li { font-size: 1rem; line-height: 1.55; color: var(--text-secondary); }
.legal ul { padding-left: 1.25em; margin: 8px 0 16px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text-primary); }
.legal code { padding: 0.1em 0.35em; border-radius: 4px; background: rgba(255,255,255,0.06); font-family: var(--font-mono); font-size: 0.9em; }

.pill { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green); background: rgba(63, 125, 87, 0.14); border: 1px solid rgba(63, 125, 87, 0.38); padding: 5px 10px; border-radius: 999px; }
.topic-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.large-title { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.title-1 { font-size: 1.75rem; font-weight: 700; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  :root { --gutter: 20px; }

  .hero-wrap { height: 100vh; }
  .pain { padding-bottom: 48px; }
  .pain h1 { font-size: clamp(2rem, 8vw, 3.5rem); }

  .pivot { padding: 80px var(--gutter); }

  /* ── Demo ── */
  .demo { height: auto; }
  .demo-sticky { position: static; height: auto; grid-template-columns: 1fr; gap: 24px; }
  .demo-visual { height: auto; display: block; }
  .demo-scene { min-height: 180px; }
  .demo-text-panel { align-self: auto; overflow: visible; position: static;
                     display: flex; flex-direction: column; gap: 32px; }
  .demo-step { position: static; transform: none !important; padding: 24px 0; }

  /* Demo visual — too complex for mobile (off-screen text, fixed popup).
     Steps text alone is sufficient to explain the feature. */
  .demo-visual { display: none !important; }
  .demo-popup  { display: none !important; }
  .demo-select-box { display: none; }
  .demo-cursor     { display: none; }

  /* ── Slides ── */
  .slides { height: auto; margin-bottom: 40px; }
  .slides-sticky { position: static; height: auto; grid-template-columns: 1fr; gap: 24px; }
  .slides-frame { border-radius: 8px; max-height: none; }
  /* On mobile: restore normal flow, reset JS-driven transforms */
  .slides-text-panel { align-self: auto; overflow: visible; position: static;
                       display: flex; flex-direction: column; gap: 40px; }
  .slides-step { position: static; transform: none !important; padding: 0; }

  /* ── Signup ── */
  .signup-section { padding: 80px var(--gutter); min-height: 0; }
  .sign-input { width: 78vw; }
  .signup-cols { flex-direction: column; gap: 40px; }
  .signup-col-left { padding-right: 0; width: 100%; }
  .signup-col-right { padding-left: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 40px; width: 100%; align-items: center; }
  .signup-col-right .reach-links { flex-direction: row; justify-content: center; gap: 12px; }

  .nav-links { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .story-split { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-reveal { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #cookie { transition: none; }
}
