:root {
  --shaft: #12151a;
  --shaft-2: #1b2028;
  --amber: #e0a04a;
  --amber-2: #f3c47a;
  --tick: #6aa0c8;
  --lock: #d24a3a;
  --ok: #3d9a6a;
  --ink: #e6eaf0;
  --mute: #8b96a3;
  --line: rgba(224, 160, 74, 0.2);
  --sans: "IBM Plex 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: 84px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--shaft);
  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(--amber-2); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); background: rgba(106, 160, 200, 0.16); padding: 0.05em 0.4em; }

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

.floors {
  position: fixed;
  right: 14px;
  top: 120px;
  bottom: 80px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  border-right: 2px solid rgba(224, 160, 74, 0.35);
  padding-right: 8px;
}
.floors .here { color: var(--amber); }

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

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

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand small { display: block; font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: 0.16em; color: var(--mute); }
.seal {
  width: 28px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 13px;
}

.nav-toggle { display: none; background: transparent; border: 1px solid var(--amber); color: var(--amber); 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(--amber-2); border-bottom-color: var(--amber); }
.nav-links a.live { color: var(--shaft); background: var(--amber); border: 0; padding: 6px 12px; }

.hero { display: grid; grid-template-columns: 0.95fr 1.05fr; min-height: calc(100vh - 70px); }
.hero-copy { padding: 8vh 6vw; display: flex; flex-direction: column; justify-content: center; }
.hero-frame { margin: 0; position: relative; }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; min-height: 520px; }
.hero-frame figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: rgba(18, 21, 26, 0.82); padding: 8px 12px; font-size: 13px;
}

.kicker, .vlabel { font-family: var(--mono); letter-spacing: 0.18em; font-size: 11px; color: var(--amber); margin: 0 0 12px; }
h1, h2, h3 { font-weight: 600; line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.03em; }
h1 { font-size: clamp(36px, 5.6vw, 70px); }
h2 { font-size: clamp(24px, 3.2vw, 36px); }
h3 { font-size: 20px; }

.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.chip { border: 1px solid var(--tick); color: var(--tick); padding: 4px 10px; font-size: 12px; font-family: var(--mono); }
.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(--amber); color: var(--shaft); border-color: var(--amber); }
.btn-ghost { background: transparent; color: inherit; }

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

.car-row, .bench-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.car, .bench, .io-grid > div { background: var(--shaft-2); border: 1px solid var(--line); padding: 20px; }
.car.warn { outline: 1px solid var(--lock); }
.stamp { font-family: var(--mono); font-size: 11px; color: var(--tick); letter-spacing: 0.12em; }
.alt { background: #0e1116; }

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

.level { margin-top: 14px; padding: 14px; border: 1px dashed var(--lock); background: #151920; }
.lock-ok { color: var(--ok); font-weight: 600; }
.lock-warn { color: var(--lock); font-weight: 600; }

.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) {
  .floors { display: none; }
  .nav { padding: 12px 16px; flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; margin-left: auto; background: var(--shaft-2); position: relative; z-index: 60; }
  .nav-links { display: none; flex-direction: column; width: 100%; padding: 8px 0 12px; }
  .nav-links.open { display: flex; }
  .hero, .land, .land.flip, .section-head, .car-row, .bench-grid, .io-grid, .footer-inner {
    grid-template-columns: 1fr; direction: ltr;
  }
  .hero-copy { padding: 36px 20px 24px; }
  .hero-frame img { min-height: 240px; }
  .wrap { width: min(1100px, calc(100% - 28px)); padding: 52px 0; }
}
