/* base.css — shared by all three mockups.
 *
 * THE TYPE FIXES. This file is the whole point of the exercise; the three
 * option stylesheets are just three ways to arrange what this file renders.
 *
 * What was making the letters look "jumped and crooked" in the live app:
 *
 *  1. font-weight: 550 / 650. Neither is a real weight in a non-variable font,
 *     so the browser SYNTHESISES it — it smears each glyph sideways by a
 *     fraction of a pixel. That is the crookedness, literally. Fixed by
 *     shipping a variable font (Inter var supports 100..900 continuously) AND
 *     by declaring font-synthesis: none so a miss can never be faked again.
 *  2. font-size: 11.5px / 12.5px. Fractional sizes put glyph edges on
 *     half-pixels; every letter lands on a different subpixel phase and the
 *     baseline reads as wobbly. Everything here sits on an integer scale.
 *  3. Two different font stacks — tokens.css declares --font, ops.css sets its
 *     own ui-sans-serif stack on body and wins. Half the app rendered in one
 *     face and half in another. One stack here, one place.
 *  4. Numbers in proportional figures, so a column of them never lines up.
 *     tabular-nums everywhere a number can repeat.
 */

/* ── the faces ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: block;
}

/* ── the scale ───────────────────────────────────────────────────────────── */

:root {
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Integer sizes only. No 11.5, no 12.5, ever. */
  --t-11: 11px; --t-12: 12px; --t-13: 13px; --t-14: 14px;
  --t-16: 16px; --t-18: 18px; --t-20: 20px; --t-24: 24px;
  --t-30: 30px; --t-38: 38px;

  /* 4px spacing grid. Every gap, pad and margin is a multiple. */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;

}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--t-14);
  font-weight: 400;
  line-height: 1.5;
  /* 🔴 the single most important line in this file */
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv05' 1;   /* just the tailed l; no stylistic sets */
}

/* Numbers never reflow column to column. */
.num, .stat-value, td.num, th.num, .metric-value, table {
  font-variant-numeric: tabular-nums;
}

/* Optical correction: big type needs to be tightened, small type needs air.
   Uniform letter-spacing is what makes a heading look loose and a caption look
   smooshed at the same time — which is exactly the complaint. */
h1, .t-display { letter-spacing: -0.021em; }
h2, .t-title   { letter-spacing: -0.014em; }
h3             { letter-spacing: -0.009em; }
.t-eyebrow, .t-caps { letter-spacing: 0.07em; }
.t-small       { letter-spacing: 0.004em; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

button, input, select { font: inherit; color: inherit; }

/* Screen-reader-only, still focusable. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; }

/* ── the option switcher, common to all three mockups ────────────────────── */

.switcher {
  position: fixed; bottom: var(--s-5); left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; align-items: center; gap: var(--s-1);
  padding: var(--s-1); border-radius: 999px;
  background: var(--brand-ink);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,.30);
}

.switcher a {
  display: block; padding: 7px 14px; border-radius: 999px;
  font-size: var(--t-13); font-weight: 500; line-height: 1;
  color: rgba(255, 255, 255, 0.62); text-decoration: none;
  white-space: nowrap;
}

.switcher a:hover { color: #fff; }

.switcher a.is-here { background: var(--brand-orange); color: #fff; font-weight: 600; }

.switcher .switcher-label {
  padding: 0 var(--s-3) 0 var(--s-4); font-size: var(--t-11); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.4);
}
