/* ==========================================================================
   PROJECT_CHIMERA // NEO TOKYO 204X — STYLESHEET
   コンセプト: ネオ・ノワール・グリッチウェーブ
   ========================================================================== */

/* ---------- 1. 変数 & リセット ---------- */
:root {
  /* カラーパレット */
  --bg: #05060f;            /* ディープブラック */
  --bg-2: #0a0d24;          /* ミッドナイトブルー */
  --bg-3: #120a2e;          /* ダークパープル */
  --cyan: #00fff7;          /* エレクトリックシアン */
  --pink: #ff2a6d;          /* サイバーピンク */
  --purple: #8a2be2;        /* ネオンパープル */
  --green: #39ff14;         /* ネオングリーン */
  --yellow: #fff500;        /* ブライトイエロー */
  --white: #eef2ff;         /* ホワイト */
  --gray: #6b7280;          /* シルバーグレイ */
  --dim: rgba(238, 242, 255, 0.55);

  /* タイポグラフィ */
  --font-head: 'Orbitron', 'Noto Sans JP', sans-serif;
  --font-sub: 'Rajdhani', 'Noto Sans JP', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;

  /* グロー */
  --glow-cyan: 0 0 8px rgba(0, 255, 247, .8), 0 0 32px rgba(0, 255, 247, .35);
  --glow-pink: 0 0 8px rgba(255, 42, 109, .8), 0 0 32px rgba(255, 42, 109, .35);

  --nav-h: 72px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sub);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .04em;
  overflow-x: hidden;
  min-height: 100vh;
}

body.loading { overflow: hidden; }

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

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

/* フォーカス（アクセシビリティ） */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* スクロールバー */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyan), var(--purple));
  border-radius: 0;
  border: 2px solid var(--bg);
}

/* ---------- 2. 共通コンテナ ---------- */
.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.section { position: relative; padding: 130px 0; }

.section-head { margin-bottom: 72px; position: relative; }

.section-index {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .35em;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0,255,247,.6);
  display: inline-block;
  margin-bottom: 18px;
}

.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.head-line {
  margin-top: 28px;
  height: 2px;
  width: 180px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  position: relative;
}
.head-line::after {
  content: '';
  position: absolute;
  right: 0; top: -3px;
  width: 8px; height: 8px;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: rotate(45deg);
}

.accent { color: var(--cyan); text-shadow: 0 0 18px rgba(0,255,247,.7); }
.accent.pink { color: var(--pink); text-shadow: var(--glow-pink); }

/* ---------- 3. 画面エフェクト ---------- */
.fx-scanlines {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1200;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 2px,
    rgba(0, 0, 0, .12) 2px, rgba(0, 0, 0, .12) 4px
  );
  mix-blend-mode: overlay;
  opacity: .55;
  animation: scan-move 8s linear infinite;
}
@keyframes scan-move {
  from { background-position: 0 0; }
  to   { background-position: 0 4px; }
}

.fx-noise {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1199;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  animation: noise-shift .6s steps(4) infinite;
}
@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

.fx-vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1198;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ---------- 4. 背景パーティクル ---------- */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 5. カスタムカーソル ---------- */
@media (pointer: fine) {
  body, a, button { cursor: none; }
}

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 2000;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(0, 255, 247, .7);
  transition: width .25s var(--ease-out), height .25s var(--ease-out),
              border-color .25s, opacity .3s;
}

.cursor-ring.is-hover {
  width: 60px; height: 60px;
  border-color: var(--pink);
  border-radius: 4px;
  box-shadow: var(--glow-pink);
}

html.has-cursor .cursor-dot,
html.has-cursor .cursor-ring { opacity: 1; }

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- 6. ローディング / 起動シーケンス ---------- */
#loader {
  position: fixed; inset: 0;
  z-index: 3000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .7s var(--ease-out), visibility .7s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-core { text-align: center; width: min(560px, 88vw); }

.loader-logo {
  font-family: var(--font-head);
  font-size: 20px;
  letter-spacing: .5em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 36px;
  animation: logo-flicker 2.4s linear infinite;
}
@keyframes logo-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: .4; }
  94% { opacity: 1; }
  96% { opacity: .6; }
  97% { opacity: 1; }
}

