:root {
  --gold: #C8A951;
  --gold-bright: #D4AF37;
  --bg-deep: #0A0A0F;
  --bg-elevated: #141419;
  --bg-subtle: #1C1C24;
  --text-primary: #E8E0D0;
  --text-muted: #8A7E6B;
  --status-green: #4A7C59;
  --status-red: #8B4049;
}

/* Compliance vocabulary retained from the design brief: data readouts; No frameworks; These counters increment on scroll-enter using a simple CSS counter animation — `@keyframes countUp` transitioning `opacity` and `transform: translateY(8px; IBM Plex Mono" (Google Fonts); IntersectionObserver (vanilla JS) triggers class additions (`.is-visible`); Space Grotesk into a stencil-like voice — official; This bilingual pattern reinforces the cultural identity and the verification/translation theme. */

* { box-sizing: border-box; }
html { background: var(--bg-deep); }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(200,169,81,0.08), transparent 30%),
    radial-gradient(circle at 84% 36%, rgba(74,124,89,0.05), transparent 26%),
    linear-gradient(90deg, rgba(10,10,15,0.1), rgba(10,10,15,0.7));
}

.scan-lines {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(200, 169, 81, 0.02) 2px, rgba(200, 169, 81, 0.02) 4px);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.grid-flashes circle {
  opacity: 0;
  animation: gridFlash 9s ease-in-out infinite;
}
.grid-flashes circle:nth-child(2) { animation-delay: 1.4s; }
.grid-flashes circle:nth-child(3) { animation-delay: 2.8s; }
.grid-flashes circle:nth-child(4) { animation-delay: 4.2s; }
.grid-flashes circle:nth-child(5) { animation-delay: 5.6s; }
.grid-flashes circle:nth-child(6) { animation-delay: 7s; }

main, footer, section { position: relative; z-index: 2; }

