/* =========================================================
   PROJECT CHIMERA — CHIMERA OS v4.6
   Neo-Noir / Triple-Head Neural HUD
   ========================================================= */

:root {
  --bg: #0A0A0A;
  --bg-2: #001F3F;
  --bg-3: #2A0A2A;
  --elev: #0d1018;
  --cyan: #00FFFF;
  --pink: #FF00FF;
  --acid: #39FF14;
  --amber: #FFFF00;
  --silver: #808080;
  --paper: #FFFFFF;
  --dim: #8a93a3;
  --ok: #39FF14;
  --warn: #FFFF00;
  --err: #ff3b6b;
  --glass: rgba(0, 255, 255, 0.045);
  --line: rgba(0, 255, 255, 0.18);
  --line-pink: rgba(255, 0, 255, 0.28);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-jp: "Noto Sans JP", "Rajdhani", system-ui, sans-serif;
  --font-body: "Rajdhani", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --header-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --glow-c: 0 0 18px rgba(0, 255, 255, 0.45), 0 0 42px rgba(0, 255, 255, 0.14);
  --glow-p: 0 0 18px rgba(255, 0, 255, 0.45), 0 0 42px rgba(255, 0, 255, 0.14);
  --glow-a: 0 0 18px rgba(57, 255, 20, 0.4);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--bg);
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.65;
  color: var(--paper);
  background:
    radial-gradient(ellipse 80% 46% at 18% 8%, rgba(0, 31, 63, 0.62), transparent 55%),
    radial-gradient(ellipse 55% 40% at 88% 12%, rgba(42, 10, 42, 0.55), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(0, 255, 255, 0.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

body.is-booting {
  overflow: hidden;
}

body.nav-open {
  overflow: hidden;
}

body.has-cursor {
  cursor: none;
}

body.has-cursor a,
body.has-cursor button,
body.has-cursor input,
body.has-cursor label {
  cursor: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 1px solid var(--acid);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10000;
  padding: 8px 14px;
  background: var(--acid);
  color: #07070b;
  font-family: var(--font-mono);
  font-size: 13px;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.dim { color: var(--dim); }
.ok { color: var(--ok); }
.hl {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 246, 255, 0.35);
}

/* =========================================================
   FX LAYERS
   ========================================================= */
.fx-canvas,
.fx-grid,
.fx-circuit,
.fx-noise,
.fx-scan,
.fx-vignette {
  pointer-events: none;
}

.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}

.fx-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

.fx-circuit {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.09;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(0, 255, 255, 0.5) 1px, transparent 2px),
    radial-gradient(circle at 78% 62%, rgba(255, 0, 255, 0.45) 1px, transparent 2px),
    linear-gradient(90deg, transparent 24px, rgba(0, 255, 255, 0.25) 25px, transparent 26px),
    linear-gradient(transparent 24px, rgba(0, 255, 255, 0.18) 25px, transparent 26px);
  background-size: 180px 180px, 220px 220px, 50px 50px, 50px 50px;
}

.fx-noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.fx-scan {
  position: fixed;
  inset: 0;
  z-index: 41;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.35;
  animation: scanDrift 9s linear infinite;
}

.fx-vignette {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.62) 100%);
}

@keyframes scanDrift {
  from { background-position: 0 0; }
  to { background-position: 0 8px; }
}

/* Custom cursor */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.25s;
}

body.has-cursor .cursor { opacity: 1; }

.cursor__ring {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease), height 0.2s var(--ease), border-color 0.2s;
}

.cursor.is-hot .cursor__ring {
  width: 46px;
  height: 46px;
  border-color: var(--pink);
}

.cursor__dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--acid);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--glow-a);
}

.cursor__label {
  position: absolute;
  left: 18px;
  top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--acid);
  white-space: nowrap;
}

/* HUD frame */
.frame {
  position: fixed;
  inset: 10px;
  z-index: 50;
  pointer-events: none;
}

.frame__c {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--cyan);
}