.loader-spinner {
  width: 64px; height: 64px;
  margin: 0 auto 36px;
  border: 2px solid rgba(0,255,247,.15);
  border-top-color: var(--cyan);
  border-right-color: var(--pink);
  transform: rotate(0deg);
  animation: spin 1.4s linear infinite;
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-terminal {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
  text-align: left;
  min-height: 150px;
  white-space: pre-wrap;
  letter-spacing: .08em;
}
.loader-terminal .ok { color: var(--green); }
.loader-terminal .warn { color: var(--yellow); }

.loader-bar {
  margin-top: 24px;
  height: 3px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
#loader-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 12px rgba(0,255,247,.8);
  transition: width .2s linear;
}

/* ---------- 7. スクロールプログレス ---------- */
#progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1500;
  background: transparent;
  pointer-events: none;
}
#progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--purple));
  box-shadow: 0 0 12px rgba(0,255,247,.7);
}

/* ---------- 8. ナビゲーション ---------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: linear-gradient(180deg, rgba(5,6,15,.92), rgba(5,6,15,.65) 70%, transparent);
  backdrop-filter: blur(8px);
  transition: background .3s;
}

.nav-inner {
  width: min(1400px, 94vw);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .25em;
  color: var(--white);
  transition: color .25s;
}
.nav-logo:hover { color: var(--cyan); text-shadow: var(--glow-cyan); }
.logo-mark { color: var(--pink); text-shadow: var(--glow-pink); }
.logo-dot { color: var(--cyan); animation: caret-blink 1s steps(1) infinite; }
.logo-accent { color: var(--cyan); }
@keyframes caret-blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 38px; }

.nav-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .25em;
  color: var(--dim);
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  position: relative;
  transition: color .25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  transition: width .3s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--cyan); text-shadow: 0 0 10px rgba(0,255,247,.6); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links .nl-idx { color: var(--pink); font-size: 10px; }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .2em;
  color: var(--cyan);
  border: 1px solid rgba(0,255,247,.5);
  padding: 9px 18px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background .25s, box-shadow .25s;
}
.nav-cta:hover {
  background: rgba(0,255,247,.12);
  box-shadow: var(--glow-cyan);
}

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(0,255,247,.7);
  transition: transform .3s var(--ease-out), opacity .3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* モバイルメニュー */
.mobile-menu {
  position: fixed; inset: 0;
  z-index: 999;
  background: rgba(5,6,15,.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease-out), visibility .4s;
  backdrop-filter: blur(6px);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { text-align: center; display: flex; flex-direction: column; gap: 30px; }
.mobile-menu a {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: .2em;
  color: var(--white);
  display: inline-block;
  transition: color .25s;
}
.mobile-menu a span { color: var(--pink); font-size: 12px; margin-right: 12px; font-family: var(--font-mono); }
.mobile-menu a:hover { color: var(--cyan); text-shadow: var(--glow-cyan); }
.mobile-menu .mm-cta {
  color: var(--cyan);
  border: 1px solid var(--cyan);
  padding: 14px 34px;
  font-size: 18px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.mm-status { font-family: var(--font-mono); font-size: 12px; letter-spacing: .3em; color: var(--green); }

/* ---------- 9. サウンドトグル ---------- */
.sound-toggle {
  position: fixed;
  left: 20px; bottom: 20px;
  z-index: 1100;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--dim);
  border: 1px solid rgba(255,255,255,.15);
  padding: 8px 14px;
  background: rgba(5,6,15,.7);
  backdrop-filter: blur(4px);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: color .25s, border-color .25s, box-shadow .25s;
}
.sound-toggle .st-state { color: var(--gray); margin-left: 6px; }
.sound-toggle.on { color: var(--cyan); border-color: rgba(0,255,247,.6); }
.sound-toggle.on .st-state { color: var(--green); }
.sound-toggle:hover { box-shadow: 0 0 16px rgba(0,255,247,.3); }

/* ---------- 10. HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 80px;
}

#matrix-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .5;
}

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,255,247,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,247,.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  animation: grid-pan 18s linear infinite;
}
@keyframes grid-pan {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 60px, 60px 0; }
}

.hero::before {
  content: '';
  position: absolute;
  width: 70vw; height: 70vw;
  top: -20vw; right: -25vw;
  background: radial-gradient(circle, rgba(138,43,226,.25), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 55vw; height: 55vw;
  bottom: -30vw; left: -20vw;
  background: radial-gradient(circle, rgba(0,255,247,.16), transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1100px, 90vw);
  margin-inline: auto;
  padding-top: 20px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: .35em;
  color: var(--green);
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag-blink { animation: caret-blink 1s steps(1) infinite; color: var(--cyan); }

.hero h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1.18;
  letter-spacing: .1em;
  margin-bottom: 34px;
  text-transform: uppercase;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--dim);
  max-width: 560px;
  margin-bottom: 48px;
  letter-spacing: .12em;
}
.hero-sub strong {
  color: var(--white);
  font-family: var(--font-mono);
  letter-spacing: .2em;
  text-shadow: 0 0 14px rgba(0,255,247,.8);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 70px; }

.hero-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 42px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--dim);
}
.hero-hud .hud-k { color: var(--gray); margin-right: 10px; }
.hero-hud .hud-v { color: var(--white); }
.hero-hud .hud-v.ok { color: var(--green); text-shadow: 0 0 10px rgba(57,255,20,.6); }
.hero-hud li { position: relative; }
.hero-hud li::before {
  content: '▸';
  color: var(--cyan);
  margin-right: 8px;
  font-size: 9px;
}

/* 縦書きサイドHUD */
.hero-side {
  position: absolute;
  right: 24px; top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .35em;
  color: var(--gray);
  writing-mode: vertical-rl;
  user-select: none;
}
.hero-side .side-sep { color: var(--pink); animation: caret-blink 1s steps(1) infinite; }

/* スクロールインジケータ */
.hero-scroll {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .5em;
  color: var(--dim);
  transition: color .25s;
}
.hero-scroll:hover { color: var(--cyan); }
.hs-line {
  width: 1px; height: 56px;
  background: linear-gradient(var(--cyan), transparent);
  overflow: hidden;
  position: relative;
}
.hs-line::after {
  content: '';
  position: absolute; top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--white);
  box-shadow: 0 0 8px var(--cyan);
  animation: line-fall 1.6s var(--ease-out) infinite;
}
@keyframes line-fall {
  from { top: -50%; }
  to   { top: 110%; }
}

