/* ============================================================
   The Balochistan Post — Design Tokens
   BRAND = red. --brand-600 (#b0070f) is the single knob; the whole brand scale
   — and every chrome element (links, kickers, logo mark, footer, breaking bar)
   — derives from it. NAVY IS RETIRED. GOLD IS RETIRED (neutralized 2026-07-04:
   urgency = red family, chips on red = white, editorial marks = brand red).
   Neutrals = ink + paper (white canvas, ink topstrip/text).
   Live/breaking red is the same red family. Editorial. Bilingual. RTL-aware.
   ============================================================ */

@import url('fonts.css');

:root {
  /* ── Ink scale (text + dark surfaces) ───────────────────── */
  /* Base neutrals bridge to Global Styles presets (Site Editor → Styles → Colors):
     change them there and the whole theme follows. Hardcoded hex = fallback. */
  --ink-950: #050505;
  --ink-900: var(--wp--preset--color--ink, #0a0a0a);
  --ink-800: #161616;
  --ink-700: var(--wp--preset--color--ink-700, #262626);
  --ink-600: #3a3a3a;
  --ink-500: var(--wp--preset--color--ink-500, #585858);
  --ink-400: #767b84;
  --ink-300: var(--wp--preset--color--ink-300, #a6abb3);
  --ink-200: #d2d6dc;
  --ink-150: var(--wp--preset--color--hairline, #e0e3e8);
  --ink-100: #eaecef;
  --ink-50:  var(--wp--preset--color--ink-50, #f5f6f8);

  /* ── Absolute black/white (mode-independent primitives) ──── */
  --white: #fff;
  --black: #000;

  /* ── Paper (light surfaces) ─────────────────────────────── */
  --paper:        var(--wp--preset--color--paper, #ffffff);
  --paper-card:   var(--wp--preset--color--paper-card, #ffffff);
  --paper-sunken: var(--wp--preset--color--paper-sunken, #f5f6f8);

  /* ── Brand — RED (primary). TRUE single knob. ──────────
     Change --brand-600 ONLY; the whole scale (and every chrome element,
     incl. logo mark + footer) is derived from it via color-mix(). ── */
  --brand-600: var(--wp--preset--color--brand, #b0070f);   /* ◀ THE KNOB — now wired to Global Styles (Site Editor → Styles → Colors → "Brand Red"). Change it there and the whole theme + every language clone recolors, no code. Hardcoded hex = fallback. */
  --brand-900: color-mix(in srgb, var(--brand-600), #000 42%);
  --brand-800: color-mix(in srgb, var(--brand-600), #000 26%);
  --brand-700: color-mix(in srgb, var(--brand-600), #000 13%);
  --brand-100: color-mix(in srgb, var(--brand-600), #fff 88%);
  --brand-50:  color-mix(in srgb, var(--brand-600), #fff 94%);
  --brand: var(--brand-600);
  /* Solid ACCENT FILLS (white text sits on these): sign-in hover, active chips,
     current page, story-reader CTAs. Red in both themes — #b0070f/#8a050c both
     clear AA with white text on light and dark canvases. */
  --fill-brand:   var(--red);
  --fill-brand-h: var(--red-strong);

  /* ── LIVE breaking news (slightly hotter than brand, same family) ── */
  --live-bg:  color-mix(in srgb, var(--brand-600), #fff 9%);
  --live-pulse: var(--red-lift);

  /* ── Signal red — the design-system accent. The "Featured & Live" hero is the
     benchmark module; this is its primary accent (red band, LIVE tag, timeline,
     breaking). Use these, never hardcode the hex/rgb. --red-rgb feeds rgba() glows.
     --red-lift = small marks (dots, rules) on BLACK surfaces, where the deep
     brand red loses contrast. */
  --red:        var(--brand-600);
  --red-strong: color-mix(in srgb, var(--brand-600), #000 20%);
  --red-rgb:    176, 7, 15; /* rgba() glows only — recolor via --brand-600 / Global Styles above */
  --red-lift:   color-mix(in srgb, var(--brand-600), #fff 26%);

  /* ── Semantic ───────────────────────────────────────────── */
  --green-600: #18794e;
  --amber-600: #b45309;
  --blue-700:  #1d4ed8;
  --blue-600:  #2563eb;

  /* ── Fonts ──────────────────────────────────────────────── */
  --font-display: 'Source Serif 4', 'Times New Roman', Georgia, serif;
  --font-ui:      'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui-cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  /* Urdu typography system
     - urdu      : default for body / UI / dense text — Noto Naskh Arabic (BBC Urdu style: clean, fast-rendering Naskh)
     - urdu-disp : for display headlines & masthead — modern Nastaliq (Gulzar)
     - urdu-trad : traditional Nastaliq for cultural anchor
     - naskh     : alternate Naskh for Balochi / Brahui specimens */
  --font-urdu:      'Noto Naskh Arabic', 'Noto Sans Arabic', 'Cairo', system-ui, sans-serif;
  --font-urdu-disp: 'Gulzar', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  --font-urdu-trad: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  --font-naskh:     'Noto Naskh Arabic', 'Cairo', sans-serif;
  --font-ar:        'IBM Plex Sans Arabic', 'Noto Naskh Arabic', system-ui, sans-serif; /* hero module (Featured & Live design) */
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* ── Type scale (display) ───────────────────────────────── */
  --t-kicker:  11px;   /* eyebrow / kicker */
  --t-meta:    12px;
  --t-caption: 13px;
  --t-body:    16px;
  --t-lead:    19px;
  --t-h6:      18px;
  --t-h5:      22px;
  --t-h4:      26px;
  --t-h3:      32px;
  --t-h2:      42px;
  --t-h1:      56px;
  --t-hero:    76px;

  /* ── Spacing ────────────────────────────────────────────── */
  --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;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* ── Radius ─────────────────────────────────────────────── */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-pill: 999px;

  /* ── Borders / shadow ───────────────────────────────────── */
  --hairline: 1px solid var(--ink-150);
  --hairline-strong: 1px solid var(--ink-300);
  --rule-thick: 3px solid var(--ink-900);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.14);

  /* ── Layout ─────────────────────────────────────────────── */
  --maxw: 1320px;
  --maxw-narrow: 720px;
  --maxw-wide:   1440px;
  --topbar-h: 36px;
  --nav-h:    64px;
}

/* ── Dark mode tokens (applied via .dark on root) ─────────── */
.dark {
  --paper:        #0d0d0d;
  --paper-card:   #161616;
  --paper-sunken: #0a0a0a;
  --ink-50:  #1a1a1a;
  --ink-100: #232323;
  --ink-150: #2a2a2a;
  --ink-200: #353535;
  --ink-300: #4a4a4a;
  --ink-400: #6a6a6a;
  --ink-500: #8a8a8a;
  --ink-600: #a8a8a8;
  --ink-700: #c4c4c4;
  --ink-800: #e2e2e2;
  --ink-900: #f4f4f4;
  --ink-950: #ffffff;
  --hairline: 1px solid #262626;
  --hairline-strong: 1px solid #3a3a3a;
  --rule-thick: 3px solid var(--ink-900);
  /* Brand is red (mode-independent) — no dark remap needed; the :root red scale
     reads well on the dark canvas. */
  --fill-brand:   var(--red);
  --fill-brand-h: var(--red-strong);
}

/* ── Base reset ────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  color: var(--ink-900);
  background: var(--paper);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── RTL — automatic typography swap ──────────────────────── */
html[dir="rtl"] body { font-family: var(--font-urdu); font-weight: 500; line-height: 1.85; }
html[dir="rtl"] .ltr,
html[dir="rtl"] [lang="en"] { font-family: var(--font-ui); line-height: 1.5; direction: ltr; }
html[dir="rtl"] .display-ur,
html[dir="rtl"] .nastaliq { font-family: var(--font-urdu-disp); font-weight: 400; line-height: 1.9; }
html[dir="rtl"] .naskh { font-family: var(--font-naskh); line-height: 1.7; }

/* English-side helpers (when in LTR doc) */
.ltr .display-en { font-family: var(--font-display); }
.ltr .ui { font-family: var(--font-ui); }

/* ── Reusable atoms ───────────────────────────────────────── */
.kicker {
  font-family: var(--font-ui-cond);
  font-size: var(--t-kicker);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.headline {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}
html[dir="rtl"] .headline { font-family: var(--font-urdu-disp); font-weight: 400; line-height: 1.7; letter-spacing: 0; }

.deck {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-600);
  line-height: 1.45;
}
html[dir="rtl"] .deck { font-family: var(--font-urdu); font-style: normal; line-height: 1.85; }

.meta {
  font-family: var(--font-ui);
  font-size: var(--t-meta);
  color: var(--ink-500);
  letter-spacing: 0.01em;
}

/* ── Shared pulse (live dots / badges across chrome) ──────── */
@keyframes livepulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(.78); }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 2px;
  border: 1px solid var(--ink-900);
  background: var(--ink-900);
  color: var(--white);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--red); border-color: var(--red); }

/* ── Scrollbars (subtle) ──────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Selection ────────────────────────────────────────────── */
::selection { background: var(--red); color: var(--white); }
