:root {
  --bg: #faf9f5;
  --line: #e8e6dc;
  --ink: #141413;
  --ink-2: #30302e;
  --muted: #5e5d59;
  --clay: #d97757;
  --clay-deep: #a94e2c;
  --deep: #1f1512;
  --cream: #faf9f5;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --s-small: 0.875rem;
  --s-body: 1.0625rem;
  --s-lead: clamp(1.1875rem, 1.1rem + 0.45vw, 1.375rem);
  --s-head: clamp(2.125rem, 1.4rem + 3.1vw, 3.75rem);
  --s-display: clamp(2.75rem, 1.5rem + 5.6vw, 6rem);

  --gutter: clamp(20px, 5vw, 80px);
  --radius: 8px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--clay-deep); }
svg { display: block; }
.defs { position: absolute; }
:focus-visible { outline: 2px solid var(--clay-deep); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--clay); color: #141413; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; color: var(--bg); }

h1, h2, .close-line {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.04;
  text-wrap: balance;
}
h1 { font-size: var(--s-display); line-height: 0.98; letter-spacing: -0.03em; }
.br-d { display: none; }
h2 { font-size: var(--s-head); }
h3 { font-family: var(--sans); font-size: var(--s-body); font-weight: 600; }
.lead { font-size: var(--s-lead); line-height: 1.45; text-wrap: pretty; }
.fine { font-size: var(--s-small); color: var(--muted); line-height: 1.5; }

/* buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--radius); border: 1px solid var(--ink);
  font: 500 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.94); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--bg); }
.btn-line { background: transparent; color: var(--ink); min-width: 92px; }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-line.is-done { background: var(--clay); border-color: var(--clay); color: #141413; }
.link {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 500; text-decoration: underline;
}
html:not(.js) [data-copy] { display: none; }

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h); padding-inline: var(--gutter);
  position: relative; z-index: 10;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
html.js .nav { position: fixed; inset: 0 0 auto 0; }
html.js .nav.is-solid { background: var(--bg); border-bottom-color: var(--line); }
html.js .nav.is-away { transform: translateY(-101%); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-family: var(--serif); font-size: 1.375rem; letter-spacing: -0.01em; }
.brand:hover { color: inherit; }
.mark { width: 26px; height: 26px; fill: var(--clay); transition: transform 0.6s var(--ease); }
.brand:hover .mark { transform: rotate(60deg) scale(0.86); }
.nav-links { display: none; gap: 28px; font-size: 0.9375rem; }
.nav-links a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a:hover { text-decoration: underline; }
.nav-buy { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }
html.on-dark .nav { color: var(--cream); }
html.on-dark .mark { fill: var(--cream); }
.nav-buy { transition: opacity 0.3s, visibility 0.3s, background-color 0.2s, color 0.2s, border-color 0.2s; }
.nav.has-buy-below .nav-buy { opacity: 0; visibility: hidden; }
html.on-dark .nav.is-solid { background: var(--deep); border-bottom-color: rgb(250 249 245 / 0.14); }
html.on-dark .nav .btn-solid { background: var(--cream); color: #141413; border-color: var(--cream); }
html.on-dark .nav a:hover { color: var(--cream); }
@media (min-width: 860px) { .nav-links { display: flex; } }

/* the ride */
#ride {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; display: none; opacity: 0;
  transition: opacity 0.5s;
}
html.ride #ride { display: block; }
html.ride-ready #ride { opacity: 1; }
html.ride-done #ride { visibility: hidden; }

.stage { position: relative; z-index: 2; }
.stage-pin {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  padding-block: 24px 60px;
  overflow: clip;
}
html.js .stage-pin { padding-top: calc(var(--nav-h) + 8px); }
html.ride .stage { height: 300vh; }
html.ride .stage-pin { position: sticky; top: 0; height: 100svh; }

.hero { display: grid; gap: clamp(14px, 2.4svh, 40px); justify-items: start; }
.hero-burst { width: min(52vw, 21svh); aspect-ratio: 1; justify-self: center; }
.burst-still { width: 100%; height: 100%; fill: var(--clay); transition: opacity 0.4s; }
html.ride-ready .burst-still { opacity: 0; }
.hero-copy { display: grid; gap: 18px; justify-items: start; max-width: 38rem; will-change: opacity, transform; }
.hero-copy .lead { max-width: 34rem; }

.ca { display: grid; gap: 6px; width: 100%; max-width: 34rem; }
.ca-label { font-size: var(--s-small); color: var(--muted); }
.ca-row { display: flex; align-items: stretch; gap: 10px; }
.ca-code {
  flex: 1; min-width: 0; display: flex; align-items: center;
  font: 0.875rem/1.35 var(--mono); word-break: break-all;
  padding: 6px 0; border-bottom: 1px solid var(--ink);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

.tape { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; overflow: hidden; border-top: 1px solid var(--line); display: flex; align-items: center; }
.tape-run { display: flex; flex: none; white-space: nowrap; font-size: var(--s-small); color: var(--muted); font-variant-numeric: tabular-nums; animation: tape 36s linear infinite; }
.tape-run span { padding-inline: 18px; }
.tape-run span::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 36px; background: url("assets/burst.svg") center / contain no-repeat; }
.tape-run b { font-weight: 600; color: var(--ink); margin-left: 4px; }
@keyframes tape { to { transform: translateX(-50%); } }