/* HUDコーナー */
.hero-corner {
  position: absolute;
  width: 46px; height: 46px;
  z-index: 2;
  pointer-events: none;
}
.c-tl { top: var(--nav-h); left: 18px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.c-tr { top: var(--nav-h); right: 18px; border-top: 2px solid var(--pink); border-right: 2px solid var(--pink); }
.c-bl { bottom: 18px; left: 18px; border-bottom: 2px solid var(--pink); border-left: 2px solid var(--pink); }
.c-br { bottom: 18px; right: 18px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }

/* グリッチタイトル */
.glitch { position: relative; color: var(--white); text-shadow: 0 0 30px rgba(0,255,247,.25); }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: pre;
  text-align: inherit;
}
.glitch::before {
  color: var(--pink);
  z-index: -1;
  animation: glitch-a 3.2s infinite steps(1);
  text-shadow: -3px 0 var(--pink);
}
.glitch::after {
  color: var(--cyan);
  z-index: -2;
  animation: glitch-b 2.7s infinite steps(1);
  text-shadow: 3px 0 var(--cyan);
}
@keyframes glitch-a {
  0%, 7% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 1; }
  8%, 9% { transform: translate(-4px, 2px); clip-path: inset(10% 0 60% 0); }
  10%, 11% { transform: translate(3px, -1px); clip-path: inset(55% 0 8% 0); }
  12%, 26% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 1; }
  27%, 28% { transform: translate(-3px, 0); clip-path: inset(30% 0 40% 0); opacity: .8; }
  29%, 30% { transform: translate(4px, 1px); clip-path: inset(70% 0 5% 0); }
  31%, 60% { transform: translate(0); opacity: 1; }
  61%, 62% { transform: translate(2px, -2px); clip-path: inset(15% 0 70% 0); opacity: .6; }
  63%, 100% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes glitch-b {
  0%, 9% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 1; }
  10%, 11% { transform: translate(4px, -2px); clip-path: inset(60% 0 12% 0); opacity: .9; }
  12%, 13% { transform: translate(-4px, 1px); clip-path: inset(5% 0 80% 0); }
  14%, 30% { transform: translate(0); opacity: 1; }
  31%, 32% { transform: translate(-2px, 2px); clip-path: inset(40% 0 30% 0); opacity: .7; }
  33%, 34% { transform: translate(5px, -1px); clip-path: inset(80% 0 3% 0); }
  35%, 100% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 1; }
}

