/* =========================================================
   KAGAMI // NEURAL MIRROR OS — Landing Page
   Design concept: MIRROR NOIR (鏡面ノワール)
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* base (as rgb triplets for alpha use) */
  --bg-0-rgb: 4 5 10;
  --bg-1-rgb: 8 11 22;
  --bg-2-rgb: 13 16 34;
  --bg-0: rgb(var(--bg-0-rgb));
  --bg-1: rgb(var(--bg-1-rgb));
  --bg-2: rgb(var(--bg-2-rgb));

  /* neon accents (skin: NOIR) */
  --p: 0 240 255;     /* primary  : electric cyan   */
  --s: 255 42 109;    /* secondary: cyber magenta   */
  --t: 214 255 46;    /* tertiary : acid signal     */
  --w: 232 240 255;   /* text white                 */
  --g: 138 147 170;   /* silver gray                */

  --font-display: "Chakra Petch", "Zen Kaku Gothic New", sans-serif;
  --font-jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mono: "Share Tech Mono", "M PLUS 1 Code", ui-monospace, monospace;
  --font-body: "M PLUS 1 Code", "Zen Kaku Gothic New", ui-monospace, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.77, 0, .18, 1);
  --gutter: clamp(20px, 6vw, 104px);
  --hud-pad: clamp(14px, 1.8vw, 26px);
}

:root[data-skin="blood"] {
  --p: 255 46 88;
  --s: 0 229 255;
  --t: 255 190 40;
}

:root[data-skin="acid"] {
  --p: 190 255 30;
  --s: 255 0 200;
  --t: 0 240 255;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg-0);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(14px, .25vw + 13px, 16px);
  line-height: 1.9;
  font-weight: 400;
  color: rgb(var(--w) / .8);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

.is-loading body, .menu-open body { overflow: hidden; }

img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }

::selection { background: rgb(var(--s) / .9); color: #fff; }

:focus-visible { outline: 2px solid rgb(var(--p)); outline-offset: 4px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 10001;
  padding: 10px 16px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em;
  color: var(--bg-0); background: rgb(var(--p));
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 900px) { .br-pc { display: none; } }

/* ---------- 3. GLOBAL FX ---------- */
.bg-field {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.fx { position: fixed; inset: 0; pointer-events: none; }

.fx--grid {
  z-index: 0;
  background-image:
    linear-gradient(rgb(var(--p) / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--p) / .05) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 10%, transparent 75%);
}

.fx--vignette {
  z-index: 88;
  background: radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / .6) 100%);
}

.fx--noise {
  z-index: 89;
  inset: -50%;
  opacity: .065;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise 1.2s steps(5) infinite;
  transition: opacity .3s;
}
.is-skin-glitch .fx--noise { opacity: .3; }

@keyframes noise {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-7%, 4%); }
  40%  { transform: translate(5%, -9%); }
  60%  { transform: translate(-3%, 8%); }
  80%  { transform: translate(8%, 2%); }
  100% { transform: translate(0, 0); }
}

.fx--scan {
  z-index: 90;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / .22) 2px 3px);
  opacity: .55;
}
.fx--scan::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 22vh;
  background: linear-gradient(to bottom, transparent, rgb(var(--p) / .045), transparent);
  animation: scanbar 8s linear infinite;
}
@keyframes scanbar {
  from { transform: translateY(-25vh); }
  to   { transform: translateY(125vh); }
}

/* ---------- 4. BOOT SEQUENCE ---------- */
.boot { display: none; }

.js .boot {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  color: rgb(var(--p));
  cursor: pointer;
}

.boot__shutters {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: repeat(10, 1fr);
}
.boot__shutters span {
  display: block;
  margin-bottom: -1px;
  background: var(--bg-0);
  transition: transform .75s var(--ease-io);
}
.boot__shutters span:nth-child(odd)  { --dir: -1; }
.boot__shutters span:nth-child(even) { --dir: 1; }
.boot__shutters span:nth-child(1)  { transition-delay: .00s; }
.boot__shutters span:nth-child(2)  { transition-delay: .05s; }
.boot__shutters span:nth-child(3)  { transition-delay: .02s; }
.boot__shutters span:nth-child(4)  { transition-delay: .08s; }
.boot__shutters span:nth-child(5)  { transition-delay: .04s; }
.boot__shutters span:nth-child(6)  { transition-delay: .10s; }
.boot__shutters span:nth-child(7)  { transition-delay: .03s; }
.boot__shutters span:nth-child(8)  { transition-delay: .07s; }
.boot__shutters span:nth-child(9)  { transition-delay: .01s; }
.boot__shutters span:nth-child(10) { transition-delay: .06s; }

.boot__inner {
  position: relative;
  width: min(820px, 100% - 40px);
  padding: 28px 0;
}

.boot__top {
  display: flex; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 1px solid rgb(var(--p) / .25);
  font-size: 12px; letter-spacing: .2em;
}
.boot__brand { font-family: var(--font-display); font-weight: 700; letter-spacing: .4em; color: rgb(var(--w)); }
.boot__brand small { margin-left: 10px; font-family: var(--font-mono); font-weight: 400; letter-spacing: .2em; color: rgb(var(--p) / .7); }
.boot__node { color: rgb(var(--w) / .45); }

.boot__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 24px;
  min-height: 260px;
}

.boot__log {
  list-style: none;
  font-size: clamp(11px, 1.3vw, 13px);
  line-height: 2;
  color: rgb(var(--w) / .75);
}
.boot__log li {
  display: flex; justify-content: space-between; gap: 12px;
  white-space: nowrap; overflow: hidden;
  animation: bootLine .18s steps(3) both;
}
.boot__log li span:first-child { overflow: hidden; text-overflow: ellipsis; }
.boot__log .st-ok   { color: rgb(var(--p)); }
.boot__log .st-warn { color: rgb(var(--t)); }
.boot__log .st-head { color: rgb(var(--w)); }
@keyframes bootLine {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

.boot__hex {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px; line-height: 1.75;
  color: rgb(var(--p) / .3);
  overflow: hidden;
  white-space: pre;
}

.boot__progress {
  display: flex; align-items: center; gap: 16px;
  margin-top: 22px;
}
.boot__bar {
  position: relative; flex: 1;
  height: 3px;
  background: rgb(var(--p) / .14);
}
.boot__bar span {
  position: absolute; inset: 0;
  background: rgb(var(--p));
  box-shadow: 0 0 14px rgb(var(--p)), 0 0 2px rgb(var(--p));
  transform-origin: left;
  transform: scaleX(0);
}
.boot__pct { min-width: 4ch; font-size: 14px; color: rgb(var(--w)); text-align: right; }

.boot__granted {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 64px);
  letter-spacing: .3em;
  color: rgb(var(--w));
  text-shadow: -3px 0 rgb(var(--s)), 3px 0 rgb(var(--p)), 0 0 30px rgb(var(--p) / .8);
  opacity: 0;
  pointer-events: none;
}

.boot__skip {
  margin-top: 18px;
  font-size: 11px; letter-spacing: .25em;
  color: rgb(var(--w) / .35);
  animation: blink 1.4s steps(1) infinite;
}
.boot__skip span { letter-spacing: .1em; }

.boot.is-granted .boot__top,
.boot.is-granted .boot__body,
.boot.is-granted .boot__progress,
.boot.is-granted .boot__skip { opacity: .12; transition: opacity .2s; }
.boot.is-granted .boot__granted { animation: granted .5s steps(1) both; }

@keyframes granted {
  0%   { opacity: 0; clip-path: inset(40% 0 40% 0); }
  15%  { opacity: 1; clip-path: inset(0 0 60% 0); transform: translate(-6px, -50%); }
  30%  { clip-path: inset(50% 0 0 0); transform: translate(8px, -50%); }
  45%  { clip-path: inset(0); transform: translate(0, -50%); }
  60%  { opacity: .4; }
  75%  { opacity: 1; }
  100% { opacity: 1; clip-path: inset(0); transform: translateY(-50%); }
}

.boot.is-exit { cursor: default; pointer-events: none; }
.boot.is-exit .boot__inner { animation: bootOut .4s steps(4) forwards; }
.boot.is-exit .boot__shutters span { transform: translateX(calc(var(--dir) * 102%)); }

@keyframes bootOut {
  0%   { opacity: 1; transform: none; filter: none; }
  30%  { transform: skewX(-12deg) translateX(-12px); clip-path: inset(0 0 45% 0); }
  60%  { transform: skewX(10deg) translateX(18px); clip-path: inset(55% 0 0 0); filter: hue-rotate(90deg); }
  100% { opacity: 0; transform: scaleY(.02); clip-path: inset(49% 0 49% 0); }
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- 5. HUD : TOP ---------- */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 65;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: var(--hud-pad) calc(var(--hud-pad) + 10px);
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.hud-top::before {
  content: "";
  position: absolute; inset: 0 0 -30px 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgb(var(--bg-0-rgb) / .92), rgb(var(--bg-0-rgb) / 0));
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.is-scrolled .hud-top::before { opacity: 1; }

.logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .38em;
  line-height: 1.2;
  color: rgb(var(--w));
}
.logo__txt small {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: .3em;
  color: rgb(var(--p) / .75);
}
.logo__mark { width: 34px; height: 34px; overflow: visible; transition: transform .6s var(--ease-out); }
.logo__a { fill: none; stroke: rgb(var(--p)); stroke-width: 2; }
.logo__b { fill: rgb(var(--p)); opacity: .9; }
.logo__c { stroke: rgb(var(--s)); stroke-width: 2; }
.logo:hover .logo__mark { transform: rotate(90deg); }
.logo:hover .logo__txt { animation: rgbJitter .3s steps(2) 1; }

