:root {
  --bg: #08090a;
  --ink: #eef2f5;
  --dim: rgba(238, 242, 245, .5);
  --faint: rgba(238, 242, 245, .14);
  --accent: #e9eef2;
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 2.6vw, 36px);
  --ease: cubic-bezier(.7, 0, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

.mono { font: 400 11px/1.55 var(--mono); letter-spacing: .02em; text-transform: none; }
.dim { color: var(--dim); }

/* Canvas + overlays */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 60% 50%, transparent 40%, rgba(0,0,0,.75) 100%); }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: grid; place-items: center; transition: clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.loader.done { clip-path: inset(0 0 100% 0); }
.loader-inner { display: grid; gap: 14px; width: min(320px, 70vw); }
.loader-count { font: 800 clamp(64px, 12vw, 120px)/1 var(--display); letter-spacing: -.04em; }
.loader-bar { height: 1px; background: var(--faint); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s linear; }

/* Cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; mix-blend-mode: difference; }
.cursor i {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #fff; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease);
}
.cursor.hover i { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } }

/* HUD */
.hud { position: fixed; z-index: 10; padding: var(--gutter); pointer-events: none; }
.hud a, .hud button { pointer-events: auto; }
.hud p { margin: 0; }
.hud-tl { top: 0; left: 0; display: grid; gap: 10px; }
.wordmark { font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.hud-tr { top: 0; right: 0; width: min(250px, 40vw); text-align: right; display: grid; gap: 8px; }
.manifesto { color: var(--ink); }
.hud-bl { bottom: 0; left: 0; }
.index { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.index a { display: inline-flex; gap: 10px; color: var(--dim); transition: color .3s, transform .3s var(--ease); }
.index a:hover { color: var(--ink); }
.index a.active { color: var(--ink); transform: translateX(8px); }
.index a.active::before { content: "→"; position: absolute; margin-left: -16px; color: var(--accent); }
.hud-br { bottom: 0; right: 0; display: grid; gap: 6px; justify-items: end; }
#counter { font-size: 13px; color: var(--ink); }
.progress { display: block; width: 120px; height: 1px; background: var(--faint); }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: background .6s; }

/* Panels */
main { position: relative; z-index: 5; }
.panel {
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: 120px var(--gutter);
}
.panel-copy { width: min(540px, 42vw); margin-left: clamp(150px, 14vw, 240px); }
.project .lede { margin-top: 18px; font-size: 15.5px; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--dim); }
.kicker b { color: var(--accent); font-weight: 500; transition: color .6s; }
.blink { width: 7px; height: 7px; background: var(--accent); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.display {
  font: 800 clamp(40px, 6.4vw, 96px)/.92 var(--display); letter-spacing: -.045em; margin: 0;
  text-transform: uppercase;
}
.project .display { font-size: clamp(44px, 7.4vw, 112px); }
.lede { font-size: clamp(16px, 1.3vw, 19px); color: var(--dim); max-width: 44ch; margin: 26px 0 0; }
.tagline { font: 500 clamp(15px, 1.25vw, 18px)/1.4 var(--body); color: var(--ink); margin: 18px 0 0; }
.scroll-hint { margin-top: 48px; animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 50% { transform: translateY(6px); opacity: .5; } }

/* Project detail */
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--faint); }
.meta span { color: var(--dim); }
.meta span em { font-style: normal; color: var(--ink); }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; counter-reset: pt; }
.points li { position: relative; padding-left: 34px; color: var(--dim); font-size: 14px; counter-increment: pt; }
.points li::before { content: "0" counter(pt); position: absolute; left: 0; top: 2px; font: 400 11px var(--mono); color: var(--accent); transition: color .6s; }

.panel { position: relative; }
.shot {
  position: absolute; right: calc(var(--gutter) + 150px); bottom: 12vh; width: clamp(220px, 21vw, 340px);
  border: 1px solid var(--faint); background: rgba(255,255,255,.02); padding: 6px;
  transform: perspective(900px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  opacity: 0; pointer-events: none; clip-path: inset(100% 0 0 0);
  transition: transform .5s var(--ease), border-color .4s, opacity .6s var(--ease), clip-path 1s var(--ease);
}
.panel.active .shot { opacity: 1; pointer-events: auto; clip-path: inset(0 0 0 0); transition-delay: 0s, 0s, .2s, .2s; }
.shot:hover { border-color: var(--accent); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; filter: grayscale(.85) contrast(1.05) brightness(.85); transition: filter .6s; }
.shot:hover img { filter: none; }
.shot-label { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: space-between; padding: 8px 10px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.shot::before, .shot::after { content: ""; position: absolute; width: 10px; height: 10px; border-color: var(--accent); border-style: solid; transition: border-color .6s; }
.shot::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.shot::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.cta {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 30px;
  padding: 14px 20px; border: 1px solid var(--faint); font: 500 12px var(--mono);
  letter-spacing: .06em; text-transform: uppercase; transition: background .4s var(--ease), color .4s, border-color .4s;
}
.cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.soon-list { display: grid; gap: 1px; margin-top: 30px; background: var(--faint); border: 1px solid var(--faint); }
.soon-list div { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: var(--bg); }
.soon-list strong { font: 700 28px/1 var(--display); letter-spacing: -.03em; }

/* Reveal choreography */
.reveal-line { display: block; overflow: hidden; }
.panel [data-r] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.panel.in [data-r] { opacity: 1; transform: none; }
.panel.in [data-r="2"] { transition-delay: .08s; }
.panel.in [data-r="3"] { transition-delay: .16s; }
.panel.in [data-r="4"] { transition-delay: .24s; }
.panel.in [data-r="5"] { transition-delay: .32s; }
.panel.in [data-r="6"] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .grain, .blink, .scroll-hint { animation: none; }
  .panel [data-r] { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 900px) {
  .panel { align-items: flex-end; padding: 45vh var(--gutter) 110px; }
  .panel-copy { width: 100%; margin: 0; }
  .intro, .outro { align-items: center; padding-top: 140px; }
  .hud-tr { display: none; }
  .hud-bl { display: none; }
  .vignette { background: linear-gradient(transparent 25%, rgba(8,9,10,.85) 70%); }
  .shot { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 28px; }
  .project { flex-direction: column; justify-content: flex-end; align-items: stretch; }
}
