/* ==========================================================================
   DESIGN TOKENS
   Extracted from the live computed styles of a Tailwind v4 site (Nov 2026).
   Two themes: dark (the site's default) and light ("paper").
   Switch with:  <html data-theme="dark">  |  <html data-theme="light">
   ========================================================================== */

:root {
  /* ---------- Fonts ---------- */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Outfit", "Geist", system-ui, sans-serif;     /* headings */
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif; /* italic emphasis words only */
  --font-urdu: "Noto Nastaliq Urdu", "Geist", serif;            /* Urdu / Arabic script */
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* ---------- Type scale (fluid) ---------- */
  --text-display: clamp(48px, 7.6vw, 116px);
  --text-display--lh: 0.95;   --text-display--ls: -0.05em;
  --text-h1: clamp(40px, 5.8vw, 84px);
  --text-h1--lh: 1.04;        --text-h1--ls: -0.045em;
  --text-h2: clamp(34px, 5vw, 66px);
  --text-h2--lh: 1.05;        --text-h2--ls: -0.045em;
  --text-statement: clamp(28px, 4.2vw, 60px);
  --text-statement--lh: 1.08; --text-statement--ls: -0.04em;
  --text-stat: clamp(28px, 3.4vw, 44px);
  --text-stat--lh: 1;         --text-stat--ls: -0.04em;
  --text-h3: clamp(22px, 2vw, 28px);
  --text-h3--lh: 1.16;        --text-h3--ls: -0.03em;
  --text-h4: 19px;            --text-h4--lh: 1.3;
  --text-lead: clamp(17px, 1.5vw, 19px);
  --text-body: 16px;
  --text-small: 15px;
  --text-caption: 13px;

  /* Tailwind base sizes used alongside the custom scale */
  --text-xs: 0.75rem;  --text-sm: 0.875rem;  --text-base: 1rem;
  --text-xl: 1.25rem;  --text-3xl: 1.875rem;

  --weight-light: 300; --weight-normal: 400; --weight-medium: 500;
  --weight-semibold: 600; --weight-bold: 700;

  --tracking-tight: -0.025em; --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;   --tracking-widest: 0.1em;
  --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625;

  /* ---------- Spacing ---------- */
  --spacing: 0.25rem;                       /* Tailwind 4px base unit */
  --space-section: clamp(52px, 6.5vw, 88px);/* vertical padding between sections */
  --space-hero: clamp(44px, 6vw, 80px);
  --space-head: clamp(24px, 3.5vw, 44px);   /* gap under a section heading */
  --space-gutter: 20px;                     /* page side padding (mobile) */
  --space-card: clamp(22px, 2.6vw, 32px);   /* card inner padding */
  --container-md: 28rem;
  --container-7xl: 80rem;                   /* max page width: 1280px */
  --header-height: 72px;

  /* ---------- Radii ---------- */
  --radius-xs: 0.125rem; --radius-sm: 0.25rem; --radius-md: 0.375rem;
  --radius-lg: 0.5rem;   --radius-xl: 0.75rem; --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;  --radius-4xl: 2rem;
  --radius-card: 28px;   /* big cards */
  --radius-inner: 20px;  /* nested elements inside a card */
  --radius-pill: 9999px; /* buttons, chips, avatars */

  /* ---------- Motion ---------- */
  --ease-soft: cubic-bezier(0.2, 0.75, 0.15, 1);
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 300ms;
  --duration-screen: 400ms;
}

/* ==========================================================================
   DARK THEME  (default)
   ========================================================================== */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --c-paper:   #0d0e0b;  /* page background */
  --c-paper-2: #151612;  /* alt section background */
  --c-paper-3: #30312c;
  --c-card:    #171814;  /* card surface */
  --c-well:    #121310;  /* inset / input surface */
  --c-quiet:   #30312c;

  --c-ink:     #f1f1ea;  /* primary text (cream) */
  --c-ink-2:   #d8d8d0;
  --c-muted:   #a3a49b;  /* secondary text */
  --c-faint:   #8a8c83;  /* tertiary text */

  --c-line:    #262822;  /* default borders */
  --c-line-2:  #34362e;  /* stronger borders */
  --c-edge:    #262822;
  --c-rim:     #34362e;

  --c-lime:        #c5f15c; /* brand accent */
  --c-lime-deep:   #b5de56;
  --c-lime-text:   #c6ec5b; /* accent used as text on dark */
  --c-lime-soft:   #c6ec5b24; /* 14% tint */
  --c-on-lime:     #16210a; /* text on lime */

  --c-night:       #1d1f18; /* "always dark" panels */
  --c-night-2:     #262820;
  --c-night-line:  #34362e;

  --c-danger:      #e8907f;
  --c-danger-soft: #e8907f26;
  --c-warn:        #ddbe72;
  --c-warn-soft:   #ddbe7226;
  --c-info:        #9fb4e0;
  --c-info-soft:   #9fb4e026;

  /* Avatar / category tints (same in both themes) */
  --color-av1: #eaf2dd; --color-av1-ink: #2e4a0c;  /* green  */
  --color-av2: #e7e8f0; --color-av2-ink: #2d3150;  /* indigo */
  --color-av3: #f3eadf; --color-av3-ink: #5b3b16;  /* sand   */
  --color-av4: #ddede6; --color-av4-ink: #1f4a3a;  /* mint   */

  /* Shadows */
  --shadow-btn:       0 10px 24px -12px #14141499;
  --shadow-btn-hover: 0 16px 30px -12px #141414b3;
  --shadow-card:      0 30px 60px -30px #14141459;
}

