/* ============================================================
   GENZONIX GLOBAL — HOME WORLD v3
   A dark, electric, arcade-grade build.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #05050e;
  --bg-2: #0a0a1a;
  --panel: #0c0c1d;
  --panel-2: #11112a;
  --ink: #eef0ff;
  --dim: #8d92ad;
  --faint: #565b76;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --magenta: #ff3d81;
  --haz: #ffb300;
  --line: rgba(150, 160, 255, 0.13);
  --line-2: rgba(150, 160, 255, 0.22);
  --grad: linear-gradient(100deg, var(--violet), var(--cyan));
  --grad-3: linear-gradient(100deg, var(--violet), var(--magenta), var(--cyan));
  --font-d: 'Unbounded', sans-serif;
  --font-b: 'Space Grotesk', sans-serif;
  --font-m: 'JetBrains Mono', monospace;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --nav-h: 76px;
  --r: 14px;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--violet); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23234a; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }

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

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

@media (pointer: fine) {
  body.cursor-on, body.cursor-on a, body.cursor-on button,
  body.cursor-on input, body.cursor-on textarea, body.cursor-on select,
  body.cursor-on summary { cursor: none; }
}

/* ---------- Boot screen (JS-only) ---------- */
.boot { display: none; }
html.js .boot {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
html.static .boot { display: none; }
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-inner { width: min(420px, 84vw); display: grid; gap: 1.1rem; justify-items: start; }
.boot-hex { animation: boot-spin 2.4s ease-in-out infinite; }
@keyframes boot-spin { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(180deg); } }
.boot-lines { font-size: 0.78rem; color: var(--dim); min-height: 4.2em; white-space: pre-line; }
.boot-lines b { color: var(--cyan); font-weight: 500; }
.boot-bar {
  width: 100%; height: 4px; background: var(--panel-2);
  border-radius: 99px; overflow: hidden;
}
.boot-bar span {
  display: block; height: 100%; width: 0;
  background: var(--grad); border-radius: 99px;
  transition: width 0.18s ease;
}
.boot-skip {
  font-size: 0.68rem; letter-spacing: 0.22em; color: var(--faint);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- World layers ---------- */
#space {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -3; background: radial-gradient(1200px 800px at 70% -10%, #12102e 0%, var(--bg) 55%);
}
.scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed; inset: 0; z-index: 59; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 50%, transparent 60%, rgba(0,0,5,0.55) 100%);
}
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 220;
  background: var(--grad-3);
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 500; pointer-events: none; opacity: 0; }
body.cursor-on .cursor { opacity: 1; }
.cursor-dot {
  position: fixed; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); translate: -50% -50%;
}
.cursor-ring {
  position: fixed; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(124, 92, 255, 0.65);
  translate: -50% -50%;
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s;
}
.cursor.is-hover .cursor-ring {
  width: 52px; height: 52px;
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.07);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.78rem 1.4rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s, border-color 0.25s, color 0.25s;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(124, 92, 255, 0.35); }
.btn-solid::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.35) 50%, transparent 80%);
  translate: -120% 0; transition: translate 0.6s ease;
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(34, 211, 238, 0.35); }
.btn-solid:hover::after { translate: 120% 0; }

.btn-ghost {
  border-color: var(--line-2); color: var(--ink);
  background: rgba(150, 160, 255, 0.04);
}
.btn-ghost:hover { border-color: var(--cyan); background: rgba(34, 211, 238, 0.08); transform: translateY(-2px); }

