/* ═══════════════════════════════════════════════════════════════
   havnr — "The Almanac"
   A field guide for the climb: numbered chapters, editorial grid,
   oversized display type, cinematic plates.
   Type   Bricolage Grotesque (display) · IBM Plex Sans (text)
   Ink    amber #E8912D on graphite #0F1113
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Bricolage'; font-weight: 200 800; font-style: normal;
  font-display: swap; src: url('assets/fonts/bricolage-var.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Plex'; font-weight: 100 700; font-style: normal;
  font-display: swap; src: url('assets/fonts/plex-var.woff2') format('woff2-variations');
}

:root {
  /* ink & paper */
  --paper:      #0F1113;
  --paper-2:    #15181B;
  --paper-3:    #1B1F23;
  --line:       #262B30;
  --line-2:     #343A40;

  --ink:        #F7F4EE;
  --ink-2:      #A8AEB4;
  --ink-3:      #767D84;
  --ink-rev:    #0F1113;

  /* the single accent — amber, the light inside the orb */
  --amber:      #E8912D;
  --amber-lo:   #C9761A;
  --amber-hi:   #FFD9A0;
  --ember:      #E0733A;
  --jade:       #3DD68C;   /* success semantics only */

  --display: 'Bricolage', ui-sans-serif, sans-serif;
  --text:    'Plex', ui-sans-serif, system-ui, sans-serif;

  /* squircle scale - soft, generous corners everywhere */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 26px;
  --r-xl: 34px;

  --ease:   cubic-bezier(.22,.61,.36,1);
  --spring: cubic-bezier(.34,1.4,.64,1);

  --gutter: clamp(20px, 5vw, 68px);
  /* content width grows with the screen instead of stranding it in the middle */
  --measure: clamp(1000px, 92vw, 1760px);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background:
    radial-gradient(120% 44% at 12% 0%, rgba(232,145,45,.045), transparent 62%),
    radial-gradient(90% 38% at 92% 38%, rgba(224,115,58,.035), transparent 60%),
    radial-gradient(110% 40% at 8% 74%, rgba(232,145,45,.03), transparent 62%),
    var(--paper);
  color: var(--ink);
  font-family: var(--text); font-size: 17px; font-weight: 300;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(232,145,45,.32); }
img, video { display: block; max-width: 100%; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 400;
  background: var(--amber); color: var(--ink-rev);
  padding: 12px 20px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── type scale: extreme jumps, no timid steps ────────────── */
.h-display {
  font-family: var(--display);
  font-weight: 800; font-size: clamp(38px, 5.6vw, 82px);
  line-height: .98; letter-spacing: -.035em;
}
.hero-title {
  font-family: var(--display);
  font-weight: 800; font-size: clamp(52px, 10.5vw, 148px);
  line-height: .88; letter-spacing: -.05em;
  display: flex; flex-direction: column;
}
.hero-sub { font-weight: 200; letter-spacing: -.04em; color: var(--amber-hi) }
.accent { font-weight: 200; color: var(--amber-hi) }
.lede {
  font-size: clamp(17px, 1.55vw, 21px); font-weight: 300;
  line-height: 1.6; color: var(--ink-2); max-width: 58ch;
}
.narrow { max-width: 46ch; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ink-2);
}
.dot { width: 22px; height: 1px; background: var(--amber); flex: none }

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  --pad: 13px 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--text); font-size: 15px; font-weight: 500;
  padding: var(--pad); border: 0; border-radius: var(--r-sm); cursor: pointer;
  text-decoration: none; letter-spacing: .01em;
  transition: transform .3s var(--spring), background .25s var(--ease),
              color .25s var(--ease), box-shadow .3s var(--ease);
}
.btn:active { transform: translateY(1px) }
.btn-lg { --pad: 17px 32px; font-size: 16px }
.btn-sm { --pad: 10px 18px; font-size: 14px }
.btn-block { width: 100% }
.btn-solid {
  background: var(--amber); color: var(--ink-rev); font-weight: 600;
  box-shadow: 0 0 0 0 rgba(232,145,45,.5);
}
.btn-solid:hover { background: var(--amber-hi); box-shadow: 0 10px 34px -8px rgba(232,145,45,.7) }
.btn-quiet {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--amber); color: var(--amber-hi) }