/* ---------- 11. ボタン ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .28em;
  padding: 18px 34px;
  text-transform: uppercase;
  overflow: hidden;
  transition: color .3s, background .3s, box-shadow .3s, border-color .3s;
  will-change: transform;
}

.btn-primary {
  color: var(--bg);
  background: linear-gradient(120deg, var(--cyan), #00aaff);
  border: 1px solid var(--cyan);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: 0 0 24px rgba(0,255,247,.4), inset 0 0 24px rgba(255,255,255,.15);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-25deg);
  animation: btn-sweep 3.2s var(--ease-out) infinite;
}
@keyframes btn-sweep {
  0%, 55% { left: -80%; }
  85%, 100% { left: 130%; }
}
.btn-primary:hover {
  box-shadow: 0 0 48px rgba(0,255,247,.85), inset 0 0 32px rgba(255,255,255,.25);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--pink);
  border: 1px solid rgba(255,42,109,.6);
  background: transparent;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.btn-ghost::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(255,42,109,.12) 4px, rgba(255,42,109,.12) 5px);
  opacity: 0;
  transition: opacity .25s;
}
.btn-ghost:hover { background: rgba(255,42,109,.1); box-shadow: var(--glow-pink); }
.btn-ghost:hover::before { opacity: 1; }

.btn-lg { font-size: 16px; padding: 22px 46px; }
.btn-caret { animation: caret-blink 1s steps(1) infinite; }

/* グリッチボタン */
.glitch-btn { position: relative; }
.glitch-btn:hover { animation: btn-glitch .45s steps(2) infinite; }
@keyframes btn-glitch {
  0% { transform: translate(0); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
  25% { transform: translate(-3px, 1px); }
  50% { transform: translate(2px, -1px); clip-path: polygon(14px 0, 100% 0, 100% 92%, 96% 100%, 0 100%, 0 14px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(0); }
}

/* ---------- 12. マーキー ---------- */
.marquee {
  border-top: 1px solid rgba(0,255,247,.25);
  border-bottom: 1px solid rgba(0,255,247,.25);
  padding: 16px 0;
  overflow: hidden;
  background: rgba(0,255,247,.03);
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .4em;
  color: var(--dim);
  white-space: nowrap;
  padding-right: 8px;
}
.marquee-track span::selection { background: transparent; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- 13. イントロ / ターミナル ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}

.terminal {
  background: rgba(5, 10, 25, .85);
  border: 1px solid rgba(0,255,247,.25);
  box-shadow: 0 0 40px rgba(0,255,247,.08), inset 0 0 60px rgba(0,255,247,.04);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  position: relative;
  overflow: hidden;
}
.terminal::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(rgba(0,255,247,.05) 1px, transparent 1px);
  background-size: 100% 4px;
  pointer-events: none;
  animation: scan-move 6s linear infinite;
  opacity: .5;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(0,255,247,.15);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.rd { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.t-dot.yl { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.t-dot.gn { background: var(--green); box-shadow: 0 0 8px var(--green); }
.term-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  margin-left: 10px;
  letter-spacing: .12em;
}

.term-body {
  padding: 22px 24px;
  min-height: 240px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 2;
  color: var(--white);
  letter-spacing: .06em;
}
.term-line { animation: term-in .5s var(--ease-out) both; }
@keyframes term-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.t-prompt { color: var(--green); }
.t-cmd { color: var(--white); }
.t-out { color: var(--dim); }
.t-out .accent { color: var(--cyan); }
.term-cursor {
  display: inline-block;
  width: 9px; height: 16px;
  background: var(--cyan);
  vertical-align: middle;
  animation: caret-blink 1s steps(1) infinite;
  box-shadow: 0 0 8px var(--cyan);
}

.term-code {
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--white);
  overflow-x: auto;
  letter-spacing: .04em;
}
.term-code .tk { color: var(--pink); }
.term-code .tv { color: var(--cyan); }
.term-code .tv.ok { color: var(--green); }

/* イントロコピー */
.intro-copy p { margin-bottom: 22px; color: var(--dim); }
.copy-lead { font-size: 1.35rem; color: var(--white) !important; font-weight: 600; line-height: 1.6; }
.copy-lead em { color: var(--pink); font-style: normal; text-shadow: var(--glow-pink); }
.copy-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow) !important;
  letter-spacing: .2em;
  border-left: 2px solid var(--yellow);
  padding-left: 14px;
  animation: warn-pulse 2s ease-in-out infinite;
}
@keyframes warn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* ---------- 14. フィーチャーカード ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.feature-card {
  position: relative;
  padding: 40px 36px;
  background: linear-gradient(160deg, rgba(10,13,36,.9), rgba(18,10,46,.7));
  border: 1px solid rgba(0,255,247,.18);
  transition: border-color .35s, box-shadow .35s, transform .35s;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  transform-style: preserve-3d;
  will-change: transform;
}
.feature-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,255,247,.09), transparent 40%, transparent 60%, rgba(255,42,109,.09));
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.feature-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.feature-card:hover {
  border-color: rgba(0,255,247,.55);
  box-shadow: 0 0 44px rgba(0,255,247,.16), inset 0 0 44px rgba(0,255,247,.05);
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover::after { transform: scaleX(1); }
.feature-card:hover .fc-icon { color: var(--cyan); filter: drop-shadow(0 0 14px rgba(0,255,247,.9)); }
.feature-card:hover .fc-icon svg { transform: scale(1.1) rotate(3deg); }

.fc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
}
.fc-icon { width: 64px; height: 64px; color: var(--pink); transition: color .35s, filter .35s; }
.fc-icon svg { transition: transform .4s var(--ease-out); }
.fc-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--gray);
  border: 1px solid rgba(255,255,255,.12);
  padding: 5px 10px;
}

