/* ============================================================
   PROJECT: CHIMERA — NEO NOIR GLITCHWAVE STYLESHEET
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Base palette */
  --bg-deep: #030308;
  --bg-mid: #08081a;
  --bg-purple: #12082a;
  --bg-panel: rgba(16, 12, 40, 0.55);

  /* Neon accents */
  --neon-cyan: #00f0ff;
  --neon-pink: #ff2df7;
  --neon-green: #39ff14;
  --neon-blue: #4d7fff;

  /* Sub accents */
  --gray-dim: #6a6a7c;
  --gray-mid: #9a9ab0;
  --white: #eef3ff;

  /* Glows */
  --glow-cyan: 0 0 4px rgba(0, 240, 255, 0.65), 0 0 12px rgba(0, 240, 255, 0.35), 0 0 32px rgba(0, 240, 255, 0.15);
  --glow-pink: 0 0 4px rgba(255, 45, 247, 0.65), 0 0 12px rgba(255, 45, 247, 0.35), 0 0 32px rgba(255, 45, 247, 0.15);

  /* Typography */
  --font-display: 'Orbitron', 'Segoe UI', sans-serif;
  --font-body: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-mono: 'Share Tech Mono', 'Consolas', monospace;

  /* Layout */
  --header-h: 72px;
  --container-w: 1180px;
  --space-section: clamp(96px, 14vh, 160px);

  /* Misc */
  --border-neon: 1px solid rgba(0, 240, 255, 0.35);
  --transition: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--neon-cyan) var(--bg-deep);
}

html.no-js .overlay-noise,
html.no-js .overlay-scanlines,
html.no-js #fxCanvas {
  display: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: rgba(0, 240, 255, 0.3);
  color: var(--white);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-blue));
  border-radius: 0;
  border: 2px solid var(--bg-deep);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   FIXED OVERLAYS
   ============================================================ */
#fxCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.overlay-scanlines {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 3px,
    transparent 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.overlay-noise {
  position: fixed;
  inset: -100px;
  z-index: 91;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 0.6s steps(4) infinite;
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-20px, 12px); }
  50% { transform: translate(15px, -18px); }
  75% { transform: translate(-12px, -8px); }
  100% { transform: translate(0, 0); }
}

.overlay-vignette {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: -50px;
  left: -50px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(0, 0);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 240, 255, 0.7);
  transition: width 0.25s, height 0.25s, border-color 0.25s, opacity 0.25s;
}

.cursor-ring.is-hover {
  width: 64px;
  height: 64px;
  border-color: var(--neon-pink);
  box-shadow: 0 0 18px rgba(255, 45, 247, 0.3);
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}

/* ============================================================
   PRELOADER (BOOT SEQUENCE)
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot {
  width: min(520px, 88vw);
  font-family: var(--font-mono);
  border: var(--border-neon);
  background: rgba(4, 6, 16, 0.8);
  padding: clamp(24px, 5vw, 44px);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.12), inset 0 0 40px rgba(0, 240, 255, 0.05);
  animation: boot-in 0.4s ease both;
}

.boot::before,
.boot::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--neon-cyan);
  border-style: solid;
}

.boot::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.boot::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

@keyframes boot-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.boot-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 28px;
}

.blink {
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.boot-line {
  color: var(--gray-mid);
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  letter-spacing: 0.05em;
  line-height: 1.9;
}

.boot-line::before {
  content: '>';
  color: var(--neon-green);
  margin-right: 0.3em;
}

.boot-bar {
  margin-top: 28px;
  height: 10px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  padding: 2px;
  overflow: hidden;
}

.boot-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
  box-shadow: 0 0 12px var(--neon-cyan);
  transition: width 0.2s linear;
}

.boot-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--neon-cyan);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  height: var(--header-h);
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(3, 3, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: rgba(0, 240, 255, 0.15);
}

.nav {
  max-width: var(--container-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.nav-logo-bracket {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  margin: 0 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--gray-mid);
  position: relative;
  padding: 6px 2px;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-cyan), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-cta {
  color: var(--neon-pink);
  border: 1px solid rgba(255, 45, 247, 0.5);
  padding: 8px 14px;
  transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: rgba(255, 45, 247, 0.12);
  box-shadow: 0 0 20px rgba(255, 45, 247, 0.25), inset 0 0 10px rgba(255, 45, 247, 0.1);
  color: var(--neon-pink);
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
  z-index: 160;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--neon-cyan);
  margin: 5px auto;
  transition: transform 0.35s ease, opacity 0.35s ease;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.nav-burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
@media (max-width: 900px) {
  .nav-burger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    background: rgba(6, 4, 16, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 1px solid rgba(0, 240, 255, 0.2);
    transform: translateX(105%);
    transition: transform 0.45s cubic-bezier(0.77, 0, 0.18, 1);
    padding: 60px 40px;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1rem;
  }
}

/* ============================================================
   SECTION SHARED
   ============================================================ */
