/* ============================================================
   Base — reset + grain + utilities
============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--surface-0);
  color: var(--ink-300);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  background: var(--surface-0);
  overflow-x: hidden;
}

/* Selection */
::selection { background: var(--gold-300); color: #000; }

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-0); }
::-webkit-scrollbar-thumb { background: var(--surface-line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }

/* Grain overlay — full page, fixed, above content but non-interactive */
.grain::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.8  0 0 0 0 0.76  0 0 0 0 0.66  0 0 0 .8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* Typography rhythm */
h1, h2, h3, h4 {
  color: var(--ink-100);
  font-family: var(--font-serif-kr);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}
.display {
  font-family: var(--font-serif-kr);
  font-weight: 500;
  font-size: clamp(48px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.display .en {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.label-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--gold-300);
  font-size: 14px;
  letter-spacing: 0.02em;
}
p { color: var(--ink-400); text-wrap: pretty; }

/* Rule */
.rule { height: 1px; background: var(--surface-line); border: 0; margin: 0; }
.rule-gold { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-400), transparent); border: 0; }

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms var(--ease-out-cubic), transform 900ms var(--ease-out-cubic);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out-cubic), transform 700ms var(--ease-out-cubic);
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 400ms; }

/* Split text word reveal */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms var(--ease-out-cubic);
  transition-delay: var(--word-delay, 0ms);
}
.in .split-word > span,
.split-word.in > span {
  transform: translateY(0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  height: 48px;
  padding: 0 var(--s-6);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out-cubic);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-200);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold-300);
  color: #0a0905;
  border-color: var(--gold-300);
}
.btn-primary:hover {
  background: var(--gold-200);
  border-color: var(--gold-200);
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--surface-line);
  color: var(--ink-200);
}
.btn-ghost:hover {
  border-color: var(--gold-300);
  color: var(--gold-100);
}
.btn-text {
  padding: 0;
  height: auto;
  color: var(--gold-200);
  gap: var(--s-2);
  letter-spacing: 0.12em;
}
.btn-text:hover { color: var(--gold-100); }
.btn-text .arr { transition: transform var(--dur-fast); }
.btn-text:hover .arr { transform: translateX(4px); }

/* Cursor (custom) */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--gold-300);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 120ms linear, width 250ms, height 250ms, background 250ms;
  mix-blend-mode: normal;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(201,169,97,.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 600ms var(--ease-out-cubic), width 400ms, height 400ms, border-color 300ms;
}
.cursor-active .cursor-dot { width: 0; height: 0; }
.cursor-active .cursor-ring { width: 56px; height: 56px; border-color: var(--gold-200); }
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Utility */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
