:root {
  --bg: #07070c;
  --ink: #ecedf1;
  --muted: #a4a8b2;
  --dim: #6c707c;
  --accent: #8a6bf4;
  --accent-2: #b8a6ff;
  --line: rgba(255, 255, 255, 0.075);
  --cross: rgba(232, 226, 255, 0.42);
  --card: rgba(18, 18, 28, 0.62);
  --cw: min(1200px, calc(100vw - 32px));
  --pad: clamp(20px, 3.4vw, 40px);
  --font: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip;
  /* fallback space if WebGL is unavailable */
  background-image: radial-gradient(60vw 50vh at 85% 8%, rgba(138, 107, 244, 0.14), transparent 70%), radial-gradient(50vw 40vh at 10% 95%, rgba(91, 79, 230, 0.12), transparent 70%);
  background-attachment: fixed;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #d4c9ff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: var(--cw); margin: 0 auto; position: relative; }

/* ---------- canvases ---------- */
#space, #world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#space { z-index: 0; }
#world { z-index: 1; opacity: 0; transition: opacity 0.9s ease; }
#world.ready { opacity: 1; }

/* ---------- blueprint rails: near-invisible frame, crosses where lines meet ---------- */
.rails {
  position: fixed; top: 0; bottom: 0; left: 50%; width: var(--cw); transform: translateX(-50%);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); pointer-events: none; z-index: 3;
}
/* a "+" at both rail intersections of an element's top edge */
.xmark::after, .sec::after, .nav::after {
  content: ""; position: absolute; left: calc(50% - var(--cw) / 2 - 5px); width: calc(var(--cw) + 11px); height: 11px; pointer-events: none;
  background:
    linear-gradient(var(--cross), var(--cross)) 0 5px / 11px 1px no-repeat,
    linear-gradient(var(--cross), var(--cross)) 5px 0 / 1px 11px no-repeat,
    linear-gradient(var(--cross), var(--cross)) 100% 5px / 11px 1px no-repeat,
    linear-gradient(var(--cross), var(--cross)) calc(100% - 5px) 0 / 1px 11px no-repeat;
}

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 10; transition: background 0.4s, backdrop-filter 0.4s; }
.nav::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid var(--line); }
.nav::after { bottom: -6px; }
.nav.solid { background: rgba(7, 7, 12, 0.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; padding: 0 var(--pad); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand:hover { color: #fff; }
.links { display: flex; gap: 28px; font-size: 14px; }
.links a { color: var(--muted); transition: color 0.2s; }
.links a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 9px; font: 600 15px/1 var(--font); transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s; white-space: nowrap; }
.btn-sm { padding: 10px 15px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 0 0 1px rgba(184, 166, 255, 0.35) inset, 0 8px 30px -10px rgba(138, 107, 244, 0.8); }
.btn-primary:hover { background: #9a7ef7; color: #fff; transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { color: #fff; border-color: rgba(184, 166, 255, 0.55); background: rgba(138, 107, 244, 0.08); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 12px var(--accent); }

/* ---------- runway: intro caption + hero, both fixed while the flight plays ---------- */
.runway { position: relative; height: 330vh; }
.intro { position: fixed; z-index: 5; }
.intro { left: 0; right: 0; bottom: 0; pointer-events: none; }
.intro-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 var(--pad) clamp(28px, 6vh, 56px); }
.intro-copy { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.intro-title { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
.hint { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.hint-arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

.season { pointer-events: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.season-label { font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.season-btns { display: flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: rgba(12, 12, 20, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.season-btns button { width: 38px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--dim); cursor: pointer; transition: color 0.2s, background 0.2s; }
.season-btns button:hover { color: var(--ink); }
.season-btns button[aria-pressed="true"] { color: #fff; background: rgba(138, 107, 244, 0.28); box-shadow: 0 0 0 1px rgba(184, 166, 255, 0.35) inset; }
.season-btns svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.season-btns [data-season="spring"] svg, .season-btns [data-season="autumn"] svg path:first-child, .season-btns [data-season="christmas"] svg path:nth-child(-n+2) { fill: currentColor; fill-opacity: 0.25; }
.season-btns [data-season="christmas"][aria-pressed="true"] { color: #ffd23d; background: rgba(214, 40, 57, 0.3); box-shadow: 0 0 0 1px rgba(255, 210, 61, 0.4) inset; }
.season-btns button[hidden] { display: none; }

/* the hero sticks while the camera flies, then scrolls away with the page like any other section */
.hero { position: sticky; top: 0; z-index: 5; height: 100vh; height: 100svh; display: grid; place-items: center; opacity: 0; pointer-events: none; padding: 80px var(--pad) 40px; }
.hero-in { width: min(var(--cw), 1040px); display: flex; flex-direction: column; gap: 22px; padding: 0 var(--pad); }
.hero h1 { font-size: clamp(40px, 7vw, 88px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 700; max-width: 12ch; }
.hero p { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 600px; }
.hero .cta-row { margin-top: 8px; }

/* ---------- sections ---------- */
main, .foot { position: relative; z-index: 4; }
.sec { position: relative; padding: clamp(72px, 11vw, 128px) 0; }
.sec::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid var(--line); }
.sec::after { top: -5px; }
.sec-head { display: flex; flex-direction: column; gap: 16px; padding: 0 var(--pad); margin-bottom: clamp(36px, 5vw, 56px); max-width: 760px; }
.sec h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.05; }
.lede { color: var(--muted); font-size: 17px; max-width: 620px; }

/* grids of cells separated by hairlines, with a cross at every corner */
.grid { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.cell { position: relative; padding: clamp(24px, 3vw, 36px) var(--pad); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; transition: background 0.3s; }
.cell::before, .cell::after {
  content: ""; position: absolute; bottom: -6px; width: 11px; height: 11px; pointer-events: none; z-index: 1;
  background: linear-gradient(var(--cross), var(--cross)) 0 5px / 11px 1px no-repeat, linear-gradient(var(--cross), var(--cross)) 5px 0 / 1px 11px no-repeat;
}
.cell::before { left: -6px; }
.cell::after { right: -6px; }
.grid-3 .cell:nth-child(3n), .grid-4 .cell:nth-child(4n) { border-right: 0; }
.cell:hover { background: rgba(138, 107, 244, 0.05); }
.cell h3 { font-size: 19px; letter-spacing: -0.015em; }
.cell p { color: var(--muted); font-size: 15px; }
.ico { width: 44px; height: 44px; margin-bottom: 6px; filter: drop-shadow(0 6px 18px rgba(138, 107, 244, 0.35)); }
.steps { counter-reset: none; }
.num { font: 500 13px/1 var(--mono); color: var(--accent-2); letter-spacing: 0.08em; }

/* logos */
.grid-logos { grid-template-columns: repeat(6, 1fr); }
.grid-logos .cell { align-items: center; justify-content: center; gap: 12px; padding: 30px 12px; text-align: center; }
.grid-logos .cell:nth-child(3n) { border-right: 1px solid var(--line); }
.grid-logos .cell:nth-child(6n) { border-right: 0; }
.grid-logos svg { width: 30px; height: 30px; fill: #a9a3c4; transition: fill 0.25s, transform 0.25s; }
.grid-logos .cell:hover svg { fill: var(--brand); transform: translateY(-2px); }
.grid-logos span { font-size: 13px; color: var(--dim); transition: color 0.25s; }
.grid-logos .cell:hover span { color: var(--ink); }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.about .sec-head { margin-bottom: 0; }
.about-body { display: flex; flex-direction: column; gap: 26px; padding: 0 var(--pad); }
.about-body > p { color: var(--muted); font-size: 17px; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { padding: 15px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.facts li::before { content: ""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); flex: none; }

/* contact */
.contact-card {
  margin: 0 var(--pad); display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  padding: clamp(28px, 5vw, 56px); border: 1px solid rgba(184, 166, 255, 0.18); border-radius: 18px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(138, 107, 244, 0.2), transparent 55%), var(--card);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.contact-copy { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }

/* footer */
.foot { padding: 28px 0 36px; font-size: 13px; color: var(--dim); }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0 var(--pad); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 .cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .grid-3 .cell:nth-child(2n) { border-right: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 .cell:nth-child(2n) { border-right: 0; }
  .grid-logos { grid-template-columns: repeat(4, 1fr); }
  .grid-logos .cell:nth-child(6n) { border-right: 1px solid var(--line); }
  .grid-logos .cell:nth-child(4n) { border-right: 0; }
  .about { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .links { display: none; }
  .nav-in { height: 60px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-3 .cell, .grid-4 .cell { border-right: 0 !important; }
  .grid-logos { grid-template-columns: repeat(3, 1fr); }
  .grid-logos .cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .grid-logos .cell:nth-child(3n) { border-right: 0; }
  .intro-in { flex-direction: column; align-items: flex-start; }
  .season { align-items: flex-start; }
  .contact-card { align-items: flex-start; }
}

/* ---------- build-in on first load: the page elements rise in after the scene ---------- */
.building-wait .intro-copy > *, .building-wait .season { opacity: 0; }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.building .nav-in > * { animation: drop-in 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.building .nav-in > :nth-child(2) { animation-delay: 0.15s; }
.building .nav-in > :nth-child(3) { animation-delay: 0.3s; }
.building .intro-copy > *, .building .season { animation: rise-in 0.8s cubic-bezier(.2, .8, .2, 1) both; }
.building .intro-copy > :nth-child(1) { animation-delay: 1.7s; }
.building .intro-copy > :nth-child(2) { animation-delay: 1.85s; }
.building .intro-copy > :nth-child(3) { animation-delay: 2.15s; }
.building .season { animation-delay: 2.3s; }
@keyframes fade-in { from { opacity: 0; } }
.building .rails { animation: fade-in 1.4s ease both; animation-delay: 0.2s; }

/* ---------- New Year ---------- */
.ny-pill {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 10px;
  padding: 9px 22px; font: 500 13px/1 var(--font); color: var(--muted);
  background: rgba(16, 13, 26, 0.75); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  /* a hexagon-cut pill, keeping things poly */
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 61, 0.35);
}
.ny-pill[hidden] { display: none; }
.ny-pill { transition: opacity 0.4s, transform 0.4s; }
.ny-pill.away { opacity: 0; transform: translate(-50%, -8px); pointer-events: none; }
.ny-clock { font: 600 15px/1 var(--mono); color: #ffd760; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 162, 0, 0.6); }
.ny-gem { width: 9px; height: 9px; background: #ffd760; transform: rotate(45deg); box-shadow: 0 0 10px #ffa200; animation: ny-blink 1s steps(2) infinite; }
@keyframes ny-blink { 50% { opacity: 0.35; } }

@media (max-width: 760px) { .ny-pill { top: 70px; padding: 8px 18px; font-size: 12px; } }