.section {
  position: relative;
  z-index: 2;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--space-section) 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-head {
  margin-bottom: clamp(40px, 6vh, 72px);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: var(--neon-green);
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.6vw, 3.4rem);
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--white);
  position: relative;
  display: inline-block;
}

.section-line {
  margin-top: 20px;
  width: clamp(120px, 18vw, 220px);
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.section-line span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--neon-cyan), transparent);
  animation: line-scan 2.8s ease-in-out infinite;
}

@keyframes line-scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Glitch effect ---------- */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 0 0 0);
  pointer-events: none;
}

.glitch::before {
  color: var(--neon-pink);
  transform: translate(-2px, 0);
  animation: glitch-shift-a 3.2s infinite steps(2, jump-none);
}

.glitch::after {
  color: var(--neon-cyan);
  transform: translate(2px, 0);
  animation: glitch-shift-b 2.7s infinite steps(2, jump-none);
}

@keyframes glitch-shift-a {
  0%, 91% { clip-path: inset(0 0 100% 0); transform: translate(0, 0); }
  92% { clip-path: inset(10% 0 60% 0); transform: translate(-4px, -2px); }
  94% { clip-path: inset(60% 0 10% 0); transform: translate(4px, 2px); }
  96% { clip-path: inset(30% 0 40% 0); transform: translate(-3px, 1px); }
  98% { clip-path: inset(80% 0 5% 0); transform: translate(3px, -1px); }
  100% { clip-path: inset(0 0 100% 0); }
}

@keyframes glitch-shift-b {
  0%, 88% { clip-path: inset(100% 0 0 0); transform: translate(0, 0); }
  90% { clip-path: inset(50% 0 20% 0); transform: translate(4px, 1px); }
  92% { clip-path: inset(10% 0 70% 0); transform: translate(-4px, -2px); }
  94% { clip-path: inset(70% 0 5% 0); transform: translate(3px, 2px); }
  96% { clip-path: inset(40% 0 40% 0); transform: translate(-2px, -1px); }
  100% { clip-path: inset(100% 0 0 0); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  letter-spacing: 0.14em;
  padding: 16px 34px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
  border: none;
  background: none;
  color: var(--white);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.btn-primary {
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15), inset 0 0 12px rgba(0, 240, 255, 0.06);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.btn-primary::before {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(77, 127, 255, 0.12));
}

.btn-primary:hover {
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.5), inset 0 0 20px rgba(0, 240, 255, 0.2);
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--gray-mid);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.btn-ghost:hover {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  text-shadow: 0 0 8px rgba(255, 45, 247, 0.7);
  box-shadow: 0 0 20px rgba(255, 45, 247, 0.2);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  background:
    radial-gradient(ellipse 70% 50% at 70% 20%, rgba(77, 127, 255, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(255, 45, 247, 0.09), transparent),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 50%, var(--bg-deep) 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(700px) rotateX(55deg) scale(1.6);
  transform-origin: center 100%;
  opacity: 0.7;
  animation: grid-move 6s linear infinite;
}

@keyframes grid-move {
  from { background-position: 0 0; }
  to { background-position: 0 64px; }
}

/* Orbit rings */
.hero-orbit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 50%;
}