.frame__c--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame__c--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.frame__c--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.frame__c--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.sidehud {
  position: fixed;
  top: 50%;
  z-index: 45;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dim);
}

.sidehud--l { left: 18px; }
.sidehud--r { right: 18px; text-align: right; align-items: flex-end; }

.sidehud__k {
  display: block;
  color: var(--cyan);
  opacity: 0.7;
  margin-bottom: 3px;
}

.sidehud__v { color: var(--paper); }
.sidehud__v--ok { color: var(--acid); }

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: var(--glow-a);
  animation: pulse 1.4s ease-in-out infinite;
  vertical-align: middle;
}

.sidehud__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.sidehud__bars i {
  width: 3px;
  background: var(--cyan);
  opacity: 0.75;
  animation: barHop 1.2s ease-in-out infinite;
}

.sidehud__bars i:nth-child(2) { animation-delay: 0.1s; }
.sidehud__bars i:nth-child(3) { animation-delay: 0.2s; }
.sidehud__bars i:nth-child(4) { animation-delay: 0.3s; }
.sidehud__bars i:nth-child(5) { animation-delay: 0.4s; }
.sidehud__bars i:nth-child(6) { animation-delay: 0.5s; }
.sidehud__bars i:nth-child(7) { animation-delay: 0.6s; }
.sidehud__bars i:nth-child(8) { animation-delay: 0.15s; }

.sidehud__rail {
  width: 2px;
  height: 120px;
  background: rgba(0, 246, 255, 0.15);
  position: relative;
}

.sidehud__rail i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 18%;
  background: var(--pink);
  box-shadow: var(--glow-p);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

@keyframes barHop {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

/* =========================================================
   BOOT
   ========================================================= */
.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #040406;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 246, 255, 0.03) 2px,
    rgba(0, 246, 255, 0.03) 4px
  );
  animation: bootSweep 2.4s linear infinite;
}

@keyframes bootSweep {
  from { transform: translateY(-8px); }
  to { transform: translateY(8px); }
}

.boot__panel {
  position: relative;
  width: min(640px, calc(100% - 40px));
  color: var(--cyan);
  text-align: center;
}

.boot__mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  color: var(--cyan);
  filter: drop-shadow(0 0 12px rgba(0, 246, 255, 0.45));
  animation: spinSlow 12s linear infinite;
}

.boot__brand {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.42em;
  margin-bottom: 10px;
}

.boot__brand span { color: var(--pink); }
.boot__brand em {
  font-style: normal;
  color: var(--acid);
  letter-spacing: 0.18em;
}

.boot__ascii {
  font-family: var(--font-mono);
  font-size: clamp(6px, 1.5vw, 11px);
  line-height: 1.15;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 246, 255, 0.4);
  margin-bottom: 18px;
  overflow: hidden;
}

.boot__log {
  min-height: 132px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--dim);
  margin-bottom: 16px;
}

.boot__log .ok { color: var(--ok); }
.boot__log .warn { color: var(--warn); }
.boot__log .err { color: var(--err); }

.boot__track {
  height: 3px;
  background: rgba(0, 246, 255, 0.12);
  overflow: hidden;
}

.boot__track span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--acid));
  box-shadow: var(--glow-c);
  transition: width 0.12s linear;
}

.boot__meta {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--paper);
}

.boot__sep { color: var(--dim); margin: 0 8px; }

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 28px;
  background: linear-gradient(to bottom, rgba(7, 7, 11, 0.86), rgba(7, 7, 11, 0));
  backdrop-filter: blur(8px);
  transition: background 0.3s, box-shadow 0.3s;
}

.header.is-scrolled {
  background: rgba(7, 7, 11, 0.88);
  box-shadow: 0 1px 0 var(--line);
}

.header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(0, 246, 255, 0.12);
}

.header__progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
}

.brand__mark {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(0, 246, 255, 0.4));
}

.brand__text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 14px;
}

.brand__text em {
  font-style: normal;
  color: var(--pink);
}

.brand__ver {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--acid);
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav__link {
  position: relative;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--silver);
  transition: color 0.2s;
}

