@import url("assets/fonts/fonts.css");

:root {
  --ink: #0B0B0C;
  --ink-raised: #151516;
  --cream: #EDE8DA;
  --cream-dim: #A8A494;      /* secondary text on ink, tinted from cream */
  --cream-faint: #8C8879;    /* struck-through and tertiary text on ink */
  --paper-ink-dim: #575344;  /* secondary text on cream */
  --lime: #BEF264;
  --lime-up: #CDF783;
  --line: rgba(237, 232, 218, 0.14);
  --line-paper: rgba(11, 11, 12, 0.16);

  --display: "Instrument Serif", "Times New Roman", serif;
  --text: "Geist", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; scrollbar-color: #3a3a36 var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--lime); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.sheet :focus-visible { outline-color: var(--ink); }

.wrap { width: min(100% - 2 * var(--gutter), 80rem); margin-inline: auto; }

.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 40; padding: .6rem 1rem; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: .6rem; }

h1, h2, h3, dt { font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.6vw, 6rem); line-height: .98; letter-spacing: -0.022em; }
.ln { display: block; }
h2 { font-size: clamp(2.5rem, 5vw, 5rem); line-height: .98; letter-spacing: -0.02em; }

/* ---------- motion primitives ---------- */
/* Words rise out of a mask. Hidden only once JS has confirmed it will reveal them. */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; transition: transform .9s var(--ease-out); transition-delay: calc(var(--i) * 38ms); }
.js [data-split]:not(.is-in) .w > span { transform: translateY(108%); }

[data-rise] { transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-rise]:not(.is-in) { opacity: 0; transform: translateY(18px); }

[data-stagger] > * { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-stagger]:not(.is-in) > * { opacity: 0; transform: translateY(14px); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .9rem;
  min-height: 3.5rem; padding: .5rem .5rem .5rem 1.5rem;
  border-radius: 999px;
  font: 500 1.0625rem/1.2 var(--text); letter-spacing: -0.005em; text-decoration: none;
  transition: transform .16s ease-out, translate .5s var(--ease-out), background-color .2s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--small { min-height: 2.75rem; padding: .5rem 1.15rem; font-size: .9375rem; }
.btn--big { min-height: 4.25rem; padding-left: 2rem; font-size: 1.1875rem; }
.btn__dot { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--ink); color: var(--lime); }
.btn--ink .btn__dot { background: var(--cream); color: var(--ink); }
.btn--big .btn__dot { width: 3.25rem; height: 3.25rem; }
.btn__dot svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn--lime:hover { background: var(--lime-up); }
  .btn--ink:hover { background: #232321; }
  .btn:hover .btn__dot svg { transform: rotate(-45deg); }
}
.textlink { position: relative; padding: .75rem 0; text-decoration: none; }
.textlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: .55rem; height: 1px; background: currentColor; opacity: .45; transform-origin: left; transition: transform .45s var(--ease-out), opacity .2s ease; }
@media (hover: hover) and (pointer: fine) { .textlink:hover::after { transform: scaleX(.4); opacity: 1; } }