/* every centered container shares one contract: cap the content,
   keep the gutter outside the cap so wide screens stay filled */
.mast-inner, .hero-body, .hero-index, .chapter,
.climb-head, .rail-hint, .closing-copy,
.foot-inner, .foot-fine {
  width: min(100%, calc(var(--measure) + 2 * var(--gutter)));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── masthead ─────────────────────────────────────────────── */
.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.masthead.stuck {
  background: rgba(15,17,19,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 -1px 0 var(--line);
}
.mast-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 18px;
  transition: padding .4s var(--ease);
}
.masthead.stuck .mast-inner { padding-block: 12px }
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 800; font-size: 21px;
  letter-spacing: -.045em; color: var(--ink); text-decoration: none;
}
.wordmark-orb {
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 33% 30%, #fff, #F0E9DC 42%, var(--amber));
  box-shadow: 0 0 14px rgba(232,145,45,.75);
}
/* reading position: the almanac page marker, not a progress bar */
.mast-mark {
  display: flex; align-items: baseline; gap: 9px; margin-right: auto; margin-left: 30px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
}
.mast-mark i {
  font-style: normal; font-family: var(--display); font-weight: 800;
  font-size: 14px; letter-spacing: 0; color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.mast-mark.flip i, .mast-mark.flip span { animation: markflip .5s var(--ease-out-crisp) }
@keyframes markflip {
  from { opacity: 0; transform: translateY(6px) }
  to   { opacity: 1; transform: none }
}

.mast-nav { display: flex; gap: 26px }
.mast-nav a {
  display: inline-flex; align-items: baseline; gap: 7px;
  font-size: 14px; color: var(--ink-2); text-decoration: none;
  transition: color .25s var(--ease);
}
.mast-nav a i {
  font-style: normal; font-size: 10px; letter-spacing: .1em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.mast-nav a:hover { color: var(--ink) }
.mast-nav a:hover i { color: var(--amber) }

/* ── hero plate ───────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 128px 0 34px; overflow: clip; isolation: isolate;
}
.hero-film {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 58%; z-index: 0;
}
.hero-grade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(15,17,19,.88) 0%, rgba(15,17,19,.3) 30%, rgba(15,17,19,.12) 50%, rgba(15,17,19,.82) 86%, var(--paper) 100%),
    radial-gradient(120% 80% at 50% 45%, transparent 52%, rgba(8,9,10,.62) 100%);
}
.hero-body { position: relative; z-index: 2 }
.hero-lede {
  margin-top: 26px; font-size: clamp(17px, 1.6vw, 21px); color: var(--ink-2);
  max-width: 40ch; margin-left: clamp(0px, 4vw, 82px);   /* deliberate indent, not a centred block */
}
.hero-act { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap }
.hero-note { margin-top: 20px; font-size: 13px; color: var(--ink-3); letter-spacing: .01em }
.hero-index {
  position: relative; z-index: 2;
  margin-top: 54px;
  display: flex; flex-wrap: wrap; gap: 0 34px; justify-content: flex-end;
  padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* one orchestrated page load — staggered, CSS-only */
.rise { opacity: 0; transform: translateY(26px); animation: rise .9s var(--ease) forwards; animation-delay: calc(.28s + var(--i) * .085s) }
@keyframes rise { to { opacity: 1; transform: none } }

/* ── chapters & rules ─────────────────────────────────────── */
.chapter { padding-block: clamp(90px, 11vw, 150px) 0 }
.rule {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 14px; margin-bottom: clamp(42px, 6vw, 76px);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3);
}
.rule i {
  font-style: normal; font-family: var(--display); font-weight: 800;
  font-size: 13px; letter-spacing: 0; color: var(--amber);
}
.rule span { flex: 1 }
.on-plate { border-bottom-color: rgba(255,255,255,.16) }

/* ── 01 · the urge ────────────────────────────────────────── */
.urge { display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(32px, 5vw, 76px); align-items: center }
.facts { margin-top: 42px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden }
.facts > div { background: var(--paper); padding: 18px 20px; display: flex; align-items: baseline; gap: 18px }
.facts dt {
  font-family: var(--display); font-weight: 800; font-size: 27px;
  letter-spacing: -.03em; color: var(--ink); min-width: 128px;
  font-variant-numeric: tabular-nums;
}
.facts dd { font-size: 15px; color: var(--ink-2) }
.urge-orb { position: relative; text-align: center }
.urge-orb video {
  width: min(420px, 100%); aspect-ratio: 1; margin: 0 auto; object-fit: cover;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 50%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 50%, transparent 72%);
}
.urge-orb figcaption { margin-top: -26px; display: flex; flex-direction: column; align-items: center; gap: 3px }
.breath { font-size: 14px; letter-spacing: .06em; color: var(--amber) }
.clock {
  font-family: var(--display); font-weight: 800; font-size: 34px;
  letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
.urge-orb small { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; max-width: 32ch }

/* ── 02 · the system ──────────────────────────────────────── */
.sys-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 70px); align-items: end; margin-bottom: 46px }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1500px }
.card {
  position: relative; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
/* the daily path is the product: give it real weight */
.card-tall { background: linear-gradient(168deg, #1A1E22, var(--paper-2) 58%) }
.card-tall h3 { font-size: 24px }
.card-tall .card-body { padding: 28px 30px 32px }
/* the privacy promise is a statement, not a feature card: strip its chrome */
.card-wide { background: none; border-color: transparent }
.card-wide:hover { border-color: transparent; transform: none }
.card-wide .card-body { padding-left: 0 }
.card-wide h3 { font-size: 30px; letter-spacing: -.03em }
.card-wide p { font-size: 16px; max-width: 46ch }
.card:hover { border-color: var(--line-2); transform: translateY(-3px) }
.card-tall { grid-row: span 2; align-items: center; padding-top: 34px }
.card-wide { grid-column: span 2 }
.card-body { padding: 24px 26px 26px; position: relative; z-index: 2 }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; margin-bottom: 8px }
.card p { font-size: 14.5px; color: var(--ink-2) }
.plate {
  width: 62%; margin: 0 auto; opacity: .5;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 40%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 45%, #000 40%, transparent 72%);
}
.plate-right {
  position: absolute; right: -6%; bottom: -22%; width: 44%; opacity: .42; margin: 0;
}
.chat { display: flex; flex-direction: column; gap: 8px; margin-top: 16px }
.bub { font-size: 13.5px; padding: 11px 15px; border-radius: var(--r-md); max-width: 88% }
.bub.me { align-self: flex-end; background: var(--paper-3); color: var(--ink-2); border-bottom-right-radius: 7px }
.bub.ai { background: rgba(232,145,45,.1); box-shadow: inset 0 0 0 1px rgba(232,145,45,.3); border-bottom-left-radius: 7px }
.feed { margin-top: 16px; display: flex; flex-direction: column; gap: 8px }
.feed p {
  font-size: 13.5px; color: var(--ink-2);
  padding: 12px 15px; background: var(--paper-3); border-left: 2px solid var(--amber);
  border-radius: 7px var(--r-md) var(--r-md) 7px;
}
.feed b { color: var(--ink) }
.stamp {
  display: inline-block; margin-top: 18px; font-size: 12px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--jade);
  padding: 8px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(61,214,140,.4);
}

/* phone mockup — the only interface drawn in code */
.phone {
  position: relative; width: 260px; border-radius: 34px; padding: 8px;
  background: linear-gradient(165deg, #262C31, #14171A);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.8), 0 0 0 1px var(--line);
}
.notch { position: absolute; top: 17px; left: 50%; transform: translateX(-50%); width: 78px; height: 20px; border-radius: 99px; background: #0A0C0D; z-index: 4 }
.screen {
  position: relative; background: var(--paper); border-radius: 27px;
  padding: 46px 13px 12px; overflow: hidden; min-height: 452px;
}
.scr-top { display: flex; justify-content: space-between; align-items: center }
.scr-hi { font-size: 11px; color: var(--ink-3) }
.scr-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em }
.scr-day { font-size: 10.5px; color: var(--amber); padding: 5px 11px; border-radius: 999px; background: rgba(232,145,45,.12) }
.scr-streak { margin-top: 14px; text-align: center; padding: 18px 12px 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md) }
.scr-num { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1; letter-spacing: -.05em; color: var(--amber-hi) }
.scr-cap { font-size: 10.5px; color: var(--ink-3); margin-top: 4px }
.scr-bar { display: block; height: 4px; border-radius: 99px; background: var(--line); margin-top: 12px; overflow: hidden }
.scr-bar i { display: block; height: 100%; width: 68%; border-radius: 99px; background: linear-gradient(90deg, var(--amber-lo), var(--amber-hi)); transition: width .9s var(--ease) }
.scr-sec { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin: 15px 0 7px }
.task { display: flex; align-items: center; gap: 9px; font-size: 12px; padding: 10px 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 6px }
.task em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--ink-3) }
.tick { width: 16px; height: 16px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; position: relative; transition: background .35s var(--ease), border-color .35s var(--ease) }
.tick::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--ink-rev); opacity: 0; transition: opacity .3s var(--ease) }
.task.done .tick { background: var(--jade); border-color: var(--jade) }
.task.done .tick::after { opacity: 1 }
.scr-tab { display: flex; align-items: center; justify-content: space-around; margin-top: 14px; padding: 8px 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px }
.scr-tab i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3) }
.sos {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #fff; letter-spacing: .04em;
  background: radial-gradient(circle at 34% 30%, #FF9D5C, #E0733A 62%);
  box-shadow: 0 5px 18px rgba(224,115,58,.55);
  animation: sos 2.8s ease-in-out infinite;
}
@keyframes sos { 0%,100% { transform: scale(1) } 50% { transform: scale(1.06) } }
.scr-toast {
  position: absolute; top: 50px; left: 13px; right: 13px; z-index: 5;
  background: rgba(232,145,45,.14); box-shadow: inset 0 0 0 1px rgba(232,145,45,.45);
  color: var(--amber-hi); font-size: 11.5px; font-weight: 500; text-align: center;
  padding: 11px; border-radius: 13px; opacity: 0; transform: translateY(-12px);
  transition: opacity .45s var(--ease), transform .5s var(--spring);
}
.scr-toast.on { opacity: 1; transform: none }

/* ── full-bleed plates ────────────────────────────────────── */
.plate-full { position: relative; overflow: clip; display: grid; place-items: center }
.plate-full > img { position: absolute; inset: 0; width: 100%; height: 112%; object-fit: cover; will-change: transform }
.sparks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none }

