/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ===== DESIGN TOKENS ===== */
:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-card: rgba(184,196,208,0.06);
  --bg-card-inner: rgba(184,196,208,0.03);
  --text-primary: #e8ecf1;
  --text-secondary: #8899aa;
  --accent: #B8C4D0;
  --accent-glow: rgba(184,196,208,0.2);
  --border: rgba(184,196,208,0.12);

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: clamp(1.875rem, 4vw, 2.5rem);
  --text-hero: clamp(2.5rem, 6vw, 4.5rem);

  /* Spacing */
  --section-gap: 120px;
  --content-max: 1200px;
  --card-radius-outer: 2rem;
  --card-radius-inner: calc(var(--card-radius-outer) - 6px);
  --btn-radius: 9999px;

  /* Breakpoints (used in media queries as raw values) */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* Easing */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-gallery: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-loader: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Z-index */
  --z-noise: 0;
  --z-content: 1;
  --z-gallery-arrows: 20;
  --z-navbar: 100;
  --z-mobile-menu: 200;
  --z-loader: 10000;
}

/* ===== BASE ===== */
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  color: #fff;
  background: rgba(255,255,255,0.2);
}

/* Korean word-break */
p, li, dd, figcaption {
  word-break: keep-all;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 400;
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-hero);
  line-height: 1.4;
}

h2 {
  font-size: var(--text-3xl);
  line-height: 1.4;
}

h3 {
  font-size: var(--text-2xl);
  line-height: 1.45;
}

h4 {
  font-size: var(--text-xl);
  line-height: 1.5;
}

.mono {
  font-family: 'Space Mono', 'Courier New', monospace;
}

/* ===== ACCESSIBILITY: Focus States ===== */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  font-weight: 700;
  border-radius: 8px;
  transition: top 200ms ease;
}
.skip-link:focus {
  top: 16px;
}

/* ===== MOBILE TOKENS ===== */
@media (max-width: 768px) {
  :root {
    --section-gap: 60px;
  }
}