.nav__link::before {
  content: attr(data-idx);
  margin-right: 6px;
  color: var(--cyan);
  opacity: 0.55;
  font-size: 10px;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--paper);
}

.nav__link--cta {
  color: var(--acid);
}

.header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.iconbtn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.iconbtn .ic--on { display: none; }
.iconbtn[aria-pressed="true"] { color: var(--acid); }
.iconbtn[aria-pressed="true"] .ic--off { display: none; }
.iconbtn[aria-pressed="true"] .ic--on { display: block; }

.header__cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  box-shadow: inset 0 0 12px rgba(0, 246, 255, 0.08);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.header__cta:hover {
  background: var(--cyan);
  color: #07070b;
  box-shadow: var(--glow-c);
}

.burger {
  display: none;
  width: 36px;
  height: 36px;
  position: relative;
}

.burger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: var(--cyan);
  transition: transform 0.25s, opacity 0.2s, top 0.25s;
}

.burger span:nth-child(1) { top: 12px; }
.burger span:nth-child(2) { top: 17px; }
.burger span:nth-child(3) { top: 22px; }

.burger[aria-expanded="true"] span:nth-child(1) {
  top: 17px;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

.burger[aria-expanded="true"] span:nth-child(3) {
  top: 17px;
  transform: rotate(-45deg);
}

.mmenu {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(7, 7, 11, 0.96);
  display: grid;
  place-items: center;
}

.mmenu[hidden] { display: none; }

.mmenu__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100% - 48px));
}

.mmenu__inner a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 4px 12px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(0, 246, 255, 0.12);
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-size: 16px;
}

.mmenu__inner a i {
  font-style: normal;
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 12px;
}

.mmenu__inner a em {
  grid-column: 2;
  font-style: normal;
  font-family: var(--font-jp);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.mmenu__cta {
  margin-top: 16px;
  justify-content: center !important;
  border: 1px solid var(--acid) !important;
  color: var(--acid);
  text-align: center;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  color: #07070b;
  background: var(--cyan);
  box-shadow: var(--glow-c);
}

.btn--primary:hover {
  background: var(--acid);
  box-shadow: var(--glow-a);
}

.btn--ghost {
  color: var(--paper);
  border: 1px solid var(--line);
  background: var(--glass);
}

.btn--ghost:hover {
  border-color: var(--pink);
  color: var(--pink);
  box-shadow: var(--glow-p);
}

.btn--lg { min-height: 54px; padding: 0 26px; }

.btn__scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}

.btn:hover .btn__scan {
  animation: btnScan 0.7s var(--ease);
}

@keyframes btnScan {
  to { transform: translateX(120%); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: end center;
  padding: calc(var(--header-h) + 24px) 24px 88px;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.15) contrast(1.08);
}

.hero__wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.55) 38%, rgba(10, 10, 10, 0.28) 62%, rgba(0, 31, 63, 0.25) 100%),
    linear-gradient(90deg, rgba(10, 10, 10, 0.45) 0%, transparent 40%, transparent 70%, rgba(42, 10, 42, 0.28) 100%);
}

.hero__rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.45;
}

.hero__rain i {
  position: absolute;
  top: -12%;
  width: 1px;
  height: 14%;
  background: linear-gradient(to bottom, transparent, rgba(0, 255, 255, 0.55));
  animation: rainFall linear infinite;
}

@keyframes rainFall {
  to { transform: translateY(780%); }
}

.hero__floor {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 28%;
  background:
    linear-gradient(to top, rgba(10, 10, 10, 1) 0%, transparent 70%),
    linear-gradient(rgba(0, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.08) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: center bottom;
}

.stamp {
  position: absolute;
  top: calc(var(--header-h) + 22px);
  right: 6vw;
  z-index: 3;
  width: min(280px, 42vw);
  padding: 10px 12px;
  border: 1px dashed var(--amber);
  color: var(--amber);
  background: rgba(10, 10, 10, 0.45);
  transform: rotate(4deg);
  font-family: var(--font-mono);
}

.stamp span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
}