/* ---------- floating header ---------- */
.bar {
  position: fixed; left: 50%; top: max(.75rem, env(safe-area-inset-top)); z-index: 30;
  width: min(100% - 1.5rem, 46rem); height: 3.75rem; padding: 0 .5rem 0 1.4rem;
  display: flex; align-items: center; gap: 1.5rem;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(21, 21, 22, 0.66);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  transform: translateX(-50%);
  transition: transform .5s var(--ease-out);
}
.bar.is-away:not(:focus-within) { transform: translate(-50%, calc(-100% - 1.5rem)); }
.bar__logo { display: flex; align-items: center; min-height: 2.75rem; margin-right: auto; }
.bar__logo img { height: 1.3rem; width: auto; }
.bar__nav { display: flex; gap: 1.6rem; font-size: .9375rem; color: var(--cream-dim); }
.bar__nav a { padding: .75rem 0; text-decoration: none; transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) { .bar__nav a:hover { color: var(--cream); } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(7.5rem, 17vh, 11rem) 0 clamp(3rem, 8vh, 6rem); overflow: clip; }
.hero__glow {
  position: absolute; left: 0; top: 0; width: 70rem; height: 70rem; margin: -35rem 0 0 -35rem;
  background: radial-gradient(closest-side, rgba(237, 232, 218, .075), rgba(237, 232, 218, 0));
  pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  transform: translate3d(70vw, 30vh, 0);
}
.hero__glow.is-on { opacity: 1; }
.hero .wrap { position: relative; }
.hero__row { margin-top: clamp(2.25rem, 6vh, 4.5rem); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.lede { max-width: 30rem; font-size: clamp(1.125rem, .5vw + 1rem, 1.375rem); line-height: 1.45; color: var(--cream-dim); }
.hero__act { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; }
.terms { margin-top: 2.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .35rem 1.6rem; max-width: 30rem; font-size: .9375rem; color: var(--cream-dim); }
.terms li { display: flex; align-items: center; gap: .55rem; }
.terms li::before { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: var(--cream-dim); }

.js .stage:not(.is-in) .stage__frame { clip-path: inset(100% 0 0 0 round 22px); }
.stage__frame { position: relative; overflow: hidden; border-radius: 22px; background: var(--ink-raised); clip-path: inset(0 0 0 0 round 22px); transition: clip-path 1.2s var(--ease-in-out) .15s; }
.stage__frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: saturate(.86) contrast(1.03); transform: scale(1.12) translate3d(0, var(--py, 0px), 0); will-change: transform; }
.stage figcaption { margin-top: .9rem; display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--cream-dim); }
.stage figcaption strong { font-weight: 500; color: var(--cream); }

.stage__play { position: absolute; left: 50%; top: 50%; width: 5rem; height: 5rem; margin: -2.5rem 0 0 -2.5rem; border: 0; border-radius: 50%; background: var(--lime); cursor: pointer; display: grid; place-items: center; transition: transform .16s ease-out; }
.stage__play[hidden] { display: none; }
.stage__play svg { width: 1.7rem; height: 1.7rem; fill: var(--ink); }
.stage__play:active { transform: scale(.95); }

/* the release card: what gets built, ticking in once the stage has arrived */
.release {
  position: absolute; left: clamp(.75rem, 2vw, 1.4rem); bottom: clamp(.75rem, 2vw, 1.4rem);
  min-width: 13.5rem; padding: 1rem 1.15rem 1.05rem;
  border-radius: 16px; border: 1px solid rgba(237, 232, 218, .16); border-top-color: rgba(237, 232, 218, .3);
  background: rgba(11, 11, 12, .8);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  transition: opacity .6s var(--ease-out) .5s, transform .6s var(--ease-out) .5s, filter .6s var(--ease-out) .5s;
}
.js .stage:not(.is-in) .release { opacity: 0; transform: translateY(12px) scale(.97); filter: blur(6px); }
.release__title { font: 400 1.5rem/1 var(--display); letter-spacing: -0.01em; }
.release__title b { font-weight: 400; color: var(--lime); }
.release ul { margin-top: .8rem; display: grid; gap: .5rem; font-size: .9375rem; }
.release li { display: flex; align-items: center; gap: .6rem; transition: opacity .4s ease; transition-delay: calc(.85s + var(--i) * .09s); }
.release svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 18; stroke-dashoffset: 0; transition: stroke-dashoffset .45s var(--ease-out); transition-delay: calc(.85s + var(--i) * .09s); }
.js .stage:not(.is-in) .release li { opacity: .35; }
.js .stage:not(.is-in) .release svg { stroke-dashoffset: 18; }

