:root {
  --bg: #0a0807;
  --bg-2: #120f0d;
  --panel: rgba(28, 22, 19, 0.84);
  --line: rgba(255, 236, 222, 0.09);
  --line-2: rgba(255, 236, 222, 0.16);
  --text: #f6efe9;
  --text-2: #c2b6ac;
  --text-3: #85796f;
  --amber: #ffb11f;
  --orange: #ff6a2a;
  --coral: #ff4a68;
  --pink: #ff3d8a;
  --magenta: #e0169a;
  --grad: linear-gradient(100deg, #ffb11f 0%, #ff6a2a 38%, #ff3d8a 72%, #e0169a 100%);
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: clamp(16px, 4vw, 56px);
  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(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
kbd { display: inline-block; min-width: 22px; padding: 2px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 7px; font: 500 12.5px var(--mono); color: var(--text); background: rgba(255, 255, 255, 0.04); text-align: center; }
::selection { background: rgba(255, 106, 42, 0.35); }

/* the WebGL scene sits behind the whole page */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, footer { position: relative; z-index: 2; }

/* ---- nav ---- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
  width: min(1120px, calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; gap: 24px; padding: 10px 10px 10px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(14, 11, 10, 0.55); backdrop-filter: blur(18px) saturate(1.4);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav.scrolled { background: rgba(14, 11, 10, 0.82); border-color: var(--line-2); }
.brand { display: flex; align-items: center; gap: 10px; font: 600 15px var(--display); letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--text-2); }
.nav-links a { position: relative; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.nav-cta.active { background: var(--grad); }
.burger { display: none; width: 40px; height: 40px; margin-left: 2px; border: 1px solid var(--line-2); border-radius: 50%; background: rgba(255, 255, 255, 0.04); cursor: pointer; position: relative; }
.burger i { position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: var(--text); transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.burger i:first-child { top: 15px; }
.burger i:last-child { top: 23px; }
.menu-open .burger i:first-child { top: 19px; transform: rotate(45deg); }
.menu-open .burger i:last-child { top: 19px; transform: rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 19; display: flex; flex-direction: column; justify-content: center; padding: 100px var(--gutter) 40px;
  background: rgba(10, 8, 7, 0.9); backdrop-filter: blur(22px); opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.menu nav { display: flex; flex-direction: column; gap: 4px; }
.menu a { font: 600 clamp(30px, 9vw, 44px)/1.25 var(--display); letter-spacing: -0.03em; color: var(--text-2); opacity: 0; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.2s; transition-delay: calc(var(--i) * 40ms); }
.menu a.active, .menu a:hover { color: var(--text); }
.menu a.active::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 14px; border-radius: 50%; background: var(--grad); vertical-align: 0.18em; }
.menu-foot { margin: 40px 0 0; font: 500 13px var(--mono); color: var(--text-3); }
.menu-open .menu { opacity: 1; visibility: visible; }
.menu-open .menu a { opacity: 1; transform: none; }
.menu-open body { overflow: hidden; }

/* ---- buttons ---- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px; font: 600 15.5px var(--body);
  border: 1px solid var(--line-2); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: 9px 18px; font-size: 14px; background: var(--text); color: #160f0b; border-color: transparent; }
.btn-primary {
  color: #1a0d06; border: 0;
  background: var(--grad); background-size: 160% 100%; background-position: 0 0;
  box-shadow: 0 10px 40px -10px rgba(255, 90, 60, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-position 0.6s var(--ease);
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 18px 60px -12px rgba(255, 70, 110, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-ghost { background: rgba(255,255,255, 0.03); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }

/* ---- type ---- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 13px var(--mono); color: var(--text-2); background: rgba(10,8,7, 0.68); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 12px #3ddc84; }
.display { font: 700 clamp(46px, 7.2vw, 108px)/0.94 var(--display); letter-spacing: -0.045em; margin: 0; }
.display .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.display .line > span { display: inline-block; will-change: transform; }
.grad > span, .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 560px; margin: 28px 0 0; font-size: clamp(17px, 1.5vw, 20px); color: var(--text-2); }
.fine { margin: 18px 0 0; font-size: 13.5px; color: var(--text-3); }

/* ---- hero: the copy, and an empty stage box the 3D mark is fitted into (scene.fit) ---- */
/* portrait screens (phones, tablets): the mark on top, in whatever room the copy leaves */
.hero {
  min-height: 100vh; min-height: 100svh; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 92px var(--gutter) 56px;
}
.hero-stage { flex: 1 1 auto; width: min(1120px, 100%); min-height: clamp(150px, 30svh, 440px); margin: 0 auto 22px; pointer-events: none; }
.hero-copy { width: min(1120px, 100%); margin: 0 auto; }
.hero .display { font-size: clamp(38px, 12.4vw, 92px); }
.hero .scroll-hint { display: none; }
/* landscape screens: the copy on the left, sized so it never runs into the mark on the right */
@media (min-aspect-ratio: 6/5) and (min-width: 560px) {
  .hero { --copy: min(46vw, 92vh, 720px); justify-content: center; padding: 120px var(--gutter) 90px; }
  .hero-stage { position: absolute; margin: 0; min-height: 0; width: auto; top: 13svh; height: 74svh; right: var(--gutter); left: calc(max(var(--gutter), (100% - 1120px) / 2) + var(--copy) + 3%); }
  .hero-copy > * { max-width: var(--copy); }
  .hero .display { font-size: calc(var(--copy) / 6.9); }
  .hero .scroll-hint { display: flex; }
}
/* short landscape screens (phones on their side): tighter spacing */
@media (min-aspect-ratio: 6/5) and (max-height: 560px) {
  .hero { padding: 84px var(--gutter) 28px; }
  .hero .eyebrow { margin-bottom: 14px; }
  .hero .lead { margin-top: 14px; font-size: 15px; }
  .hero .cta-row { margin-top: 18px; }
  .hero .fine { margin-top: 10px; }
  .hero .scroll-hint { display: none; }
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font: 500 11px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); }
.scroll-hint span { width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--orange); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---- footer ---- */
.footer { position: relative; z-index: 2; padding: 64px var(--gutter) 34px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; background: linear-gradient(rgba(10,8,7, 0.73), rgba(10,8,7, 0.94)); }
.footer-top, .footer-bottom { width: min(1120px, 100%); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 48px; }
.footer-brand p { max-width: 330px; margin: 16px 0 18px; color: var(--text-2); line-height: 1.55; }
.footer-release { display: inline-flex; align-items: center; gap: 9px; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 12.5px var(--mono); color: var(--text-2); transition: border-color 0.2s, color 0.2s; }
.footer-release:hover { color: var(--text); border-color: rgba(255, 106, 42, 0.45); }
.footer-release .dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-cols h4 { margin: 4px 0 14px; font: 500 11.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.footer-cols a { display: block; padding: 5px 0; color: var(--text-2); transition: color 0.2s, transform 0.3s var(--ease); }
.footer-cols a:hover { color: var(--text); transform: translateX(3px); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; }

/* ---- page headers (every page but home) ---- */
.page-hero { position: relative; z-index: 2; width: min(1120px, calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 170px 0 60px; }
.page-hero .display { font-size: clamp(46px, 7vw, 100px); }
.page-hero .lead { max-width: 640px; }
.page-hero.center { text-align: center; }
.page-hero.center .lead { margin-left: auto; margin-right: auto; }
.page-hero.center .cta-row { justify-content: center; }
/* the page's own 3D shape is fitted into this box (scene.fit, from page.js): above the words on portrait
   screens, beside them on landscape ones (behind them, for a centred header) */
.page-stage { height: clamp(140px, 26svh, 300px); margin: 0 0 8px; pointer-events: none; }
.page-hero.staged { padding-top: 92px; }
@media (min-aspect-ratio: 6/5) and (min-width: 560px) {
  .page-hero.staged { padding-top: 170px; }
  .page-hero.staged > :not(.page-stage) { max-width: min(600px, 54%); }
  .page-stage { position: absolute; margin: 0; top: 14svh; height: 76svh; right: 0; left: calc(min(600px, 54%) + 3%); }
  /* a centred header goes side by side too, so a tall shape never stands behind the words */
  .page-hero.center.staged { text-align: left; }
  .page-hero.center.staged .lead { margin-left: 0; margin-right: 0; }
  .page-hero.center.staged .cta-row { justify-content: flex-start; }
}
@media (min-aspect-ratio: 6/5) and (max-height: 560px) {
  .page-hero.staged { padding-top: 96px; }
  .page-hero.staged .display { font-size: clamp(36px, 6vw, 64px); }
}
[data-reveal] { opacity: 0; transform: translateY(26px); }
[data-reveal].in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .burger { display: block; margin-left: auto; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero { padding-top: 130px; }
  .nav { gap: 12px; }
  .brand span { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint span::after { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
}
