/* ─────────────────────────────────────────────────────────────
   Legal Eye · Design Tokens
   Hebrew RTL legal-research platform — "tradition meets technology"
   Navy + ivory + Old Gold accent. Warm-bronze surfaces, not cool-blue.
   ───────────────────────────────────────────────────────────── */

/* Fonts — Google-hosted (used in production by the legal-eye app) */
@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@400;500;700;900&family=Heebo:wght@400;500;600;700;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ── Surfaces — warm ivory + clean white ─────────────────── */
  --bg:               #faf7f0;   /* warm ivory canvas */
  --bg-canvas:        #faf7f0;
  --bg-surface:       #ffffff;   /* cards, dialogs */
  --bg-surface-soft:  #f3efe4;   /* hover, alt row */
  --bg-input:         #faf7f0;
  --bg-hover:         #f3efe4;
  --bg-tinted:        #fdfbf5;   /* very soft section bg */

  /* ── Ink — navy primary, warm grays for text ────────────── */
  --ink:              #0f172a;   /* primary surface for dark bands */
  --ink-2:            #1e293b;
  --fg-1:             #1a1d23;   /* primary text */
  --fg-2:             #5a5e68;   /* secondary text */
  --fg-3:             #8a8d96;   /* tertiary / meta */
  --fg-on-dark:       #faf7f0;
  --fg-on-dark-muted: #9aa0aa;
  --muted:            #64748b;

  /* ── Brand — Old Gold (singular accent) ─────────────────── */
  --gold:             #bf9b30;
  --gold-strong:      #a07e26;
  --gold-dark:        #9a7c25;
  --gold-soft:        #f5ecd0;
  --gold-soft-a:      rgba(191, 155, 48, 0.08);
  --gold-grad:        linear-gradient(135deg, #E3C57E 0%, #C89B3C 50%, #9A7423 100%); /* @kind color */

  /* ── Borders — warm bronze tones, never cool grey ───────── */
  --border:           #d8d2c0;
  --rule:             #d6cfc1;
  --border-strong:    #a8a092;

  /* ── Semantic — desaturated for dignity ─────────────────── */
  --success:          #3a8062;
  --success-soft:     rgba(58, 128, 98, 0.10);
  --warning:          #a07820;
  --warning-soft:     rgba(160, 120, 32, 0.10);
  --danger:           #8b2e2e;
  --danger-soft:      rgba(139, 46, 46, 0.10);
  --info:             #1e40af;
  --green:            #15803d;
  --red:              #dc2626;

  /* ── Shadows — quiet ────────────────────────────────────── */
  --shadow-card:      0 1px 2px rgba(15,23,42,0.04);
  --shadow-elev:      0 8px 24px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);
  --shadow-soft:      0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-gold:      0 10px 30px rgba(191, 155, 48, 0.18);

  /* ── Radii ──────────────────────────────────────────────── */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-pill: 999px;

  /* ── Spacing scale (4-pt base, generous on long-form Hebrew) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 22px;
  --space-6: 28px;
  --space-7: 36px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;

  /* ── Type families ──────────────────────────────────────── */
  --font-serif: 'Frank Ruhl Libre', 'David Libre', 'David', 'Times New Roman', serif;
  --font-sans:  'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* ── Type tokens ────────────────────────────────────────── */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   16px;
  --text-lg:   17px;
  --text-xl:   19px;
  --text-2xl:  22px;
  --text-3xl:  28px;
  --text-4xl:  38px;
  --text-5xl:  56px;

  --leading-tight: 1.25;
  --leading-snug:  1.45;
  --leading-body:  1.7;
  --leading-relaxed: 1.75;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;
  --weight-bold:    700;
  --weight-black:   900;
}

/* ──────────────────────────────────────────────────────────────
   Semantic type — apply to the element directly OR copy onto your own
   selector. Defaults assume Hebrew RTL but work LTR too.
   ────────────────────────────────────────────────────────────── */

html, body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--bg);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

/* Hebrew long-form bodies opt into the serif */
.font-serif, .serif { font-family: var(--font-serif); }
.font-sans, .sans   { font-family: var(--font-sans); }
.font-mono, .mono   { font-family: var(--font-mono); }

h1, .h1 {
  font-family: var(--font-serif);
  font-weight: var(--weight-black);
  font-size: clamp(34px, 5.5vw, 56px);
  letter-spacing: -1px;
  line-height: var(--leading-tight);
  color: var(--ink);
  margin: 0;
}

h2, .h2 {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: var(--leading-tight);
  color: var(--ink);
  margin: 0;
}

h3, .h3 {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: var(--text-xl);
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

h4, .h4 {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  color: var(--fg-1);
  margin: 0;
}

p, .p {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--fg-1);
  margin: 0 0 12px;
}

.lead {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--ink-2);
  line-height: 1.55;
}

/* Eyebrow / kicker — JetBrains Mono, gold, all-caps */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: var(--weight-medium);
}

/* Wordmark — JetBrains Mono is THE typographic gesture of the brand */
.wordmark {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--ink);
}

/* Meta / token labels — bracketed mono numerals like [01] [02] */
.meta-token, .tk {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--gold);
  font-weight: var(--weight-bold);
}

/* Inline code & mono numerals (case names, stats, "Day-12 baseline") */
code, .code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-surface-soft);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  color: var(--ink-2);
}

a {
  color: var(--gold);
  text-decoration: none;
}
a:hover { color: var(--gold-dark); }

hr, .rule {
  border: 0;
  border-top: 1px solid var(--rule);
}

/* Bracketed numeric badge convention — e.g. [01], [02] in trust lists */
.bracket-num::before { content: '['; }
.bracket-num::after  { content: ']'; }

/* ─── Brand · blinking eye + tone-split wordmark ───────────────
   The eye mark blinks every 5s wherever it's inlined in the DOM.
   .le-g paints the "eye" half of the wordmark gold (legal=ink, eye=gold).
   Nested <b> is used so per-surface `.x-wordmark span` rules don't catch it. */
.le-eye-blink { transform-box: fill-box; transform-origin: center; animation: le-blink 5s ease-in-out infinite; }
@keyframes le-blink { 0%,90%,100% { transform: scaleY(1); } 94% { transform: scaleY(0.08); } 98% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .le-eye-blink { animation: none; } }
.le-g { color: var(--gold); }
.le-g-dark { color: #d9b85c; }