.manifesto { padding: clamp(120px, 18vh, 220px) var(--gutter) }
.manifesto::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(70% 62% at 50% 50%, rgba(15,17,19,.72), rgba(15,17,19,.9) 60%, var(--paper) 100%);
}
.fill {
  position: relative; z-index: 2; max-width: 20ch;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 4.2vw, 58px); line-height: 1.22; letter-spacing: -.03em;
  margin: 0 auto; text-align: left;
}
.fill span { color: #333A40; transition: color .4s var(--ease) }
.fill span.lit { color: var(--ink) }

.summit { min-height: 78vh; padding: clamp(110px, 16vh, 190px) var(--gutter) }
.summit::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(15,17,19,.5) 26%, rgba(15,17,19,.55) 70%, var(--paper) 100%);
}
.summit-copy { position: relative; z-index: 2; text-align: center; max-width: 62ch; margin-inline: auto }

.closing { min-height: 88vh; padding: clamp(110px, 15vh, 180px) 0 }
.closing::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--paper) 0%, rgba(15,17,19,.55) 24%, rgba(15,17,19,.6) 70%, var(--paper) 100%),
    linear-gradient(90deg, rgba(15,17,19,.86) 0%, rgba(15,17,19,.35) 46%, transparent 66%);
}
.closing-copy { position: relative; z-index: 2 }
.closing-act { margin-top: 32px }
.inline-wl { display: flex; gap: 8px; margin-top: 18px; max-width: 420px }
.inline-wl input {
  flex: 1; min-width: 0; font-family: var(--text); font-size: 15px; color: var(--ink);
  background: rgba(15,17,19,.6); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 14px 18px;
}
.inline-wl input::placeholder { color: var(--ink-3) }
.inline-wl input:focus { outline: none; border-color: var(--amber) }
.wl-ok { margin-top: 18px; color: var(--jade); font-size: 15px; font-weight: 500 }
.fine { margin-top: 14px; font-size: 12.5px; color: var(--ink-3) }