.orbit-ring.o1 {
  width: min(720px, 85vw);
  height: min(720px, 85vw);
  animation: orbit-spin 40s linear infinite;
}

.orbit-ring.o1::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--neon-cyan);
}

.orbit-ring.o2 {
  width: min(520px, 65vw);
  height: min(520px, 65vw);
  border-color: rgba(255, 45, 247, 0.1);
  animation: orbit-spin 28s linear infinite reverse;
}

.orbit-ring.o2::before {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 30%;
  width: 6px;
  height: 6px;
  background: var(--neon-pink);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--neon-pink);
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  max-width: 980px;
}

.hero-statusline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.4vw, 0.78rem);
  letter-spacing: 0.18em;
  color: var(--neon-green);
  border: 1px solid rgba(57, 255, 20, 0.3);
  background: rgba(57, 255, 20, 0.05);
  padding: 8px 16px;
  margin-bottom: 30px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--neon-green);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 8px var(--neon-green);
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6.4vw, 5rem);
  line-height: 1.25;
  letter-spacing: 0.1em;
  color: var(--white);
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gray-mid);
  line-height: 1.9;
  margin-bottom: 44px;
}

.hero-sub-accent {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.hero-coords {
  position: absolute;
  bottom: 28px;
  left: 28px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgba(154, 154, 176, 0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 3;
}

.hero-hud-corners .hc {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(0, 240, 255, 0.5);
  border-style: solid;
  z-index: 2;
  opacity: 0.7;
}

.hc-tl { top: calc(var(--header-h) + 16px); left: 16px; border-width: 2px 0 0 2px; }
.hc-tr { top: calc(var(--header-h) + 16px); right: 16px; border-width: 2px 2px 0 0; }
.hc-bl { bottom: 16px; left: 16px; border-width: 0 0 2px 2px; }
.hc-br { bottom: 16px; right: 16px; border-width: 0 2px 2px 0; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.4em;
  color: var(--gray-mid);
}

.scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, var(--neon-cyan));
  position: relative;
  overflow: hidden;
  display: block;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
  animation: scroll-drop 1.8s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

@keyframes scroll-drop {
  0% { top: -50%; }
  100% { top: 120%; }
}

/* ============================================================
   GENESIS SECTION
   ============================================================ */
.genesis {
  background: linear-gradient(180deg, var(--bg-deep), var(--bg-mid));
}

.genesis-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.genesis-text p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 2.1;
  color: var(--gray-mid);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.genesis-text em {
  font-style: normal;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  font-weight: 600;
}

/* Stats */
.genesis-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border: var(--border-neon);
  background: var(--bg-panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 28px 20px;
  position: relative;
}

.genesis-stats::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--neon-cyan);
  border-left: 2px solid var(--neon-cyan);
}

.stat {
  text-align: center;
  padding: 10px 4px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gray-dim);
}

/* ============================================================
   SOLUTION CARDS
   ============================================================ */
.solution {
  background: linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
}

.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(16, 12, 40, 0.7), rgba(6, 6, 16, 0.85));
  padding: 30px 24px;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(120px 120px at 50% 10%, rgba(0, 240, 255, 0.08), transparent);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 26px rgba(0, 240, 255, 0.12);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  margin-bottom: 22px;
  position: relative;
  background: rgba(0, 240, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.card-icon::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--neon-cyan);
  border-right: 1px solid var(--neon-cyan);
  opacity: 0.7;
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card:hover .card-icon {
  color: var(--neon-pink);
  border-color: rgba(255, 45, 247, 0.4);
  box-shadow: 0 0 18px rgba(255, 45, 247, 0.15);
  transition: all 0.4s ease;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 8px;
}

.card-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--neon-green);
  margin-bottom: 14px;
  opacity: 0.8;
}

.card-desc {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--gray-mid);
}

/* ============================================================
   ARCHITECTURE / FLOW + TERMINAL
   ============================================================ */
