/* =====================================================================
   OUR HOUSE — JUNHEE · JEEYUN · AZIN
   ===================================================================== */
:root {
  --bg: #07060b;
  --bg-2: #0d0c14;
  --ink: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.56);
  --faint: rgba(244, 241, 234, 0.28);
  --line: rgba(255, 255, 255, 0.1);

  --junhee: #4d8dff;
  --junhee-2: #5ce1ff;
  --jeeyun: #ff4f8b;
  --jeeyun-2: #ff9a6b;
  --azin: #ffd23f;
  --azin-2: #fff1a8;
  --tri: linear-gradient(90deg, var(--junhee), var(--jeeyun), var(--azin));

  --f-display: 'Unbounded', 'Arial Black', sans-serif;
  --f-sans: 'Syne', 'Noto Sans KR', sans-serif;
  --f-kr: 'Noto Sans KR', sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --pad: clamp(20px, 4.5vw, 72px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-kr);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-gated { overflow: hidden; height: 100vh; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--azin); color: var(--bg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* =====================================================================
   GATE
   ===================================================================== */
.gate {
  position: fixed; inset: 0; z-index: 100;
  perspective: 1800px;
  perspective-origin: 50% 50%;
}
.gate.is-gone { display: none; }
.gate-doors { position: absolute; inset: 0; display: flex; transform-style: preserve-3d; }
.gate-door {
  position: relative; width: 50%; height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}
.gate-left { transform-origin: 0% 50%; }
.gate-right { transform-origin: 100% 50%; }
.door-face {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 50%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, #121019, #08070c 70%);
  display: flex; align-items: center;
  backface-visibility: hidden;
}
.gate-left .door-face { justify-content: flex-end; border-right: 1px solid rgba(255, 255, 255, 0.08); }
.gate-right .door-face {
  justify-content: flex-start; border-left: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 80% at 0% 50%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, #121019, #08070c 70%);
}
.door-word {
  position: relative; z-index: 2;
  font-family: var(--f-display); font-weight: 900;
  font-size: clamp(64px, 13vw, 240px); line-height: 1; letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);
  padding: 0 0.06em;
  transform: translateY(-0.25em);
  transition: -webkit-text-stroke-color 0.6s, color 0.6s;
}
.gate:has(.gate-vinyl:hover) .door-word { -webkit-text-stroke-color: rgba(255, 255, 255, 0.5); }
.door-handle {
  position: absolute; z-index: 3; top: 50%;
  width: 10px; height: clamp(80px, 14vh, 140px);
  border-radius: 10px;
  background: linear-gradient(90deg, #6b5a2a, #ffe79a 40%, #b38a2d 70%, #5a4718);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 210, 63, 0.18);
  transform: translateY(-50%);
}
.gate-left .door-handle { right: clamp(18px, 2.5vw, 40px); }
.gate-right .door-handle { left: clamp(18px, 2.5vw, 40px); }
.door-panels { position: absolute; inset: 7vh 3.5vw; display: grid; grid-template-rows: 1fr 1.35fr; gap: 3.5vh; pointer-events: none; }
.door-panels i {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.18), inset 0 0 0 11px rgba(255, 255, 255, 0.03);
}
.gate-seam {
  position: absolute; z-index: 4; left: 50%; top: 0; bottom: 0; width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--junhee) 25%, var(--jeeyun) 50%, var(--azin) 75%, transparent);
  box-shadow: 0 0 24px 2px rgba(255, 79, 139, 0.45);
  opacity: 0.85;
  animation: seamGlow 2.2s ease-in-out infinite;
  @media (prefers-reduced-motion: reduce) { animation: none; }
}
@keyframes seamGlow { 50% { opacity: 0.35; } }