/* ── 03 · the climb ───────────────────────────────────────── */
.chapter-climb { position: relative; width: 100%; max-width: none; padding-inline: 0; padding-bottom: clamp(70px, 9vw, 110px) }
.chapter-climb > .rule {
  width: min(100%, calc(var(--measure) + 2 * var(--gutter)));
  margin-inline: auto; padding-inline: var(--gutter);
}
.climb-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none }
.climb-bg img { width: 100%; height: 116%; object-fit: cover; object-position: 60% 70%; will-change: transform }
.climb-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(15,17,19,.62) 22%, rgba(15,17,19,.68) 72%, var(--paper) 100%);
}
.chapter-climb > * { position: relative; z-index: 2 }
.climb-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 30px;
  margin-bottom: 44px;
}
.day-read { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3) }
.day-read b {
  font-family: var(--display); font-weight: 800; font-size: 62px; letter-spacing: -.05em;
  color: var(--amber); display: block; line-height: 1; font-variant-numeric: tabular-nums;
}
.rail {
  display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none;
  padding-block: 4px 18px; cursor: grab; user-select: none;
  padding-inline: max(var(--gutter), calc((100% - var(--measure)) / 2));
  scroll-snap-type: x proximity;
}
.rail::-webkit-scrollbar { display: none }
.rail.drag { cursor: grabbing }
.stop {
  position: relative; flex: none; width: 306px; scroll-snap-align: center;
  background: rgba(21,24,27,.92); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px 26px 26px; overflow: hidden;
  transition: border-color .35s var(--ease), transform .4s var(--ease);
}
.stop:hover { border-color: var(--amber); transform: translateY(-4px) }
.stop-n {
  position: absolute; top: -14px; right: 10px;
  font-family: var(--display); font-weight: 800; font-size: 92px;
  letter-spacing: -.06em; color: var(--amber); opacity: .14;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.stop h3 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.025em; margin-bottom: 8px }