.stamp strong {
  display: block;
  margin: 4px 0;
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.stamp em {
  display: block;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.hero__barcode {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 3;
  width: 150px;
  color: rgba(0, 255, 255, 0.55);
}

.hero__barcode svg { width: 100%; height: 28px; fill: currentColor; }

.hero__barcode span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.hero__body {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  text-align: left;
  justify-self: start;
  margin-left: max(4vw, 12px);
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--silver);
}

.blink {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: var(--glow-a);
  animation: pulse 1.2s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(36px, 7.2vw, 92px);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.75), 0 0 24px rgba(0, 255, 255, 0.18);
}

.hero__title .glitch { display: block; }

.hero__sub {
  display: block;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.36em;
  color: var(--cyan);
  text-shadow: var(--glow-c);
}

.hero__lead {
  margin: 24px 0 0;
  max-width: 640px;
  font-family: var(--font-jp);
  font-size: clamp(14px, 1.5vw, 18px);
  color: #c8d0d8;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 32px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero__stats dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.hero__stats dd {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 28px);
  color: var(--paper);
}

.hero__stats i {
  font-style: normal;
  margin-left: 4px;
  font-size: 0.45em;
  color: var(--cyan);
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--dim);
  z-index: 2;
}

.hero__scroll i {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollLine 1.6s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0.2); transform-origin: top; opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

/* ticker */
.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(0, 246, 255, 0.03);
}

.ticker__track {
  display: flex;
  width: max-content;
  gap: 40px;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  animation: ticker 32s linear infinite;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* =========================================================
   GLITCH
   ========================================================= */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  transform: translate(1px, -1px);
  clip-path: inset(0 0 60% 0);
  opacity: 0.55;
  mix-blend-mode: screen;
}

.glitch::after {
  color: var(--pink);
  transform: translate(-1px, 1px);
  clip-path: inset(55% 0 0 0);
  opacity: 0.5;
  mix-blend-mode: screen;
}

.glitch.is-firing::before {
  animation: glitchA 0.28s steps(2) 2;
}

.glitch.is-firing::after {
  animation: glitchB 0.28s steps(2) 2;
}

@keyframes glitchA {
  0% { transform: translate(2px, -1px); }
  50% { transform: translate(-3px, 1px); clip-path: inset(20% 0 40% 0); }
  100% { transform: translate(1px, -1px); }
}

@keyframes glitchB {
  0% { transform: translate(-2px, 1px); }
  50% { transform: translate(3px, -1px); clip-path: inset(50% 0 10% 0); }
  100% { transform: translate(-1px, 1px); }
}

/* =========================================================
   SECTIONS
   ========================================================= */
.sect {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}

.sect::before {
  content: attr(data-sect);
  position: absolute;
  top: 48px;
  right: 6vw;
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 72px);
  letter-spacing: 0.08em;
  color: rgba(0, 246, 255, 0.05);
  pointer-events: none;
}

.sect__head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.sect__num {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--acid);
  padding-top: 10px;
}

.sect__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  margin-bottom: 8px;
}

.sect__title {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.sect__title em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.55em;
  color: var(--pink);
  letter-spacing: 0.14em;
}

.sect__lead {
  max-width: 640px;
  margin: 0 0 40px 56px;
  color: var(--silver);
  font-family: var(--font-jp);
}

.product {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 28px;
  align-items: center;
  margin: 0 0 40px;
  padding: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(0, 31, 63, 0.45), rgba(10, 10, 10, 0.5));
}

.product img {
  width: 100%;
  height: auto;
  object-fit: cover;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 24px rgba(0, 255, 255, 0.25));
}

.product figcaption {
  font-family: var(--font-mono);
}

.product figcaption span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  margin-bottom: 8px;
}

.product figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}

.product figcaption em {
  display: block;
  font-style: normal;
  font-family: var(--font-jp);
  color: var(--silver);
  letter-spacing: 0.04em;
}

