:root {
  --steel: #1a1d22;
  --steel-2: #242830;
  --alum: #d7dde3;
  --heat: #e26a2a;
  --heat-2: #ffb070;
  --pore: #8a6ad4;
  --ok: #3d9a6a;
  --mute: #8b939c;
  --line: rgba(215, 221, 227, 0.12);
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 82px; }

body {
  margin: 0;
  color: var(--alum);
  background:
    linear-gradient(135deg, #15171c 0%, #1c1510 42%, #15171c 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--heat-2); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); background: rgba(226,106,42,0.14); padding: 0.05em 0.4em; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 5;
  opacity: 0.16;
  background-image: url("images/texture.webp");
  background-size: 420px auto;
  mix-blend-mode: overlay;
}

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 70; background: var(--steel); padding: 8px 12px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(26, 29, 34, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; letter-spacing: 0.12em; }
.brand small { display: block; font-family: var(--mono); font-size: 10px; color: var(--mute); letter-spacing: 0.16em; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--heat); color: var(--heat); padding: 6px 12px; }
.nav-links { display: flex; gap: 14px; font-size: 13px; }
.nav-links a { color: var(--mute); border-bottom: 2px solid transparent; }
.nav-links a.is-active, .nav-links a:hover { color: var(--heat-2); border-bottom-color: var(--heat); }
.nav-links a.live { color: #1a1d22; background: var(--heat); border: 0; padding: 6px 12px; }

.hero { position: relative; min-height: 92vh; display: grid; align-items: end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(26,29,34,0.88), rgba(26,29,34,0.35) 60%, transparent),
    linear-gradient(180deg, transparent 40%, rgba(26,29,34,0.92));
}
.hero-inner { position: relative; z-index: 1; padding: 10vh 8vw 8vh; max-width: 760px; }

.kicker, .vlabel { font-family: var(--mono); letter-spacing: 0.2em; font-size: 11px; color: var(--heat); margin: 0 0 12px; }
h1, h2, h3 { font-weight: 700; line-height: 1.08; margin: 0 0 14px; }
h1 { font-size: clamp(40px, 7vw, 80px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: 20px; }
.lead { color: rgba(215,221,227,0.86); }

.shot {
  height: 14px;
  background: #2a3038;
  margin: 22px 0 8px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%);
}
.shot i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 42%;
  background: linear-gradient(90deg, #8a6ad4, var(--heat), var(--heat-2));
}
.shot-meta { font-family: var(--mono); font-size: 13px; color: var(--heat-2); margin: 0 0 18px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid currentColor; font-size: 14px; }
.btn-fill { background: var(--heat); color: #1a1d22; border-color: var(--heat); }
.btn-ghost { background: transparent; color: inherit; }

.wrap { width: min(1100px, calc(100% - 48px)); margin: 0 auto; padding: 80px 0; }
.section-head { display: grid; grid-template-columns: 150px 1fr; gap: 20px; margin-bottom: 32px; }
.section-head p:last-child { color: var(--mute); margin: 0; }

.grid-3, .bench-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card, .bench, .io-grid > div {
  background: var(--steel-2);
  border: 1px solid var(--line);
  padding: 20px;
  border-top: 3px solid var(--heat);
}
.stamp { font-family: var(--mono); font-size: 11px; color: var(--pore); letter-spacing: 0.14em; }
.alt { background: rgba(0,0,0,0.22); }

.step { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin-bottom: 40px; }
.step.reverse { direction: rtl; }
.step.reverse > * { direction: ltr; }
.step figure { margin: 0; border: 1px solid var(--line); }
.step img { width: 100%; height: 240px; object-fit: cover; }
.step figcaption { padding: 10px 14px; font-size: 13px; color: var(--mute); }
.num { font-family: var(--mono); color: var(--heat); font-size: 12px; }

.rule-list { margin: 0; padding-left: 22px; }
.rule-list li { margin-bottom: 10px; }
.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding: 28px 0 48px; color: var(--mute); font-size: 14px; }

@media (max-width: 900px) {
  .nav { padding: 12px 16px; flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; margin-left: auto; background: var(--steel); position: relative; z-index: 60; }
  .nav-links { display: none; flex-direction: column; width: 100%; padding: 8px 0 12px; }
  .nav-links.open { display: flex; }
  .hero, .step, .step.reverse, .section-head, .grid-3, .bench-grid, .io-grid, .footer-inner {
    grid-template-columns: 1fr; direction: ltr;
  }
  .wrap { width: min(1100px, calc(100% - 28px)); padding: 52px 0; }
  .hero-inner { padding: 16vh 20px 48px; }
}