.cue {
  display: none; position: absolute; left: 0; right: 0; bottom: 52px;
  justify-content: center; align-items: center; gap: 10px;
  font-size: var(--s-small); color: var(--muted);
}
@media (min-width: 860px) { html.ride .cue { display: flex; } }
.cue svg { animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

.depth {
  display: none; position: fixed; left: var(--gutter); bottom: 14px; z-index: 5; margin: 0;
  font: 500 var(--s-small)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
  color: var(--cream); opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
html.ride .depth { display: block; }
html.ride.on-dark .depth { opacity: 0.9; }

@media (max-height: 760px) and (max-width: 859px) {
  .hero-copy { gap: 10px; }
  .hero { gap: 14px; }
  .hero-burst { width: min(30vw, 14svh); }
  h1 { font-size: 2.25rem; }
  .hero-copy .lead { font-size: 1rem; line-height: 1.4; }
  .btn { min-height: 44px; }
  .link { min-height: 44px; }
}
@media (max-width: 999px) {
  html.ride .depth { display: none; }
}
@media (max-width: 619px) {
  .out .actions { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (min-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); align-items: center; gap: 40px; }
  .hero-burst { order: 2; width: min(54vw, 96svh); justify-self: start; margin-right: -22vw; margin-left: -2vw; }
  .hero-copy { gap: 24px; }
  h1 { font-size: clamp(3.25rem, 0.6rem + 4.3vw, 4.75rem); }
  .br-d { display: inline; }
}

/* the inside: every section rides the tunnel, so the tokens flip to cream on deep clay */
.inside {
  --bg: var(--deep);
  --ink: #faf9f5;
  --ink-2: #ece7dd;
  --muted: #cfc8ba;
  --line: rgb(250 249 245 / 0.18);
  --clay-deep: #e08463;
  position: relative; z-index: 2;
  background: var(--deep); color: var(--ink);
}
html.ride .inside { background: transparent; }

.sec { position: relative; padding-block: clamp(72px, 11vw, 150px); display: grid; gap: clamp(36px, 6vw, 72px); justify-items: center; }
.sec > * { width: 100%; max-width: 42rem; }
html.ride .sec { padding-block: 20vh; }
.sec-head { display: grid; gap: 20px; justify-items: center; text-align: center; }
.sec-head p:not(.lead) { color: var(--muted); text-wrap: pretty; }
.sec p a, .eras a, .faq a { text-decoration: underline; }

/* the plan */
#plan > h2 { max-width: none; text-align: center; font-size: clamp(3rem, 11vw, 10rem); line-height: 0.9; letter-spacing: -0.04em; text-wrap: balance; }
.sec-head .chant { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.18; letter-spacing: -0.015em; color: var(--clay); text-wrap: balance; }

/* lore: five stations */
.eras { display: grid; }
.eras li { display: grid; gap: 18px; justify-items: center; text-align: center; align-content: center; padding-block: 44px; border-top: 1px solid var(--line); }
html.ride .eras li { min-height: 78vh; border-top: 0; padding-block: 0; }
.eras time { font-family: var(--serif); font-size: clamp(4.5rem, 2rem + 13vw, 10.5rem); line-height: 0.86; letter-spacing: -0.045em; color: var(--clay); font-variant-numeric: lining-nums; }
.eras p { max-width: 30rem; font-size: var(--s-lead); line-height: 1.42; text-wrap: pretty; }
.eras cite { font-style: italic; }

/* thick */
#thick > h2 { max-width: none; text-align: center; font-size: clamp(3rem, 12.5vw, 11rem); line-height: 0.9; color: var(--clay); letter-spacing: -0.04em; margin-bottom: calc(clamp(36px, 6vw, 72px) * -0.4); }
.figures { display: grid; margin: 0; border-top: 1px solid var(--line); }
.figures div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.figures dt { color: var(--muted); font-size: var(--s-small); }
.figures dd.is-tick { animation: tick 0.6s var(--ease); }
@keyframes tick { 0% { transform: scale(1.18); color: var(--clay); } 100% { transform: none; } }
.figures dd { font-family: var(--serif); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); line-height: 1; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; }

.whale { display: grid; gap: 28px; }
.whale-label { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); letter-spacing: -0.015em; line-height: 1.15; text-align: center; }
.whale-input { display: grid; gap: 4px; justify-items: center; }
.whale-size { font: 500 var(--s-lead)/1 var(--sans); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 60px; margin: 0; background: transparent; cursor: grab; font-size: 16px;
  --fill: 70.8%;
}
input[type="range"]:active { cursor: grabbing; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 12px; border-radius: 6px;
  background: linear-gradient(to right, var(--clay) var(--fill), var(--line) var(--fill));
}
input[type="range"]::-moz-range-track { height: 12px; border-radius: 6px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 12px; border-radius: 6px; background: var(--clay); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 56px; height: 56px; margin-top: -22px; border: 0; border-radius: 50%;
  background: #faf9f5 url("assets/burst-ink.svg") center / 48px 48px no-repeat;
  transition: transform 0.3s var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 56px; height: 56px; border: 0; border-radius: 50%;
  background: #faf9f5 url("assets/burst-ink.svg") center / 48px 48px no-repeat;
}
input[type="range"]:hover::-webkit-slider-thumb { transform: rotate(30deg) scale(1.08); }
input[type="range"]:active::-webkit-slider-thumb { transform: rotate(75deg) scale(0.82); }
input[type="range"]:focus-visible { outline: 2px solid var(--clay-deep); outline-offset: 2px; border-radius: var(--radius); }