.btn-hazard {
  background: var(--haz); color: #14110a; font-weight: 700;
  font-family: var(--font-m); letter-spacing: 0.04em;
  border: 2px solid #14110a;
  box-shadow: 0 0 0 2px var(--haz), 0 10px 36px rgba(255, 179, 0, 0.35);
  border-radius: 6px;
}
.btn-hazard:hover { transform: translateY(-2px) rotate(-0.5deg); box-shadow: 0 0 0 2px var(--haz), 0 16px 44px rgba(255, 179, 0, 0.5); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 clamp(1rem, 3vw, 2.2rem);
  transition: transform 0.35s ease, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
/* blur lives on a pseudo so the fixed mobile menu keeps the viewport
   as its containing block (backdrop-filter on .nav itself would break it) */
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(7, 7, 18, 0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav.scrolled::before { opacity: 1; }
.nav.hidden { transform: translateY(-100%); }
body.menu-open { overflow: hidden; }
body.menu-open .nav { transform: none; }
.m-only { display: none; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.logo-text {
  font-family: var(--font-d); font-weight: 800; font-size: 0.92rem; letter-spacing: 0.04em;
  display: inline-flex; align-items: baseline; gap: 0.45rem;
}
.logo-sub {
  font-family: var(--font-m); font-weight: 500; font-size: 0.6rem;
  color: var(--cyan); letter-spacing: 0.3em;
  border: 1px solid rgba(34, 211, 238, 0.4); border-radius: 4px; padding: 0.15em 0.4em;
}

.nav-links { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--dim);
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nl-num { font-size: 0.6rem; color: var(--faint); transition: color 0.2s; }
.nav-links a:hover .nl-num { color: var(--cyan); }

.nav-hazard {
  color: var(--haz) !important; font-family: var(--font-m); font-weight: 700;
  font-size: 0.78rem !important; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px dashed rgba(255, 179, 0, 0.5); border-radius: 6px;
  padding: 0.4em 0.7em; gap: 0.55rem !important;
}
.nav-hazard:hover { background: rgba(255, 179, 0, 0.1); border-style: solid; }
.hazard-stripe {
  width: 14px; height: 8px; border-radius: 1px;
  background: repeating-linear-gradient(135deg, var(--haz) 0 3px, #161306 3px 6px);
  opacity: 0.9;
}

.nav-right { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.nav-links + .nav-right { margin-left: 0; }
.nav-status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.62rem; letter-spacing: 0.25em; color: var(--dim);
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #34e88a; display: inline-block;
  box-shadow: 0 0 0 0 rgba(52, 232, 138, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 232, 138, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(52, 232, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 232, 138, 0); }
}

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 210; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); transition: 0.3s ease; border-radius: 2px; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid; place-items: center;
  position: relative;
  padding: calc(var(--nav-h) + 2rem) var(--pad) 4rem;
}
.hud {
  position: absolute; font-size: 0.62rem; letter-spacing: 0.22em; color: var(--faint);
  user-select: none;
}
.hud-tl { top: calc(var(--nav-h) + 18px); left: var(--pad); }
.hud-tr { top: calc(var(--nav-h) + 18px); right: var(--pad); }
.hud-bl { bottom: 24px; left: var(--pad); }
.hud-br { bottom: 24px; right: var(--pad); }

.hero-inner { max-width: 1060px; text-align: center; display: grid; justify-items: center; gap: 1.6rem; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.66rem; letter-spacing: 0.22em; color: var(--dim);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 0.55em 1.1em;
  background: rgba(12, 12, 30, 0.5);
}

.mega {
  font-family: var(--font-d);
  font-weight: 900;
  font-size: clamp(2.7rem, 9.5vw, 7.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  display: grid; gap: 0.05em;
}
.mega-line { display: block; }
.mega-grad {
  background: var(--grad-3);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: grad-pan 7s ease-in-out infinite;
  filter: drop-shadow(0 0 28px rgba(124, 92, 255, 0.4));
}
@keyframes grad-pan { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.scramble { display: inline-block; white-space: nowrap; }

.hero-sub { max-width: 640px; color: var(--dim); font-size: clamp(1rem, 1.5vw, 1.15rem); }
.link-hazard {
  color: var(--haz); font-weight: 600;
  border-bottom: 1px dashed rgba(255, 179, 0, 0.6);
  transition: 0.2s;
}
.link-hazard:hover { background: rgba(255, 179, 0, 0.12); }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.hero-meta {
  display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center;
  font-size: 0.62rem; letter-spacing: 0.24em; color: var(--faint);
  margin-top: 1.2rem;
}
.hero-meta-hint { color: var(--cyan); opacity: 0.7; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 99px;
  display: grid; justify-items: center; padding-top: 8px;
}
.scroll-cue span {
  width: 3px; height: 9px; border-radius: 99px; background: var(--cyan);
  animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee-zone {
  padding: 3.4rem 0;
  transform: rotate(-1.6deg) scale(1.04);
  display: grid; gap: 0.9rem;
  overflow: hidden;
}
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track {
  display: inline-flex; align-items: center; gap: 2.4rem;
  padding-right: 2.4rem;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
.marquee-track.reverse { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-track span {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(160, 170, 255, 0.35);
  transition: 0.3s;
}
.m-bottom .marquee-track span { -webkit-text-stroke: 1px rgba(34, 211, 238, 0.3); }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee:hover span { color: var(--ink); -webkit-text-stroke: 1px transparent; }
.marquee-track i {
  font-style: normal; color: var(--violet); font-size: 1.4rem;
}
.m-bottom .marquee-track i { color: var(--cyan); }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 8.5rem) var(--pad); max-width: 1340px; margin: 0 auto; }
.section-head { max-width: 760px; margin-bottom: clamp(2.4rem, 5vw, 4.2rem); }
.eyebrow {
  display: inline-block; font-size: 0.68rem; letter-spacing: 0.3em;
  color: var(--cyan); margin-bottom: 1rem;
}
.h2 {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(1.7rem, 4.4vw, 3.3rem);
  line-height: 1.08; letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { color: var(--dim); max-width: 620px; }
.section-sub b { color: var(--ink); }

/* ---------- Quests (services) ---------- */
.quests { border-top: 1px solid var(--line); }
.quest { border-bottom: 1px solid var(--line); position: relative; }
.quest::before {
  content: ''; position: absolute; inset: 0 -2rem;
  background: linear-gradient(100deg, rgba(124, 92, 255, 0.07), rgba(34, 211, 238, 0.05));
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.quest:hover::before, .quest.open::before { opacity: 1; }

.quest-head {
  width: 100%; display: grid;
  grid-template-columns: 4.2rem 1fr auto 3.2rem;
  align-items: center; gap: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  text-align: left; position: relative;
}
.quest-num { color: var(--faint); font-size: 0.85rem; transition: color 0.3s; }
.quest:hover .quest-num, .quest.open .quest-num { color: var(--cyan); }
.quest-title {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(1.45rem, 4.6vw, 3.4rem);
  line-height: 1.02; letter-spacing: -0.01em;
  transition: 0.3s; position: relative;
}
.quest:hover .quest-title, .quest.open .quest-title {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateX(8px);
}
.quest-star { color: var(--haz); -webkit-text-fill-color: var(--haz); font-size: 0.5em; vertical-align: super; margin-left: 0.3em; }
.quest-tags { font-size: 0.62rem; letter-spacing: 0.18em; color: var(--faint); text-align: right; }
.quest-toggle { position: relative; width: 30px; height: 30px; justify-self: end; }
.quest-toggle i {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 2px;
  background: var(--dim); translate: -50% -50%; transition: 0.35s ease; border-radius: 2px;
}
.quest-toggle i:last-child { rotate: 90deg; }
.quest.open .quest-toggle i:last-child { rotate: 0deg; }
.quest.open .quest-toggle i { background: var(--cyan); }

.quest-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s cubic-bezier(0.65, 0, 0.25, 1); }
.quest.open .quest-body { grid-template-rows: 1fr; }
.quest-body > .quest-grid { overflow: hidden; min-height: 0; }
.quest-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem;
  padding-bottom: 0; opacity: 0; transition: opacity 0.4s 0.05s, padding-bottom 0.55s cubic-bezier(0.65, 0, 0.25, 1);
}
.quest.open .quest-grid { padding-bottom: clamp(1.6rem, 3vw, 2.6rem); opacity: 1; }
.quest-grid p { color: var(--dim); max-width: 56ch; }
.quest-grid .btn { margin-top: 1.3rem; }

.quest-list { list-style: none; margin-top: 1.1rem; display: grid; gap: 0.5rem; }
.quest-list li {
  color: var(--dim); font-size: 0.95rem; padding-left: 1.4rem; position: relative;
}
.quest-list li::before {
  content: '▸'; position: absolute; left: 0; color: var(--cyan);
}

.quest-visual { display: grid; gap: 1rem; align-content: start; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-size: 0.66rem; letter-spacing: 0.06em; color: var(--dim);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 0.4em 0.7em;
  background: rgba(12, 12, 30, 0.6);
}

.terminal-mini {
  border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  background: #07071a; font-size: 0.8rem;
}
.tm-bar {
  display: flex; align-items: center; gap: 6px; padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line); color: var(--faint);
}
.tm-bar b { width: 9px; height: 9px; border-radius: 50%; background: #2a2a4d; }
.tm-bar b:nth-child(1) { background: #ff5f57; } .tm-bar b:nth-child(2) { background: #febc2e; } .tm-bar b:nth-child(3) { background: #28c840; }
.tm-bar em { font-style: normal; font-size: 0.66rem; margin-left: auto; }
.tm-body { padding: 1rem 1.1rem; display: grid; gap: 0.35rem; }
.c-kw { color: var(--magenta); } .c-var { color: var(--cyan); } .c-fn { color: var(--violet); filter: brightness(1.4); } .c-cm { color: var(--faint); }

.phone {
  width: 120px; border: 1.5px solid var(--line-2); border-radius: 20px;
  padding: 8px; background: #07071a; position: relative;
}
.phone-notch { width: 40px; height: 5px; background: #1c1c3a; border-radius: 99px; margin: 2px auto 8px; }
.phone-screen { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.phone-screen span {
  height: 30px; border-radius: 7px;
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.25), rgba(34, 211, 238, 0.18));
  animation: app-glow 3s ease-in-out infinite;
}
.phone-screen span:nth-child(2n) { animation-delay: 0.7s; }
.phone-screen span:nth-child(3n) { animation-delay: 1.4s; }
@keyframes app-glow { 50% { filter: brightness(1.7); } }

.eq { display: flex; align-items: flex-end; gap: 7px; height: 90px; }
.eq i {
  flex: 1; height: var(--h); border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(124, 92, 255, 0.7), rgba(34, 211, 238, 0.9));
  animation: eq-bounce 1.4s ease-in-out infinite;
}
.eq i:nth-child(2n) { animation-delay: 0.2s; } .eq i:nth-child(3n) { animation-delay: 0.45s; } .eq i:nth-child(5n) { animation-delay: 0.7s; }
@keyframes eq-bounce { 50% { transform: scaleY(0.55); } }

.flow { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.7rem; }
.flow-node { border: 1px solid var(--line-2); border-radius: 7px; padding: 0.55em 0.8em; letter-spacing: 0.1em; }
.flow-dead { color: var(--faint); text-decoration: line-through; border-style: dashed; }
.flow-live { color: var(--cyan); border-color: rgba(34, 211, 238, 0.6); box-shadow: 0 0 18px rgba(34, 211, 238, 0.18); }
.flow-arrow { color: var(--faint); }

/* ---------- Arcade ---------- */
.arcade-sec { max-width: 1180px; }
.arcade { display: grid; gap: 0.9rem; }
.arcade-frame {
  border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden;
  background: #060614;
  box-shadow: 0 0 0 6px rgba(12, 12, 30, 0.8), 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 80px rgba(124, 92, 255, 0.14);
}
.arcade-top, .arcade-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.2rem; font-size: 0.7rem; letter-spacing: 0.16em; color: var(--dim);
}
.arcade-top { border-bottom: 1px solid var(--line); }
.arcade-bottom { border-top: 1px solid var(--line); }
.arcade-bottom b { color: var(--cyan); font-weight: 700; }
.arcade-hint { color: var(--haz); animation: blink 1.4s steps(2) infinite; text-align: center; }
.arcade-lights { display: flex; gap: 6px; }
.arcade-lights b { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: lights 1.2s ease-in-out infinite; }
.arcade-lights b:nth-child(2) { background: var(--cyan); animation-delay: 0.4s; }
.arcade-lights b:nth-child(3) { background: var(--magenta); animation-delay: 0.8s; }
@keyframes lights { 50% { opacity: 0.25; } }
#gameCanvas { width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: manipulation; }
.arcade-foot { text-align: center; font-size: 0.62rem; letter-spacing: 0.22em; color: var(--faint); }

/* ---------- Sectors ---------- */
.sector-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  perspective: 1200px;
}
.sector {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.6rem 1.4rem 1.5rem;
  background: linear-gradient(160deg, var(--panel), rgba(10, 10, 26, 0.4));
  position: relative; overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: border-color 0.3s, transform 0.18s ease-out;
}
.sector::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(280px circle at var(--gx) var(--gy), rgba(34, 211, 238, 0.13), transparent 65%);
  opacity: 0; transition: opacity 0.3s;
}
.sector:hover { border-color: var(--line-2); }
.sector:hover::after { opacity: 1; }
.sector-num { font-size: 0.6rem; letter-spacing: 0.2em; color: var(--faint); }
.sector h4 {
  font-family: var(--font-d); font-weight: 600; font-size: 1.02rem;
  margin: 0.9rem 0 0.5rem; letter-spacing: 0.02em;
}
.sector p { color: var(--dim); font-size: 0.9rem; line-height: 1.55; }

/* ---------- Route (process) ---------- */
.route-sec { position: relative; }
body.route-pinned .route-sec { height: 340vh; }
.route-pin {
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(1.6rem, 3vh, 3rem);
  padding: calc(var(--nav-h) + 1rem) var(--pad) 2rem;
  max-width: 1340px; margin: 0 auto;
}
body.route-pinned .route-pin {
  position: sticky; top: 0; height: 100vh; overflow: hidden; max-width: none;
}
body.route-pinned .route-head { max-width: 1340px; margin-left: auto; margin-right: auto; width: 100%; }
.route-head { margin-bottom: 0; }

.route-track {
  display: flex; gap: 1.2rem; align-items: stretch;
  will-change: transform;
}
body.route-pinned .route-track { width: max-content; padding-left: max(calc((100vw - 1340px) / 2), 0px); }
body:not(.route-pinned) .route-track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; }
body:not(.route-pinned) .route-card { scroll-snap-align: start; }

.route-card {
  flex: 0 0 clamp(300px, 36vw, 460px);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 2.1rem 1.9rem;
  background: linear-gradient(165deg, var(--panel), rgba(8, 8, 22, 0.6));
  position: relative; overflow: hidden;
  display: grid; align-content: start; gap: 0.9rem;
}
.route-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
}
.route-num {
  font-family: var(--font-d); font-weight: 900;
  font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(150, 160, 255, 0.35);
}
.route-card h3 {
  font-family: var(--font-d); font-weight: 800; font-size: 1.4rem; letter-spacing: 0.02em;
}
.route-card p { color: var(--dim); font-size: 0.97rem; }
.route-tag {
  justify-self: start; font-size: 0.62rem; letter-spacing: 0.2em; color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 5px; padding: 0.35em 0.7em;
  margin-top: 0.4rem;
}
.route-end {
  flex: 0 0 auto; align-self: center;
  font-size: clamp(1.2rem, 2.4vw, 2rem); line-height: 1.3; letter-spacing: 0.06em;
  color: var(--ink); padding: 0 3rem;
  font-weight: 700;
}
.route-end span { color: var(--cyan); font-size: 0.55em; letter-spacing: 0.2em; }
.route-progress {
  font-size: 0.62rem; letter-spacing: 0.24em; color: var(--faint);
  max-width: 1340px; margin: 0 auto; width: 100%;
}
.route-progress span { color: var(--cyan); }
body:not(.route-pinned) .route-progress { display: none; }