.gate-center {
  position: absolute; z-index: 6; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; pointer-events: none; text-align: center;
}
.gate-center > * { pointer-events: auto; }
.gate-plate {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.28em;
  background: rgba(7, 6, 11, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.gate-plate .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.d1 { background: var(--junhee); } .dot.d2 { background: var(--jeeyun); } .dot.d3 { background: var(--azin); margin-right: 6px; }

.gate-vinyl {
  position: relative; width: clamp(200px, 26vmin, 280px); aspect-ratio: 1;
  border-radius: 50%;
  transition: transform 0.6s var(--ease-out);
}
.gate-vinyl:hover { transform: scale(1.06); }
.gate-vinyl:focus-visible { outline: 2px solid var(--azin); outline-offset: 10px; }
.vinyl-disc {
  position: absolute; inset: 12%; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 36%, rgba(255, 255, 255, 0.06) 37%, transparent 39%),
    repeating-radial-gradient(circle, #0c0b10 0 2px, #17151d 2px 3.5px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 60px rgba(255, 79, 139, 0.15);
  animation: spin 6s linear infinite;
  @media (prefers-reduced-motion: reduce) { animation-duration: 40s; }
}
.vinyl-grooves {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 10%, rgba(255, 255, 255, 0.09) 14%, transparent 20% 60%, rgba(255, 255, 255, 0.07) 64%, transparent 70%);
}
.vinyl-label {
  position: absolute; inset: 31%; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--junhee), var(--jeeyun), var(--azin), var(--junhee));
  color: var(--bg);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.2);
}
.vinyl-label b { font-family: var(--f-display); font-size: clamp(14px, 2vmin, 19px); line-height: 1; letter-spacing: 0.02em; }
.vinyl-label small { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.2em; font-weight: 600; }
.vinyl-label::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--bg); display: none; }
.vinyl-ring {
  position: absolute; inset: -4%; width: 108%; height: 108%;
  animation: spin 22s linear infinite reverse;
  @media (prefers-reduced-motion: reduce) { animation: none; }
}
.vinyl-ring text { font-family: var(--f-mono); font-size: 9.6px; letter-spacing: 0.32em; fill: rgba(244, 241, 234, 0.6); }
@keyframes spin { to { transform: rotate(360deg); } }

.gate-hint { font-size: 14px; color: var(--muted); }
.gate-hint span { color: var(--ink); font-family: var(--f-serif); font-style: italic; font-size: 16px; }
.gate-silent {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--faint);
  padding: 6px 10px; border-radius: 6px; transition: color 0.3s;
}
.gate-silent:hover { color: var(--ink); }
.gate-flash {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 80% at 50% 50%, #fff 0%, rgba(255, 210, 63, 0.7) 25%, rgba(255, 79, 139, 0.35) 50%, transparent 75%);
  mix-blend-mode: screen;
}

