/* App styles on brand tokens (tokens.css, from brand/tokens). Fonts are self-hosted.
   One file per component (components/) or page family (pages/). Every file opens with the
   same layer order, so the cascade doesn't depend on the order the files load in, and a
   class is defined in one file only (pre-launch review A32). */
@layer base, components, pages;

@font-face { font-family: "Inter"; src: url("/assets/inter-latin-wght-normal-1f021a24.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/bricolage-grotesque-latin-wght-normal-3084aa15.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.55; }

  /* Type scale (A33): one hero h1, a smaller h1 for cards and the console, h2, and h3. */
  h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 var(--space-3); }
  h1 { font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl)); }
  h2 { font-size: var(--text-lg); }
  h3 { font-size: var(--text-base); font-weight: 700; letter-spacing: 0; }
  .card h1, .console h1, .h1-sm { font-size: clamp(var(--text-xl), 4vw, var(--text-2xl)); }

  a { color: var(--accent); }

  /* One focus ring for everything you can reach with Tab (A28). */
  :is(a, button, input, select, textarea, summary, model-viewer, [tabindex]):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  [tabindex="-1"]:focus { outline: none; }

  .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .skip-link { position: absolute; left: var(--space-4); top: var(--space-2); z-index: 100; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
               background: var(--accent); color: var(--on-accent); font-weight: 600; transform: translateY(-200%); }
  .skip-link:focus { transform: none; }
}