.whale-result { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.whale-result > div { display: grid; gap: 8px; justify-items: center; text-align: center; align-content: start; }
.whale-num { font-family: var(--serif); font-size: clamp(2.75rem, 1rem + 8.5vw, 7.5rem); line-height: 0.86; letter-spacing: -0.045em; font-variant-numeric: tabular-nums lining-nums; }
.whale-here .whale-num { color: var(--clay); }
.whale-there .whale-num { color: var(--muted); }
.whale-cap { max-width: 13rem; color: var(--muted); font-size: 1rem; line-height: 1.4; }
.whale-here .whale-cap { color: var(--ink); }
.whale > .fine { text-align: center; }

/* pair */
.hops { display: grid; }
.hops li { display: grid; gap: 16px; justify-items: center; text-align: center; padding-block: 28px; font-family: var(--serif); font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
html.ride .hops li { padding-block: 13vh; }
.hop-n { width: 40px; height: 40px; }
.hop-n svg { width: 100%; height: 100%; fill: var(--clay); animation: spin 14s linear infinite; }
.hops li:nth-child(2) .hop-n svg { animation-duration: 9s; animation-direction: reverse; }
.hops li:nth-child(3) .hop-n svg { animation-duration: 6s; }
@keyframes spin { to { transform: rotate(360deg); } }
.split { display: grid; gap: 36px; }
.split > p { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.18; letter-spacing: -0.015em; text-wrap: balance; text-align: center; }
.split > div { display: grid; gap: 12px; color: var(--muted); }
.split h3 { color: var(--ink); }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr 28px; gap: 16px; align-items: center;
  min-height: 72px; padding-block: 16px;
  font-family: var(--serif); font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.625rem); line-height: 1.15; letter-spacing: -0.012em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 28px; height: 28px;
  background: url("assets/burst.svg") center / contain no-repeat;
  transition: transform 0.6s var(--ease);
}
.faq summary:hover::after { transform: rotate(60deg); }
.faq details[open] summary::after { transform: rotate(180deg) scale(0.55); }
.faq details p { padding: 0 44px 24px 0; color: var(--ink-2); }
html.ride #pair { padding-bottom: 118vh; }

/* out the other side */
.out { position: relative; z-index: 2; display: grid; gap: 36px; padding-block: clamp(72px, 11vw, 150px); }
html.ride .out { padding-top: 10vh; }
.out-line { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); letter-spacing: -0.015em; color: var(--muted); padding-bottom: 56px; text-align: center; }
html.ride .out-line { position: absolute; left: 0; right: 0; bottom: 24vh; padding-bottom: 0; color: #141413; font-size: clamp(2rem, 1.2rem + 3.4vw, 3.75rem); letter-spacing: -0.025em; }
.close-line { font-size: var(--s-display); line-height: 0.98; letter-spacing: -0.03em; max-width: 15em; }
.close-line span { display: block; }

/* footer */
.foot { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--line); }
.foot-in { display: grid; gap: 12px; padding-block: 40px 32px; }
.foot-legal, .foot-src { font-size: var(--s-small); line-height: 1.55; color: var(--muted); max-width: 46rem; }
.foot-crop { height: calc(min(150vw, 1100px) * 0.46); overflow: hidden; }
.foot-mark { width: min(150vw, 1100px); height: min(150vw, 1100px); fill: var(--clay); position: relative; left: 50%; translate: -50% 0; animation: spin 90s linear infinite; }

/* things arrive from the far end */
html.js [data-rise] { opacity: 0; transform: scale(0.82); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
html.js [data-rise].is-in { opacity: 1; transform: none; }

@media (min-width: 620px) {
  .figures { grid-template-columns: repeat(3, 1fr); column-gap: 32px; border-top: 0; }
  .figures div { flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; border-bottom: 0; border-top: 1px solid var(--line); padding-block: 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html.js [data-rise] { opacity: 1; transform: none; }
}

@media (max-height: 700px) and (max-width: 859px) {
  .tape { display: none; }
  .stage-pin { padding-bottom: 16px; }
}