.nav__list {
  display: flex; gap: 2px;
  list-style: none;
  padding: 5px;
  border: 1px solid rgb(var(--p) / .16);
  background: rgb(var(--bg-0-rgb) / .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.nav__link {
  position: relative;
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 13px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: rgb(var(--w) / .58);
  transition: color .25s, background-color .25s;
}
.nav__link b { font-weight: 400; font-size: 10px; color: rgb(var(--p) / .85); }
.nav__link::after {
  content: "";
  position: absolute; left: 13px; right: 13px; bottom: 3px;
  height: 1px;
  background: rgb(var(--p));
  box-shadow: 0 0 8px rgb(var(--p));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="true"] { color: rgb(var(--w)); background: rgb(var(--p) / .06); }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }
.nav__foot { display: none; }

.hud-top__right { display: flex; align-items: center; gap: 14px; }

.perm {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  color: rgb(var(--w) / .45);
}
.perm b {
  padding: 3px 8px;
  font-weight: 400; font-size: 12px; letter-spacing: .25em;
  color: rgb(var(--p));
  border: 1px solid rgb(var(--p) / .4);
  background: rgb(var(--p) / .06);
}
.perm.is-up b { animation: permFlash .9s steps(2) 2; }
@keyframes permFlash {
  50% { color: var(--bg-0); background: rgb(var(--p)); box-shadow: 0 0 18px rgb(var(--p)); }
}

.btn-mini {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-jp); font-weight: 700; font-size: 13px; letter-spacing: .12em;
  color: var(--bg-0);
  background: rgb(var(--p));
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background-color .25s, color .25s;
}
.btn-mini span { font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .15em; opacity: .75; }
.btn-mini:hover { background: rgb(var(--w)); animation: rgbJitter .3s steps(2) 1; }

