/* ============================================================
   Fly GACA — Tools compatibility shim
   The interactive tool pages were authored against an earlier
   design system. This file maps that system's design tokens onto
   the current Falcon dark palette and aliases its fonts to Cairo,
   so each tool's self-contained styles render in the current look
   without a per-page rewrite.
   Load order: tokens.css -> base.css -> tools.css -> tools-legacy.css
   ============================================================ */

:root {
  /* --- Old light-theme tokens, remapped to the dark system --- */
  --ivory:        var(--bg);
  --ivory-warm:   var(--surface);
  --ivory-edge:   var(--border);
  --ink:          var(--text);
  --ink-soft:     var(--text-muted);
  --ink-mute:     var(--text-dim);
  --moon:         var(--text);
  --moon-soft:    var(--text-muted);
  --moon-mute:    var(--text-dim);

  /* --- Falcon accents the old system named differently --- */
  --falcon-stroke:        var(--border-bright);
  --falcon-teal-bright:   var(--teal-bright);
  --falcon-sage-bright:   var(--sage-bright);
  --falcon-gold-soft:     #E0C588;

  /* --- Semantic --- */
  --danger:   #E3554E;
  --success:  var(--falcon-sage);
  --warning:  var(--falcon-gold);

  /* --- Radii --- */
  --radius-2: var(--radius-sm);
  --radius-3: var(--radius-md);
  --radius-4: var(--radius-lg);

  /* --- Elevation --- */
  --shadow-1: var(--shadow-sm);
  --shadow-2: var(--shadow-card);

  /* --- Motion --- */
  --dur-1: 0.15s;
  --dur-2: 0.25s;
  --dur-3: 0.4s;
  --ease-glide: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-lift:  cubic-bezier(0.34, 1.4, 0.64, 1);

  /* --- Type scale the old pages reach for (with fallbacks present) --- */
  --text-2xl: clamp(1.5rem, 1.1rem + 1.7vw, 2rem);
  --tracking-tight: -0.02em;
  --leading-tight: 1.15;
}

/* The old pages hard-code Inter Tight / Inter / IBM Plex Sans Arabic.
   Alias all three to the self-hosted Cairo variable face so the type
   matches the rest of the site. */
@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/Cairo-Variable.woff2') format('woff2');
  font-weight: 200 1000; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Cairo-Variable.woff2') format('woff2');
  font-weight: 200 1000; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('../fonts/Cairo-Variable.woff2') format('woff2');
  font-weight: 200 1000; font-display: swap;
}

/* --- The page-title band ('.ph') sat on near-black against a light
   page; on the dark canvas it needs to lift to a surface tone. --- */
.ph {
  background: var(--falcon-deep) !important;
  border-block-end: 3px solid var(--falcon-gold);
}
.ph .back:hover { color: var(--teal-bright); }

/* The old tool body forced a light background; the dark canvas wins. */
body { background: var(--bg) !important; }