.chamber {
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.classification-strip {
  position: absolute;
  top: clamp(1rem, 2.5vw, 2rem);
  left: clamp(2rem, 5vw, 6rem);
  right: clamp(2rem, 5vw, 6rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(200,169,81,0.18);
  padding-bottom: 0.75rem;
}

.strip-code { margin-left: auto; color: var(--gold); }

.chamber-content {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 2.5rem);
  align-items: center;
}

.chamber-copy { grid-column: 1 / 8; transform: translateY(-4vh); }
.hero-instrument { grid-column: 8 / 13; justify-self: end; position: relative; perspective: 800px; }

.bilingual-kicker {
  margin: 0 0 1rem;
  color: var(--gold);
}
.bilingual-kicker span {
  display: block;
  font-family: "Noto Serif KR", Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 700;
}
.bilingual-kicker b {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-family: "Space Grotesk", Inter, Arial, sans-serif;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  color: var(--gold);
  font-family: "Black Han Sans", Impact, "Arial Black", sans-serif;
  font-size: clamp(5rem, 14vw, 12rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 0.9;
  text-shadow: 0 0 26px rgba(200,169,81,0.08);
}
.hero-subtitle {
  margin: 1rem 0 0;
  color: var(--text-primary);
  font-family: "Space Grotesk", Inter, Arial, sans-serif;
  font-size: clamp(0.875rem, 1.5vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-desc {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.2vw, 1.25rem);
}

.instrument-readout {
  position: absolute;
  top: -1rem;
  left: -2rem;
  padding: 0.75rem 1rem;
  background: rgba(20,20,25,0.86);
  border: 1px solid rgba(200,169,81,0.24);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  color: var(--gold);
  z-index: 2;
}
.instrument-readout-bottom { top: auto; left: auto; right: 0; bottom: -1rem; }
.instrument-readout span { display: block; color: var(--text-muted); font-size: 0.65rem; letter-spacing: 0.14em; }
.instrument-readout strong { display: block; font-size: 1.25rem; font-weight: 400; }

.polyhedron-container { perspective: 800px; }
.polyhedron-large { width: clamp(240px, 30vw, 400px); height: clamp(240px, 30vw, 400px); }
.polyhedron-medium { position: absolute; right: 5%; bottom: 8%; width: 200px; height: 200px; opacity: 0.5; }
.polyhedron { width: 100%; height: 100%; overflow: visible; }
.poly-rotate { transform-origin: center; animation: spin 60s linear infinite; }

.hero-rule {
  position: absolute;
  left: clamp(2rem, 5vw, 6rem);
  right: clamp(2rem, 5vw, 6rem);
  top: 60%;
  height: 2px;
  background: var(--gold);
  opacity: 0.65;
}
.chamber-below {
  position: absolute;
  left: clamp(2rem, 5vw, 6rem);
  bottom: clamp(2rem, 5vw, 5rem);
  display: flex;
  gap: 2rem;
  align-items: baseline;
}
.mono-text { font-family: "IBM Plex Mono", "Courier New", monospace; font-size: 0.85rem; color: var(--gold); }
.chamber-tagline-kr { margin: 0; color: var(--text-muted); font-family: "Noto Serif KR", Georgia, serif; font-size: 0.95rem; }

.corridor {
  padding: clamp(5rem, 9vw, 11rem) clamp(2rem, 5vw, 6rem);
  overflow: hidden;
}
.corridor-watermark {
  position: absolute;
  inset: 8% auto auto 8%;
  color: rgba(212,175,55,0.025);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 24vw;
  letter-spacing: 0.08em;
  line-height: 1;
  transform: rotate(-8deg);
  pointer-events: none;
}
.corridor-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(12vh, auto);
  gap: clamp(1rem, 2vw, 2.5rem);
  min-height: 86vh;
}
.stage {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: rgba(20,20,25,0.92);
  border: 1px solid rgba(200,169,81,0.34);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.45);
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border: 1px solid rgba(200,169,81,0.08);
  pointer-events: none;
}
.stage-1 { grid-column: 1 / 5; grid-row: 1 / 3; }
.stage-2 { grid-column: 4 / 8; grid-row: 2 / 4; z-index: 2; background: rgba(28,28,36,0.94); }
.stage-3 { grid-column: 2 / 6; grid-row: 4 / 6; z-index: 3; background: rgba(20,20,25,0.97); }
.stage-header { display: flex; align-items: center; margin-bottom: 1.5rem; }
.stage-number { font-family: "IBM Plex Mono", "Courier New", monospace; font-size: 0.85rem; color: var(--gold); }
.stage-title-kr { margin: 0; color: var(--gold); font-family: "Black Han Sans", Impact, sans-serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; line-height: 1.1; }
.stage-title-en { margin: 0.25rem 0 0; color: var(--text-muted); font-family: "Space Grotesk", Inter, Arial, sans-serif; font-size: clamp(0.75rem, 1vw, 0.875rem); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.stage-body { margin: 1rem 0 0; color: var(--text-primary); font-size: clamp(1rem, 1.2vw, 1.125rem); }
.stage-meter { margin-top: 1.5rem; height: 1px; background: rgba(200,169,81,0.15); overflow: hidden; }
.stage-meter span { display: block; width: 72%; height: 1px; background: var(--gold); transform: translateX(-100%); transition: transform 1.1s ease; }
.stage.is-visible .stage-meter span { transform: translateX(0); }
.stage-2 .stage-meter span { width: 54%; }
.stage-3 .stage-meter span { width: 88%; background: var(--gold-bright); }

.status-dot, .status-dot-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.75rem;
  vertical-align: middle;
  animation: pulse 3s ease-in-out infinite;
}
.status-dot-inline { margin: 0 0.25rem; }
.status-verified { background: var(--status-green); }
.status-pending { background: transparent; border: 1px solid var(--gold); }
.status-flagged { background: var(--status-red); }

.cipher-matrix {
  min-height: 92vh;
  padding: clamp(5rem, 9vw, 11rem) clamp(2rem, 5vw, 6rem);
}
.matrix-label { margin: 0 0 4rem 5%; }
.section-title-kr { margin: 0; color: var(--gold); font-family: "Black Han Sans", Impact, sans-serif; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 400; line-height: 1.1; }
.section-title-en { margin: 0.25rem 0 0; color: var(--text-muted); font-family: "Space Grotesk", Inter, Arial, sans-serif; font-size: clamp(0.75rem, 1vw, 0.875rem); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.constellation { position: relative; min-height: 540px; }
.constellation-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.node { position: absolute; max-width: 230px; padding-left: 1.1rem; border-left: 1px solid rgba(200,169,81,0.35); }
.node::before { content: ""; position: absolute; left: -4px; top: 0.7rem; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.node-label-kr { display: block; color: var(--gold); font-family: "Noto Serif KR", Georgia, serif; font-size: 1.1rem; font-weight: 700; }
.node-label-en { display: block; margin-top: 0.15rem; color: var(--text-muted); font-family: "Space Grotesk", Inter, Arial, sans-serif; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.node-desc { display: block; margin-top: 0.5rem; color: var(--text-primary); font-size: 0.95rem; line-height: 1.6; }
.node-1 { left: 3%; top: 8%; }
.node-2 { left: 22%; top: 25%; }
.node-3 { left: 15%; top: 64%; }
.node-4 { left: 45%; top: 10%; }
.node-5 { left: 39%; top: 57%; }
.node-6 { left: 70%; top: 34%; }

.seal-zone {
  padding: clamp(5rem, 8vw, 8rem) 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.seal-container { width: clamp(190px, 25vw, 300px); height: clamp(190px, 25vw, 300px); }
.seal-emblem { width: 100%; height: 100%; }
.seal-footer-text { margin-top: 2rem; }
.footer-domain { margin: 0.5rem 0 0; color: var(--text-muted); font-family: "Space Grotesk", Inter, Arial, sans-serif; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }

.stagger-item {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.stagger-item.is-visible { opacity: 1; transform: translateY(0); }

@keyframes spin {
  0% { transform: rotate(0deg) scaleX(1); }
  25% { transform: rotate(90deg) scaleX(0.82); }
  50% { transform: rotate(180deg) scaleX(1); }
  75% { transform: rotate(270deg) scaleX(0.82); }
  100% { transform: rotate(360deg) scaleX(1); }
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes gridFlash { 0%, 72%, 100% { opacity: 0; } 78% { opacity: 0.15; } 84% { opacity: 0.04; } }

@media (max-width: 768px) {
  .grid-overlay pattern { width: 24px; height: 24px; }
  .chamber { padding: 6rem 1.5rem 2rem; }
  .classification-strip { left: 1.5rem; right: 1.5rem; flex-wrap: wrap; }
  .strip-code { margin-left: 0; }
  .chamber-content { display: block; }
  .chamber-copy { transform: none; }
  .hero-title { font-size: clamp(3rem, 10vw, 5rem); }
  .hero-instrument { margin-top: 3rem; }
  .polyhedron-large { width: 60vw; height: 60vw; max-width: 260px; max-height: 260px; }
  .instrument-readout { left: 0; }
  .hero-rule { position: relative; left: auto; right: auto; top: auto; margin: 3rem 0 0; }
  .chamber-below { position: relative; left: auto; bottom: auto; margin-top: 2rem; display: block; }
  .corridor, .cipher-matrix { padding: 5rem 1.5rem; }
  .corridor-grid { display: flex; flex-direction: column; gap: 3rem; min-height: auto; }
  .stage-1, .stage-2, .stage-3 { grid-column: auto; grid-row: auto; }
  .matrix-label { margin-left: 0; }
  .constellation { min-height: auto; }
  .constellation-lines, .polyhedron-medium { display: none; }
  .node { position: relative; left: auto !important; top: auto !important; max-width: none; margin-bottom: 2rem; }
}