.menu-btn {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid rgb(var(--p) / .4);
  background: rgb(var(--bg-0-rgb) / .6);
}
.menu-btn span {
  position: absolute; left: 11px; right: 11px;
  height: 1.5px;
  background: rgb(var(--p));
  transition: transform .35s var(--ease-out), opacity .2s;
}
.menu-btn span:nth-child(1) { top: 14px; }
.menu-btn span:nth-child(2) { top: 21px; right: 17px; }
.menu-btn span:nth-child(3) { top: 28px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. HUD : SIDE / GAUGE / BOTTOM ---------- */
.hud-side {
  position: fixed; z-index: 60;
  left: calc(var(--hud-pad) - 4px); top: 50%;
  display: flex; align-items: center; gap: 14px;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .3em;
  color: rgb(var(--w) / .3);
  pointer-events: none;
}
.hud-side i { width: 1px; height: 70px; background: linear-gradient(rgb(var(--p) / 0), rgb(var(--p) / .6), rgb(var(--p) / 0)); }

.hud-gauge {
  --prog: 0;
  position: fixed; z-index: 60;
  right: var(--hud-pad); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .2em;
  color: rgb(var(--w) / .38);
  pointer-events: none;
}
.hud-gauge__label { writing-mode: vertical-rl; }
.hud-gauge__track {
  position: relative;
  width: 9px; height: 30vh;
  background:
    linear-gradient(rgb(var(--w) / .18), rgb(var(--w) / .18)) center / 1px 100% no-repeat,
    repeating-linear-gradient(to bottom, rgb(var(--w) / .25) 0 1px, transparent 1px 10%) center / 7px 100% no-repeat;
}
.hud-gauge__fill {
  position: absolute; left: 4px; top: 0;
  width: 1px; height: 100%;
  background: rgb(var(--p));
  box-shadow: 0 0 8px rgb(var(--p));
  transform-origin: top;
  transform: scaleY(var(--prog));
}
.hud-gauge__mark {
  position: absolute; left: -7px;
  top: calc(var(--prog) * 100%);
  width: 0; height: 0;
  margin-top: -5px;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent rgb(var(--p));
  filter: drop-shadow(0 0 4px rgb(var(--p)));
}
.hud-gauge__val { color: rgb(var(--p)); font-size: 11px; }

.hud-bottom {
  position: fixed; z-index: 60;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 0 calc(var(--hud-pad) + 10px) var(--hud-pad);
  pointer-events: none;
}
.hud-bottom > * { pointer-events: auto; }
.hud-bottom::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: -1;
  height: 120px;
  background: linear-gradient(to top, rgb(var(--bg-0-rgb) / .92), rgb(var(--bg-0-rgb) / 0));
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.is-scrolled .hud-bottom::before { opacity: 1; }
.hud-bottom__sys {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .2em;
  color: rgb(var(--w) / .38);
  pointer-events: none;
}
.hud-bottom__sys b { font-weight: 400; color: rgb(var(--w) / .75); }
.hud-bottom__ctrl { display: flex; align-items: center; gap: 12px; }

.skin {
  display: flex; gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgb(var(--w) / .12);
  background: rgb(var(--bg-0-rgb) / .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.skin__btn {
  width: 16px; height: 16px;
  transform: rotate(45deg) scale(.72);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.skin__btn[data-skin-btn="noir"]  { background: #00f0ff; }
.skin__btn[data-skin-btn="blood"] { background: #ff2e58; }
.skin__btn[data-skin-btn="acid"]  { background: #beff1e; }
.skin__btn:hover { transform: rotate(45deg) scale(.9); }
.skin__btn[aria-pressed="true"] {
  transform: rotate(45deg) scale(.9);
  box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 3px rgb(var(--w) / .85), 0 0 14px rgb(var(--p));
}

.sound-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .2em;
  white-space: nowrap;
  color: rgb(var(--w) / .6);
  border: 1px solid rgb(var(--w) / .12);
  background: rgb(var(--bg-0-rgb) / .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: color .25s, border-color .25s;
}
.sound-btn b { font-weight: 400; color: rgb(var(--s)); }
.sound-btn[aria-pressed="true"] { color: rgb(var(--w)); border-color: rgb(var(--p) / .45); }
.sound-btn[aria-pressed="true"] b { color: rgb(var(--p)); }
.sound-btn:hover { border-color: rgb(var(--p) / .6); }
.sound-btn__eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound-btn__eq i {
  width: 2px; height: 3px;
  background: currentColor;
  transform-origin: bottom;
}
.sound-btn[aria-pressed="true"] .sound-btn__eq i { background: rgb(var(--p)); animation: eq .9s ease-in-out infinite alternate; }
.sound-btn__eq i:nth-child(2) { animation-delay: -.3s !important; }
.sound-btn__eq i:nth-child(3) { animation-delay: -.6s !important; }
.sound-btn__eq i:nth-child(4) { animation-delay: -.15s !important; }
.sound-btn__eq i:nth-child(5) { animation-delay: -.45s !important; }
@keyframes eq {
  0%   { height: 3px; }
  50%  { height: 12px; }
  100% { height: 5px; }
}

/* ---------- 7. CUSTOM CURSOR ---------- */
.cursor { display: none; }
.has-cursor .cursor {
  display: block;
  position: fixed; left: 0; top: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.has-cursor .cursor.is-active { opacity: 1; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input[type="text"], .has-cursor input[type="email"] { cursor: text !important; }
.has-cursor.modal-open, .has-cursor.modal-open * { cursor: auto !important; }
.has-cursor.modal-open .modal button { cursor: pointer !important; }
.has-cursor.modal-open .cursor { opacity: 0; }

.cursor__dot {
  position: fixed; left: 0; top: 0;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  background: rgb(var(--p));
  box-shadow: 0 0 10px rgb(var(--p));
}
.cursor__ring {
  position: fixed; left: 0; top: 0;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out);
}
.cursor__ring i {
  position: absolute;
  width: 8px; height: 8px;
  border: 0 solid rgb(var(--p) / .9);
  transition: border-color .3s;
}
.cursor__ring i:nth-child(1) { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; }
.cursor__ring i:nth-child(2) { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.cursor__ring i:nth-child(3) { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }
.cursor__ring i:nth-child(4) { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; }
.cursor.is-hover .cursor__ring { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.cursor.is-hover .cursor__ring i { border-color: rgb(var(--s)); }
.cursor.is-down .cursor__ring { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
.cursor__label {
  position: fixed; left: 0; top: 0;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .22em;
  color: var(--bg-0);
  background: rgb(var(--s));
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
}
.cursor.is-hover .cursor__label { opacity: 1; }

/* ---------- 8. BUTTONS ---------- */
.btn {
  --cut: 14px;
  --bc: rgb(var(--p));
  --fill: rgb(var(--p) / .1);
  --fill-hover: rgb(var(--p));
  --tc-hover: var(--bg-0);
  position: relative;
  isolation: isolate;
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 22px;
  min-height: 60px;
  padding: 12px 18px 12px 26px;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .14em;
  line-height: 1.3;
  color: rgb(var(--w));
  text-align: left;
  transition: color .35s var(--ease-out), filter .35s;
}
.btn::before, .btn::after {
  content: "";
  position: absolute;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.btn::before { inset: 0; z-index: -2; background: var(--bc); }
.btn::after {
  inset: 1px; z-index: -1;
  background:
    linear-gradient(90deg, var(--fill-hover) 50%, transparent 50%) 100% 0 / 202% 100% no-repeat,
    linear-gradient(var(--fill), var(--fill)),
    var(--bg-0);
  transition: background-position .5s var(--ease-io);
}
.btn:hover::after, .btn:focus-visible::after { background-position: 0 0, 0 0, 0 0; }
.btn:hover, .btn:focus-visible { color: var(--tc-hover); filter: drop-shadow(0 0 16px rgb(var(--p) / .45)); }
.btn:hover .btn__label { animation: rgbJitter .35s steps(2) 1; }
.btn:active { transform: translateY(1px); }

.btn__label small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: .28em;
  opacity: .72;
}
.btn__icon {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  font-family: var(--font-display);
  font-size: 18px;
  border-left: 1px solid currentColor;
  padding-left: 10px;
  box-sizing: content-box;
  transition: transform .4s var(--ease-out);
}
.btn:hover .btn__icon { transform: translateX(4px); }

.btn--ghost {
  --bc: rgb(var(--w) / .32);
  --fill: transparent;
  --fill-hover: rgb(var(--w));
}
.btn--ghost:hover, .btn--ghost:focus-visible { filter: drop-shadow(0 0 12px rgb(var(--w) / .25)); }

.btn--xl { width: 100%; min-height: 72px; font-size: 18px; }
.btn--sm { min-height: 48px; font-size: 14px; padding: 8px 14px 8px 20px; gap: 16px; }
.btn--sm .btn__icon { width: 24px; height: 24px; font-size: 15px; }

.btn[disabled] { opacity: .5; pointer-events: none; }

@keyframes rgbJitter {
  0%   { text-shadow: -2px 0 rgb(var(--s)), 2px 0 rgb(var(--p)); transform: translateX(-1px); }
  50%  { text-shadow: 2px 0 rgb(var(--s)), -2px 0 rgb(var(--p)); transform: translateX(1px); }
  100% { text-shadow: none; transform: none; }
}

/* ---------- 9. GLITCH TEXT ---------- */
[data-glitch] { position: relative; }
.glitch__layer {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  text-shadow: none;
}
.glitch__layer--a { color: rgb(var(--s)); }
.glitch__layer--b { color: rgb(var(--p)); }
.glitch__layer em { color: inherit !important; -webkit-text-stroke: 0 !important; text-shadow: none !important; }
.is-glitching .glitch__layer { opacity: .9; }
.is-glitching .glitch__layer--a { animation: glitchA .42s steps(1) both; }
.is-glitching .glitch__layer--b { animation: glitchB .42s steps(1) both; }
.is-glitching .glitch__main { animation: glitchMain .42s steps(1) both; }

@keyframes glitchA {
  0%   { clip-path: inset(8% 0 72% 0);  transform: translate(-7px, 0); }
  16%  { clip-path: inset(62% 0 14% 0); transform: translate(6px, 0); }
  32%  { clip-path: inset(34% 0 46% 0); transform: translate(-4px, 0); }
  48%  { clip-path: inset(82% 0 3% 0);  transform: translate(9px, 0); }
  64%  { clip-path: inset(18% 0 60% 0); transform: translate(-5px, 0); }
  80%  { clip-path: inset(50% 0 30% 0); transform: translate(3px, 0); }
  100% { clip-path: inset(0 0 100% 0);  transform: none; }
}
@keyframes glitchB {
  0%   { clip-path: inset(70% 0 10% 0); transform: translate(6px, 0); }
  16%  { clip-path: inset(12% 0 66% 0); transform: translate(-8px, 0); }
  32%  { clip-path: inset(46% 0 28% 0); transform: translate(5px, 0); }
  48%  { clip-path: inset(4% 0 84% 0);  transform: translate(-3px, 0); }
  64%  { clip-path: inset(58% 0 22% 0); transform: translate(7px, 0); }
  80%  { clip-path: inset(26% 0 52% 0); transform: translate(-4px, 0); }
  100% { clip-path: inset(0 0 100% 0);  transform: none; }
}
@keyframes glitchMain {
  0%   { transform: translate(2px, 0) skewX(-4deg); }
  20%  { transform: translate(-3px, 0); opacity: .8; }
  40%  { transform: none; opacity: 1; }
  60%  { transform: translate(4px, 0) skewX(6deg); }
  80%  { transform: translate(-1px, 0); }
  100% { transform: none; }
}

/* ---------- 10. TOAST ---------- */
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 95;
  max-width: calc(100% - 32px);
  padding: 12px 18px 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .1em; line-height: 1.6;
  color: rgb(var(--w));
  background: rgb(var(--bg-1-rgb) / .94);
  border: 1px solid rgb(var(--p) / .45);
  border-left: 3px solid rgb(var(--p));
  box-shadow: 0 12px 40px rgb(0 0 0 / .6), 0 0 24px rgb(var(--p) / .18);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease-out);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: "[ NOTICE ] "; color: rgb(var(--p)); }
.toast[data-type="warn"] { border-color: rgb(var(--s) / .5); border-left-color: rgb(var(--s)); }
.toast[data-type="warn"]::before { content: "[ ALERT ] "; color: rgb(var(--s)); }
.toast[data-type="ok"] { border-left-color: rgb(var(--t)); }
.toast[data-type="ok"]::before { content: "[ GRANTED ] "; color: rgb(var(--t)); }

/* ---------- 11. REVEAL ---------- */
.js [data-reveal] {
  opacity: 0;
  translate: 0 38px;
  transition: opacity 1s var(--ease-out), translate 1s var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }
.js [data-scramble]:not(.is-in) { opacity: 0; }

/* ---------- 12. HERO ---------- */
main { position: relative; z-index: 1; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 130px var(--gutter) 150px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--bg-0));
  pointer-events: none;
}

.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* reticle around the hologram (position mirrors the canvas core: 68% / 46%) */
.hero__reticle {
  position: absolute; z-index: 0;
  left: 68%; top: 46%;
  width: min(60vmin, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out) .6s;
}
.is-ready .hero__reticle { opacity: 1; }
.hero__reticle svg { width: 100%; height: 100%; overflow: visible; fill: none; }
.rt-ring { stroke: rgb(var(--p) / .2); stroke-width: 1; }
.rt-ring--dash { stroke-dasharray: 2 10; stroke: rgb(var(--p) / .3); }
.rt-ticks {
  stroke: rgb(var(--p) / .35);
  stroke-width: 7;
  stroke-dasharray: 1 11.1;
  transform-origin: 200px 200px;
  animation: spin 80s linear infinite reverse;
}
.rt-spin { transform-origin: 200px 200px; animation: spin 18s linear infinite; }
.rt-arc { stroke: rgb(var(--p) / .75); stroke-width: 2; filter: drop-shadow(0 0 6px rgb(var(--p))); }
.rt-arc--b { stroke: rgb(var(--s) / .65); filter: drop-shadow(0 0 6px rgb(var(--s))); }
.rt-cross { stroke: rgb(var(--w) / .35); stroke-width: 1; }
.rt-corner { stroke: rgb(var(--p) / .6); stroke-width: 1.5; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__tag {
  position: absolute;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  color: rgb(var(--w) / .55);
  white-space: nowrap;
  border-left: 1px solid rgb(var(--p) / .6);
  background: rgb(var(--bg-0-rgb) / .45);
}
.hero__tag b { font-weight: 400; color: rgb(var(--p)); }
.hero__tag--a { top: 4%; right: -14%; }
.hero__tag--b { bottom: 12%; right: -10%; }
.hero__tag--c { bottom: 6%; left: -6%; }
.hero__tag--c b { color: rgb(var(--t)); }

.hero__inner {
  position: relative; z-index: 2;
  width: 100%;
  max-width: 800px;
}
.js .hero__inner > * {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .9s var(--ease-out), translate .9s var(--ease-out);
}
.is-ready .hero__inner > * { opacity: 1; translate: 0 0; }
.is-ready .hero__inner > :nth-child(1) { transition-delay: .05s; }
.is-ready .hero__inner > :nth-child(2) { transition-delay: .15s; }
.is-ready .hero__inner > :nth-child(3) { transition-delay: .25s; }
.is-ready .hero__inner > :nth-child(4) { transition-delay: .6s; }
.is-ready .hero__inner > :nth-child(5) { transition-delay: .75s; }
.is-ready .hero__inner > :nth-child(6) { transition-delay: .9s; }

.hero__cmd {
  min-height: 1.6em;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: .06em;
  color: rgb(var(--w) / .9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero__prompt { color: rgb(var(--s)); }
.hero__ok { color: rgb(var(--p)); }
.caret {
  display: inline-block;
  width: .6em; height: 1.1em;
  margin-left: 3px;
  vertical-align: -2px;
  background: rgb(var(--p));
  box-shadow: 0 0 8px rgb(var(--p));
  animation: blink 1s steps(1) infinite;
}

.hero__eyebrow {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .2em;
  color: rgb(var(--w) / .85);
}
.hero__eyebrow-en { color: rgb(var(--w) / .45); }
.hero__eyebrow-en b { font-weight: 400; color: rgb(var(--t)); }
.pulse-dot {
  position: relative;
  width: 8px; height: 8px;
  background: rgb(var(--t));
  box-shadow: 0 0 12px rgb(var(--t));
}
.pulse-dot::after {
  content: "";
  position: absolute; inset: -5px;
  border: 1px solid rgb(var(--t) / .8);
  animation: ping 1.8s var(--ease-out) infinite;
}
@keyframes ping {
  0%   { transform: scale(.4); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.hero__title {
  margin: 24px 0 14px;
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(2.1rem, 7vw, 7.2rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: rgb(var(--w));
  text-shadow: 0 0 30px rgb(var(--p) / .25);
}
.hero__line {
  display: block;
  width: fit-content;
  white-space: nowrap;
}
.js .hero__line {
  clip-path: inset(-25% 101% -25% -4%);
  transition: clip-path 1.1s var(--ease-io);
}
.is-ready .hero__line { clip-path: inset(-25% -12% -25% -4%); }
.is-ready .hero__line:nth-child(1) { transition-delay: .3s; }
.is-ready .hero__line:nth-child(2) { transition-delay: .5s; }
.hero__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px rgb(var(--p));
  text-shadow: 0 0 22px rgb(var(--p) / .55);
}
@supports not (-webkit-text-stroke: 1px black) {
  .hero__title em { color: rgb(var(--p)); }
}

.hero__en {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.85rem, 1.5vw, 1.2rem);
  letter-spacing: .55em;
  color: rgb(var(--w) / .72);
}
.hero__en span { color: rgb(var(--p)); text-shadow: 0 0 14px rgb(var(--p) / .7); }

.hero__lead {
  max-width: 36em;
  margin: 30px 0 38px;
  font-size: clamp(14px, .3vw + 13px, 16px);
  line-height: 2;
  color: rgb(var(--w) / .78);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__stats {
  position: absolute; z-index: 2;
  left: var(--gutter); bottom: 64px;
  display: flex; gap: clamp(20px, 3vw, 48px);
  margin: 0;
}
.hero__stats div { position: relative; padding-left: 14px; }
.hero__stats div::before {
  content: "";
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 1px;
  background: linear-gradient(rgb(var(--p)), transparent);
}
.hero__stats dt {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  color: rgb(var(--w) / .42);
}
.hero__stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: .06em;
  line-height: 1.2;
  color: rgb(var(--w));
  font-variant-numeric: tabular-nums;
}
.hero__stats small { margin-left: 2px; font-size: .55em; color: rgb(var(--p)); }

.hero__rewrite {
  position: absolute; z-index: 2;
  right: var(--gutter); bottom: 64px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .24em;
  color: rgb(var(--w) / .85);
  border: 1px solid rgb(var(--p) / .35);
  background: rgb(var(--bg-0-rgb) / .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: color .25s, border-color .25s, background-color .25s, box-shadow .25s;
}
.hero__rewrite span { color: rgb(var(--p)); }
.hero__rewrite small { font-size: 10px; letter-spacing: .1em; color: rgb(var(--w) / .45); }
.hero__rewrite:hover {
  color: rgb(var(--w));
  border-color: rgb(var(--p));
  background: rgb(var(--p) / .1);
  box-shadow: 0 0 22px rgb(var(--p) / .3);
}

.hero__scroll {
  position: absolute; z-index: 2;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .35em;
  color: rgb(var(--w) / .5);
}
.hero__scroll i {
  position: relative;
  width: 1px; height: 44px;
  background: rgb(var(--w) / .15);
  overflow: hidden;
}
.hero__scroll i::after {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 1px; height: 45%;
  background: rgb(var(--p));
  box-shadow: 0 0 6px rgb(var(--p));
  animation: drip 1.8s var(--ease-io) infinite;
}
@keyframes drip {
  from { transform: translateY(-110%); }
  to   { transform: translateY(240%); }
}

/* ---------- 13. SECTION COMMON ---------- */
.section {
  position: relative;
  padding: clamp(110px, 13vw, 200px) var(--gutter);
  scroll-margin-top: 0;
}

.section__num {
  position: absolute; z-index: -1;
  top: clamp(40px, 6vw, 90px); right: calc(var(--gutter) - .06em);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 22vw, 21rem);
  line-height: .8;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--p) / .16);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
.section__num--left { right: auto; left: calc(var(--gutter) - .06em); }
@supports not (-webkit-text-stroke: 1px black) { .section__num { color: rgb(var(--p) / .05); } }

.section__head { position: relative; max-width: 820px; }
.section__head--right { margin-left: auto; text-align: right; }
.section__head--right .section__lead { margin-left: auto; }
.section__head--center { margin: 0 auto; text-align: center; }
.section__head--center .section__lead { margin-left: auto; margin-right: auto; }

.section__label {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .3em;
  color: rgb(var(--p));
}
.section__label span {
  padding: 1px 8px;
  letter-spacing: .1em;
  color: var(--bg-0);
  background: rgb(var(--p));
}
.section__label::after {
  content: "";
  width: 56px; height: 1px;
  background: linear-gradient(90deg, rgb(var(--p) / .7), transparent);
}
.section__head--right .section__label { flex-direction: row-reverse; }
.section__head--right .section__label::after { background: linear-gradient(-90deg, rgb(var(--p) / .7), transparent); }

.section__title {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.2;
  letter-spacing: .01em;
  color: rgb(var(--w));
  text-shadow: 0 0 26px rgb(var(--p) / .18);
}
.section__title > span, .connect__title > span { display: block; }

.section__lead {
  max-width: 38em;
  margin-top: 26px;
  font-size: clamp(14px, .3vw + 13px, 16px);
  color: rgb(var(--w) / .7);
}

/* ---------- 14. TERMINAL (shared) ---------- */
.term {
  position: relative;
  background: rgb(var(--bg-1-rgb) / .82);
  border: 1px solid rgb(var(--p) / .24);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .85), inset 0 0 50px rgb(var(--p) / .035);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.term::before {
  content: "";
  position: absolute; left: -1px; top: -1px;
  width: 22px; height: 22px;
  border-left: 2px solid rgb(var(--p));
  border-top: 2px solid rgb(var(--p));
  pointer-events: none;
}
.term__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(var(--p) / .16);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  color: rgb(var(--w) / .45);
}
.term__bar i { width: 8px; height: 8px; border: 1px solid rgb(var(--p) / .5); }
.term__bar i:first-child { background: rgb(var(--s)); border-color: rgb(var(--s)); }
.term__bar span { margin-left: 10px; }

.term__lines {
  list-style: none;
  padding: 20px 22px 24px;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.1vw, 13.5px);
  line-height: 1.95;
  color: rgb(var(--w) / .62);
  overflow-x: auto;
}
.term__lines li { white-space: pre; }
.term__lines .is-cmd { color: rgb(var(--w)); }
.term__lines .is-cmd::before { content: "$ "; color: rgb(var(--s)); }
.term__lines .is-err { color: rgb(var(--s)); text-shadow: 0 0 10px rgb(var(--s) / .5); }
.js [data-typer] li { visibility: hidden; }
.js [data-typer] li.is-shown { visibility: visible; }
[data-typer] li.is-active::after {
  content: "";
  display: inline-block;
  width: .55em; height: 1.05em;
  margin-left: 2px;
  vertical-align: -2px;
  background: rgb(var(--p));
  animation: blink .8s steps(1) infinite;
}
[data-typer] li.is-err.is-shown { animation: errGlitch .5s steps(2) 1; }
@keyframes errGlitch {
  0%   { transform: translateX(-4px); opacity: .4; }
  25%  { transform: translateX(5px); }
  50%  { transform: translateX(-2px); opacity: 1; }
  100% { transform: none; }
}

/* ---------- 15. GENESIS ---------- */
.genesis__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 140px);
  max-width: 1320px;
  margin: 0 auto;
}

.genesis__head {
  position: sticky; top: 120px;
  align-self: start;
}
/* vertical-rl: each span is one column, flowing right → left */
.genesis__title {
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(2.2rem, 3.3vw, 3.4rem);
  line-height: 1.35;
  letter-spacing: .1em;
  color: rgb(var(--w));
  text-shadow: 0 0 26px rgb(var(--p) / .18);
}
.genesis__title > span { display: block; white-space: nowrap; }
.genesis__title > span:last-child { color: rgb(var(--p)); text-shadow: 0 0 24px rgb(var(--p) / .45); }

.genesis__body { min-width: 0; }

.genesis__story { max-width: 40em; }
.genesis__story p + p { margin-top: 1.4em; }
.genesis__story p {
  font-size: clamp(15px, .45vw + 13px, 17.5px);
  line-height: 2.1;
  color: rgb(var(--w) / .78);
}
.genesis__story b { font-family: var(--font-display); color: rgb(var(--p)); font-weight: 600; }
.genesis__story strong { color: rgb(var(--w)); background: linear-gradient(transparent 62%, rgb(var(--s) / .45) 62%); }

.genesis__quote {
  position: relative;
  margin-top: 2.4em !important;
  padding-left: 26px;
  font-family: var(--font-jp) !important;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.9rem) !important;
  line-height: 1.7 !important;
  color: rgb(var(--w)) !important;
}
.genesis__quote::before {
  content: "";
  position: absolute; left: 0; top: .3em; bottom: .3em;
  width: 2px;
  background: rgb(var(--s));
  box-shadow: 0 0 12px rgb(var(--s));
}
.genesis__quote em { font-style: normal; color: rgb(var(--s)); text-shadow: 0 0 22px rgb(var(--s) / .55); }

.term--genesis { margin: 56px 0 0; max-width: 680px; }

.genesis__data { margin-top: 56px; }

.chart {
  padding: 18px 18px 10px;
  border: 1px solid rgb(var(--p) / .14);
  background: rgb(var(--bg-0-rgb) / .6);
}
.chart__cap {
  display: flex; gap: 12px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .18em;
  color: rgb(var(--w) / .5);
}
.chart__cap span { color: rgb(var(--p)); }
.chart__svg { width: 100%; height: auto; overflow: visible; }
.chart__grid path { stroke: rgb(var(--w) / .07); stroke-width: 1; fill: none; }
.chart__hatch { fill: rgb(var(--s) / .35); }
.chart__area { fill: url(#hatch); opacity: 0; transition: opacity 1s ease 1.6s; }
.chart__line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2.2s var(--ease-io);
}
.chart__line--data { stroke: rgb(var(--s)); filter: drop-shadow(0 0 5px rgb(var(--s) / .8)); transition-delay: .3s; }
.chart__line--human { stroke: rgb(var(--p)); filter: drop-shadow(0 0 5px rgb(var(--p) / .8)); }
.chart__dot { fill: rgb(var(--s)); opacity: 0; transition: opacity .3s 2.4s; }
.chart__t {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .12em;
  fill: rgb(var(--w) / .4);
  opacity: 0;
  transition: opacity .6s ease 1.8s;
}
.chart__t--data  { fill: rgb(var(--s)); }
.chart__t--human { fill: rgb(var(--p)); }
.chart__t--warn  { fill: rgb(var(--t)); font-size: 12px; letter-spacing: .3em; }
.chart.is-in .chart__line { stroke-dashoffset: 0; }
.chart.is-in .chart__area, .chart.is-in .chart__t, .chart.is-in .chart__dot { opacity: 1; }
.chart.is-in .chart__dot { animation: blink 1s steps(1) 2.6s infinite; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  list-style: none;
  background: rgb(var(--p) / .16);
  border: 1px solid rgb(var(--p) / .16);
}
.stats li { padding: 22px 20px 20px; background: var(--bg-0); }
.stats b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1;
  color: rgb(var(--w));
  font-variant-numeric: tabular-nums;
}
.stats small { margin-left: 6px; font-size: .42em; letter-spacing: .12em; color: rgb(var(--p)); }
.stats li > span { display: block; margin-top: 10px; font-size: 12px; line-height: 1.6; color: rgb(var(--w) / .55); }

.warning {
  position: relative;
  display: flex; align-items: center; gap: 22px;
  max-width: 1320px;
  margin: clamp(64px, 8vw, 110px) auto 0;
  padding: 18px 26px;
  font-family: var(--font-mono);
  color: rgb(var(--t));
  border: 1px solid rgb(var(--t) / .5);
  background: rgb(var(--t) / .045);
  overflow: hidden;
}
.warning__icon {
  flex-shrink: 0;
  display: grid; place-items: end center;
  width: 38px; height: 34px;
  padding-bottom: 1px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px; line-height: 1.4;
  color: var(--bg-0);
  background: rgb(var(--t));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: blink 1.2s steps(1) infinite;
}
.warning p { position: relative; z-index: 1; font-size: 14px; letter-spacing: .14em; line-height: 1.6; }
.warning p span { display: block; font-size: 11px; letter-spacing: .18em; opacity: .7; }
.warning__tape {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 38%;
  background: repeating-linear-gradient(-45deg, rgb(var(--t) / .22) 0 12px, transparent 12px 24px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(90deg, transparent, #000);
  animation: tapeSlide 1.6s linear infinite;
}
@keyframes tapeSlide { to { background-position: 34px 0; } }

/* ---------- 16. MODULES ---------- */
.modules__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 1320px;
  margin: clamp(56px, 7vw, 96px) auto 0;
  list-style: none;
}
/* staggered 2-column rhythm: right column sits 90px lower */
.modules__item:nth-child(2) { margin-top: 90px; }
.modules__item:nth-child(3) { margin-top: -62px; }
.modules__item:nth-child(4) { margin-top: 28px; }

.module {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 0%;
  position: relative;
  height: 100%;
  padding: 30px 32px 30px;
  background: linear-gradient(160deg, rgb(var(--bg-2-rgb) / .92), rgb(var(--bg-0-rgb) / .94) 70%);
  border: 1px solid rgb(var(--p) / .16);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--ease-out), border-color .35s, background-color .35s;
  overflow: hidden;
}
.module:hover { border-color: rgb(var(--p) / .55); }
.module::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 36%;
  background: linear-gradient(to bottom, transparent, rgb(var(--p) / .07), transparent);
  transform: translateY(-110%);
  pointer-events: none;
}
.module:hover::after { animation: cardScan 1.6s linear infinite; }
@keyframes cardScan { to { transform: translateY(290%); } }

.module__sheen {
  position: absolute; inset: 0;
  background: radial-gradient(460px circle at var(--mx) var(--my), rgb(var(--p) / .15), transparent 62%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.module:hover .module__sheen { opacity: 1; }

.module__corner {
  position: absolute; top: 0; right: 0;
  width: 30px; height: 30px;
  background: linear-gradient(to bottom left, transparent calc(50% - 1px), rgb(var(--p) / .6) 50%, transparent calc(50% + 1px));
  pointer-events: none;
}

.module__head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .25em;
}
.module__id { color: rgb(var(--p)); }
.module__state { display: inline-flex; align-items: center; gap: 8px; color: rgb(var(--w) / .5); padding-right: 18px; }
.module__state i {
  width: 6px; height: 6px;
  background: rgb(var(--t));
  box-shadow: 0 0 8px rgb(var(--t));
  animation: blink 2s steps(1) infinite;
}

.module__icon { margin-top: 26px; width: 64px; height: 64px; }
.module__icon svg {
  width: 64px; height: 64px;
  fill: none;
  stroke: rgb(var(--p));
  stroke-width: 1.5;
  stroke-linecap: square;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgb(var(--p) / .55));
  transition: transform .5s var(--ease-out);
}
.module:hover .module__icon svg { transform: scale(1.08); }
.i-pulse { transform-box: fill-box; transform-origin: center; animation: iconPulse 2.4s var(--ease-out) infinite; }
.i-dot { fill: rgb(var(--s)); stroke: none; }
.i-flow { stroke-dasharray: 3 5; animation: dash 1.4s linear infinite; }
.i-scan { stroke: rgb(var(--s)); animation: iconScan 2.8s ease-in-out infinite; }
.i-inner { opacity: .45; }
@keyframes iconPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
@keyframes dash { to { stroke-dashoffset: -16; } }
@keyframes iconScan { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(22px); opacity: .4; } }

.module__title {
  margin: 24px 0 14px;
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(1.4rem, 2.1vw, 1.95rem);
  line-height: 1.35;
  color: rgb(var(--w));
}
.module__title span {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .3em;
  color: rgb(var(--p));
}
.module__desc { font-size: 14px; line-height: 1.95; color: rgb(var(--w) / .7); }

.module__spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 18px;
  background: rgb(var(--p) / .14);
  border: 1px solid rgb(var(--p) / .14);
}
.module__spec div { padding: 10px 14px; background: rgb(var(--bg-0-rgb) / .92); }
.module__spec dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; color: rgb(var(--w) / .42); }
.module__spec dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .04em;
  color: rgb(var(--w));
}
.module__spec sup { font-size: .6em; }

