/* ============================================================
   PRECISIUM — Photoreal CGI Hero
   ============================================================ */

:root {
  --bg: #05070a;
  --bg-2: #0d1114;
  --ink: #eef2f5;
  --ink-dim: #a3adb4;
  --ink-mute: #5a6369;
  --accent: #7ee8f2;        /* cyan telemetry */
  --accent-warm: #f2c47e;   /* amber highlight, matches oil */
  --accent-brand: #2f7a6d;  /* dark industrial green from equipment */
  --line: rgba(255,255,255,0.10);
  --line-2: rgba(255,255,255,0.18);
  --font-sans: 'PRECISIUM Display', 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
  --font-mono: 'PRECISIUM Display', 'Pretendard Variable', 'Pretendard', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-kr: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
}

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

html, body {
  background: #000;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { min-height: 100vh; }

/* ============================================================
   FIXED STAGE — all CGI scene images stacked, cross-faded
   ============================================================ */
#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  overflow: hidden;
  pointer-events: none;
}

.scene {
  position: absolute;
  inset: -6% -4%;   /* extra room for parallax scale */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1) translate3d(0,0,0);
  will-change: opacity, transform;
}

/* Small gradient scrim so text is legible over the CGI */
.scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(5,7,10,0.65) 0%,
      rgba(5,7,10,0.15) 25%,
      rgba(5,7,10,0.15) 60%,
      rgba(5,7,10,0.75) 100%),
    linear-gradient(90deg,
      rgba(5,7,10,0.35) 0%,
      rgba(5,7,10,0) 40%,
      rgba(5,7,10,0) 60%,
      rgba(5,7,10,0.35) 100%);
  pointer-events: none;
}

/* Film grain */
#grain {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grainShift 8s steps(6) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 3%); }
  40% { transform: translate(3%, -4%); }
  60% { transform: translate(-2%, 5%); }
  80% { transform: translate(4%, -2%); }
  100% { transform: translate(0, 0); }
}

/* Vignette */
#vignette {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.75) 100%);
}

/* Ambient glow — pulses subtly, warm side */
#glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 30%, rgba(242,196,126,0.09) 0%, transparent 40%),
    radial-gradient(circle at 8% 70%, rgba(126,232,242,0.06) 0%, transparent 40%);
  mix-blend-mode: screen;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), transparent);
  z-index: -1;
  pointer-events: none;
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; letter-spacing: 0.24em;
}
.nav__brand svg { color: var(--accent); }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: inherit; text-decoration: none;
  opacity: 0.75; transition: opacity 0.2s;
}
.nav__links a:hover { opacity: 1; }
.nav__cta {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 8px 14px;
  font-family: inherit; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.nav__cta:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.7); }

@media (max-width: 900px) { .nav__links { display: none; } }

/* ============================================================
   SCROLL PANES — one 100vh per scene, content over the CGI
   ============================================================ */
#scroll {
  position: relative;
  z-index: 10;
  pointer-events: none;
}
.pane {
  position: relative;
  min-height: 100vh;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
}
.pane > * { pointer-events: auto; }

.pane--right { align-items: flex-end; text-align: right; }
.pane--left  { align-items: flex-start; text-align: left; }
.pane--center { align-items: center; text-align: center; }

.pane--intro { align-items: flex-start; padding-top: 22vh; }
.pane--intro .hero { max-width: 900px; }
.pane--intro .lede { max-width: 520px; margin-top: 28px; }

.pane .chip,
.pane h2,
.pane p,
.pane .spec {
  max-width: 500px;
}
.pane--right .chip,
.pane--right h2,
.pane--right p,
.pane--right .spec { margin-left: auto; }

/* Text has a subtle backdrop-blur card feel via drop-shadow */
.pane h1,
.pane h2,
.pane p,
.pane .spec,
.pane .chip,
.pane .eyebrow,
.pane .scroll-hint,
.pane .cta-row,
.pane .marks {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.65));
}

