:root {
  --bg: #000;
  --s1: #0a0a0b;
  --s2: #111113;
  --line: #1c1c20;
  --line-2: #2a2a30;
  --text: #f2f1ee;
  --muted: #76757c;
  --soft: #a9a8ae;
  --accent: #ff5a36;
  --radius: 18px;
  --max: 1180px;
  --pad: clamp(20px, 4vw, 44px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }

/* ---------------------------------------------------------------- header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--pad);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.top.solid { background: rgba(0, 0, 0, .72); border-color: var(--line); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; justify-self: start; }
.nav {
  display: flex; gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 10, 11, .7);
}
.nav a { text-decoration: none; font-size: 14px; color: var(--muted); padding: 7px 14px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); background: var(--s2); }
.pill { justify-self: end; font: 500 12px/1 var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 9px 12px; border-radius: 999px; }
.pill::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; box-shadow: 0 0 10px var(--accent); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 100px var(--pad) 72px; overflow: hidden; }
.stage { position: absolute; inset: 0; }
#scene { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: pan-y; outline: none; }
.fallback { display: none; position: absolute; right: 8%; top: 50%; width: min(42vw, 460px); height: auto; transform: translateY(-50%); }
.no-webgl #scene, .no-webgl .hint { display: none; }
.no-webgl .fallback { display: block; }
.hint {
  position: absolute; right: var(--pad); bottom: 28px; display: flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--mono); color: var(--muted); padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, .6);
  transition: opacity .6s; pointer-events: none;
}
.hint.gone { opacity: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero-copy { position: relative; max-width: 640px; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.hero h1 { font-size: clamp(42px, 6vw, 84px); }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 26px; max-width: 480px; font-size: clamp(17px, 1.5vw, 19px); color: var(--soft); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; transition: transform .15s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: #000; }
.btn.primary:hover { background: #fff; }
.btn.ghost { border: 1px solid var(--line-2); color: var(--muted); cursor: default; }

/* ---------------------------------------------------------------- sections */
.section, .contact { max-width: var(--max); margin: 0 auto; padding: clamp(84px, 12vw, 150px) var(--pad); }
.section h2, .contact h2 { font-size: clamp(34px, 5vw, 64px); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 36px 32px 0 0; }
.steps li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.num { font: 500 13px/1 var(--mono); color: var(--accent); }
.steps h3 { font-size: clamp(30px, 3.4vw, 44px); margin: 18px 0 12px; }
.steps p { color: var(--soft); max-width: 300px; }
.frame { margin: clamp(56px, 8vw, 96px) 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 120px rgba(255, 90, 54, .06); }
.frame img { width: 100%; height: auto; }

.feats { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feats li { background: var(--bg); padding: 28px 24px 30px; display: flex; flex-direction: column; gap: 8px; transition: background .25s; }
.feats li:hover { background: var(--s1); }
.feats b { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.feats b::before { content: ""; display: block; width: 8px; height: 8px; background: var(--accent); margin-bottom: 18px; }
.feats span { color: var(--muted); font-size: 15px; }
.specs { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.specs span { font: 500 12px/1 var(--mono); color: var(--soft); border: 1px solid var(--line); padding: 9px 12px; border-radius: 999px; }

.about { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; border-top: 1px solid var(--line); }
.about-logo { width: clamp(90px, 12vw, 150px); height: auto; filter: drop-shadow(0 0 40px rgba(255, 90, 54, .18)); }
.about .big { margin-top: 22px; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; color: var(--soft); max-width: 720px; letter-spacing: -.01em; }

/* ---------------------------------------------------------------- log deck */
.log { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; border-top: 1px solid var(--line); }
.log-head .muted { margin-top: 18px; max-width: 360px; }
.deck-ui { display: flex; align-items: center; gap: 16px; margin-top: 32px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 18px; transition: background .2s, border-color .2s; }
.round:hover { background: var(--s2); border-color: #3a3a42; }
.count { font: 500 13px/1 var(--mono); color: var(--muted); min-width: 64px; text-align: center; }

.deck { position: relative; height: clamp(360px, 42vw, 440px); outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lcard {
  --hue: 12;
  position: absolute; inset: 0 12% 0 0; max-width: 460px;
  border-radius: 22px;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .4s;
}
.lcard.is-top { cursor: grab; }
.lcard.dragging { cursor: grabbing; transition: none; }
.lcard-in {
  --rx: 0deg; --ry: 0deg;
  position: relative; height: 100%; padding: 30px;
  display: flex; flex-direction: column;
  border-radius: inherit; overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, hsla(var(--hue), 90%, 55%, .22), transparent 60%),
    linear-gradient(160deg, #141416, #0b0b0c 60%);
  border: 1px solid #222228;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .04);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s ease-out;
}
.lcard-in::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.lnum { font: 700 clamp(64px, 8vw, 96px)/.9 var(--font); letter-spacing: -.05em; color: hsla(var(--hue), 90%, 62%, .9); }
.ltype { margin-top: auto; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lcard h3 { font-size: clamp(30px, 3.4vw, 40px); margin: 12px 0 10px; }
.lcard p:not(.ltype) { color: var(--soft); }
.tags { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 500 12px/1 var(--mono); color: var(--soft); border: 1px solid #2a2a30; padding: 7px 10px; border-radius: 999px; background: rgba(0, 0, 0, .3); }

/* ---------------------------------------------------------------- contact */
.contact { text-align: center; border-top: 1px solid var(--line); }
.mail {
  display: inline-block; margin: 30px 0 22px;
  font-size: clamp(30px, 6vw, 76px); font-weight: 700; letter-spacing: -.035em; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
  transition: background-size .35s, color .2s;
}
.mail:hover { color: var(--accent); background-size: 100% 3px; }
.contact a:not(.mail) { color: var(--soft); }
.foot { max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) 40px; display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.foot a { text-decoration: none; }

/* reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .lcard, .lcard-in { transition-duration: .01s; }
}

/* 404 */
.nf .contact { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 0; }
.nf h1 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 18px; }
.nf-logo { margin-bottom: 24px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .top { grid-template-columns: auto 1fr; }
  .pill { display: none; }
  .nav { justify-self: end; }
  .feats { grid-template-columns: repeat(2, 1fr); }
  .log { grid-template-columns: 1fr; }
  .lcard { inset: 0 8% 0 0; }
}
@media (max-width: 720px) {
  .top { grid-template-columns: 1fr; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand span { display: none; }
  .top { grid-template-columns: auto 1fr; }
  .nav { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 9px; font-size: 13px; white-space: nowrap; }
  .hero { flex-direction: column; justify-content: flex-end; padding-top: 0; min-height: auto; }
  .stage { position: relative; inset: auto; width: calc(100% + 2 * var(--pad)); margin: 0 calc(-1 * var(--pad)); height: 64svh; min-height: 380px; }
  .fallback { position: static; transform: none; width: 70%; margin: 90px auto 0; }
  .hint { bottom: 12px; right: 50%; transform: translateX(50%); white-space: nowrap; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 30px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .feats { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .lcard { inset: 0 6% 0 0; }
  .lcard-in { padding: 24px; }
}