.module__meter { position: relative; height: 3px; background: rgb(var(--p) / .12); }
.module__meter span {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: calc(var(--v) * 100%);
  background: linear-gradient(90deg, rgb(var(--p)), rgb(var(--s)));
  box-shadow: 0 0 10px rgb(var(--p) / .6);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.6s var(--ease-out) .35s;
}
.is-in .module__meter span { transform: scaleX(1); }

/* ---------- 17. TAPES (marquee) ---------- */
.tapes {
  position: relative; z-index: 2;
  height: clamp(170px, 18vw, 260px);
  margin: 0 0 clamp(20px, 4vw, 60px);
  overflow: hidden;
  pointer-events: none;
}
.tape {
  position: absolute; left: -6%; right: -6%; top: 50%;
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
}
.tape__track { display: inline-flex; will-change: transform; }
.tape__track span {
  padding-right: .4em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 24px);
  letter-spacing: .22em;
  line-height: 1.4;
}
.tape--a {
  z-index: 2;
  color: var(--bg-0);
  background: rgb(var(--p));
  box-shadow: 0 0 40px rgb(var(--p) / .35);
  transform: translateY(-50%) rotate(-3.2deg);
}
.tape--b {
  z-index: 1;
  color: rgb(var(--s));
  background: rgb(var(--bg-0-rgb) / .95);
  border-block: 1px solid rgb(var(--s) / .65);
  transform: translateY(-50%) rotate(2.6deg);
}
.tape--b .tape__track span { font-size: clamp(13px, 1.3vw, 18px); letter-spacing: .3em; }