.feature-card h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  letter-spacing: .14em;
  margin-bottom: 6px;
}
.fc-en {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0,255,247,.5);
  margin-bottom: 18px;
}
.fc-desc { color: var(--dim); font-size: 15px; }
.fc-desc strong { color: var(--yellow); }

.fc-spec {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.fc-spec > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .3em;
  color: var(--gray);
}
.spec-bar {
  height: 4px;
  background: rgba(255,255,255,.08);
  position: relative;
  overflow: hidden;
}
.spec-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 10px rgba(0,255,247,.7);
  transition: width 1.2s var(--ease-out);
}

/* ---------- 15. アーキテクチャ ---------- */
.arch-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}

.arch-spec { border: 1px solid rgba(255,42,109,.2); padding: 40px 36px; position: relative; }
.arch-spec::before {
  content: '//';
  position: absolute; top: -11px; left: 20px;
  background: var(--bg);
  color: var(--pink);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0 8px;
  letter-spacing: .3em;
}
.arch-spec h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: .2em;
  color: var(--pink);
  margin-bottom: 30px;
}

.spec-list { display: flex; flex-direction: column; gap: 22px; }
.spec-list li {
  display: grid;
  grid-template-columns: 130px 1fr 54px;
  align-items: center;
  gap: 16px;
}
.sl-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--dim);
}
.sl-bar {
  height: 6px;
  background: rgba(255,255,255,.07);
  position: relative;
  overflow: hidden;
}
.sl-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 12px rgba(255,42,109,.6);
  transition: width 1.4s var(--ease-out);
}
.sl-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  text-align: right;
}
.arch-note {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--green);
  border-top: 1px dashed rgba(57,255,20,.3);
  padding-top: 20px;
}

/* ---------- 16. タイムライン ---------- */
.timeline { position: relative; padding-left: 0; }

.timeline::before {
  content: '';
  position: absolute;
  left: 27px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), var(--pink));
  opacity: .5;
  box-shadow: 0 0 18px rgba(0,255,247,.4);
}

.tl-node {
  position: relative;
  padding: 0 0 64px 96px;
}
.tl-node:last-child { padding-bottom: 0; }

.tl-marker {
  position: absolute;
  left: 0; top: 6px;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border: 1px solid rgba(0,255,247,.4);
  transform: rotate(45deg);
}
.tl-dot {
  width: 14px; height: 14px;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: rotate(45deg);
}

.tl-card {
  position: relative;
  padding: 30px 34px;
  background: rgba(10,13,36,.6);
  border: 1px solid rgba(255,255,255,.08);
  border-left: 2px solid var(--cyan);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.tl-card:hover {
  border-left-color: var(--pink);
  box-shadow: -8px 8px 30px rgba(0,0,0,.4), 0 0 30px rgba(255,42,109,.12);
  transform: translateX(6px);
}

.tl-phase {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .3em;
  color: var(--purple);
  display: block;
  margin-bottom: 10px;
}
.tl-card h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.tl-card p { color: var(--dim); font-size: 15px; margin-bottom: 16px; }
.tl-card em { color: var(--cyan); font-style: normal; }

.tl-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--gray);
}
.tl-status.done { color: var(--green); text-shadow: 0 0 8px rgba(57,255,20,.5); }
.tl-status.now {
  color: var(--yellow);
  animation: warn-pulse 1.4s ease-in-out infinite;
}

