/* ==========================================================================
   DESIGN SYSTEM & CORE TOKENS
   ========================================================================== */
:root {
  --bg-pure: #000000;
  --bg-scene5: #180d0d;
  --bg-ivory: #F5F2EB;
  --bg-ivory-card: #FFFFFF;
  --bg-ivory-warm: #EFECE3;
  
  --text-pure: #FFFFFF;
  --text-light: #F2EFEB;
  --text-dim: #9C9890;
  --text-dark: #181716;
  --text-dark-muted: #5D5A53;

  --copper-primary: #D17646;
  --copper-bright: #E79163;
  --copper-glow: rgba(209, 118, 70, 0.32);
  --copper-subtle: rgba(209, 118, 70, 0.14);
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-ivory: rgba(24, 23, 22, 0.09);

  --font-sans: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Noto Serif Thai', Georgia, serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Simplified Chinese: the Thai webfonts carry no CJK glyphs, so name the
   platform CJK faces explicitly instead of leaving it to the generic fallback. */
:root:lang(zh-Hans) {
  --font-sans: 'IBM Plex Sans Thai', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-serif: 'Noto Serif Thai', "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "SimSun", serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-pure);
  color: var(--text-light);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  background-color: var(--bg-pure);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--copper-bright);
  outline-offset: 4px;
}