/* ---------- 18. ARCHITECTURE ---------- */
.arch__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1320px;
  margin: clamp(40px, 5vw, 72px) auto 0;
}

.stack {
  position: relative;
  height: clamp(440px, 46vw, 620px);
  display: grid; place-items: center;
  perspective: 1700px;
}
.stack__scene {
  --size: clamp(210px, 22vw, 310px);
  --gap: calc(var(--size) * .2);
  --tx: 0deg; --tz: 0deg;
  position: relative;
  width: var(--size); height: var(--size);
  transform-style: preserve-3d;
  transform: rotateX(calc(58deg + var(--tx))) rotateZ(calc(-45deg + var(--tz)));
  transition: transform .9s var(--ease-out);
}
.stack__layer {
  position: absolute; inset: 0;
  transform: translateZ(calc((var(--i) - 2) * var(--gap)));
  border: 1px solid rgb(var(--p) / .42);
  background-color: rgb(var(--bg-1-rgb) / .55);
  cursor: pointer;
  transition: transform .8s var(--ease-out), border-color .35s, background-color .35s, opacity .35s, box-shadow .35s;
}
.stack__layer::before {
  content: "";
  position: absolute; inset: 9%;
  background: var(--pat);
  opacity: .75;
  transition: opacity .35s;
}
.stack__layer::after {
  content: "";
  position: absolute; inset: -1px;
  background:
    linear-gradient(rgb(var(--p)), rgb(var(--p))) left top / 14px 2px no-repeat,
    linear-gradient(rgb(var(--p)), rgb(var(--p))) left top / 2px 14px no-repeat,
    linear-gradient(rgb(var(--p)), rgb(var(--p))) right bottom / 14px 2px no-repeat,
    linear-gradient(rgb(var(--p)), rgb(var(--p))) right bottom / 2px 14px no-repeat;
}
.stack__layer[data-layer="0"] { --pat: repeating-radial-gradient(circle at 50% 50%, rgb(var(--p) / .55) 0 1px, transparent 1.5px 13px); }
.stack__layer[data-layer="1"] { --pat: radial-gradient(rgb(var(--p) / .8) 1px, transparent 1.6px) 0 0 / 14px 14px; }
.stack__layer[data-layer="2"] { --pat: repeating-linear-gradient(45deg, rgb(var(--p) / .38) 0 1px, transparent 1px 15px), repeating-linear-gradient(-45deg, rgb(var(--p) / .38) 0 1px, transparent 1px 15px); }
.stack__layer[data-layer="3"] { --pat: repeating-linear-gradient(90deg, rgb(var(--s) / .45) 0 2px, transparent 2px 11px); }
.stack__layer[data-layer="4"] { --pat: repeating-linear-gradient(0deg, rgb(var(--p) / .45) 0 1px, transparent 1px 7px); }

.stack__layer:hover { border-color: rgb(var(--p) / .85); }
.stack__layer.is-active {
  transform: translateZ(calc((var(--i) - 2) * var(--gap) + var(--gap) * .5));
  border-color: rgb(var(--p));
  background-color: rgb(var(--p) / .14);
  box-shadow: 0 0 60px rgb(var(--p) / .35), inset 0 0 50px rgb(var(--p) / .25);
}
.stack.has-active .stack__layer:not(.is-active) { opacity: .4; }
.stack.has-active .stack__layer:not(.is-active):hover { opacity: .8; }

.stack__label {
  position: absolute; left: 10px; bottom: 7px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em;
  color: rgb(var(--w) / .8);
  white-space: nowrap;
}
.stack__layer.is-active .stack__label { color: rgb(var(--p)); }

.stack__pillar {
  position: absolute; left: var(--px); top: var(--py);
  width: 1px;
  height: calc(var(--gap) * 4 + 24px);
  background: repeating-linear-gradient(to bottom, rgb(var(--p) / .45) 0 4px, transparent 4px 8px);
  transform-origin: 0 0;
  transform: translateZ(calc(var(--gap) * 2 + 12px)) rotateX(-90deg);
  pointer-events: none;
}

