/* =========================================================================
   TotalReview Design System — Colors & Type
   Editorial auto/tech review publication (RO)
   ========================================================================= */

/* --- Fonts (Google Fonts — flagged as substitutions; swap for licensed later) --- */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700;8..60,900&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* ---------- Brand ---------- */
  --tr-red:          #D4261A;   /* primary "verdict" red */
  --tr-red-dark:     #A81C12;
  --tr-red-soft:     #FBE9E7;
  --tr-ink:          #111111;   /* headline black */
  --tr-paper:        #FBFAF7;   /* warm off-white */
  --tr-cream:        #F4EFE6;   /* section panel */
  --tr-gold:         #C8A24B;   /* editor's pick accent */
  --tr-blue:         #1E3A8A;   /* link / rating accent */
  --tr-green:        #0F7A4F;   /* "recommend" */

  /* ---------- Neutrals ---------- */
  --tr-n-950: #0B0B0B;
  --tr-n-900: #1A1A1A;
  --tr-n-800: #2A2A2A;
  --tr-n-700: #404040;
  --tr-n-500: #737373;
  --tr-n-300: #D4D4D4;
  --tr-n-200: #E5E5E5;
  --tr-n-100: #F2F0EB;
  --tr-n-50:  #FAF8F3;

  /* ---------- Semantic ---------- */
  --fg-1: var(--tr-ink);
  --fg-2: var(--tr-n-700);
  --fg-3: var(--tr-n-500);
  --fg-inv: var(--tr-paper);
  --bg-1: var(--tr-paper);
  --bg-2: var(--tr-cream);
  --bg-inv: var(--tr-n-950);
  --border-1: var(--tr-n-200);
  --border-2: var(--tr-n-300);
  --border-strong: var(--tr-ink);
  --link: var(--tr-red);

  /* ---------- Rating scale ---------- */
  --score-excellent: #0F7A4F;
  --score-good:      #6B9A3E;
  --score-ok:        #C8A24B;
  --score-poor:      #D97706;
  --score-bad:       #D4261A;

  /* ---------- Type families ---------- */
  --font-serif: 'Source Serif 4', 'Times New Roman', Georgia, serif;   /* display / headlines */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* ---------- Type scale (fluid-ish, editorial) ---------- */
  --t-hero:    clamp(56px, 8vw, 112px);   /* cover story */
  --t-display: clamp(40px, 5vw, 72px);
  --t-h1:      clamp(32px, 3.5vw, 48px);
  --t-h2:      28px;
  --t-h3:      22px;
  --t-h4:      18px;
  --t-body:    17px;
  --t-small:   14px;
  --t-eyebrow: 12px;

  /* ---------- Weights ---------- */
  --w-regular: 400;
  --w-medium:  500;
  --w-semi:    600;
  --w-bold:    700;
  --w-black:   900;

  /* ---------- Spacing (4px base) ---------- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  /* ---------- Radii (editorial = tight) ---------- */
  --r-0: 0;
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
  --r-full: 999px;

  /* ---------- Shadows ---------- */
  --shadow-1: 0 1px 2px rgba(17,17,17,0.06);
  --shadow-2: 0 4px 16px rgba(17,17,17,0.08);
  --shadow-3: 0 12px 40px rgba(17,17,17,0.12);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in-out: cubic-bezier(.6,0,.4,1);
  --dur-fast: 120ms;
  --dur-med:  220ms;
  --dur-slow: 420ms;

  /* ---------- Container ---------- */
  --container: 1440px;
  --gutter: 24px;
}

/* =========================================================================
   Base semantic styles
   ========================================================================= */
html, body {
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.tr-hero, h1.tr-hero {
  font-family: var(--font-serif);
  font-weight: var(--w-black);
  font-size: var(--t-hero);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 20;
  color: var(--fg-1);
  text-wrap: balance;
}

.tr-display, h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--t-display);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2, .tr-h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--t-h2);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3, .tr-h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--t-h3);
  line-height: 1.2;
}

h4, .tr-h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--t-h4);
  line-height: 1.3;
}

p, .tr-body { font-size: var(--t-body); line-height: 1.6; color: var(--fg-1); }
.tr-small { font-size: var(--t-small); color: var(--fg-2); }
.tr-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tr-red);
}
code, .tr-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--tr-n-100);
  padding: 2px 6px;
  border-radius: var(--r-2);
}

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tr-red-dark); text-decoration-thickness: 2px; }

hr { border: none; border-top: 1px solid var(--border-1); margin: var(--sp-6) 0; }
hr.tr-rule-strong { border-top: 2px solid var(--border-strong); }