/* =====================================================================
   GLOBAL FX
   ===================================================================== */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
  @media (prefers-reduced-motion: reduce) { animation: none; }
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.beat-flash {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0;
  background: radial-gradient(70% 60% at 50% 45%, var(--flash, #fff), transparent 70%);
  mix-blend-mode: screen;
}
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 70; height: 2px; width: 100%;
  background: var(--tri); transform-origin: 0 50%; transform: scaleX(0);
  display: none;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    display: block;
    animation: grow-progress linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes grow-progress { to { transform: scaleX(1); } }

/* Cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; mix-blend-mode: difference; }
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; translate: -50% -50%; }
.cursor-dot { width: 6px; height: 6px; background: #fff; }
.cursor-ring {
  width: 40px; height: 40px; border: 1px solid #fff;
  display: grid; place-items: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), background 0.35s;
}
.cursor-ring em { font-style: normal; font-family: var(--f-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; color: #000; opacity: 0; transition: opacity 0.2s; }
.cursor.is-hover .cursor-ring { width: 86px; height: 86px; background: #fff; }
.cursor.is-hover .cursor-ring em { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { body:not(.is-gated) { cursor: none; } body:not(.is-gated) a, body:not(.is-gated) button, body:not(.is-gated) label { cursor: none; } }

/* =====================================================================
   NAV
   ===================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.nav.is-scrolled { background: rgba(7, 6, 11, 0.62); backdrop-filter: blur(14px) saturate(140%); padding-block: 14px; border-bottom: 1px solid var(--line); }
.nav-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { position: relative; width: 26px; height: 24px; }
.logo-mark i { position: absolute; width: 11px; height: 11px; border-radius: 50%; transition: transform 0.15s; }
.logo-mark i:nth-child(1) { left: 0; bottom: 0; background: var(--junhee); }
.logo-mark i:nth-child(2) { right: 0; bottom: 0; background: var(--jeeyun); }
.logo-mark i:nth-child(3) { left: 50%; top: 0; margin-left: -5.5px; background: var(--azin); }
.logo-mark i.pop { transform: scale(1.45); }
.logo-text { font-family: var(--f-display); font-weight: 900; font-size: 16px; letter-spacing: 0.02em; }
.logo-text em { font-family: var(--f-serif); font-weight: 400; font-size: 19px; color: var(--muted); }
.nav-links { display: flex; gap: clamp(16px, 3vw, 44px); list-style: none; }
.nav-links a {
  position: relative; text-decoration: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.22em;
  color: var(--muted); transition: color 0.3s;
}
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--tri); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-bpm { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }
.nav-bpm b { color: var(--ink); font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--jeeyun); box-shadow: 0 0 0 calc(var(--pulse, 0) * 8px) rgba(255, 79, 139, 0.25); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* =====================================================================
   DOCK (sound)
   ===================================================================== */
.dock {
  position: fixed; right: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px); z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px 6px 6px; border-radius: 999px;
  background: rgba(14, 13, 20, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  opacity: 0; translate: 0 20px; pointer-events: none;
  transition: opacity 0.6s, translate 0.6s var(--ease-out);
}
body.is-open .dock { opacity: 1; translate: 0 0; pointer-events: auto; }
.dock-disc { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.dock-vinyl {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, var(--azin) 0 18%, #0b0a10 19% 22%, transparent 23%), repeating-radial-gradient(circle, #111 0 1.5px, #1c1a24 1.5px 3px);
  animation: spin 3s linear infinite; animation-play-state: paused;
}
.dock.is-playing .dock-vinyl { animation-play-state: running; }
.dock-state {
  position: relative; font-family: var(--f-mono); font-size: 8px; font-weight: 600; letter-spacing: 0.05em;
  color: var(--bg); background: var(--azin); border-radius: 4px; padding: 1px 3px; translate: 0 13px;
}
.dock-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dock-eq { display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.dock-eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--tri); background-size: 60px 100%; transform-origin: 50% 100%; transform: scaleY(0.1); }
.dock-track { width: 150px; overflow: hidden; white-space: nowrap; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--muted); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.dock-track span { display: inline-block; padding-left: 100%; animation: ticker 12s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }
.dock-file {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); font-size: 14px; cursor: pointer; transition: background 0.3s, color 0.3s;
}
.dock-file:hover { background: var(--ink); color: var(--bg); }
.drop-zone {
  position: fixed; inset: 16px; z-index: 300; display: none; place-items: center; text-align: center;
  border: 2px dashed var(--azin); border-radius: 28px; background: rgba(7, 6, 11, 0.85); backdrop-filter: blur(8px);
}
.drop-zone.show { display: grid; }
.drop-zone b { display: block; font-family: var(--f-display); font-size: clamp(36px, 7vw, 96px); background: var(--tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.drop-zone span { color: var(--muted); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  --kick: 0; --bass: 0; --pulse: 0;
  --scene: var(--junhee); --scene-2: var(--junhee-2);
  position: relative; height: 100svh; min-height: 620px; overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
  filter: blur(90px); opacity: calc(0.16 + var(--bass) * 0.3);
  mix-blend-mode: screen;
  transition: scale 1.4s var(--ease-out), opacity 0.2s;
  animation: orbit 26s ease-in-out infinite;
  @media (prefers-reduced-motion: reduce) { animation: none; }
}
.b-junhee { left: -18vmax; top: -12vmax; background: radial-gradient(circle, var(--junhee), transparent 65%); }
.b-jeeyun { right: -20vmax; top: 6vmax; background: radial-gradient(circle, var(--jeeyun), transparent 65%); animation-delay: -9s; }
.b-azin { left: 22vw; bottom: -30vmax; background: radial-gradient(circle, var(--azin), transparent 65%); animation-delay: -17s; }
.hero[data-scene="0"] .b-junhee, .hero[data-scene="1"] .b-jeeyun, .hero[data-scene="2"] .b-azin { scale: 1.35; opacity: calc(0.3 + var(--bass) * 0.4); }
@keyframes orbit {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(8vw, 6vh); }
  66% { transform: translate(-6vw, 10vh); }
}
.hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1.4px);
  background-size: 28px 28px;
  mask-image: radial-gradient(70% 60% at 50% 47%, #000 10%, transparent 75%);
  opacity: calc(0.5 + var(--pulse) * 0.5);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; touch-action: pan-y; }
.hero-ghost {
  position: absolute; z-index: 1; left: 50%; top: 47%;
  translate: -50% -50%;
  scale: calc(1 + var(--kick) * 0.035);
  font-family: var(--f-display); font-weight: 900; line-height: 1;
  font-size: clamp(120px, 30vw, 620px); letter-spacing: -0.05em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  pointer-events: none; user-select: none;
}
.hero-ghost .g-ch { display: inline-block; transition: color 0.5s, -webkit-text-stroke-color 0.5s; }
.hero-ghost .g-ch.hit { color: color-mix(in srgb, var(--scene) 14%, transparent); -webkit-text-stroke-color: color-mix(in srgb, var(--scene) 70%, transparent); transition: none; }

.vmarquee {
  position: absolute; z-index: 4; top: 0; bottom: 0; width: 22px; overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
}
.vm-left { left: clamp(10px, 1.6vw, 26px); }
.vm-right { right: clamp(10px, 1.6vw, 26px); }
.vm-track {
  writing-mode: vertical-rl; white-space: nowrap;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.4em; color: var(--faint);
}
.vm-track b { color: var(--muted); font-weight: 600; }
@media (max-width: 760px) { .vmarquee { display: none; } }

.hero-caption {
  position: absolute; z-index: 5; left: var(--pad); bottom: clamp(28px, 7vh, 72px);
  max-width: min(560px, 60vw);
}
.cap-meta { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.cap-meta i { width: 36px; height: 1px; background: var(--scene); }
.cap-name {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(54px, 7.4vw, 128px); line-height: 0.95; letter-spacing: -0.01em;
  color: var(--scene); margin: 6px 0 8px;
  text-shadow: calc(var(--kick) * 7px) 0 rgba(255, 0, 90, 0.55), calc(var(--kick) * -7px) 0 rgba(0, 210, 255, 0.55);
  overflow: hidden; padding-right: 0.15em;
}
.cap-name .ch { display: inline-block; }
.cap-line { font-size: 15px; color: var(--muted); }

.hero-hud {
  position: absolute; z-index: 5; right: var(--pad); bottom: clamp(28px, 7vh, 72px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.hud-beats { display: flex; gap: 6px; }
.hud-beats i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); transition: background 0.35s, box-shadow 0.35s; }
.hud-beats i.on { background: var(--scene); border-color: var(--scene); box-shadow: 0 0 16px var(--scene); transition: none; }
.hud-bar { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.hud-bar b { color: var(--ink); font-weight: 600; }
.hud-scenes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hud-scenes button {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.hud-scenes button:hover { border-color: var(--ink); color: var(--ink); }
.hud-scenes button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 760px) {
  .hero-hud { left: var(--pad); right: auto; top: 86px; bottom: auto; align-items: flex-start; }
  .hud-scenes { justify-content: flex-start; }
  .hero-caption { max-width: none; right: var(--pad); }
}

.hero-scroll {
  position: absolute; z-index: 5; left: 50%; bottom: 22px; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.3em; color: var(--faint);
}
.hero-scroll i { width: 1px; height: 46px; background: linear-gradient(180deg, var(--ink), transparent); transform-origin: top; animation: drip 1.9s var(--ease-out) infinite; @media (prefers-reduced-motion: reduce) { animation: none; } }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 760px) { .hero-scroll { display: none; } }

/* Pre-open states (revealed by GSAP) */
body.is-gated .nav, body.is-gated .hero-caption, body.is-gated .hero-hud, body.is-gated .hero-scroll, body.is-gated .vmarquee { opacity: 0; }

/* =====================================================================
   EQUATION
   ===================================================================== */
.equation { position: relative; }
.eq-pin {
  height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vh;
  padding: 0 var(--pad); text-align: center; overflow: hidden;
}
.eq-line {
  --eq-fs: 17vw;
  display: flex; align-items: baseline; justify-content: center; white-space: nowrap;
  font-family: var(--f-display); font-weight: 900; font-size: var(--eq-fs); line-height: 1; letter-spacing: -0.03em;
}
.eq-word { display: inline-flex; align-items: baseline; }
.eq-word b { font-weight: 900; }
.w-junhee b { color: var(--junhee); }
.w-jeeyun b { color: var(--jeeyun); }
.w-azin b { color: var(--azin); }
.rest { display: inline-block; max-width: 0; overflow: hidden; vertical-align: bottom; color: var(--ink); }
.eq-op { margin: 0 0.16em; font-weight: 400; color: var(--faint); }
.eq-sub { font-size: clamp(16px, 1.6vw, 22px); color: var(--muted); line-height: 1.7; }
.eq-sub em { font-family: var(--f-serif); font-size: 1.35em; color: var(--ink); }
.eq-sub small { display: block; margin-top: 6px; font-family: var(--f-serif); font-style: italic; font-size: 0.95em; color: var(--faint); }

/* =====================================================================
   BAND (kinetic tape)
   ===================================================================== */
.band { position: relative; padding: 10vh 0; overflow: hidden; }
.band-row {
  display: flex; width: max-content; white-space: nowrap;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(40px, 6.4vw, 110px); line-height: 1.12; letter-spacing: -0.02em;
}
.band-row:first-child { background: var(--azin); color: var(--bg); rotate: -3deg; margin-left: -5vw; padding: 0.06em 0; box-shadow: 0 30px 80px rgba(255, 210, 63, 0.18); }
.band-row.outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55); rotate: 2deg; margin-top: -0.2em; }
.band-row span { padding: 0 0.35em; display: inline-flex; align-items: center; gap: 0.35em; }
.band-row span i { font-style: normal; font-size: 0.55em; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { position: relative; padding: clamp(110px, 16vh, 190px) var(--pad); }
.section-head { max-width: 1400px; margin: 0 auto clamp(48px, 7vh, 80px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.3em; color: var(--muted);
}
.eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--tri); }
.section-title {
  margin-top: 18px;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(42px, 8vw, 132px); line-height: 0.95; letter-spacing: -0.035em;
}
.section-title em { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.01em; background: var(--tri); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.08em; }
.section-title .line { display: block; overflow: hidden; }
.section-title .line > span { display: inline-block; }
.section-desc { margin-top: 20px; max-width: 560px; color: var(--muted); font-size: 16px; }
.sample-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 6px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.15em; color: var(--azin); border: 1px dashed rgba(255, 210, 63, 0.5); vertical-align: middle; }