.stack__packet {
  position: absolute; left: var(--x); top: var(--y);
  width: 6px; height: 6px;
  background: rgb(var(--s));
  box-shadow: 0 0 12px 3px rgb(var(--s) / .75);
  animation: packet var(--d) linear var(--dl) infinite;
  pointer-events: none;
}
@keyframes packet {
  0%   { transform: translateZ(calc(var(--gap) * -2)); opacity: 0; }
  10%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateZ(calc(var(--gap) * 2.3)); opacity: 0; }
}

.stack__hint {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .3em;
  color: rgb(var(--w) / .4);
  white-space: nowrap;
}

.arch__tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.arch__tab {
  padding: 10px 10px 9px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .16em;
  color: rgb(var(--w) / .5);
  border: 1px solid rgb(var(--p) / .2);
  background: rgb(var(--bg-1-rgb) / .6);
  transition: color .25s, border-color .25s, background-color .25s, box-shadow .25s;
}
.arch__tab b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .08em;
  color: rgb(var(--p) / .8);
}
.arch__tab:hover { color: rgb(var(--w) / .85); border-color: rgb(var(--p) / .5); }
.arch__tab[aria-selected="true"] {
  color: rgb(var(--w));
  border-color: rgb(var(--p));
  background: rgb(var(--p) / .12);
  box-shadow: inset 0 -2px 0 rgb(var(--p)), 0 0 20px rgb(var(--p) / .15);
}
.arch__tab[aria-selected="true"] b { color: rgb(var(--p)); }

.arch__panel .term__body { padding: 24px 28px 30px; }
.arch__cmd {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .08em;
  color: rgb(var(--w) / .45);
}
.arch__cmd b { font-weight: 400; color: rgb(var(--s)); }
.arch__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.7vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: .08em;
  color: rgb(var(--w));
  text-shadow: 0 0 20px rgb(var(--p) / .35);
  overflow-wrap: anywhere;
}
.arch__jp {
  margin: 6px 0 18px;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 14px; letter-spacing: .35em;
  color: rgb(var(--p));
}
.arch__desc { min-height: 5.8em; font-size: 14px; line-height: 1.95; color: rgb(var(--w) / .75); }

.arch__metrics { display: grid; gap: 12px; margin-top: 22px; list-style: none; }
.arch__metrics li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .16em;
  color: rgb(var(--w) / .5);
}
.arch__metrics i { position: relative; height: 4px; background: rgb(var(--p) / .12); }
.arch__metrics i::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: calc(var(--v) * 100%);
  background: rgb(var(--p));
  box-shadow: 0 0 10px rgb(var(--p) / .7);
  transform-origin: left;
  animation: meterIn 1s var(--ease-out) both;
}
.arch__metrics b { min-width: 6.5em; text-align: right; font-weight: 400; font-size: 13px; color: rgb(var(--w)); }
@keyframes meterIn { from { transform: scaleX(0); } }

/* ---------- 19. ROADMAP ---------- */
.timeline {
  --progress: 0;
  position: relative;
  max-width: 1320px;
  margin: clamp(56px, 7vw, 100px) auto 0;
}
.timeline__rail {
  position: absolute; left: 0; right: 0; top: 8px;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgb(var(--w) / .25) 0 6px, transparent 6px 12px);
}
.timeline__fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(var(--p)), rgb(var(--s)));
  box-shadow: 0 0 12px rgb(var(--p) / .8);
  transform-origin: left;
  transform: scaleX(var(--progress));
}
.timeline__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  list-style: none;
}
.phase { position: relative; padding-top: 42px; }
.phase__node {
  position: absolute; left: 0; top: 1px;
  width: 15px; height: 15px;
  border: 1px solid rgb(var(--w) / .45);
  background: var(--bg-0);
  transform: rotate(45deg);
}
.phase.is-done .phase__node { background: rgb(var(--p)); border-color: rgb(var(--p)); box-shadow: 0 0 12px rgb(var(--p)); }
.phase.is-current .phase__node { border-color: rgb(var(--t)); background: rgb(var(--t)); box-shadow: 0 0 16px rgb(var(--t)); }
.phase.is-current .phase__node::after {
  content: "";
  position: absolute; inset: -7px;
  border: 1px solid rgb(var(--t));
  animation: ping 1.8s var(--ease-out) infinite;
}
.phase.is-classified .phase__node { border: 1px dashed rgb(var(--s)); }

.phase__body {
  height: 100%;
  padding: 22px 22px 24px;
  border: 1px solid rgb(var(--p) / .13);
  background: rgb(var(--bg-1-rgb) / .6);
  transition: border-color .3s, background-color .3s;
}
.phase__body:hover { border-color: rgb(var(--p) / .4); }
.phase.is-current .phase__body {
  border-color: rgb(var(--t) / .55);
  background: linear-gradient(170deg, rgb(var(--t) / .07), rgb(var(--bg-1-rgb) / .6) 60%);
  box-shadow: 0 0 40px -10px rgb(var(--t) / .3);
}
.phase.is-classified .phase__body {
  border-style: dashed;
  border-color: rgb(var(--s) / .45);
  background: repeating-linear-gradient(-45deg, rgb(var(--s) / .035) 0 10px, transparent 10px 20px), rgb(var(--bg-1-rgb) / .6);
}

.phase__meta {
  display: flex; gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .2em;
  color: rgb(var(--w) / .45);
}
.phase__meta > span:first-child { color: rgb(var(--p)); }
.phase__title {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.9vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: .08em;
  color: rgb(var(--w));
}
.phase__title > span:last-child {
  display: block;
  margin-top: 6px;
  font-family: var(--font-jp);
  font-size: 13px; letter-spacing: .3em;
  color: rgb(var(--w) / .5);
}
.phase__desc { margin-bottom: 18px; font-size: 13.5px; line-height: 1.9; color: rgb(var(--w) / .68); }
.phase__status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  color: rgb(var(--w) / .4);
  border: 1px solid currentColor;
}
.phase.is-done .phase__status { color: rgb(var(--p)); }
.phase.is-current .phase__status { color: rgb(var(--t)); }
.phase.is-current .phase__status i { width: 6px; height: 6px; background: currentColor; animation: blink 1s steps(1) infinite; }
.phase.is-classified .phase__status { color: rgb(var(--s)); }

.redact {
  color: rgb(var(--w) / .88);
  letter-spacing: 0;
  overflow-wrap: anywhere;
  transition: color .3s;
}
.redact.is-open { color: rgb(var(--s)); text-shadow: 0 0 12px rgb(var(--s) / .6); letter-spacing: inherit; }

.phase__decrypt {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 12px 14px 0;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .2em;
  color: rgb(var(--s));
  border: 1px dashed rgb(var(--s) / .7);
  transition: background-color .25s, color .25s;
}
.phase__decrypt small { font-size: 10px; letter-spacing: .08em; opacity: .75; }
.phase__decrypt:hover { color: var(--bg-0); background: rgb(var(--s)); }
.phase__decrypt[aria-expanded="true"] { color: rgb(var(--w) / .5); border-color: rgb(var(--w) / .25); }

/* ---------- 20. CONNECT (CTA) ---------- */
.connect { overflow: hidden; }
.connect__portal {
  position: absolute; z-index: -1;
  left: 50%; top: 30%;
  width: min(125vmin, 1200px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.connect__portal::before {
  content: "";
  position: absolute; inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--p) / .16), transparent 65%);
  filter: blur(20px);
}
.connect__portal span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgb(var(--p) / .13);
  animation: spin 70s linear infinite;
}
.connect__portal span:nth-child(1) { inset: 0; border-style: dashed; }
.connect__portal span:nth-child(2) { inset: 9%; animation-direction: reverse; animation-duration: 50s; border-color: rgb(var(--s) / .14); border-top-color: rgb(var(--s) / .6); }
.connect__portal span:nth-child(3) { inset: 18%; border-width: 6px; border-color: rgb(var(--p) / .06); border-left-color: rgb(var(--p) / .35); animation-duration: 30s; }
.connect__portal span:nth-child(4) { inset: 28%; border-style: dotted; animation-direction: reverse; animation-duration: 90s; }
.connect__portal span:nth-child(5) { inset: 38%; border-color: rgb(var(--p) / .2); border-bottom-color: rgb(var(--p) / .7); animation-duration: 16s; }

.connect__title {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 6.4rem);
  line-height: 1.12;
  letter-spacing: .02em;
  color: rgb(var(--w));
  text-shadow: 0 0 40px rgb(var(--p) / .35);
}

.connect__grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: clamp(28px, 4vw, 60px);
  max-width: 1200px;
  margin: clamp(56px, 7vw, 90px) auto 0;
}

.countdown__label {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .22em;
  color: rgb(var(--w) / .6);
}
.countdown__label b { font-weight: 400; color: rgb(var(--t)); }
.countdown__label span { letter-spacing: .1em; color: rgb(var(--w) / .42); }
.countdown__digits { display: flex; align-items: flex-start; gap: clamp(4px, .9vw, 12px); }
.cd {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 6px 10px;
  border: 1px solid rgb(var(--p) / .25);
  background: linear-gradient(to bottom, rgb(var(--bg-2-rgb) / .9), rgb(var(--bg-0-rgb) / .9));
}
.cd::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgb(0 0 0 / .6);
}
.cd__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1;
  color: rgb(var(--w));
  text-shadow: 0 0 20px rgb(var(--p) / .6);
  font-variant-numeric: tabular-nums;
}
.cd__num.is-tick { animation: digitTick .32s steps(3) 1; }
@keyframes digitTick {
  0%   { opacity: .3; transform: translateY(-4px); text-shadow: -3px 0 rgb(var(--s)), 3px 0 rgb(var(--p)); }
  60%  { opacity: 1; transform: translateY(1px); }
  100% { transform: none; }
}
.cd__unit { font-family: var(--font-mono); font-size: 10px; letter-spacing: .28em; color: rgb(var(--p) / .85); }
.cd__sep {
  padding-top: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  color: rgb(var(--p) / .6);
  animation: blink 1s steps(1) infinite;
}