.stop p { font-size: 14px; color: var(--ink-2) }
.stop-end { border-color: rgba(232,145,45,.5); background: linear-gradient(165deg, rgba(232,145,45,.12), rgba(21,24,27,.94) 62%) }
.stop-end h3 { color: var(--amber-hi) }
.rail-hint { font-size: 12px; color: var(--ink-3); letter-spacing: .08em }

/* ── 04 · the tribe ───────────────────────────────────────── */
.tribe { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 70px); align-items: center }
.tribe-plate img { width: 100%; border: 1px solid var(--line); border-radius: var(--r-xl) }
.marquee {
  margin-top: clamp(48px, 7vw, 84px); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.track { display: flex; gap: 14px; width: max-content; will-change: transform }
.track blockquote {
  width: 340px; flex: none; padding: 26px 28px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  font-family: var(--display); font-weight: 300; font-size: 17px;
  line-height: 1.45; letter-spacing: -.02em;
}
.track cite {
  display: block; margin-top: 14px; font-family: var(--text); font-style: normal;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--amber);
}

/* ── 05 · access ──────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch }
.plan {
  position: relative; padding: 36px 30px 30px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  transition: border-color .35s var(--ease), transform .4s var(--ease);
}
.plan:hover { border-color: var(--line-2); transform: translateY(-3px) }
.plan-lead { border-color: rgba(232,145,45,.55); background: linear-gradient(170deg, rgba(232,145,45,.1), var(--paper-2) 58%) }
.plan-flag {
  position: absolute; top: 16px; right: 16px;
  background: var(--amber); color: var(--ink-rev);
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px;
}
.plan-name { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3) }
.plan-price {
  font-family: var(--display); font-weight: 800; font-size: 52px;
  letter-spacing: -.05em; line-height: 1; margin: 12px 0 8px;
}
.plan-price span { font-family: var(--text); font-size: 14px; font-weight: 300; color: var(--ink-3); letter-spacing: 0; margin-left: 6px }
.plan-note { font-size: 14px; color: var(--ink-2); margin-bottom: 26px; flex: 1 }
.trial { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px }
.trial li { padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 14px; color: var(--ink-2) }
.trial li span { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px }
.trial li b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px }

/* ── 06 · questions ───────────────────────────────────────── */
.faq { border-top: 1px solid var(--line); max-width: 940px }
.faq details { border-bottom: 1px solid var(--line) }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 20px;
  padding: 24px 2px; font-family: var(--display); font-weight: 500; font-size: 19px;
  letter-spacing: -.02em; transition: color .25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none }
