/* ============ THE STORY — the homepage, continued under the hero ============

   The hero is the first screen; scrolling reads on into the mission, told in
   the brand site's editorial voice (Instrument Serif over Work Sans, on
   ivory). One page, no navigation: the story's only exit is the same
   doorway as the orb.

   Desktop: the hero stays pinned and the story rises over it like a curtain,
   so the orb screen is exactly what it was. Phone / short landscape: the
   intro already scrolls as a column (hero → chapters → what this is), and the
   story is simply the next thing in that column. */

.story {
  --st-paper: #faf3e6;           /* Discover's ivory, so the hero flows into it */
  --st-ink: #241f1b;
  --st-muted: #6e6860;
  --st-rule: #e4d9c3;
  --st-accent: #bd613c;
  --st-display: "Instrument Serif", ui-serif, Georgia, serif;
  --st-sans: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --st-gutter: clamp(24px, 5vw, 40px);

  position: relative; z-index: 50;   /* over the hero's fixed chrome (≤46), under the wash (60) */
  order: 4;
  color: var(--st-ink);
  font-family: var(--st-sans);
  -webkit-font-smoothing: antialiased;
  /* the hero dissolves into paper rather than meeting an edge */
  background: linear-gradient(to bottom, rgba(250, 243, 230, 0) 0, var(--st-paper) 26vh);
}
body:not(.story-open) .story { display: none; }

/* desktop: the page scrolls while the story is on it, and the hero holds still */
@media (min-width: 761px) and (min-height: 481px) {
  body.story-open { height: auto; min-height: 100%; overflow: visible; }
  body.story-open .hero { position: fixed; inset: 0; }
  .story { margin-top: 100vh; }
}

/* ---- leaving for the journey: the words go first, then the paper, and the
   hero's copy stays hidden until the orb has carried the reader into the
   light. `visibility`, not opacity: the intro's entrance animations own
   opacity and would win. ---- */
body.story-leaving .hero-inner > *:not(.cta-wrap),
body.story-leaving .site-header, body.story-leaving .chapters, body.story-leaving .quote,
body.story-leaving .pager, body.story-leaving .scroll-hint { visibility: hidden; }
.story.leaving {
  position: fixed; left: 0; right: 0; margin: 0;
  opacity: 0; pointer-events: none; transition: opacity .8s ease .35s;
}
.story.leaving .st-sec {
  opacity: 0; transform: translateY(-14px);
  transition: opacity .45s ease, transform .6s cubic-bezier(.3,.6,.3,1);
}

/* ---------- sections ---------- */
.st-sec {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(96px, 16vh, 168px) var(--st-gutter);
}
.st-sec:first-child { padding-top: clamp(200px, 32vh, 300px); }
.st-wrap { width: 100%; max-width: 1240px; margin: 0 auto; }
.st-narrow { max-width: 1000px; }

/* ---------- type ---------- */
.st-display-lg, .st-display-md, .st-word, .st-meaning, .st-editorial, .st-phon, .st-bounds {
  font-family: var(--st-display); font-weight: 400;
}
.st-editorial { font-style: italic; }
.st-display-lg {
  font-size: clamp(2rem, 5.4vw, 4rem); line-height: 1.05; letter-spacing: -.015em;
  text-wrap: balance;
}
.st-display-md {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.12; letter-spacing: -.012em;
  max-width: 26ch; padding: 24px 0;
}
.st-muted { color: var(--st-muted); }
.st-ink { color: var(--st-ink); }
.st-body {
  margin-top: clamp(40px, 6vh, 56px); max-width: 46ch;
  font-size: 18px; line-height: 1.625; color: var(--st-muted);
}
.st-editorial {
  margin-top: clamp(40px, 7vh, 56px); max-width: 34ch;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.15;
}
.st-gap { margin-top: clamp(48px, 9vh, 80px); }

/* ---- 04 What we believe: a manifesto read line by line ----
   The chapter mark holds its place on the left while the statements pass on
   the right; each one inks in as the reader reaches it and stays. */
.st-believe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.st-believe-side { position: sticky; top: clamp(96px, 14vh, 140px); }
.st-believe-side .st-chapter { margin-bottom: 0; }
.st-line {
  font-family: var(--st-display); font-weight: 400;
  font-size: clamp(1.75rem, 3.9vw, 3.4rem); line-height: 1.1; letter-spacing: -.014em;
  max-width: 22ch; padding: clamp(28px, 4.5vh, 44px) 0;
  border-top: 1px solid var(--st-rule);
  opacity: .24; transform: translateY(10px);
  transition: opacity 1s cubic-bezier(.2,.8,.2,1), transform 1s cubic-bezier(.2,.8,.2,1);
}
.st-line:first-child { border-top: 0; padding-top: 0; }
.st-line.lit { opacity: 1; transform: none; }
.st-line em { font-style: italic; }
.st-closing {
  font-size: clamp(2.4rem, 5.6vw, 4.5rem); line-height: 1.02; letter-spacing: -.02em;
  max-width: 14ch; margin-top: clamp(24px, 5vh, 48px);
  padding-top: clamp(40px, 7vh, 64px);
}
.st-coda {
  margin-top: clamp(32px, 5vh, 48px); max-width: 42ch;
  font-size: 18px; line-height: 1.625; color: var(--st-muted);
}

/* numbered chapter mark: hairline, then number and name */
.st-chapter { margin-bottom: clamp(48px, 8vh, 64px); }
.st-rule { display: block; height: 1px; background: var(--st-rule); }
.st-chapter p {
  display: flex; align-items: baseline; gap: 20px; margin-top: 16px;
  font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--st-muted);
  font-variant-numeric: tabular-nums;
}
.st-dim { opacity: .6; }

