/* styles/base.css */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
               "Helvetica Neue", Arial, sans-serif;
  /* No --ui-scale multiplication here: body { zoom: var(--ui-scale) }
     in layout.css already scales fonts (and everything else) in lockstep.
     Multiplying here too would double-scale type vs. spacing. */
  font-size: var(--font-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  /* No min-height: 100vh — combined with body { zoom: var(--ui-scale) } in
     layout.css, a 100vh min-height would render as (100 × ui-scale)vh on
     screen, pushing body past the viewport and forcing the page to scroll
     (which dragged the sidebar out of view). The .app-shell child already
     sets height: calc(100vh / var(--ui-scale)) to fill exactly one viewport
     under zoom; body wraps that and ends up exactly viewport-tall.

     overflow: hidden locks the body so only internal scroll containers
     (.main, .sidebar > nav, drawer panels) can scroll. This is the
     authoritative source of truth for "page does not scroll." */
  overflow: hidden;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button { font: inherit; cursor: pointer; }

/* Scrollbar (Chromium / WebKit) */
::-webkit-scrollbar          { width: 10px; height: 10px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* Focus rings — keyboard only */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection { background: var(--brand); color: var(--bg); }

/* Prevent FOUC on route mount */
#app:empty::before {
  content: "";
  display: block;
  min-height: 100vh;
  background: var(--bg);
}

/* Respect user's motion preferences. !important is appropriate here
   because user OS preference must override component-level animation. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Typography (ported from V4 mock lines 181-215) === */
.t-display-lg {
  font-size: var(--font-display-lg);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}
.t-display {
  font-size: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}
.t-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
