:root {
  --night: #0b0c0e;
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --orange: #ff5a1f;
  --blue: #2f6bf6;
  --yellow: #ffc43d;
  --sans: 'Inter Tight', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1180px;
  /* day theme is the default for everything below the story */
  --bg: var(--paper);
  --ink: #111216;
  --ink-2: rgba(17, 18, 22, 0.72);
  --ink-3: rgba(17, 18, 22, 0.5);
  --line: rgba(17, 18, 22, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 0.98; text-wrap: balance; }
h1 { font-size: clamp(44px, 6.6vw, 88px); }
h2 { font-size: clamp(34px, 4.8vw, 62px); }
h3 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: var(--ink-2); max-width: 31em; }
.eyebrow { font: 500 12.5px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); margin-bottom: 20px; display: block; }
.fine { margin-top: 28px; font: 500 13px/1.5 var(--mono); letter-spacing: 0.04em; color: var(--ink-2); }

/* night theme: the top of the story, and the finale */
[data-sky='night'] .nav:not(.nav--solid), [data-sky='night'] .story__stage, .finale {
  --ink: #f4efe6;
  --ink-2: rgba(244, 239, 230, 0.78);
  --ink-3: rgba(244, 239, 230, 0.5);
  --line: rgba(244, 239, 230, 0.22);
  color: var(--ink);
}

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; color: var(--ink); transition: background 0.25s, color 0.25s; }
.nav--solid { background: rgba(244, 239, 230, 0.9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 36px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav__links { display: flex; gap: 28px; margin-right: auto; }
.nav__links a { text-decoration: none; font-size: 16px; color: var(--ink-2); }
.nav__links a:hover, .nav__links a[aria-current] { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px;
  background: var(--orange); color: #111216; font: 600 17px/1 var(--sans); text-decoration: none;
  border-radius: 999px; transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 0 #111216;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #111216; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #111216; }
.btn--sm { padding: 10px 16px; font-size: 15px; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink), 0 3px 0 var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

canvas[data-scene] { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }

/* scroll story */
.story { height: 620vh; position: relative; background: var(--night); padding: 0; }
.story__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--ink); }
.beat {
  position: absolute; z-index: 2; left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  top: clamp(92px, 14vh, 150px); width: min(560px, calc(100vw - 2 * var(--pad)));
  opacity: 0; pointer-events: none; will-change: opacity, transform;
}
.beat.on { pointer-events: auto; }
.beat h1 { font-size: clamp(44px, 6vw, 84px); }
.beat h2 { font-size: clamp(40px, 5.4vw, 76px); }
.beat .lede { margin-top: 22px; }
.hint { margin-top: 26px; font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }

section { padding: clamp(72px, 9vw, 120px) 0; position: relative; }
.tint { background: var(--paper-2); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.card { background: var(--paper); border: 1.5px solid #111216; border-radius: 18px; padding: 18px 22px 26px; box-shadow: 0 5px 0 #111216; }
.card canvas { display: block; width: 100%; height: 170px; image-rendering: pixelated; margin-bottom: 14px; border-bottom: 1.5px solid #111216; }
.card__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font: 500 14px/1 var(--mono); border: 1.5px solid #111216; margin-bottom: 44px; }
.card--orange .card__n { background: var(--orange); } .card--blue .card__n { background: var(--blue); color: #fff; } .card--yellow .card__n { background: var(--yellow); }
.card p { color: var(--ink-2); font-size: 17px; margin-top: 12px; }

.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 19px; color: var(--ink-2); }
.ticks li { padding: 18px 0; border-top: 1.5px solid var(--line); }
.ticks li:first-child { border-top: 0; padding-top: 0; }
.ticks b { color: var(--ink); font-weight: 600; }

/* photos (hidden until data.js has some) */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 48px; }
.photo { margin: 0; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; border: 1.5px solid #111216; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { position: absolute; left: 10px; bottom: 10px; font: 500 12px/1 var(--mono); background: var(--paper); padding: 6px 8px; border-radius: 6px; }

/* partners */
.phero { height: min(100svh, 820px); padding: 0; overflow: hidden; }
.phero__copy { position: relative; z-index: 2; padding-top: clamp(100px, 16vh, 150px); }
.phero h1 { max-width: 9.5em; font-size: clamp(40px, 5.6vw, 76px); }
.phero .lede { margin-top: 22px; max-width: 25em; }
.pgroup { display: grid; grid-template-columns: 300px 1fr; gap: 32px; padding: 36px 0; border-top: 1.5px solid var(--line); }
.pgroup:first-child { border-top: 0; padding-top: 0; }
.pgroup p { color: var(--ink-2); font-size: 16.5px; margin-top: 10px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-content: start; }
.partner { height: 104px; display: grid; place-items: center; padding: 16px; text-align: center; background: #fffdf8; border: 1.5px solid #111216; border-radius: 14px; text-decoration: none; font-weight: 600; font-size: 18px; }
.partner img { max-height: 48px; }
.partner--open { background: none; border-style: dashed; font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.partner--open:hover { color: var(--orange); border-color: var(--orange); }

/* finale: back to night, plane on final */
.finale { background: var(--night); min-height: min(92svh, 760px); overflow: hidden; padding: 0; }
.finale__copy { position: relative; z-index: 2; padding-top: clamp(80px, 13vh, 130px); padding-bottom: 300px; }
.finale h2 { max-width: 9em; font-size: clamp(40px, 6vw, 80px); }
.finale .lede { margin-top: 20px; }

footer { background: var(--night); color: rgba(244, 239, 230, 0.6); border-top: 1px solid rgba(244, 239, 230, 0.2); padding: 26px 0; font: 500 12.5px/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
footer a { text-decoration: none; }
footer a:hover { color: var(--paper); }

@media (max-width: 900px) {
  .split, .pgroup { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav .wrap { justify-content: space-between; }
  .beat { top: 84px; }
  .beat h1 { font-size: clamp(38px, 10.5vw, 56px); }
  .beat h2 { font-size: clamp(36px, 10vw, 52px); }
  .beat .lede { font-size: 17px; margin-top: 16px; }
  .beat .actions { margin-top: 20px; gap: 10px; }
  .beat .btn { padding: 13px 18px; font-size: 16px; }
  .phero { height: 100svh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* founder note */
.note blockquote { margin: 0; max-width: 20em; font-size: clamp(28px, 3.8vw, 50px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; display: grid; gap: 0.5em; }
.note__by { margin-top: 30px; font: 500 13px/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }

/* faq */
.faq details { border-top: 1.5px solid var(--line); padding: 18px 0; }
.faq details:first-child { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 21px; letter-spacing: -0.015em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 500 20px/1 var(--mono); color: var(--orange); }
.faq details[open] summary::after { content: '\2212'; }
.faq p { margin-top: 10px; color: var(--ink-2); font-size: 18px; max-width: 30em; }

@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } .card canvas { height: 130px; } }

/* day-theme eyebrows need a deeper orange to hold on cream */
[data-sky='day'] .eyebrow { color: #cf3f08; }
.finale .eyebrow { color: var(--orange); }
/* mid-page scene strip */
.strip { position: relative; height: 300px; border-block: 1.5px solid #111216; overflow: hidden; }
@media (max-width: 900px) { .strip { height: 240px; } }

/* the sunrise caption rides on its own chip so it reads on a half-lit sky */
.beat--chip h2 { display: inline-block; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: -0.02em; line-height: 1.1; background: var(--night); color: #f4efe6; padding: 12px 18px; border-radius: 14px; box-shadow: 0 0 0 1.5px #f4efe6; }