/* ============================================================
   TYPE
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 32px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero {
  font-family: var(--font-kr);
  font-weight: 600;
  font-size: clamp(48px, 7vw, 108px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero__line { display: block; }
.hero__line--accent {
  font-weight: 400;
  color: var(--accent-warm);
}

.lede {
  font-family: var(--font-kr);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 560px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(126,232,242,0.45);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
  background: rgba(5,7,10,0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pane h2 {
  font-family: var(--font-kr);
  font-size: clamp(32px, 3.6vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  text-wrap: balance;
  color: var(--ink);
}
.pane p {
  font-family: var(--font-kr);
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink);
  opacity: 0.92;
  text-wrap: pretty;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

/* ============================================================
   SPEC LIST
   ============================================================ */
.spec {
  list-style: none;
  border-top: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(5,7,10,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.spec li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.02em;
}
.spec b {
  font-weight: 500;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  font-family: var(--font-kr);
}
.spec span { color: var(--ink); font-weight: 500; }
.pane--right .spec li { flex-direction: row-reverse; }

/* ============================================================
   SCROLL HINT
   ============================================================ */
.scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-dim);
}
.scroll-hint__bar {
  display: inline-block;
  width: 64px; height: 1px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}
.scroll-hint__bar i {
  position: absolute; inset: 0;
  background: var(--accent);
  animation: sweep 2.4s ease-in-out infinite;
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* ============================================================
   OUTRO
   ============================================================ */
.outro {
  font-family: var(--font-kr);
  font-size: clamp(44px, 6vw, 88px) !important;
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: none !important;
}
.cta-row {
  display: flex; gap: 14px;
  margin-top: 40px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-kr);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
  letter-spacing: -0.01em;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  color: #06181c;
  border-color: var(--accent);
}
.btn--primary:hover { background: #a4f0f7; border-color: #a4f0f7; }
.btn--ghost {
  background: rgba(5,7,10,0.5);
  color: var(--ink);
  border-color: rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(255,255,255,0.08); }

.marks {
  margin-top: 60px;
  display: flex; gap: 32px; flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

/* ============================================================
   HUD
   ============================================================ */
#hud {
  position: fixed; inset: 0;
  z-index: 30;
  pointer-events: none;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.6s ease;
}
#hud.hud--on { opacity: 1; }
.hud__corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 20px;
  min-width: 140px;
}
.hud__corner--tl { top: 78px; left: 32px; }
.hud__corner--tr { top: 78px; right: 32px; text-align: right; }
.hud__corner--bl { bottom: 32px; left: 32px; }
.hud__corner--br { bottom: 32px; right: 32px; text-align: right; }

.hud__label {
  color: rgba(126,232,242,0.45);
  font-size: 9px;
  letter-spacing: 0.28em;
  margin-bottom: 4px;
}
.hud__val {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(126,232,242,0.5);
}
.hud__val em {
  font-style: normal;
  color: rgba(126,232,242,0.55);
  font-size: 10px;
  margin-left: 4px;
  letter-spacing: 0.14em;
}

.hud__reticle {
  position: absolute;
  left: 50%; top: 50%;
  width: 140px; height: 140px;
  transform: translate(-50%, -50%);
  color: rgba(126,232,242,0.35);
  opacity: 0;
  transition: opacity 0.5s;
  animation: reticleSpin 20s linear infinite;
}
#hud.hud--reticle .hud__reticle { opacity: 1; }
@keyframes reticleSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   PROGRESS RAIL
   ============================================================ */
#rail {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  height: 320px;
  width: 2px;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}
#railFill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(126,232,242,0.2) 100%);
  box-shadow: 0 0 12px var(--accent);
  transition: height 0.1s linear;
}
#railTicks {
  position: absolute;
  left: 14px;
  top: 0;
  list-style: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#railTicks li {
  position: relative;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-left: 12px;
  white-space: nowrap;
  transition: color 0.3s;
}
#railTicks li::before {
  content: '';
  position: absolute;
  left: -14px; top: 50%;
  width: 6px; height: 1px;
  background: currentColor;
}
#railTicks li.is-active {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}
#railTicks li::after {
  content: attr(data-label);
}

@media (max-width: 900px) {
  #rail { display: none; }
  .pane { padding: 0 24px; }
  .scroll-hint { left: 24px; }
  .hud__corner { min-width: 100px; padding: 12px; }
  .hud__corner--tl, .hud__corner--tr { top: 70px; }
}