/* the question: six boundaries, one at a time */
.st-bounds {
  display: flex; flex-wrap: wrap; gap: 20px 48px; margin-top: clamp(56px, 8vh, 64px);
  font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.12; letter-spacing: -.012em;
}

/* the word */
.st-define { max-width: 46ch; }
.st-word {
  font-size: clamp(3.75rem, 8vw, 4.5rem); font-weight: 500; line-height: 1;
  letter-spacing: -.025em; text-transform: lowercase;
}
.st-phon { margin-top: 16px; font-size: 24px; font-style: italic; color: var(--st-muted); }
.st-phon span { font-style: normal; font-size: 16px; }
.st-meaning { margin-top: 40px; font-size: clamp(1.875rem, 3.2vw, 2.25rem); line-height: 1.375; }

/* the invitation */
.st-go { margin-top: clamp(56px, 9vh, 88px); }
.st-cta {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 20px 30px 20px 34px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--st-ink); color: var(--st-paper);
  font-family: var(--st-sans); font-size: 13px; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase;
  transition: background-color .4s ease, box-shadow .6s ease, transform .4s cubic-bezier(.3,.7,.3,1);
}
.st-cta svg { width: 30px; flex: 0 0 auto; transition: transform .5s ease; }
.st-cta:hover, .st-cta:focus-visible {
  background: var(--st-accent);
  box-shadow: 0 0 0 8px rgba(189, 97, 60, .12), 0 18px 50px rgba(189, 97, 60, .28);
}
.st-cta:hover svg, .st-cta:focus-visible svg { transform: translateX(5px); }
.st-cta:active { transform: scale(.98); }
.st-cta:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 4px; }

/* the audit door, beside the journey door — same route as the hero's line */
.st-go { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.st-signin {
  border: 0; background: none; cursor: pointer; padding: 8px 0;
  font-family: var(--st-sans); font-size: 14px; color: var(--st-muted);
}
.st-signin span {
  color: var(--st-ink); border-bottom: 1px solid rgba(36, 31, 27, .35); padding-bottom: 1px;
  transition: border-color .3s ease;
}
.st-signin:hover span { border-bottom-color: var(--st-ink); }
.st-signin:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 4px; }
/* a quiet way out of "Continue": offered only when there is a journey to
   continue, and never instead of it */
.st-new {
  display: none; border: 0; background: none; cursor: pointer; padding: 8px 0;
  font-family: var(--st-sans); font-size: 14px; color: var(--st-muted);
  text-decoration: underline; text-decoration-color: rgba(110, 104, 96, .35); text-underline-offset: 3px;
}
.st-new:hover { color: var(--st-ink); text-decoration-color: var(--st-ink); }
.st-new:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 4px; }
body[data-journey="incomplete"] .st-new { display: inline-block; }
/* the same auth gate as the hero's line (styles.css): nothing is asserted
   while the host answers, and a signed-in reader has no use for it */
body[data-auth="loading"] .st-signin { visibility: hidden; pointer-events: none; }
body[data-auth="authenticated"] .st-signin { display: none; }
.st-signed-in {
  display: none; margin: 0; padding: 8px 0;
  font-family: var(--st-sans); font-size: 14px; color: var(--st-muted);
}
body[data-auth="authenticated"] .st-signed-in { display: inline-block; }
.st-signed-in .signed-in-who { font-weight: 400; color: var(--st-ink); }
.st-signed-in .js-sign-out {
  border: 0; background: none; cursor: pointer; padding: 0 0 1px; margin-left: 6px;
  font: inherit; color: var(--st-ink); border-bottom: 1px solid rgba(36, 31, 27, .35);
}
.st-signed-in .js-sign-out:hover { border-bottom-color: var(--st-ink); }
.st-signed-in .js-sign-out:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 4px; }


/* ---------- reveal: words arrive as they are reached ---------- */
.st-reveal, .st-reveal-group > * {
  opacity: 0; filter: blur(6px); transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1), filter .9s;
  transition-delay: var(--rd, 0ms);
}
.st-reveal-group > * { display: inline-block; filter: blur(8px); transform: none; transition-duration: 1s; }
.st-reveal.in, .st-reveal-group.in > * { opacity: 1; filter: none; transform: none; }
.st-dim.st-reveal.in { opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  .st-reveal, .st-reveal-group > * { opacity: 1; filter: none; transform: none; transition: none; }
  .st-dim.st-reveal { opacity: .6; }
  .st-line { opacity: 1; transform: none; transition: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .st-sec { min-height: 88svh; }
  .st-believe { grid-template-columns: 1fr; gap: 0; }
  .st-believe-side { position: static; margin-bottom: 40px; }
}

/* ---------- phone / stacked flow ---------- */
@media (max-width: 760px), (max-height: 480px) {
  .story { background: linear-gradient(to bottom, rgba(250, 243, 230, 0) 0, var(--st-paper) 90px); }
  .st-sec { min-height: 0; padding: 96px var(--st-gutter); }
  .st-sec:first-child { padding-top: 120px; }
  .st-body { font-size: 17px; }
  .st-display-md { padding: 16px 0; }
  .st-bounds { gap: 12px 28px; }
  .st-chapter { margin-bottom: 40px; }
  .st-go { flex-direction: column; align-items: stretch; }
  .st-signin, .st-new, .st-signed-in { text-align: center; }
  .st-line { padding: 24px 0; }
  .st-cta { display: flex; width: 100%; justify-content: space-between; padding: 20px 24px 20px 28px; letter-spacing: .22em; }
}