/* ==========================================================================
   LIGHT THEME  ("paper")
   ========================================================================== */
:root[data-theme="light"] {
  color-scheme: light;

  --c-paper:   #f3f2ec;
  --c-paper-2: #eae9e1;
  --c-paper-3: #e7e8e2;
  --c-card:    #ffffff;
  --c-well:    #f4f4f0;
  --c-quiet:   #e9e9e3;

  --c-ink:     #141414;
  --c-ink-2:   #2a2a27;
  --c-muted:   #5c5c55;
  --c-faint:   #6b6b64;

  --c-line:    #deddd4;
  --c-line-2:  #cfcec4;
  --c-edge:    #e3e3dd;
  --c-rim:     #e3e3dd;

  --c-lime:        #c5f15c;
  --c-lime-deep:   #9bc23a;
  --c-lime-text:   #3b6309;  /* accent as text on light (AA contrast) */
  --c-lime-soft:   #eaf7cf;
  --c-on-lime:     #16210a;

  --c-night:       #141414;
  --c-night-2:     #1e1e1c;
  --c-night-line:  #2e2e2b;

  --c-danger:      #b33a2a;
  --c-danger-soft: #fbe8e4;
  --c-warn:        #8a5d00;
  --c-warn-soft:   #f8efd8;
  --c-info:        #2f4fa0;
  --c-info-soft:   #e6ecfa;
}

/* Public color tokens: alias the per-theme --c-* values (lets Tailwind and plain CSS share names) */
:root {
  --color-card: var(--c-card);
  --color-danger: var(--c-danger);
  --color-danger-soft: var(--c-danger-soft);
  --color-edge: var(--c-edge);
  --color-faint: var(--c-faint);
  --color-info: var(--c-info);
  --color-info-soft: var(--c-info-soft);
  --color-ink: var(--c-ink);
  --color-ink-2: var(--c-ink-2);
  --color-lime: var(--c-lime);
  --color-lime-deep: var(--c-lime-deep);
  --color-lime-soft: var(--c-lime-soft);
  --color-lime-text: var(--c-lime-text);
  --color-line: var(--c-line);
  --color-line-2: var(--c-line-2);
  --color-muted: var(--c-muted);
  --color-night: var(--c-night);
  --color-night-2: var(--c-night-2);
  --color-night-line: var(--c-night-line);
  --color-on-lime: var(--c-on-lime);
  --color-paper: var(--c-paper);
  --color-paper-2: var(--c-paper-2);
  --color-paper-3: var(--c-paper-3);
  --color-quiet: var(--c-quiet);
  --color-rim: var(--c-rim);
  --color-warn: var(--c-warn);
  --color-warn-soft: var(--c-warn-soft);
  --color-well: var(--c-well);
}

/* ==========================================================================
   SECTION COLOUR PRESETS
   The site themes individual panels with --ink / --accent / --bright.
   Palettes below were found in its utilities; pairings are suggestions.
   Usage: <section class="panel" data-preset="forest">
   ========================================================================== */
[data-preset][data-preset] { background: var(--ink); color: #f4f5ef; }
[data-preset="midnight"] { --ink: #0d0f1a; --accent: #2447dc; --bright: #ffe55b; }
[data-preset="navy"]     { --ink: #101f34; --accent: #2447dc; --bright: #facc15; }
[data-preset="forest"]   { --ink: #173f32; --accent: #c6ec5b; --bright: #dded86; }
[data-preset="plum"]     { --ink: #652d3f; --accent: #6151aa; --bright: #ed7359; }
[data-preset="slate"]    { --ink: #161925; --accent: #6151aa; --bright: #c8a566; }
[data-preset="dusk"]     { --ink: #343347; --accent: #6151aa; --bright: #a87859; }