/* =====================================================================
   CREW
   ===================================================================== */
.crew-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); perspective: 1400px; }
@media (max-width: 980px) { .crew-grid { grid-template-columns: 1fr; } }
.crew-card {
  --mx: 50%; --my: 30%;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 600px; padding: clamp(22px, 2.4vw, 34px);
  border-radius: 30px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--c) 16%, var(--bg-2)), var(--bg) 62%);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  transform-style: preserve-3d;
}
.crew-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 32%, transparent), transparent 60%);
}
.crew-card:hover::before { opacity: 1; }
.crew-initial {
  position: absolute; z-index: -1; right: -0.08em; bottom: -0.2em;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(260px, 26vw, 420px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--c) 35%, transparent);
  transition: translate 0.8s var(--ease-out);
}
.crew-card:hover .crew-initial { translate: -4% -3%; }
.crew-top { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.crew-top b { color: var(--c); font-weight: 600; }
.crew-avatar {
  position: relative; width: 112px; height: 112px; border-radius: 50%; margin: 18px 0 6px;
  display: grid; place-items: center;
}
.crew-avatar::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c), var(--c2), transparent 60%, var(--c));
  animation: spin 5s linear infinite;
  @media (prefers-reduced-motion: reduce) { animation: none; }
}
.crew-avatar::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--bg-2); }
.crew-avatar span { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 900; font-size: 40px; color: var(--c); }
.crew-avatar img { position: absolute; inset: 5px; z-index: 1; width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; object-fit: cover; }
.crew-name { font-family: var(--f-display); font-weight: 900; font-size: clamp(40px, 4.3vw, 70px); line-height: 0.95; letter-spacing: -0.03em; color: var(--c); }
.crew-title { font-family: var(--f-serif); font-style: italic; font-size: 26px; line-height: 1.1; }
.crew-bio { color: var(--muted); font-size: 15px; max-width: 34ch; }
.crew-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.crew-tags span { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; padding: 5px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); color: color-mix(in srgb, var(--c) 80%, var(--ink)); }
.crew-links { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crew-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 14px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
  transition: background 0.35s, color 0.35s, border-color 0.35s, translate 0.35s var(--ease-out);
}
.crew-link svg { width: 18px; height: 18px; flex: none; }
.crew-link small { display: block; color: var(--faint); font-size: 9.5px; letter-spacing: 0.06em; margin-top: 2px; transition: color 0.35s; }
.crew-link:hover { background: var(--c); color: var(--bg); border-color: var(--c); translate: 0 -3px; }
.crew-link:hover small { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.crew-link.is-empty { border-style: dashed; }

/* =====================================================================
   DOORS
   ===================================================================== */
.door-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.2vw, 32px); }
@media (max-width: 1100px) { .door-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .door-grid { grid-template-columns: 1fr; } }
.door { display: flex; flex-direction: column; gap: 20px; text-decoration: none; color: inherit; }
.door-frame {
  position: relative; aspect-ratio: 3 / 4.5; padding: 10px;
  border-radius: 999px 999px 20px 20px;
  background: #050409; border: 1px solid var(--line);
  perspective: 1100px;
  transition: box-shadow 0.8s var(--ease-out), border-color 0.6s;
}
.door:hover .door-frame, .door:focus-visible .door-frame { box-shadow: 0 0 90px -10px var(--h1), inset 0 0 0 1px color-mix(in srgb, var(--h1) 50%, transparent); border-color: color-mix(in srgb, var(--h1) 60%, transparent); }
.door-room, .door-panel { position: absolute; inset: 10px; border-radius: 999px 999px 12px 12px; }
.door-room {
  overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 30%, var(--h1), var(--h2) 70%);
}
.door-room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; scale: 1.15; transition: scale 1.2s var(--ease-out); }
.door:hover .door-room img { scale: 1; }
.door-room .room-icon { position: relative; font-size: clamp(56px, 6vw, 90px); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5)); transition: scale 0.8s var(--ease-out); }
.door:hover .room-icon { scale: 1.15; }
.door-room .room-enter {
  position: absolute; bottom: 9%; left: 50%; translate: -50% 0;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.24em;
  padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); white-space: nowrap;
}
.door-panel {
  transform-origin: 0% 50%;
  transition: transform 1s var(--ease-out), box-shadow 1s;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 30%),
    linear-gradient(160deg, #1b1925, #0d0c13 70%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 36% 20px 22px;
  backface-visibility: hidden;
}
.door:hover .door-panel, .door:focus-visible .door-panel { transform: rotateY(-80deg); box-shadow: 30px 0 60px rgba(0, 0, 0, 0.6); }
.door.is-locked:hover .door-panel { transform: rotateY(-16deg); }
.door-panel .p-no { font-family: var(--f-display); font-weight: 900; font-size: clamp(42px, 4.5vw, 70px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35); }
.door-panel .p-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.15; }
.door-panel .p-knob {
  position: absolute; right: 18px; top: 58%; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4c4, #d9a93a 50%, #6b4f12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}
.door-panel .p-lock { position: absolute; right: 20px; top: calc(58% + 24px); font-size: 12px; opacity: 0.6; }
.door-meta { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.door-meta .m-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.door-meta h3 { font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.door-meta .m-sub { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--faint); }
.door-meta p { color: var(--muted); font-size: 14px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.18em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.live { color: var(--azin); border-color: rgba(255, 210, 63, 0.4); }
.status.live::before { animation: blink 1.4s infinite; }
.status.building { color: var(--junhee-2); border-color: rgba(92, 225, 255, 0.35); }
.status.soon { color: var(--faint); }
@keyframes blink { 50% { opacity: 0.2; } }

/* =====================================================================
   QUESTS
   ===================================================================== */
.quest-tabs { max-width: 1400px; margin: 0 auto 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.qtab {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--muted);
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.qtab:hover { color: var(--ink); border-color: var(--qc); }
.qtab[aria-selected="true"] { background: var(--qc); color: var(--bg); border-color: var(--qc); font-weight: 600; }
.qtab .qi { font-size: 16px; }
.quest-panel {
  --qc: var(--azin);
  max-width: 1400px; margin: 0 auto; position: relative; overflow: hidden;
  padding: clamp(24px, 4vw, 56px); border-radius: 30px;
  background: radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--qc) 10%, transparent), transparent 60%), rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}
.q-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; }
.q-title { display: flex; align-items: center; gap: 18px; }
.q-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-size: 36px; background: color-mix(in srgb, var(--qc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--qc) 40%, transparent); }
.q-title h3 { font-family: var(--f-display); font-weight: 900; font-size: clamp(26px, 3.6vw, 54px); line-height: 1; letter-spacing: -0.03em; }
.q-title p { color: var(--muted); margin-top: 6px; }
.q-xp { width: min(320px, 100%); }
.q-xp-top { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 10px; }
.q-xp-top b { color: var(--qc); }
.q-xp-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.q-xp-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--qc), color-mix(in srgb, var(--qc) 50%, #fff)); transform-origin: 0 50%; transform: scaleX(0); }
.q-track { position: relative; margin-top: clamp(40px, 6vh, 64px); display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 22px; }
.q-line { position: absolute; left: 12px; right: 12px; top: 11px; height: 2px; background: var(--line); }
.q-line i { position: absolute; inset: 0; background: var(--qc); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px var(--qc); }
.q-ms { position: relative; padding-top: 46px; }
.q-node {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--bg);
  background: var(--bg); border: 2px solid var(--faint);
}
.q-ms.done .q-node { background: var(--qc); border-color: var(--qc); }
.q-ms.doing .q-node { border-color: var(--qc); }
.q-ms.doing .q-node::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--qc); animation: ping 1.6s var(--ease-out) infinite; @media (prefers-reduced-motion: reduce) { animation: none; opacity: 0.4; } }
.q-ms.doing .q-node::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--qc); }
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.q-date { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--qc); }
.q-ms h4 { font-family: var(--f-kr); font-weight: 700; font-size: clamp(17px, 1.4vw, 21px); margin: 6px 0 4px; line-height: 1.3; }
.q-ms p { color: var(--muted); font-size: 14px; }
.q-ms-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.q-chip { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.16em; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--faint); }
.q-ms.done .q-chip { color: var(--bg); background: var(--qc); border-color: var(--qc); }
.q-ms.doing .q-chip { color: var(--qc); border-color: var(--qc); }
.q-who { display: flex; }
.q-who span { width: 24px; height: 24px; margin-left: -6px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 10px; font-weight: 900; color: var(--bg); border: 2px solid var(--bg); }
@media (max-width: 860px) {
  .q-track { grid-template-columns: 1fr; gap: 28px; padding-left: 40px; }
  .q-line { left: 11px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .q-line i { transform-origin: 50% 0; transform: scaleY(0); }
  .q-ms { padding-top: 0; }
  .q-node { left: -40px; }
}

/* =====================================================================
   ROOMS
   ===================================================================== */
.room-list { max-width: 1400px; margin: 0 auto; list-style: none; border-bottom: 1px solid var(--line); }
.room-list li {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 70px 1fr auto; align-items: baseline; gap: 18px;
  padding: clamp(18px, 3vh, 30px) 8px; border-top: 1px solid var(--line);
  transition: color 0.4s, padding 0.5s var(--ease-out);
}
.room-list li::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--tri); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease-out); }
.room-list li:hover { color: var(--bg); padding-left: 28px; }
.room-list li:hover::before { transform: scaleY(1); }
.room-list span { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; opacity: 0.6; }
.room-list b { font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 4.4vw, 64px); line-height: 1.05; letter-spacing: -0.03em; }
.room-list em { font-style: normal; font-size: 14px; opacity: 0.7; }
@media (max-width: 640px) { .room-list li { grid-template-columns: 40px 1fr; } .room-list em { grid-column: 2; } }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { position: relative; padding: clamp(80px, 14vh, 160px) var(--pad) 28px; overflow: hidden; }
.footer-big {
  font-family: var(--f-display); font-weight: 900; font-size: clamp(48px, 12.4vw, 230px); line-height: 0.9; letter-spacing: -0.05em;
  text-align: center; white-space: nowrap;
}
.footer-big .fch { display: inline-block; background: var(--tri); background-size: 1200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-big .fsp { display: inline-block; width: 0.3em; }
.footer-bar { margin-top: clamp(50px, 8vh, 90px); padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--faint); }
.footer-bar a { text-decoration: none; color: var(--muted); }
.footer-bar a:hover { color: var(--ink); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 250; translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 500; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: opacity 0.35s, translate 0.45s var(--ease-out);
}
.toast.show { opacity: 1; translate: -50% 0; }