.faq summary:hover { color: var(--amber-hi) }
.faq summary i {
  margin-left: auto; flex: none; width: 13px; height: 13px; position: relative;
  transition: transform .35s var(--ease);
}
.faq summary i::before, .faq summary i::after {
  content: ''; position: absolute; background: var(--amber); inset: 6px 0 auto; height: 1px;
}
.faq summary i::after { transform: rotate(90deg) }
.faq details[open] summary i { transform: rotate(135deg) }
.faq p { padding: 0 2px 26px; max-width: 68ch; color: var(--ink-2); font-size: 15.5px }

/* ── footer ───────────────────────────────────────────────── */
.foot { margin-top: clamp(90px, 12vw, 150px); border-top: 1px solid var(--line); padding: 64px 0 36px }
.foot-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px }
.foot-line { margin-top: 14px; font-size: 14px; color: var(--ink-3); max-width: 30ch }
.foot h4 { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 16px }
.foot nav a { display: block; font-size: 14.5px; color: var(--ink-2); text-decoration: none; margin-bottom: 10px; transition: color .25s var(--ease) }
.foot nav a:hover { color: var(--amber-hi) }
.foot-fine { margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3) }

/* ── mobile dock ──────────────────────────────────────────── */
.dock {
  position: fixed; inset: auto 0 0 0; z-index: 95; display: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(15,17,19,0), rgba(15,17,19,.94) 34%, var(--paper));
  transform: translateY(120%); transition: transform .45s var(--ease);
}
.dock.on { transform: none }

/* ── motion system ────────────────────────────────────────────
   Different things enter differently, because they are different
   things. Nothing shares one generic fade.
   ─────────────────────────────────────────────────────────── */

/* easing vocabulary */
:root {
  --ease-out-soft:  cubic-bezier(.16, 1, .3, 1);      /* long, expensive settle */
  --ease-out-crisp: cubic-bezier(.2, .8, .2, 1);      /* short, decisive        */
  --ease-draw:      cubic-bezier(.65, 0, .35, 1);     /* rules & wicks          */
}

/* headlines rise from behind an edge — masked, never faded */
.h-display, .hero-title span { --mask-d: 0s }
/* each line is revealed bottom-up by its own clip, so nothing in the
   layout is ever clipped: descenders and wrapped lines stay intact */
.h-display > .line-in {
  display: block;
  clip-path: inset(-.22em -.14em 100% -.07em);
  transform: translateY(.42em);
  transition: clip-path 1.1s var(--ease-out-soft) var(--mask-d),
              transform 1.15s var(--ease-out-soft) var(--mask-d);
}
.h-display.in > .line-in {
  clip-path: inset(-.22em -.14em -.2em -.07em);
  transform: none;
}

/* body copy: shorter travel, quicker, no drama */
.lede.reveal, p.reveal, .fine.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s var(--ease-out-crisp), transform .7s var(--ease-out-crisp);
}

/* plates and figures: settle in from a hair larger, slower than text */
figure.reveal, .tribe-plate.reveal, .urge-orb.reveal {
  opacity: 0; transform: scale(1.045);
  transition: opacity 1.3s var(--ease-out-soft), transform 1.4s var(--ease-out-soft);
}
figure.reveal.in, .tribe-plate.reveal.in, .urge-orb.reveal.in { transform: none }