.architecture {
  background: linear-gradient(180deg, var(--bg-deep), var(--bg-purple));
}

.arch-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: stretch;
}

/* Flow */
.arch-flow {
  display: flex;
  align-items: center;
  gap: 14px;
  border: var(--border-neon);
  background: var(--bg-panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: clamp(20px, 3vw, 36px);
}

.node {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  position: relative;
}

.node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  margin-bottom: 14px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
}

.node-icon svg {
  width: 22px;
  height: 22px;
}

.node h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  color: var(--white);
  margin-bottom: 6px;
}

.node p {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--gray-mid);
  line-height: 1.7;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.node-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--neon-green);
  border: 1px solid rgba(57, 255, 20, 0.3);
  padding: 3px 8px;
  animation: pulse 2s ease-in-out infinite;
}

.link {
  flex: 0 0 44px;
  position: relative;
  height: 2px;
}

.link-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.7), rgba(255, 45, 247, 0.7));
}

.link-pulse {
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: link-travel 1.6s linear infinite;
}

@keyframes link-travel {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

/* Terminal */
.terminal {
  border: 1px solid rgba(57, 255, 20, 0.3);
  background: rgba(3, 8, 5, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  min-height: 280px;
}

.term-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(57, 255, 20, 0.2);
  background: rgba(57, 255, 20, 0.03);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.term-dot.red { background: #ff3b46; box-shadow: 0 0 6px #ff3b46; }
.term-dot.yellow { background: #ffd23f; box-shadow: 0 0 6px #ffd23f; }
.term-dot.green { background: #39ff14; box-shadow: 0 0 6px #39ff14; }

.term-title {
  margin-left: 10px;
  font-size: 0.7rem;
  color: var(--gray-mid);
  letter-spacing: 0.06em;
}

.term-body {
  flex: 1;
  padding: 18px 20px;
  font-size: clamp(0.62rem, 1.4vw, 0.74rem);
  line-height: 1.95;
  color: var(--neon-green);
  overflow: hidden;
}

.term-body .t-line {
  white-space: pre-wrap;
  word-break: break-all;
  opacity: 0;
  animation: term-in 0.3s forwards;
}

.term-body .t-cyan { color: var(--neon-cyan); }
.term-body .t-pink { color: var(--neon-pink); }
.term-body .t-dim { color: var(--gray-dim); }

@keyframes term-in {
  to { opacity: 1; }
}

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--neon-green);
  vertical-align: text-bottom;
  animation: blink 0.8s steps(1) infinite;
}

/* ============================================================
   TIMELINE / PROTOCOL
   ============================================================ */
.protocol {
  background: linear-gradient(180deg, var(--bg-purple), var(--bg-deep));
}

.timeline {
  position: relative;
  max-width: 760px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 1px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink), transparent);
  opacity: 0.6;
}

.tl-item {
  position: relative;
  padding-left: 64px;
  margin-bottom: clamp(40px, 6vh, 64px);
}

.tl-item:last-child {
  margin-bottom: 0;
}

.tl-node {
  position: absolute;
  left: 8px;
  top: 6px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--neon-cyan);
  background: var(--bg-deep);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.tl-active .tl-node {
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px rgba(255, 45, 247, 0.6);
  animation: node-pulse 2s ease-in-out infinite;
}

@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 45, 247, 0.4); }
  50% { box-shadow: 0 0 20px rgba(255, 45, 247, 0.9); }
}

.tl-phase {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--neon-green);
  display: block;
  margin-bottom: 8px;
}

.tl-done .tl-phase { color: var(--gray-dim); }
.tl-active .tl-phase { color: var(--neon-pink); text-shadow: var(--glow-pink); }
.tl-future .tl-phase { color: var(--gray-mid); }

.tl-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 8px;
}

.tl-done .tl-title { color: rgba(238, 243, 255, 0.5); text-decoration: line-through; text-decoration-color: rgba(154, 154, 176, 0.4); }