.slots { margin-top: 34px; }
.slots__head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .18em;
  color: rgb(var(--w) / .55);
}
.slots__head b { font-weight: 400; color: rgb(var(--w) / .75); }
#slotsLeft { font-family: var(--font-display); font-weight: 600; font-size: 1.6em; color: rgb(var(--p)); font-variant-numeric: tabular-nums; }
.slots__bar { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 3px; height: 16px; }
.slots__bar i { background: rgb(var(--w) / .08); transition: background-color .4s, box-shadow .4s; }
.slots__bar i.is-on { background: rgb(var(--p)); box-shadow: 0 0 8px rgb(var(--p) / .55); }
.slots.is-low #slotsLeft { color: rgb(var(--s)); }
.slots.is-low .slots__bar i.is-on { background: rgb(var(--s)); box-shadow: 0 0 8px rgb(var(--s) / .6); }

.perks {
  margin-top: 34px;
  padding: 22px 24px;
  border: 1px dashed rgb(var(--p) / .3);
  background: rgb(var(--bg-0-rgb) / .5);
}
.perks__head { margin-bottom: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; color: rgb(var(--p)); }
.perks ul { display: grid; gap: 10px; list-style: none; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgb(var(--w) / .85); }
.perks li span {
  flex-shrink: 0;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .1em;
  color: var(--bg-0);
  background: rgb(var(--p));
}

.access {
  position: relative;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid rgb(var(--p) / .26);
  background: rgb(var(--bg-1-rgb) / .85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 40px 100px -40px rgb(0 0 0 / .9), inset 0 0 60px rgb(var(--p) / .04);
}
.access__frame i {
  position: absolute;
  width: 20px; height: 20px;
  border: 0 solid rgb(var(--p));
}
.access__frame i:nth-child(1) { left: -6px; top: -6px; border-width: 2px 0 0 2px; }
.access__frame i:nth-child(2) { right: -6px; top: -6px; border-width: 2px 2px 0 0; }
.access__frame i:nth-child(3) { right: -6px; bottom: -6px; border-width: 0 2px 2px 0; }
.access__frame i:nth-child(4) { left: -6px; bottom: -6px; border-width: 0 0 2px 2px; }
.access.is-shake { animation: shake .45s steps(6) 1; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.access__head {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgb(var(--p) / .22);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .16em;
  color: rgb(var(--w) / .5);
}
.access__secure { color: rgb(var(--p)); }
.access__secure::before { content: "◆ "; }

.field { margin-bottom: 18px; }
.field__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .2em;
  color: rgb(var(--p));
}
.field__label small { margin-left: 6px; font-family: var(--font-body); font-size: 11px; letter-spacing: .04em; color: rgb(var(--w) / .48); }
.field__input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 16px; letter-spacing: .08em;
  color: rgb(var(--w));
  background: rgb(var(--bg-0-rgb) / .85);
  border: 1px solid rgb(var(--p) / .28);
  border-radius: 0;
  outline: none;
  caret-color: rgb(var(--p));
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field__input::placeholder { color: rgb(var(--w) / .22); }
.field__input:focus {
  border-color: rgb(var(--p));
  background: rgb(var(--p) / .05);
  box-shadow: 0 0 0 3px rgb(var(--p) / .15), 0 0 26px rgb(var(--p) / .18);
}
.field__input[aria-invalid="true"] { border-color: rgb(var(--s)); box-shadow: 0 0 0 3px rgb(var(--s) / .16); }
.field__err {
  min-height: 1.4em;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .04em; line-height: 1.4;
  color: rgb(var(--s));
}

.check { position: relative; margin: 4px 0 10px; }
.check__input { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; margin: 0; opacity: 0; }
.check__label {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px;
  color: rgb(var(--w) / .85);
  cursor: pointer;
}
.check__box {
  position: relative;
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 1px solid rgb(var(--p) / .55);
  background: rgb(var(--bg-0-rgb) / .8);
  transition: background-color .2s, box-shadow .2s;
}
.check__box::after {
  content: "";
  position: absolute; left: 5px; top: 5px;
  width: 9px; height: 5px;
  border-left: 2px solid var(--bg-0);
  border-bottom: 2px solid var(--bg-0);
  transform: rotate(-45deg) scale(0);
  transition: transform .2s var(--ease-out);
}
.check__input:checked + .check__label .check__box { background: rgb(var(--p)); box-shadow: 0 0 14px rgb(var(--p) / .5); }
.check__input:checked + .check__label .check__box::after { transform: rotate(-45deg) scale(1); }
.check__input:focus-visible + .check__label .check__box { outline: 2px solid rgb(var(--p)); outline-offset: 3px; }
.check__input[aria-invalid="true"] + .check__label .check__box { border-color: rgb(var(--s)); }
.check__docs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0 32px; }
.link-inline {
  font-size: 12px;
  color: rgb(var(--p));
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgb(var(--p) / .45);
}
.link-inline:hover { text-decoration-color: rgb(var(--p)); }
.check .field__err { margin-left: 32px; }

.access__note { margin-top: 16px; font-size: 11px; line-height: 1.7; color: rgb(var(--w) / .42); }

.access__log ol {
  min-height: 250px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px; line-height: 2.1;
  color: rgb(var(--w) / .72);
}
.access__log li { display: flex; justify-content: space-between; gap: 12px; animation: bootLine .2s steps(3) both; }
.access__log li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access__log .ok { color: rgb(var(--p)); }
.access__log li.is-final { color: rgb(var(--t)); }

/* access pass */
.pass { text-align: center; outline: none; }
.pass__title {
  margin-bottom: 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: .24em;
  color: rgb(var(--t));
  text-shadow: 0 0 20px rgb(var(--t) / .5);
}
.pass__title span { display: block; margin-top: 6px; font-family: var(--font-jp); font-size: 13px; font-weight: 500; letter-spacing: .12em; color: rgb(var(--w) / .6); text-shadow: none; }

.pass__card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 20px 22px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "top top" "mid qr" "meta qr" "bar bar";
  gap: 12px 18px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgb(var(--p) / .5);
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / .018) 0 1px, transparent 1px 3px),
    linear-gradient(135deg, #0b1122 0%, #111a35 45%, #1c0c28 100%);
  box-shadow: 0 30px 80px -24px rgb(var(--p) / .4), inset 0 1px 0 rgb(255 255 255 / .06);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease-out);
}
.pass.is-in .pass__card { animation: passIn 1s var(--ease-out) both; }
@keyframes passIn {
  0%   { opacity: 0; transform: perspective(900px) rotateX(70deg) translateY(40px) scale(.9); filter: brightness(3) hue-rotate(80deg); }
  40%  { opacity: 1; filter: brightness(1.8); }
  100% { opacity: 1; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); filter: none; }
}
.pass__holo {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 22%, rgb(var(--p) / .3) 38%, rgb(var(--s) / .26) 50%, rgb(var(--t) / .22) 62%, transparent 78%);
  background-size: 260% 260%;
  background-position: var(--mx) var(--my);
  mix-blend-mode: screen;
  opacity: .75;
  pointer-events: none;
}
.pass__top {
  grid-area: top;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .2em;
  color: rgb(var(--w) / .7);
}
.pass__logo { width: 22px; height: 22px; fill: none; stroke: rgb(var(--p)); stroke-width: 2.5; }
.pass__logo-fill { fill: rgb(var(--p)); stroke: none; }
.pass__perm {
  margin-left: auto;
  padding: 1px 8px;
  font-weight: 400;
  color: var(--bg-0);
  background: rgb(var(--t));
  letter-spacing: .2em;
}
.pass__mid { grid-area: mid; display: flex; align-items: center; gap: 16px; min-width: 0; }
.pass__chip {
  flex-shrink: 0;
  width: 42px; height: 32px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 32%, rgb(0 0 0 / .35) 32% 36%, transparent 36% 64%, rgb(0 0 0 / .35) 64% 68%, transparent 68%),
    linear-gradient(0deg, transparent 46%, rgb(0 0 0 / .35) 46% 54%, transparent 54%),
    linear-gradient(135deg, #f5e7a1, #b9953c 55%, #f1dc8c);
}
.pass__mid > div { min-width: 0; }
.pass__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .3em; color: rgb(var(--w) / .45); }
.pass__handle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: .08em;
  line-height: 1.2;
  color: rgb(var(--w));
  text-shadow: 0 0 16px rgb(var(--p) / .6);
  overflow-wrap: anywhere;
}
.pass__meta { grid-area: meta; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0; }
.pass__meta dt { font-family: var(--font-mono); font-size: 9px; letter-spacing: .28em; color: rgb(var(--w) / .42); }
.pass__meta dd { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: rgb(var(--w) / .92); white-space: nowrap; }
.pass__qr {
  grid-area: qr;
  align-self: end;
  width: 92px; height: 92px;
  padding: 4px;
  background: rgb(var(--bg-0-rgb) / .8);
  border: 1px solid rgb(var(--p) / .35);
  image-rendering: pixelated;
}
.pass__barcode { grid-area: bar; width: 100%; height: 26px; opacity: .85; }

.pass__msg { margin: 24px auto 20px; max-width: 30em; font-size: 14px; color: rgb(var(--w) / .75); }
.pass__msg b { color: rgb(var(--p)); font-weight: 500; }