.circuit-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(90deg, transparent 48px, rgba(0, 255, 255, 0.35) 49px, transparent 50px),
    linear-gradient(transparent 48px, rgba(255, 0, 255, 0.2) 49px, transparent 50px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 20%, transparent 75%);
}

.architecture { overflow: hidden; }

/* prologue */
.prologue__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: start;
}

.prologue__text p {
  margin-bottom: 16px;
  font-family: var(--font-jp);
  color: #c5d0dc;
}

.prologue__text .lead {
  font-size: 1.08em;
  color: var(--paper);
}

.quote {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 2px solid var(--pink);
  background: linear-gradient(90deg, rgba(255, 43, 214, 0.08), transparent);
  font-family: var(--font-jp);
  color: var(--paper);
}

.quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}

.panel {
  border: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.72);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(0, 246, 255, 0.03);
}

.panel__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.panel__body { padding: 16px 14px 18px; }

.gauge {
  display: grid;
  grid-template-columns: 88px 1fr 72px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.gauge__k { color: var(--silver); }
.gauge__v { text-align: right; color: var(--paper); }

.gauge__track {
  height: 4px;
  background: rgba(0, 246, 255, 0.1);
  overflow: hidden;
}

.gauge__track i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cyan);
  box-shadow: var(--glow-c);
  transition: width 1.2s var(--ease);
}

.gauge.is-on .gauge__track i {
  width: calc(var(--val, 20) * 1%);
}

.gauge--max .gauge__track i {
  background: linear-gradient(90deg, var(--cyan), var(--acid));
}

.gauge--max .gauge__k,
.gauge--max .gauge__v { color: var(--acid); }

.panel__note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
}

/* cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.cards .card:last-child {
  grid-column: 1 / -1;
}

.card {
  position: relative;
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(0, 246, 255, 0.04), rgba(7, 7, 11, 0.4));
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}

.card:hover {
  border-color: var(--pink);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), var(--glow-p);
}

.card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  color: var(--cyan);
}

.card__code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--pink);
  margin-bottom: 8px;
}

.card__title {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 10px;
}

.card__desc {
  color: var(--silver);
  font-family: var(--font-jp);
  font-size: 15px;
  margin-bottom: 16px;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.card__meta span {
  padding: 3px 8px;
  border: 1px solid var(--line);
}

/* architecture */
.arch {
  display: grid;
  gap: 0;
}

.arch__layer {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 20, 0.55);
  transition: border-color 0.25s, background 0.25s;
}

.arch__layer:hover {
  border-color: var(--cyan);
  background: rgba(0, 246, 255, 0.05);
}

.arch__num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--acid);
  letter-spacing: 0.08em;
}

.arch__body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
}

.arch__body p {
  color: var(--silver);
  font-family: var(--font-jp);
  font-size: 15px;
}

.arch__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.arch__tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--cyan);
}

.arch__connector {
  height: 22px;
  display: grid;
  place-items: center;
}

.arch__connector span {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, var(--pink), var(--cyan));
}

.terminal {
  margin-top: 36px;
  border: 1px solid var(--line);
  background: #05070c;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
}

.terminal__dots {
  display: flex;
  gap: 5px;
}

.terminal__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
}

.terminal__dots i:nth-child(1) { background: #ff5f57; }
.terminal__dots i:nth-child(2) { background: #febc2e; }
.terminal__dots i:nth-child(3) { background: #28c840; }

.terminal__badge {
  margin-left: auto;
  color: var(--acid);
  letter-spacing: 0.16em;
  font-size: 10px;
}

.terminal__body {
  min-height: 180px;
  padding: 14px 16px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #b8c4d0;
}

.terminal__body .t-prompt { color: var(--acid); }
.terminal__body .t-cmd { color: var(--cyan); }
.terminal__body .t-ok { color: var(--ok); }
.terminal__body .t-warn { color: var(--warn); }

/* timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 8px;
}

.timeline__track {
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), var(--pink), var(--acid));
  opacity: 0.45;
}

.timeline__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 8px 0 24px;
}

.timeline__node {
  position: relative;
  padding-left: 28px;
}

.timeline__dot {
  position: absolute;
  left: 14px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--cyan);
  box-shadow: var(--glow-c);
}

.timeline__dot--future {
  border-color: var(--acid);
  box-shadow: var(--glow-a);
}

.timeline__phase {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.timeline__date {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--acid);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.timeline__content {
  border: 1px solid var(--line);
  padding: 16px 18px;
  background: rgba(8, 12, 20, 0.45);
}

.timeline__content h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.timeline__content p {
  color: var(--silver);
  font-family: var(--font-jp);
  font-size: 15px;
}

/* CTA */
.access {
  position: relative;
  padding-bottom: 80px;
  overflow: hidden;
}

.access__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.72)),
    url("assets/hero.jpg") center 40% / cover no-repeat;
  filter: saturate(1.1);
  pointer-events: none;
}