/* cards: rise a little, each on its own beat */
.card.reveal, .plan.reveal, .trial.reveal, .faq.reveal, .facts.reveal, .marquee.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease-out-crisp), transform .9s var(--ease-out-soft);
}

/* the closing act: the only element allowed a slow, cinematic entrance */
.closing-act.reveal, .inline-wl.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 1.1s var(--ease-out-soft), transform 1.1s var(--ease-out-soft);
}

.reveal.in { opacity: 1; transform: none }
.d1 { transition-delay: .09s } .d2 { transition-delay: .19s } .d3 { transition-delay: .32s }

/* ── the signature: chapter rules light like a wick ────────── */
.rule { position: relative }
.rule::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--amber), var(--amber-hi) 55%, transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.5s var(--ease-draw);
}
.rule.in::after { transform: scaleX(1) }
/* the ember that runs ahead of the flame */
.rule::before {
  content: ''; position: absolute; bottom: -3px; left: 0; width: 5px; height: 5px;
  border-radius: 50%; background: var(--amber-hi);
  box-shadow: 0 0 12px 2px rgba(232,145,45,.85);
  opacity: 0; transform: translateX(0);
}
.rule.in::before { animation: wick 1.5s var(--ease-draw) forwards }
@keyframes wick {
  0%   { opacity: 0; left: 0 }
  12%  { opacity: 1 }
  88%  { opacity: 1 }
  100% { opacity: 0; left: 100% }
}

/* ── scroll-driven, native (no JS, runs on the compositor) ─── */
@supports (animation-timeline: view()) {
  /* plates breathe open as they cross the viewport */
  .plate-full > img, .climb-bg img {
    animation: plate-scale linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes plate-scale {
    from { transform: scale(1.12) }
    to   { transform: scale(1.02) }
  }

  /* the day numeral grows as you travel the climb */
  .day-read b {
    animation: day-grow linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 60%;
  }
  @keyframes day-grow {
    from { opacity: .25; transform: translateY(14px) scale(.9) }
    to   { opacity: 1;   transform: none }
  }

  /* the hero title dissolves upward as you leave it behind */
  .hero-body {
    animation: hero-exit linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 90%;
  }
  @keyframes hero-exit {
    from { opacity: 1; transform: none }
    to   { opacity: 0; transform: translateY(-70px) }
  }

  /* stops on the rail tilt in as they scroll past horizontally */
  .stop {
    animation: stop-in linear both;
    animation-timeline: view(inline);
    animation-range: entry 0% entry 85%;
  }
  @keyframes stop-in {
    from { opacity: .35; transform: translateY(16px) }
    to   { opacity: 1;   transform: none }
  }
}

/* ── film grain: analogue imperfection over the plates ─────── */
.plate-full::before, .hero::before {
  content: ''; position: absolute; inset: 0; z-index: 3;
  pointer-events: none; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: grain 1.1s steps(3) infinite;
}
@keyframes grain {
  0%   { transform: translate(0,0) }
  33%  { transform: translate(-3%, 2%) }
  66%  { transform: translate(2%, -3%) }
  100% { transform: translate(0,0) }
}

/* ── quiz modal ───────────────────────────────────────────── */
body.locked { overflow: hidden }
.modal { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 20px }
.modal[hidden] { display: none }
.modal-veil { position: absolute; inset: 0; background: rgba(8,9,10,.8); backdrop-filter: blur(8px); animation: fade .3s var(--ease) }
@keyframes fade { from { opacity: 0 } }
.modal-card {
  position: relative; width: min(500px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--paper-2); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  padding: 40px 36px 34px;
  animation: pop .45s var(--spring);
}
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97) } }
.modal-x {
  position: absolute; top: 12px; right: 14px; width: 32px; height: 32px;
  background: none; border: 0; color: var(--ink-3); font-size: 22px; cursor: pointer;
  transition: color .25s var(--ease);
}
.modal-x:hover { color: var(--ink) }
.modal-bar { display: block; height: 3px; border-radius: 99px; background: var(--line); margin-bottom: 28px; overflow: hidden }
.modal-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber-lo), var(--amber-hi)); transition: width .5s var(--ease) }
.q-step { animation: slide .4s var(--ease) }
@keyframes slide { from { opacity: 0; transform: translateX(20px) } }
.q-back { background: none; border: 0; color: var(--ink-3); font-family: var(--text); font-size: 13.5px; cursor: pointer; padding: 0 0 14px; transition: color .25s }
.q-back:hover { color: var(--ink) }
.q-count { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px }
.q-ask { font-family: var(--display); font-weight: 700; font-size: 25px; letter-spacing: -.025em; line-height: 1.16; margin-bottom: 24px }
.q-opt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font-family: var(--text); font-size: 15.5px; color: var(--ink);
  background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 16px 19px; margin-bottom: 10px;
  opacity: 0; transform: translateY(12px);
  animation: qin .45s var(--ease) forwards; animation-delay: calc(var(--i) * .06s + .08s);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
