/*
 * styles/base.css
 * Reset, body defaults, typography foundations.
 * Import after tokens.css on every page.
 * No component styles here — only primitives.
 */

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

/* ── BODY ────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background:              var(--bg);
  color:                   var(--text-primary);
  font-family:             var(--font-body);
  font-size:               16px;
  line-height:             1.6;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:              background var(--transition-micro),
                           color     var(--transition-micro);
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family:    var(--font-display);
  font-weight:    500;
  line-height:    1.1;
  letter-spacing: -0.3px;
  color:          var(--text-primary);
}

p {
  color: var(--text-secondary);
}

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

/* ── FORM PRIMITIVES ─────────────────────────────────────────── */
button {
  font-family: var(--font-body);
  cursor:      pointer;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size:   inherit;
}

/* ── ACCESSIBILITY ───────────────────────────────────────────── */
/* Visible focus for keyboard navigation (Keiko, DDR #004) */
:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove outline for mouse users only */
:focus:not(:focus-visible) {
  outline: none;
}

/* ── LANGUAGE-SPECIFIC LINE HEIGHT (DDR #004) ────────────────── */
/* Korean requires more vertical rhythm at equivalent font size */
:lang(ko) {
  line-height: 1.8;
  word-break: keep-all;
}

:lang(zh) {
  line-height: 1.75;
}

:lang(th) {
  line-height: 1.9;
}

/* ── SCROLLBARS ──────────────────────────────────────────────
 * Ultra-thin scrollbars site-wide. Yuki: native browser chrome
 * replaced with 3px token-matched tracks that don't compete
 * with content. Webkit + Firefox covered.
 * ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 3px; height: 3px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: var(--border-strong); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover  { background: var(--text-tertiary); }
::-webkit-scrollbar-corner       { background: transparent; }

/* Firefox */
*                                { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