.cta {
  position: relative;
  z-index: 1;
  padding: 56px 32px 48px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 0, 255, 0.12), transparent 60%),
    rgba(8, 10, 16, 0.82);
  text-align: center;
}

.cta__corners i {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--acid);
}

.cta__corners i:nth-child(1) { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.cta__corners i:nth-child(2) { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.cta__corners i:nth-child(3) { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.cta__corners i:nth-child(4) { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.cta__code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  margin-bottom: 10px;
}

.cta__title {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(28px, 5vw, 52px);
}

.cta__lead {
  margin-top: 10px;
  color: var(--silver);
  font-family: var(--font-jp);
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 32px 0 28px;
}

.countdown__unit {
  min-width: 76px;
  padding: 12px 8px 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}

.countdown__num {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--paper);
}

.countdown__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.countdown__sep {
  font-family: var(--font-display);
  color: var(--pink);
  font-size: 22px;
}

.form { width: min(720px, 100%); margin: 0 auto; }

.form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.field {
  position: relative;
  text-align: left;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.field input {
  width: 100%;
  padding: 12px 4px 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 16px;
}

.field input::placeholder { color: #3d4652; }

.field input:focus {
  outline: none;
  border-bottom-color: var(--acid);
}

.field.is-invalid input { border-bottom-color: var(--err); }

.field__err {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--err);
}

.form__note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--dim);
  font-family: var(--font-jp);
}

.form__note a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form__ok {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--acid);
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 13px;
}

.form__ok[hidden] { display: none; }

.form__ok code {
  display: inline-block;
  margin-top: 6px;
  color: var(--paper);
}

/* footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.footer__brand p {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.08em;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--silver);
}

.footer__links a:hover { color: var(--cyan); }

.footer__social {
  display: flex;
  gap: 14px;
}

.footer__social a {
  color: var(--silver);
  transition: color 0.2s;
}

.footer__social a:hover { color: var(--acid); }

.footer__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #4b5560;
  letter-spacing: 0.08em;
}

/* =========================================================
   REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }
.d5 { transition-delay: 0.4s; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .sidehud { display: none; }
  .frame { display: none; }
}

@media (max-width: 860px) {
  .nav,
  .header__cta { display: none; }

  .burger { display: block; }

  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__body { margin-left: 0; text-align: left; }
  .stamp { display: none; }
  .hero__barcode { display: none; }
  .product { grid-template-columns: 1fr; }

  .prologue__grid,
  .cards,
  .form__row,
  .timeline__item {
    grid-template-columns: 1fr;
  }

  .sect__lead { margin-left: 0; }

  .timeline__node { padding-left: 28px; }

  .form__row .btn { width: 100%; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 28px); }
  .header { padding: 0 14px; }
  .hero { padding-left: 14px; padding-right: 14px; }
  .countdown { gap: 4px; }
  .countdown__unit { min-width: 58px; padding: 8px 4px; }
  .countdown__num { font-size: 20px; }
  .countdown__sep { display: none; }
  .hero__title { font-size: clamp(32px, 11vw, 56px); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  body.has-cursor { cursor: auto; }
  .cursor { display: none; }
}

@media (hover: none) {
  body.has-cursor { cursor: auto; }
  .cursor { display: none; }
}