/* ---------- audience band ---------- */
.band { padding: clamp(1.75rem, 4vh, 3rem) 0; border-block: 1px solid var(--line); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.band__track { display: flex; width: max-content; animation: band 76s linear infinite; }
.band span { display: flex; align-items: center; font: italic 400 clamp(1.75rem, 3.4vw, 3.25rem)/1.1 var(--display); letter-spacing: -0.01em; color: var(--cream-dim); white-space: nowrap; }
.band span::after { content: ""; width: .32em; height: .32em; margin: 0 .85em; border-radius: 50%; background: var(--cream-faint); opacity: .6; }
@keyframes band { to { transform: translateX(-50%); } }
/* four copies: half the track is two copies, so the loop holds on very wide screens */

/* ---------- what ships ---------- */
.ships { padding: clamp(5rem, 14vh, 10rem) 0; }
.ships__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.ships__side { position: sticky; top: 7rem; }
.ships__intro { margin-top: 1.25rem; max-width: 24rem; color: var(--cream-dim); }

.meter { margin-top: clamp(2rem, 6vh, 4rem); }
.meter__num { display: flex; align-items: baseline; font-family: var(--display); font-size: clamp(6rem, 13vw, 12.5rem); line-height: .82; letter-spacing: -0.035em; font-variant-numeric: lining-nums; color: var(--cream); transition: color .6s ease; }
.meter__num b { font-weight: 400; display: inline-block; transition: transform .5s var(--ease-out), opacity .3s ease, filter .3s ease; }
.meter__num.is-ticking b { transform: translateY(.22em); opacity: 0; filter: blur(8px); transition-duration: 0s; }
.meter.is-done .meter__num { color: var(--lime); }
.meter__track { display: block; margin-top: 1.6rem; height: 2px; max-width: 24rem; background: var(--line); }
.meter__track i { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(var(--p, 1)); transition: transform .8s var(--ease-out); }

.part { padding: 2rem 0 2.1rem; border-top: 1px solid var(--line); }
.part:last-child { border-bottom: 1px solid var(--line); }
.part__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.part h3 { font-size: clamp(2rem, 2.4vw + 1.2rem, 3.5rem); line-height: 1; letter-spacing: -0.018em; transition: color .6s ease; }
.owner { flex: none; padding: .32rem .7rem; border-radius: 999px; border: 1px solid var(--line); font-size: .8125rem; font-weight: 500; color: var(--cream-dim); transition: color .5s ease, border-color .5s ease, background-color .5s ease; }
.owner--mine { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.part p { max-width: 36rem; }
.was { margin-top: 1rem; color: var(--cream-faint); transition: color .5s ease; }
/* the strike is drawn, line by line, when the part ships */
.was span { background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 100% 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .7s var(--ease-in-out); }
.now { margin-top: .4rem; color: var(--cream); transition: color .6s ease, transform .7s var(--ease-out); }
.part__head + .now { margin-top: 1rem; }

/* until a part has shipped it reads as version zero; without JS everything is shipped */
.js .part:not(.is-shipped) h3 { color: var(--cream-faint); }
.js .part:not(.is-shipped) .was { color: var(--cream-dim); }
.js .part:not(.is-shipped) .was span { background-size: 0% 1px; }
.js .part:not(.is-shipped) .now { color: var(--cream-faint); transform: translateY(6px); }
.js .part:not(.is-shipped) .owner { color: var(--cream-faint); background: transparent; border-color: var(--line); }

/* ---------- the deal (cream sheet) ---------- */
.deal { padding: 0 clamp(.5rem, 1.2vw, 1rem); }
.sheet { background: var(--cream); color: var(--ink); border-radius: clamp(1.5rem, 3vw, 2.75rem); padding: clamp(4rem, 11vh, 8rem) 0; }
.sheet ::selection { background: var(--ink); color: var(--cream); }
.deal__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.deal dl { margin-top: clamp(2rem, 5vh, 3.5rem); }
.deal dl > div { padding: 1.6rem 0 1.7rem; border-top: 1px solid var(--line-paper); display: grid; gap: .35rem; }
.deal dl > div:last-child { border-bottom: 1px solid var(--line-paper); }
.deal dt { font-size: clamp(1.625rem, 1.4vw + 1.2rem, 2.5rem); line-height: 1.05; letter-spacing: -0.015em; }
.deal dd { color: var(--paper-ink-dim); max-width: 34rem; }
.note { position: sticky; top: 7rem; padding-top: .5rem; }
.note p + p { margin-top: 1rem; }
.note .note__sign { margin-top: 2rem; display: flex; flex-direction: column; gap: .2rem; font-size: .9375rem; color: var(--paper-ink-dim); }
.note__sign em { font: italic 400 2.25rem/1.1 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.note .btn { margin-top: 2rem; }

/* ---------- close ---------- */
.close { padding: clamp(6rem, 17vh, 12rem) 0 clamp(5rem, 13vh, 9rem); }
.close h2 { font-size: clamp(2.9rem, 6.6vw, 6rem); line-height: .98; letter-spacing: -0.022em; max-width: 14ch; }
.close__row { margin-top: clamp(2.5rem, 7vh, 5rem); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: end; }
.close__small { margin-top: 1.1rem; font-size: .9375rem; color: var(--cream-dim); }
.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.75rem 1fr; align-items: baseline; padding: 1.25rem 0; border-top: 1px solid var(--line); font-size: 1.125rem; color: var(--cream); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); font: italic 400 1.625rem/1 var(--display); color: var(--cream-dim); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: clamp(2.5rem, 6vh, 4rem) 0 calc(2.5rem + env(safe-area-inset-bottom)); font-size: .875rem; color: var(--cream-dim); overflow: hidden; }
.foot__mark { font: 400 clamp(3.25rem, 13.5vw, 13.5rem)/.9 var(--display); letter-spacing: -0.03em; color: var(--cream); white-space: nowrap; }
.foot__logo { height: 1.3rem; width: auto; align-self: center; }
.foot__row { margin-top: clamp(2rem, 5vh, 3.5rem); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 3rem; align-items: baseline; }
.foot__links { display: flex; flex-wrap: wrap; gap: .25rem 2rem; }
.foot__links a { display: inline-block; padding: .65rem 0; text-decoration: none; color: var(--cream); }
@media (hover: hover) and (pointer: fine) { .foot__links a:hover { text-decoration: underline; text-underline-offset: .28em; } }
.foot__legal { max-width: 34rem; line-height: 1.6; }

/* ---------- video dialog ---------- */
.player { width: min(100% - 2rem, 64rem); padding: 0; border: 0; background: transparent; overflow: visible; }
.player::backdrop { background: rgba(5, 5, 6, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.player__box { aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; }
.player__box > * { width: 100%; height: 100%; border: 0; display: block; }
.player__close { position: absolute; right: 0; top: -3.25rem; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(237, 232, 218, .12); cursor: pointer; display: grid; place-items: center; transition: transform .16s ease-out; }
.player__close:active { transform: scale(.94); }
.player__close svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linecap: round; }
.player[open] { opacity: 1; transform: scale(1); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); }
@starting-style { .player[open] { opacity: 0; transform: scale(.96); } }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .bar { height: 3.5rem; padding-left: 1.1rem; }
  .bar__nav { display: none; }
  .bar__logo img { height: 1.15rem; }
  h1 { font-size: clamp(2.75rem, 13vw, 5rem); }
  h2, .close h2 { font-size: clamp(2.5rem, 11.5vw, 4.5rem); }
  .hero { padding-top: 6.75rem; }
  .hero__row, .ships__grid, .deal__grid, .close__row { grid-template-columns: minmax(0, 1fr); }
  .hero__act .btn, .note .btn, .close .btn { width: 100%; justify-content: space-between; }
  .stage { order: -1; }
  .stage__frame img { aspect-ratio: 3 / 2; object-position: 50% 24%; }
  .release { display: none; }

  /* the meter turns into a slim strip that rides at the top */
  .ships__side { display: contents; }
  .ships__grid { gap: 0; }
  .meter {
    position: sticky; top: 0; z-index: 5;
    margin: 1.75rem calc(-1 * var(--gutter)) 0; padding: .8rem var(--gutter) .85rem;
    display: flex; align-items: center; gap: 1rem;
    background: rgba(11, 11, 12, .88);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .meter__num { font-size: 2.1rem; line-height: 1; min-width: 3.6rem; }
  .meter__track { flex: 1; max-width: none; margin-top: 0; }
  .part { padding: 1.6rem 0 1.7rem; }
  .part:first-child { border-top: 0; }
  .note { position: static; }
  .foot__row { flex-direction: column; }
  .foot__logo { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .band { -webkit-mask-image: none; mask-image: none; }
  .band__track { width: auto; flex-wrap: wrap; justify-content: center; gap: .4rem 0; padding: 0 var(--gutter); }
  .band span:nth-child(n+6) { display: none; }
  .band span:nth-child(5)::after { display: none; }
  .meter { position: static; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar, .meter, .release { background: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