.tl-desc {
  font-size: 0.98rem;
  color: var(--gray-mid);
  line-height: 1.85;
  margin-bottom: 12px;
}

.tl-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  opacity: 0.8;
}

.tl-active .tl-date {
  color: var(--neon-pink);
}

/* ============================================================
   REGISTER / CTA
   ============================================================ */
.register {
  max-width: none;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 45% at 50% 100%, rgba(255, 45, 247, 0.12), transparent),
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(0, 240, 255, 0.1), transparent),
    var(--bg-deep);
  padding: var(--space-section) 24px;
}

.register-inner {
  width: min(680px, 100%);
  text-align: center;
  border: var(--border-neon);
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 56px);
  position: relative;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.08), 0 30px 60px rgba(0, 0, 0, 0.5);
}

.register-inner::before,
.register-inner::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-style: solid;
}

.register-inner::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
  border-color: var(--neon-cyan);
}

.register-inner::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  border-color: var(--neon-pink);
}

.register-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 18px;
}

.register-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--gray-mid);
  letter-spacing: 0.05em;
  line-height: 1.9;
  margin-bottom: 36px;
}

/* Countdown */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 44px;
  font-family: var(--font-display);
}

.cd-box {
  min-width: 74px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(3, 3, 8, 0.75);
  position: relative;
}

.cd-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--neon-cyan);
  border-left: 1px solid var(--neon-cyan);
}

.cd-num {
  display: block;
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.cd-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  color: var(--gray-dim);
  margin-top: 6px;
}

.cd-sep {
  color: var(--neon-pink);
  font-weight: 700;
  font-size: 1.6rem;
  animation: blink 1.6s steps(1) infinite;
}

/* Form */
.register-form {
  display: grid;
  gap: 20px;
  max-width: 460px;
  margin: 0 auto;
  text-align: left;
}

.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gray-mid);
  margin-bottom: 8px;
}

.form-field input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(3, 3, 8, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form-field input::placeholder {
  color: rgba(154, 154, 176, 0.4);
}

.form-field input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25), inset 0 0 8px rgba(0, 240, 255, 0.06);
}

.form-field input.is-error {
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255, 45, 247, 0.3);
}

.btn-register {
  width: 100%;
  margin-top: 6px;
}

.form-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--neon-green);
  min-height: 1.4em;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.form-note.is-error {
  color: var(--neon-pink);
  text-shadow: 0 0 8px rgba(255, 45, 247, 0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(3, 3, 8, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 44px 24px;
}

.footer-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  font-size: 0.95rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gray-dim);
  order: 3;
  width: 100%;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--gray-mid);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-links a:hover {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gray-mid);
  transition: all 0.3s ease;
}

.social-link svg {
  width: 17px;
  height: 17px;
}

.social-link:hover {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255, 45, 247, 0.3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .arch-grid {
    grid-template-columns: 1fr;
  }

  .genesis-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-coords {
    display: none;
  }

  .hero-hud-corners .hc {
    width: 22px;
    height: 22px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .genesis-stats {
    grid-template-columns: 1fr;
  }

  .arch-flow {
    flex-direction: column;
    gap: 22px;
  }

  .link {
    flex-direction: column;
    flex-basis: auto;
    width: 2px;
    height: 44px;
  }

  .link-line {
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.7), rgba(255, 45, 247, 0.7));
  }

  .link-pulse {
    top: auto;
    left: -3px;
    animation: link-travel-v 1.6s linear infinite;
  }

  @keyframes link-travel-v {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: calc(100% - 8px); opacity: 0; }
  }

  .countdown {
    gap: 8px;
  }

  .cd-box {
    min-width: 60px;
    padding: 10px 4px;
  }

  .footer-inner {
    justify-content: center;
  }

  .tl-item {
    padding-left: 52px;
  }
}

@media (max-width: 420px) {
  .cd-box {
    min-width: 52px;
  }
}

/* ============================================================
   PRIORITY: レイアウトシフト防止でキャンバスを背面固定
   ============================================================ */
main {
  position: relative;
  z-index: 2;
}