/* ---------- Stack terminal ---------- */
.stack-sec { max-width: 1000px; }
.terminal {
  border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden;
  background: #060616;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(34, 211, 238, 0.07);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line);
  color: var(--faint); font-size: 0.7rem;
}
.term-bar b { width: 10px; height: 10px; border-radius: 50%; }
.term-bar b:nth-child(1) { background: #ff5f57; } .term-bar b:nth-child(2) { background: #febc2e; } .term-bar b:nth-child(3) { background: #28c840; }
.term-bar em { font-style: normal; margin-left: auto; letter-spacing: 0.12em; }
.term-body { padding: 1.4rem 1.5rem 1.7rem; display: grid; gap: 0.45rem; font-size: 0.88rem; }
.term-line { color: var(--ink); }
html.js .term-line { opacity: 0; }
html.js .term-line.show, html.static .term-line { opacity: 1; }
.t-prompt { color: var(--magenta); margin-right: 0.5em; }
.term-out { color: var(--dim); padding-left: 1.4em; transition: 0.35s ease; }
html.js .term-out { opacity: 0; transform: translateY(4px); }
html.js .term-out.show, html.static .term-out { opacity: 1; transform: none; }
.term-grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700;
}

/* ---------- The Rift (dispatch teaser) ---------- */
.rift {
  position: relative; margin: clamp(3rem, 7vw, 6rem) 0;
  background: #0e0c06;
  border-top: 1px solid rgba(255, 179, 0, 0.25);
  border-bottom: 1px solid rgba(255, 179, 0, 0.25);
}
.rift-stripe {
  height: 18px;
  background: repeating-linear-gradient(135deg, var(--haz) 0 22px, #131006 22px 44px);
  opacity: 0.92;
}
.rift-inner {
  max-width: 1000px; margin: 0 auto; text-align: center;
  padding: clamp(3.4rem, 7vw, 5.6rem) var(--pad);
  display: grid; justify-items: center; gap: 1.4rem;
}
.rift-alert {
  font-size: 0.68rem; letter-spacing: 0.3em; color: var(--haz);
  border: 1px dashed rgba(255, 179, 0, 0.5); border-radius: 6px;
  padding: 0.6em 1.2em;
  animation: blink 2.2s steps(2) infinite;
}
.rift-title {
  font-family: var(--font-d); font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 3.6rem); line-height: 1.05;
}
.rift-title span { color: var(--haz); text-shadow: 0 0 40px rgba(255, 179, 0, 0.35); }
.rift-sub { color: #b3a98e; max-width: 640px; }
.rift-truck { width: 100%; max-width: 560px; display: grid; gap: 6px; margin-top: 1rem; }
.rift-rig {
  font-size: 1.1rem; color: var(--haz); letter-spacing: -1px;
  animation: rig-drive 9s linear infinite; justify-self: start;
}
@keyframes rig-drive { from { transform: translateX(-15%); } to { transform: translateX(min(520px, 86vw)); } }
.rift-road {
  height: 3px; width: 100%;
  background: repeating-linear-gradient(90deg, rgba(255, 179, 0, 0.55) 0 26px, transparent 26px 52px);
  animation: road-move 0.7s linear infinite;
}
@keyframes road-move { to { background-position: -52px 0; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.7rem; max-width: 880px; }
.faq-item {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(12, 12, 29, 0.55);
  transition: border-color 0.25s;
  overflow: hidden;
}
.faq-item:hover, .faq-item[open] { border-color: var(--line-2); }
.faq-item summary {
  list-style: none; display: flex; align-items: center; gap: 1rem;
  padding: 1.15rem 1.3rem; font-weight: 600; font-size: 1.02rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { font-size: 0.62rem; letter-spacing: 0.18em; color: var(--cyan); flex: 0 0 auto; }
.faq-x { margin-left: auto; color: var(--dim); font-size: 1.3rem; font-weight: 400; transition: 0.3s; line-height: 1; }
.faq-item[open] .faq-x { rotate: 45deg; color: var(--cyan); }
.faq-body { padding: 0 1.3rem 1.3rem 1.3rem; color: var(--dim); }
.faq-body p { max-width: 64ch; }

/* ---------- Contact ---------- */
.contact-sec { max-width: 1240px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.contact-grid > *, .quest-grid > *, .sector, .route-card { min-width: 0; }
.contact-list { list-style: none; display: grid; gap: 0.8rem; margin-top: 2rem; }
.contact-list li {
  display: flex; align-items: baseline; gap: 1rem; font-size: 0.85rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1.1rem;
  background: rgba(12, 12, 29, 0.5);
  transition: border-color 0.25s, transform 0.25s;
}
.contact-list li:hover { border-color: var(--cyan); transform: translateX(6px); }
.cl-key { color: var(--cyan); font-size: 0.62rem; letter-spacing: 0.2em; flex: 0 0 auto; }

.contact-form {
  border: 1px solid var(--line-2); border-radius: 18px;
  background: linear-gradient(165deg, var(--panel), rgba(7, 7, 20, 0.7));
  padding: 0; overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  display: grid;
}
.form-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.4rem; border-bottom: 1px solid var(--line);
  font-size: 0.68rem; letter-spacing: 0.18em; color: var(--dim);
}
.form-blink { color: var(--cyan); animation: blink 1.1s steps(2) infinite; }
.contact-form > label, .contact-form .row, .contact-form button, .form-msg { margin: 0 1.4rem; }
.contact-form > label:first-of-type, .contact-form .row:first-of-type { margin-top: 1.4rem; }
.contact-form label { display: grid; gap: 0.45rem; margin-bottom: 1.05rem !important; }
.contact-form label > span { font-size: 0.6rem; letter-spacing: 0.22em; color: var(--faint); }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form .row label { margin: 0 !important; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; background: rgba(5, 5, 16, 0.8);
  border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); font: inherit; font-size: 0.95rem;
  padding: 0.78rem 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.contact-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.contact-form button { margin-bottom: 0.4rem; }
.form-msg { min-height: 2.4em; font-size: 0.78rem; padding: 0.5rem 0 1.2rem; color: var(--dim); }
.form-msg.ok { color: var(--cyan); }
.form-msg.err { color: var(--magenta); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 4rem; }
.footer-mega { display: block; overflow: hidden; padding: clamp(1.5rem, 4vw, 3rem) var(--pad) 0; }
.footer-word {
  display: block; text-align: center;
  font-family: var(--font-d); font-weight: 900;
  font-size: clamp(3rem, 12.5vw, 12rem); line-height: 0.95;
  letter-spacing: 0.02em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(150, 160, 255, 0.22);
  transition: 0.5s ease;
  user-select: none;
}
.footer-mega:hover .footer-word {
  background: var(--grad-3); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1.5px transparent;
  filter: drop-shadow(0 0 40px rgba(124, 92, 255, 0.35));
}

.foot-grid {
  max-width: 1340px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.4rem;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad);
}
.foot-brand .muted { margin-top: 1.1rem; }
.muted { color: var(--faint); font-size: 0.88rem; }
.foot-grid h5 {
  font-size: 0.62rem; letter-spacing: 0.26em; color: var(--cyan);
  margin-bottom: 1.1rem; font-weight: 500;
}
.foot-grid nav { display: grid; align-content: start; gap: 0.65rem; }
.foot-grid nav a { color: var(--dim); font-size: 0.92rem; transition: 0.2s; width: fit-content; }
.foot-grid nav a:hover { color: var(--ink); translate: 4px 0; }
.foot-hazard { color: var(--haz) !important; }
.foot-mail { margin-top: 0.8rem; font-size: 0.74rem !important; }

.foot-bottom {
  max-width: 1340px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.4rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.64rem; letter-spacing: 0.2em; color: var(--faint);
}
.foot-made { display: inline-flex; align-items: center; gap: 0.7rem; }

/* ---------- Reveal (hidden only when JS is running) ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); filter: blur(4px); transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease; }
html.js .reveal.in { opacity: 1; transform: none; filter: none; }
html.static .reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }

.bp-m { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { gap: 1.1rem; }
  .nl-num { display: none; }
  .nav-status { display: none; }
}

@media (max-width: 900px) {
  .sector-grid { grid-template-columns: repeat(2, 1fr); }
  .quest-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .quest-head { grid-template-columns: 2.6rem 1fr 2.4rem; }
  .quest-tags { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hud { display: none; }
}

@media (max-width: 760px) {
  .nav { gap: 0.8rem; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .nav-links {
    position: fixed; inset: 0; z-index: 205;
    background:
      radial-gradient(900px 480px at 88% -8%, rgba(124, 92, 255, 0.2), transparent 60%),
      radial-gradient(700px 480px at 8% 108%, rgba(34, 211, 238, 0.13), transparent 60%),
      #06060f;
    flex-direction: column; justify-content: center; align-items: stretch;
    gap: 0;
    padding: calc(var(--nav-h) + 0.5rem) 1.6rem 2.2rem;
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
  }
  .nav-links.open { opacity: 1; visibility: visible; }

  .nav-links a {
    font-size: clamp(1.5rem, 7vw, 2rem);
    font-family: var(--font-d); font-weight: 800; color: var(--ink);
    width: 100%; padding: 0.6em 0.1em;
    border-bottom: 1px solid var(--line);
    display: flex; align-items: baseline; gap: 1rem;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease, color 0.2s;
  }
  .nav-links.open a { opacity: 1; transform: none; }
  .nav-links.open a:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open a:nth-child(2) { transition-delay: 0.1s; }
  .nav-links.open a:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open a:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.open a:nth-child(5) { transition-delay: 0.25s; }
  .nav-links.open a:nth-child(6) { transition-delay: 0.3s; }
  .nav-links.open a:nth-child(7) { transition-delay: 0.35s; }
  .nav-links.open a:nth-child(8) { transition-delay: 0.4s; }
  .nav-links a:active { color: var(--cyan); }
  .nav-links .nl-num { display: inline; font-size: 0.66rem; color: var(--cyan); min-width: 1.6em; }

  .nav-links .m-only { display: flex; }
  .nav-hazard {
    margin-top: 1.4rem;
    border: 1px dashed rgba(255, 179, 0, 0.55) !important; border-radius: 8px;
    justify-content: center; align-items: center !important;
    font-size: 1.05rem !important; padding: 0.85em !important;
    border-bottom-style: dashed !important;
  }
  .menu-foot {
    display: flex; align-items: center; justify-content: center; gap: 0.7rem;
    margin-top: 1.6rem;
    font-size: 0.66rem; letter-spacing: 0.2em; color: var(--faint);
    opacity: 0; transition: opacity 0.45s 0.45s;
  }
  .nav-links.open .menu-foot { opacity: 1; }
  .bp-m { display: inline; }
  .contact-form .row { grid-template-columns: 1fr; }
  .hero-meta { gap: 0.8rem; flex-direction: column; }
  .mega { font-size: clamp(1.9rem, 9.4vw, 4.4rem); }
  .hero-badge { white-space: normal; line-height: 1.8; max-width: 92vw; }
  .quest-title { font-size: clamp(1.3rem, 7vw, 2.2rem); }
}

@media (max-width: 520px) {
  .sector-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .route-card { flex-basis: 84vw; }
}

/* ---------- 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; filter: none; }
  .marquee-track { animation: none; }
}