@keyframes qin { to { opacity: 1; transform: none } }
.q-opt:hover { border-color: var(--amber) }
.q-opt.sel { border-color: var(--amber); background: rgba(232,145,45,.13) }
.q-result { text-align: center }
.q-level { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: 9px 18px; border-radius: 999px; margin-bottom: 18px }
.q-meter { display: flex; gap: 5px; margin: 18px 0 6px }
.q-meter span { flex: 1; font-size: 11px; padding: 11px 2px; text-align: center; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--r-xs); color: var(--ink-3) }
.q-desc { color: var(--ink-2); font-size: 15px; margin: 16px 0 4px }
.q-free { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.03em; margin: 18px 0 4px }
.q-free b { color: var(--amber-hi) }
.q-sub { font-size: 13px; color: var(--ink-3); margin-bottom: 22px }
.q-form { display: flex; gap: 8px }
.q-form input {
  flex: 1; min-width: 0; font-family: var(--text); font-size: 15px; color: var(--ink);
  background: var(--paper-3); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 15px 18px;
}
.q-form input:focus { outline: none; border-color: var(--amber) }
.q-done { text-align: center; padding: 24px 0 8px }
.q-done .orb {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 22px;
  background: radial-gradient(circle at 34% 30%, #fff, #F0E9DC 46%, var(--amber));
  box-shadow: 0 0 46px rgba(232,145,45,.6);
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(.9) } 50% { transform: scale(1.06) } }
.q-done h3 { font-family: var(--display); font-weight: 800; font-size: 29px; letter-spacing: -.03em; margin-bottom: 10px }
.q-done p { color: var(--ink-2); font-size: 15px; max-width: 34ch; margin: 0 auto }

/* ── focus ────────────────────────────────────────────────── */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 3px;
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, 1fr) }
  .card-tall { grid-row: auto; grid-column: span 2 }
  .card-wide { grid-column: span 2 }
  .urge, .tribe, .sys-head { grid-template-columns: 1fr; gap: 40px }
  .foot-inner { grid-template-columns: 1fr 1fr }
  .mast-nav { display: none }
  .mast-mark { margin-left: 18px }
}
@media (max-width: 720px) {
  body { font-size: 16px }
  .grid, .plans, .trial { grid-template-columns: 1fr }
  .card-tall, .card-wide { grid-column: auto }
  .plan-lead { order: -1 }
  .dock { display: block }
  .mast-mark { display: none }
  .hero { padding-bottom: 96px }
  .hero-index { display: none }
  .facts dt { min-width: 96px; font-size: 23px }
  .fill { max-width: none }
  .climb-head { flex-direction: column; align-items: flex-start; gap: 14px }
  .day-read b { font-size: 46px }
  .stop { width: 264px }
  .foot-inner { grid-template-columns: 1fr; gap: 30px }
}

/* ── reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important }
  html { scroll-behavior: auto }
  .rise, .reveal, .q-opt,
  figure.reveal, .card.reveal, .plan.reveal { opacity: 1 !important; transform: none !important }
  .rule::after { transform: scaleX(1) !important }
  .h-display > .line-in { clip-path: none !important; transform: none !important }
  .rule::before, .plate-full::before, .hero::before { display: none }
  .fill span { color: var(--ink) }
}