/* ---------- 17. CTAセクション ---------- */
.cta-section {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(138,43,226,.2), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(0,255,247,.08), transparent 70%);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.cta-panel {
  text-align: center;
  width: min(760px, 92vw);
  padding: 70px 40px;
  border: 1px solid rgba(0,255,247,.25);
  background: rgba(5,6,15,.6);
  box-shadow: 0 0 80px rgba(0,255,247,.07), inset 0 0 80px rgba(0,255,247,.03);
  clip-path: polygon(28px 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%, 0 28px);
  position: relative;
}
.cta-panel::before, .cta-panel::after {
  content: '';
  position: absolute;
  width: 34px; height: 34px;
}
.cta-panel::before { top: 12px; left: 12px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.cta-panel::after { bottom: 12px; right: 12px; border-bottom: 2px solid var(--pink); border-right: 2px solid var(--pink); }

.cta-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .4em;
  color: var(--pink);
  display: block;
  margin-bottom: 22px;
}

.cta-panel h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: .12em;
  margin-bottom: 18px;
}
.cta-lead { color: var(--dim); margin-bottom: 48px; letter-spacing: .15em; }

/* カウントダウン */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}
.cd-box {
  width: 104px;
  padding: 20px 8px;
  background: rgba(10,13,36,.8);
  border: 1px solid rgba(0,255,247,.3);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.cd-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: .1em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  font-variant-numeric: tabular-nums;
}
.cd-unit {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .35em;
  color: var(--gray);
  margin-top: 8px;
}
.cd-sep {
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--pink);
  text-shadow: var(--glow-pink);
  animation: caret-blink 1s steps(1) infinite;
  align-self: center;
  padding-bottom: 18px;
}

.cta-note {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--dim);
}
.note-warn { color: var(--yellow); margin-right: 6px; }
.cta-small {
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray);
  font-family: var(--font-mono);
  letter-spacing: .08em;
}

/* ---------- 18. フッター ---------- */
#footer {
  padding: 60px 0 30px;
  border-top: 1px solid rgba(0,255,247,.15);
  background: linear-gradient(180deg, var(--bg), #03040a);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 44px;
}
.footer-logo {
  font-family: var(--font-head);
  letter-spacing: .3em;
  font-size: 15px;
  color: var(--white);
}
.footer-logo .logo-mark { color: var(--pink); }

.footer-links { display: flex; gap: 30px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .18em;
  color: var(--dim);
  transition: color .25s;
  position: relative;
}
.footer-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease-out);
}
.footer-links a:hover { color: var(--cyan); }
.footer-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.15);
  color: var(--dim);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: color .25s, border-color .25s, box-shadow .25s;
}
.footer-social a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  color: var(--gray);
}
.footer-mono { margin-top: 8px; color: rgba(107,114,128,.6) !important; }

/* ---------- 19. スクロールリビール ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--rd, 0s);
  will-change: opacity, transform;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* フェードイン遅延ヘルパー */
.js .reveal.d1 { --rd: .1s; }
.js .reveal.d2 { --rd: .2s; }
.js .reveal.d3 { --rd: .3s; }

/* ---------- 20. レスポンシブ ---------- */
@media (max-width: 1024px) {
  .hero-side { display: none; }
  .hero-hud { gap: 8px 24px; }
}

@media (max-width: 900px) {
  .section { padding: 90px 0; }
  .intro-grid, .arch-grid { grid-template-columns: 1fr; gap: 48px; }
  .features-grid { grid-template-columns: 1fr; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .tl-node { padding-left: 76px; }
  .tl-marker { width: 44px; height: 44px; }
  .timeline::before { left: 21px; }
  .spec-list li { grid-template-columns: 110px 1fr 50px; gap: 10px; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .hero { padding-bottom: 100px; }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .section-head h2 { letter-spacing: .06em; }
  .hero-hud { font-size: 10.5px; gap: 8px 16px; }
  .hero-hud li::before { display: none; }
  .cd-box { width: 76px; padding: 14px 4px; }
  .cd-num { font-size: 1.7rem; }
  .countdown { gap: 10px; }
  .cta-panel { padding: 46px 22px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .feature-card { padding: 30px 24px; }
  .br-sp { display: block; }
  .sound-toggle { left: 12px; bottom: 12px; padding: 6px 10px; font-size: 10.5px; }
  .hero-corner { display: none; }
}

/* ---------- 21. モーション軽減 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
