:root {
  --bg: #070708;
  --fg: #f5f5f7;
  --muted: #8e8e93;
  --line: rgba(255, 255, 255, 0.12);
  --pad: clamp(24px, 5vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(110, 182, 255, 0.32);
  color: #fff;
}

:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: 4px;
}

a { color: inherit; }

.hairline {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #9b87ff, #6eb6ff 42%, #f0d08a 74%, #ff8b7a);
  pointer-events: none;
}

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: 0 var(--pad) 22px;
  overflow: hidden;
}

.grid,
.glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 70% 42%, #000 8%, transparent 62%);
}

.glow {
  background: radial-gradient(ellipse at 72% 40%, rgba(130, 150, 255, 0.16), rgba(255, 176, 140, 0.05) 36%, transparent 64%);
}

.nav,
.hero,
.panel,
.legal {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  flex: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 600;
}

.brand svg { width: 14px; height: 14px; }

.nav-side {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.16em;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(220px, 1.08fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: 0;
  perspective: 1100px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.display {
  margin: 0;
  font-size: clamp(56px, 6.2vw, 92px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.lead {
  margin: 20px 0 0;
  max-width: 18em;
  color: rgba(245, 245, 247, 0.78);
  font-size: clamp(16px, 1.35vw, 20px);
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.prism-wrap {
  position: relative;
  justify-self: end;
  width: min(500px, 100%);
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease);
}

.hud {
  position: absolute;
  inset: 6% 2% 8% 8%;
  pointer-events: none;
  animation: lock 5.2s ease-in-out infinite;
}

.hud span {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(245, 245, 247, 0.72);
}

.hud span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hud span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hud span:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }

.prism {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(48vh, 440px);
  overflow: visible;
}

.beam { stroke-opacity: 0.22; }

.beam-hot {
  stroke-dasharray: 78 260;
  stroke-dashoffset: 260;
  animation: charge 5.2s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}

.beam-core {
  stroke-dasharray: 170;
  stroke-dashoffset: 170;
  animation: charge-core 5.2s linear infinite;
}

.reticle {
  transform-box: view-box;
  transform-origin: 410px 318px;
  animation: spin 22s linear infinite;
}

.reticle-inner {
  transform-box: view-box;
  transform-origin: 410px 318px;
  animation: spin 14s linear infinite reverse;
}

.lock {
  opacity: 0;
  animation: lock-on 5.2s linear infinite;
}

.sheen { mix-blend-mode: screen; }

.spark {
  fill: none;
  stroke-width: 1.6;
  opacity: 0;
  animation: spark 5.2s linear infinite;
}

.spark-a { stroke: #9b87ff; transform: translate(-4px, 1px); }
.spark-b { stroke: #ff8b7a; transform: translate(4px, -1px); }

.spectrum {
  transform-box: view-box;
  transform-origin: 491px 302px;
  animation: disperse 5.2s ease-in-out infinite;
}

.spectrum line {
  stroke-linecap: round;
  stroke-dasharray: 290;
  stroke-dashoffset: 290;
  animation: fire 5.2s cubic-bezier(0.16, 0.84, 0.24, 1) infinite;
}

.spectrum-glow { filter: url(#glow); }
.spectrum-glow line:nth-child(1),
.spectrum-line line:nth-child(1) { animation-delay: 0.02s; }
.spectrum-glow line:nth-child(2),
.spectrum-line line:nth-child(2) { animation-delay: 0.08s; }
.spectrum-glow line:nth-child(3),
.spectrum-line line:nth-child(3) { animation-delay: 0.14s; }
.spectrum-glow line:nth-child(4),
.spectrum-line line:nth-child(4) { animation-delay: 0.2s; }
.spectrum-glow line:nth-child(5),
.spectrum-line line:nth-child(5) { animation-delay: 0.26s; }

@keyframes charge {
  0% { stroke-dashoffset: 260; opacity: 0; }
  8% { opacity: 1; }
  26% { stroke-dashoffset: 0; opacity: 1; }
  36% { opacity: 0.15; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes charge-core {
  0%, 16% { stroke-dashoffset: 170; opacity: 0; }
  24% { opacity: 1; }
  34% { stroke-dashoffset: 0; opacity: 1; }
  46%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes fire {
  0%, 24% { stroke-dashoffset: 290; opacity: 0; }
  46% { stroke-dashoffset: 0; opacity: 1; }
  74% { stroke-dashoffset: 0; opacity: 0.9; }
  90%, 100% { stroke-dashoffset: -30; opacity: 0; }
}

@keyframes spark {
  0%, 26% { opacity: 0; }
  33% { opacity: 0.95; }
  48%, 100% { opacity: 0; }
}

@keyframes lock {
  0%, 100% { transform: scale(1.05); opacity: 0.28; }
  28% { transform: scale(0.97); opacity: 1; }
  70% { transform: scale(1); opacity: 0.55; }
}

@keyframes lock-on {
  0%, 20% { opacity: 0; }
  28%, 40% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

@keyframes disperse {
  0%, 24% { transform: rotate(0deg); }
  50% { transform: rotate(2.4deg); }
  78% { transform: rotate(-1.2deg); }
  100% { transform: rotate(0deg); }
}

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

.panel {
  flex: none;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1.05fr;
  gap: clamp(20px, 3vw, 40px);
  padding: 26px 0 18px;
  border-top: 1px solid var(--line);
}

.panel h2 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.words {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.words li {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.words li:nth-child(1) { width: 72px; }
.words li:nth-child(2) { width: 128px; }
.words li:nth-child(3) { width: 124px; }

.words span {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.words i {
  display: block;
  width: 0;
  height: 2px;
  border-radius: 2px;
  transition: width 1.05s var(--ease);
}

body.is-in .words li:nth-child(1) i { width: 100%; background: #9b87ff; transition-delay: 0.15s; }
body.is-in .words li:nth-child(2) i { width: 100%; background: #6eb6ff; transition-delay: 0.28s; }
body.is-in .words li:nth-child(3) i {
  width: 100%;
  background: linear-gradient(90deg, #f0d08a, #ff8b7a);
  transition-delay: 0.4s;
}

.focus,
.addr {
  margin: 0;
  font-size: clamp(20px, 1.7vw, 26px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.rise { animation: rise 1.05s var(--ease) both; }
.rise.d2 { animation-delay: 0.08s; }
.rise.d3 { animation-delay: 0.16s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  html, body { height: auto; }

  .sheet {
    min-height: 100svh;
    overflow: visible;
    padding-bottom: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 8px 0 12px;
  }

  .prism-wrap { justify-self: start; width: min(260px, 74%); }
  .prism { max-height: 148px; }
  .display { font-size: clamp(46px, 12vw, 60px); }
  .kicker { margin-bottom: 8px; letter-spacing: 0.16em; }
  .lead { margin-top: 10px; font-size: 15px; max-width: none; }
  .words span { font-size: 16px; }
  .words li:nth-child(1) { width: 68px; }
  .words li:nth-child(2) { width: 118px; }
  .words li:nth-child(3) { width: 112px; }

  .panel { grid-template-columns: 1fr; gap: 18px; padding: 16px 0 12px; }
  .panel h2 { margin-bottom: 8px; }
  .focus, .addr { font-size: 20px; }
  .meta { margin-top: 4px; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .display { font-size: 64px; }
  .prism { max-height: 34vh; }
  .panel { padding-top: 16px; }
  .nav { height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .rise,
  .beam-hot,
  .beam-core,
  .spectrum,
  .spectrum line,
  .reticle,
  .reticle-inner,
  .hud,
  .lock,
  .spark { animation: none; }
  .spectrum line { stroke-dashoffset: 0; opacity: 1; }
  .words i { transition: none; width: 100%; }
  .prism-wrap { transition: none; }
}
