:root {
  --bg: #070605;
  --text: #f7f4f1;
  --muted: #a39c96;
  --orange: #ff5a1f;
  --orange-2: #ff7a45;
  --line: rgba(255, 255, 255, 0.1);
  --amber: #f5b942;
  --red: #fb7185;
  --green: #4ade80;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; color: var(--text); }
body {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 55% at 78% 18%, rgba(180, 62, 16, 0.34), transparent 58%),
    radial-gradient(ellipse 40% 30% at 18% 0%, rgba(255, 120, 40, 0.08), transparent 50%),
    var(--bg);
}
h1, h2, h3, .load-word, .brand { font-family: "Inter Tight", Inter, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

#loader {
  position: fixed; inset: 0; z-index: 40;
  background: radial-gradient(circle at 70% 40%, rgba(180, 60, 16, 0.35), #070605 55%);
  display: grid; place-items: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.load-stage { position: relative; width: min(420px, 80vw); text-align: center; }
.load-rings { width: 160px; height: 160px; }
.load-rings circle {
  fill: none; stroke: rgba(255, 186, 130, 0.8); stroke-width: 1.2;
  stroke-dasharray: 70 380; transform-origin: 100px 100px; animation: spin 2.4s linear infinite;
}
.load-rings circle:nth-child(2) { stroke: rgba(255, 90, 31, 0.9); animation-duration: 3.2s; animation-direction: reverse; }
.load-rings circle:nth-child(3) { stroke: #fff; stroke-dasharray: 18 180; animation-duration: 1.6s; }
.load-word { margin-top: 8px; font-size: clamp(42px, 8vw, 64px); font-weight: 600; letter-spacing: -0.045em; }
.load-meta { margin-top: 10px; display: flex; justify-content: center; gap: 14px; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.load-meta b { color: var(--orange-2); font-weight: 500; }

.site-head { position: sticky; top: 0; z-index: 20; }
.topbar {
  background: #100e0c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  padding: 10px 16px;
  font-size: 13.5px;
  color: #ddd6cf;
}
.topbar b {
  display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
}
.topbar a { margin-left: 8px; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.topbar a:hover { color: var(--orange-2); }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 4vw;
  background: rgba(7, 6, 5, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: -0.03em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav nav { display: flex; gap: 26px; }
.nav nav a { color: #c9c2bb; font-size: 15px; transition: color 0.2s ease; }
.nav nav a:hover { color: #fff; }
.nav-end { display: flex; align-items: center; gap: 16px; }
.nav-end #clock { color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; }

.page { position: relative; }
.hero {
  position: relative;
  min-height: calc(100vh - 104px);
  display: flex;
  align-items: center;
  padding: 6vh 6vw 10vh;
  overflow: hidden;
}
.stage {
  position: absolute; inset: 0;
  pointer-events: none;
}
.stage canvas {
  width: 100%; height: 100%; display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 18%, #000 46%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 18%, #000 46%);
}
.hero-copy { position: relative; z-index: 2; max-width: 640px; }
.hud {
  position: absolute; top: 28px; right: 4vw; z-index: 2;
  display: flex; gap: 14px; align-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #f0e6dc;
}
.metrics {
  position: absolute; right: 4vw; bottom: 28px; z-index: 2;
  width: min(460px, 42vw);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  pointer-events: auto;
}
.metrics div {
  background: rgba(16, 12, 10, 0.55);
  border: 1px solid rgba(255, 186, 140, 0.22);
  border-radius: 14px; padding: 10px 12px;
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.metrics div:hover { transform: translateY(-4px); border-color: rgba(255, 122, 69, 0.7); background: rgba(40, 18, 10, 0.72); }
.metrics b { display: block; color: #fff; font-size: 15px; letter-spacing: -0.03em; font-family: "Inter Tight", Inter, sans-serif; white-space: nowrap; }
.metrics span { color: #b7aea6; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-family: "IBM Plex Mono", ui-monospace, monospace; }

.eyebrow { margin: 0 0 18px; color: #d8cfc7; font-size: 14px; }
.live-dot { color: #ffd2b8; }
.live-dot::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 12px var(--orange); vertical-align: 1px;
  animation: pulse 1.6s ease-in-out infinite;
}
h1 { margin: 0; font-weight: 600; font-size: clamp(56px, 6.6vw, 92px); line-height: 0.98; letter-spacing: -0.048em; max-width: 9ch; }
h2 { font-weight: 600; letter-spacing: -0.045em; }
.lead { margin: 22px 0 0; max-width: 460px; color: #c9c1ba; font-size: 18px; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--orange); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 28px rgba(255, 90, 31, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--orange-2); box-shadow: 0 16px 32px rgba(255, 90, 31, 0.36); }
.btn.ghost {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.16);
  box-shadow: none; font-weight: 500;
}
.btn.ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.32); }
.textlink { color: #fff; font-weight: 500; font-size: 15px; }
.textlink span { display: inline-block; transition: transform 0.2s ease; }
.textlink:hover span { transform: translateX(4px); }
.ca { margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted); background: rgba(0,0,0,0.28); }

.gallery { display: grid; grid-template-columns: 1.4fr 0.8fr 0.9fr; gap: 14px; padding: 10px 6vw 0; }
.gallery figure { margin: 0; }
.gallery img, .gallery svg {
  width: 100%; height: 320px; object-fit: cover; border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08); background: #110e0c;
  transition: transform 0.45s ease, border-color 0.35s ease, box-shadow 0.45s ease;
}
.gallery figure:hover img, .gallery figure:hover svg {
  transform: translateY(-8px);
  border-color: rgba(255, 122, 69, 0.55);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}
.gallery circle { fill: none; stroke: rgba(255, 170, 110, 0.55); }
.gallery circle.you, .gallery svg circle:nth-of-type(n+3) { fill: var(--orange); stroke: none; }
.gallery text { fill: #f3ebe4; font-size: 13px; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.gallery figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.marquee { overflow: hidden; border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); margin-top: 28px; background: rgba(255,255,255,0.02); }
.marquee div { display: flex; gap: 42px; width: max-content; padding: 14px 0; animation: ticker 28s linear infinite; }
.marquee:hover div { animation-play-state: paused; }
.marquee span { letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; color: #b7aea6; transition: color 0.2s ease; }
.marquee:hover span { color: #fff; }

.primitives, .phases, .tools, .bands, footer { padding: 88px 6vw; }
.kicker { margin: 0 0 12px; color: var(--orange-2); letter-spacing: 0.16em; font-size: 12px; text-transform: uppercase; }
h2 { margin: 0 0 28px; font-size: clamp(40px, 5vw, 68px); line-height: 0.98; }
.prim-grid, .phase-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.shot, .phase-grid article, .card, .band-grid article {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.shot:hover, .phase-grid article:hover, .card:hover, .band-grid article:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 122, 69, 0.45);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}
.shot img { height: 190px; width: 100%; object-fit: cover; transition: transform 0.55s ease; }
.shot:hover img { transform: scale(1.05); }
.shot div, .text-shot, .phase-grid article, .card { padding: 22px; }
.shot h3, .phase-grid h3, .card h2 { margin: 0 0 8px; font-weight: 600; letter-spacing: -0.03em; }
.shot p, .phase-grid p, .sub { margin: 0; color: var(--muted); line-height: 1.55; }
.text-shot { min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end; }
.text-shot b { font-size: 42px; font-weight: 600; color: var(--text); }
.phase-grid { grid-template-columns: repeat(4, 1fr); }
.phase-grid span { display: block; color: var(--orange-2); letter-spacing: 0.14em; font-size: 12px; margin-bottom: 18px; }

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 0; }
.card h2 { font-size: 36px; }
.stack { display: grid; gap: 10px; }
.field { display: flex; gap: 10px; }
.sizes { display: flex; gap: 8px; }
.size, button[type="submit"] { border: 1px solid var(--line); background: transparent; border-radius: 999px; cursor: pointer; }
.size { flex: 1; height: 42px; color: var(--muted); transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease; }
.size:hover { color: #fff; border-color: rgba(255, 122, 69, 0.6); transform: translateY(-2px); }
.size.on, button[type="submit"] { background: var(--orange); color: #fff; border-color: transparent; }
button[type="submit"] { padding: 0 18px; font-weight: 600; font-size: 14px; transition: transform 0.2s ease, background 0.2s ease; }
button[type="submit"]:hover { transform: translateY(-2px); background: var(--orange-2); }
button:disabled { opacity: 0.5; cursor: wait; }
input {
  width: 100%; min-width: 0; background: rgba(0,0,0,0.35); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:hover { border-color: rgba(255, 255, 255, 0.22); }
input:focus { border-color: rgba(255, 122, 69, 0.8); box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.15); }
.result { margin-top: 16px; min-height: 120px; }
.result.empty p, .note { margin: 0; color: var(--muted); }
.score-row { display: flex; gap: 16px; align-items: center; }
.meter {
  width: 96px; height: 96px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--tone) calc(var(--p) * 1%), rgba(255,255,255,0.08) 0);
  display: grid; place-items: center;
}
.meter span { width: 72px; height: 72px; border-radius: 50%; background: #14110f; display: grid; place-items: center; font-size: 24px; }
.LOW { --tone: var(--green); color: var(--green); }
.MED { --tone: var(--amber); color: var(--amber); }
.HIGH { --tone: var(--red); color: var(--red); }
.score-copy .band { letter-spacing: 0.14em; font-size: 12px; font-weight: 600; }
.score-copy p { margin: 6px 0 0; color: var(--muted); }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.meta div { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.meta span { display: block; color: var(--muted); font-size: 10px; letter-spacing: 0.12em; margin-bottom: 4px; }
ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
li { color: #e7e0da; font-size: 14px; padding-left: 12px; position: relative; }
li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); position: absolute; left: 0; top: 0.5em; }
.sim-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sim-head em { color: var(--muted); font-style: normal; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; }
.members { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.member { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.member.you { border-color: rgba(255, 122, 69, 0.55); }
.member span { color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; }
.err { color: var(--red); }
.band-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.band-grid article { padding: 22px; }
.band-grid b { letter-spacing: 0.12em; font-size: 13px; }
.low b { color: var(--green); } .med b { color: var(--amber); } .high b { color: var(--red); }
footer { display: flex; justify-content: space-between; gap: 24px; align-items: end; border-top: 1px solid rgba(255,255,255,0.08); }
#scan, #sim, #how, #score, #tools { scroll-margin-top: 150px; }

body:not(.ready) .hero-copy > * { opacity: 0; }
body.ready .hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
body.ready .hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
body.ready .hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
body.ready .hero-copy > *:nth-child(3) { animation-delay: 0.22s; }
body.ready .hero-copy > *:nth-child(4) { animation-delay: 0.32s; }
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.shot.reveal.in:hover, .phase-grid article.reveal.in:hover, .card.reveal.in:hover, .band-grid article.reveal.in:hover {
  transform: translateY(-8px);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.7); } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (max-width: 900px) {
  .nav nav { display: none; }
  .hero { min-height: auto; padding: 32px 20px 280px; display: block; }
  .metrics { left: 16px; right: 16px; width: auto; bottom: 16px; }
  .hud { right: 16px; }
  h1 { font-size: 52px; }
  .gallery, .prim-grid, .phase-grid, .tools, .band-grid, footer { display: block; }
  .gallery img, .gallery svg { height: 220px; margin-bottom: 8px; }
  .shot, .phase-grid article, .card, .band-grid article { margin-bottom: 12px; }
  .field { display: block; }
  button[type="submit"], .btn { margin-top: 0; }
  .members { grid-template-columns: 1fr; }
  .primitives, .phases, .tools, .bands, footer { padding: 56px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #loader { display: none; }
}