/* ---------- 21. FOOTER ---------- */
.footer {
  position: relative; z-index: 1;
  padding: clamp(60px, 8vw, 110px) var(--gutter) clamp(90px, 8vw, 120px);
  border-top: 1px solid rgb(var(--p) / .14);
  background: linear-gradient(to bottom, rgb(var(--bg-0-rgb) / .2), rgb(var(--bg-1-rgb) / .92));
  overflow: hidden;
}
.footer__mark { position: relative; margin-bottom: clamp(40px, 6vw, 80px); text-align: center; user-select: none; }
.footer__word, .footer__reflect {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 17vw, 16rem);
  line-height: .86;
  letter-spacing: .14em;
  margin-right: -.14em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--p) / .6);
}
.footer__word { transition: color .5s, text-shadow .5s; }
.footer__mark:hover .footer__word { color: rgb(var(--p) / .1); text-shadow: 0 0 40px rgb(var(--p) / .35); }
.footer__reflect {
  margin-top: .04em;
  transform: scaleY(-1);
  -webkit-text-stroke-color: rgb(var(--p) / .35);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 62%);
  mask-image: linear-gradient(to top, #000 0%, transparent 62%);
  filter: blur(.6px);
}
@media (prefers-reduced-motion: no-preference) {
  .footer__reflect { filter: url(#ripple) blur(.6px); }
}
@supports not (-webkit-text-stroke: 1px black) {
  .footer__word, .footer__reflect { color: rgb(var(--p) / .15); }
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: 1320px;
  margin: 0 auto;
}
.footer__tag { margin-top: 18px; font-family: var(--font-jp); font-weight: 700; font-size: 15px; color: rgb(var(--w) / .85); }
.footer__tag span { display: block; font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .35em; color: rgb(var(--p) / .75); }
.footer__contact { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: rgb(var(--w) / .5); }
.footer__contact a { color: rgb(var(--p)); border-bottom: 1px solid rgb(var(--p) / .35); }
.footer__contact a:hover { border-bottom-color: rgb(var(--p)); }
.footer__head { margin-bottom: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .28em; color: rgb(var(--p)); }
.footer__col ul { display: grid; gap: 10px; list-style: none; }
.footer__link {
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: .12em;
  color: rgb(var(--w) / .62);
  transition: color .2s, transform .3s var(--ease-out);
}
.footer__link::before {
  content: ">";
  position: absolute; left: -16px;
  color: rgb(var(--p));
  opacity: 0;
  transition: opacity .2s;
}
.footer__link:hover { color: rgb(var(--w)); transform: translateX(14px); }
.footer__link:hover::before { opacity: 1; }

.sns { display: flex !important; flex-wrap: wrap; gap: 14px !important; }
.sns__link { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sns__hex {
  position: relative;
  display: grid; place-items: center;
  width: 50px; height: 56px;
  background: rgb(var(--p) / .4);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: background-color .3s;
}
.sns__hex::before {
  content: "";
  position: absolute; inset: 1px;
  background: var(--bg-0);
  clip-path: inherit;
  transition: background-color .3s;
}
.sns__hex svg {
  position: relative;
  width: 20px; height: 20px;
  fill: none;
  stroke: rgb(var(--p));
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: round;
  transition: stroke .3s, transform .4s var(--ease-out);
}
.sns__name { font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; color: rgb(var(--w) / .45); transition: color .3s; }
.sns__link:hover .sns__hex { background: rgb(var(--p)); }
.sns__link:hover .sns__hex::before { background: rgb(var(--p) / .85); }
.sns__link:hover svg { stroke: var(--bg-0); transform: scale(1.1); }
.sns__link:hover .sns__name { color: rgb(var(--p)); }

.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 28px;
  max-width: 1320px;
  margin: clamp(40px, 6vw, 70px) auto 0;
  padding-top: 24px;
  border-top: 1px dashed rgb(var(--p) / .16);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .12em;
  color: rgb(var(--w) / .45);
}
.footer__disclaimer { font-family: var(--font-body); letter-spacing: .02em; }
.to-top { color: rgb(var(--p)); letter-spacing: .15em; }
.to-top small { font-size: 10px; opacity: .7; }
.to-top:hover { text-shadow: 0 0 12px rgb(var(--p)); }

/* ---------- 22. MODAL ---------- */
.modal {
  width: min(640px, calc(100% - 32px));
  max-height: min(84vh, 760px);
  padding: 0;
  color: rgb(var(--w) / .82);
  background: var(--bg-1);
  border: 1px solid rgb(var(--p) / .45);
  box-shadow: 0 40px 120px rgb(0 0 0 / .85), 0 0 60px rgb(var(--p) / .15);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modalIn .4s var(--ease-out); }
.modal::backdrop { background: rgb(2 3 8 / .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes modalIn {
  0%   { opacity: 0; transform: scaleY(.03); }
  45%  { opacity: 1; transform: scaleY(.03) scaleX(1); }
  100% { transform: none; }
}
.modal__body { padding: 26px 30px 10px; overflow: auto; }
.modal__title {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px; letter-spacing: .14em;
  color: rgb(var(--w));
}
.modal__content p { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.9; }
.modal__content p + p { margin-top: 12px; }
.modal__content p::before { content: "›"; position: absolute; left: 0; color: rgb(var(--p)); }
.modal__foot { padding: 18px 30px 26px; }

/* ---------- 23. RESPONSIVE ---------- */
@media (max-width: 1180px) {
  .nav__link { padding: 7px 9px; }
  .perm span { display: none; }
}

@media (max-width: 1024px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    display: flex; flex-direction: column; justify-content: center;
    padding: 110px 32px 60px;
    background: rgb(var(--bg-0-rgb) / .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    visibility: hidden;
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .6s var(--ease-io), opacity .3s, visibility 0s linear .6s;
  }
  .menu-open .nav {
    visibility: visible;
    opacity: 1;
    clip-path: inset(0);
    transition: clip-path .6s var(--ease-io), opacity .3s, visibility 0s;
  }
  .nav__list {
    flex-direction: column; gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    clip-path: none;
  }
  .nav__link {
    align-items: center; gap: 18px;
    padding: 14px 4px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(24px, 6vw, 40px);
    letter-spacing: .1em;
    color: rgb(var(--w) / .85);
    border-bottom: 1px solid rgb(var(--p) / .12);
  }
  .nav__link b { font-family: var(--font-mono); font-size: 12px; }
  .nav__link::after { left: 4px; right: 4px; bottom: -1px; }
  .nav__foot { display: block; margin-top: 36px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .25em; color: rgb(var(--w) / .35); }
  .hud-top__right { position: relative; z-index: 1; }
  .logo { position: relative; z-index: 1; }

  .hud-side, .hud-gauge { display: none; }

  .hero { align-items: flex-end; padding-bottom: 170px; }
  .hero__reticle { left: 50%; top: 30%; width: min(78vmin, 520px); opacity: .7; }
  .is-ready .hero__reticle { opacity: .7; }
  .hero__tag--a { right: -2%; top: -2%; }
  .hero__tag--b { right: -2%; }
  .hero__tag--c { left: 0; }
  .hero__inner { max-width: none; }

  .genesis__layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .genesis__head { position: static; }
  .genesis__title { writing-mode: horizontal-tb; font-size: clamp(2rem, 7vw, 3.6rem); letter-spacing: .02em; }
  .genesis__title > span { white-space: normal; }

  .arch__wrap { grid-template-columns: minmax(0, 1fr); }
  .stack { height: clamp(360px, 70vw, 520px); }

  .timeline__rail { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: repeating-linear-gradient(to bottom, rgb(var(--w) / .25) 0 6px, transparent 6px 12px); }
  .timeline__fill { background: linear-gradient(to bottom, rgb(var(--p)), rgb(var(--s))); transform-origin: top; transform: scaleY(var(--progress)); }
  .timeline__list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .phase { padding: 0 0 0 40px; }
  .phase__node { top: 26px; }

  .connect__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --hud-pad: 12px; }
  .btn-mini { display: none; }
  .hide-sm { display: none; }

  /* on phones the bottom HUD (clock / skin / sound) lives inside the menu overlay */
  .hud-bottom { display: none; }
  .menu-open .hud-bottom { display: flex; z-index: 66; }
  .menu-open .hud-bottom::before { display: none; }
  .hud-bottom__sys { gap: 4px 12px; }
  .sound-btn { padding: 8px 10px; }
  .sound-btn > span:last-child { font-size: 10px; }
  .skin { padding: 7px 8px; }

  .hero { padding-top: 136px; padding-bottom: 116px; }
  .hero__cmd { white-space: normal; font-size: 12px; }
  .hero__ok { display: block; }
  .hero__stats { left: var(--gutter); right: var(--gutter); bottom: 34px; gap: 18px; }
  .hero__stats dd { font-size: 16px; }
  .hero__stats dt { font-size: 9px; letter-spacing: .14em; }
  .hero__rewrite { right: var(--gutter); bottom: auto; top: 84px; padding: 7px 12px; font-size: 11px; }
  .hero__rewrite small { display: none; }
  .hero__scroll { display: none; }
  .hero__tag { display: none; }
  .hero__cta .btn { flex: 1 1 100%; }

  .section__head--right { text-align: left; margin-left: 0; }
  .section__head--right .section__label { flex-direction: row; }
  .section__head--right .section__label::after { background: linear-gradient(90deg, rgb(var(--p) / .7), transparent); }

  .stats { grid-template-columns: minmax(0, 1fr); }
  .warning { gap: 14px; padding: 16px 18px; }
  .warning p { font-size: 12px; }

  .modules__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .modules__item:nth-child(n) { margin-top: 0; }
  .module { padding: 26px 22px; }

  .arch__tabs { gap: 4px; }
  .arch__tab { padding: 8px 4px; text-align: center; }
  .arch__tab span { display: none; }
  .arch__panel .term__body { padding: 20px 18px 24px; }
  .arch__metrics li { grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; font-size: 10px; }
  .arch__metrics b { min-width: 0; font-size: 12px; }

  .cd { padding: 12px 2px 8px; }
  .cd__unit { font-size: 9px; letter-spacing: .15em; }
  .cd__sep { padding-top: 10px; }

  .pass__card { grid-template-areas: "top top" "mid mid" "meta qr" "bar bar"; padding: 18px 16px 16px; }
  .pass__qr { width: 76px; height: 76px; }

  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (hover: none) {
  .module:hover::after { animation: none; }
}

/* ---------- 24. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .fx--noise, .fx--scan::after { animation: none !important; }
  .js [data-reveal] { opacity: 1; translate: none; }
  .js [data-scramble]:not(.is-in) { opacity: 1; }
}
