/* brand/brand.css — Forge brand foundation. SINGLE SOURCE OF TRUTH for palette, type and glow.
 *
 * Derived from the approved identity (landing-page comp + Texpo Land card). Every runtime
 * (marketing site, web chat, desktop app) links this file and then maps its own token names
 * onto the --brand-* variables below, so a palette change is one edit here + `npm run brand:sync`.
 *
 * Do not edit the copies at site/brand.css or app/renderer/brand.css — they are generated.
 */

/* Self-hosted variable fonts (no third-party request; the desktop CSP forbids one anyway). */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Type. Montserrat carries the brand voice (headlines, nav, buttons, labels); Inter carries
     dense product text (chat, tables, settings) where Montserrat's width hurts. System
     fallbacks include Segoe UI/Tahoma so Arabic renders natively. */
  --brand-font-display: 'Montserrat', 'Segoe UI', system-ui, -apple-system, Tahoma, sans-serif;
  --brand-font-ui: 'Inter', 'Segoe UI', system-ui, -apple-system, Tahoma, sans-serif;
  --brand-font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;

  /* Ink ramp: deep navy-black, not neutral grey. Sampled from the comp (#040718 page,
     #070e21 chrome, #0a0c2c band, #131a38 raised). */
  --brand-ink-0: #03061a;
  --brand-ink-1: #060b1f;
  --brand-ink-2: #0a1128;
  --brand-ink-3: #121a3a;
  --brand-ink-4: #1a2350;
  --brand-inset: #050816;

  /* Lines are indigo-tinted so edges read as part of the palette. */
  --brand-line-subtle: rgba(129, 140, 248, 0.10);
  --brand-line: rgba(129, 140, 248, 0.18);
  --brand-line-strong: rgba(139, 120, 255, 0.34);

  /* Text ramp (all >= 4.5:1 on ink-1/ink-2). */
  --brand-text: #f4f3ff;
  --brand-text-2: #bcc0dc;
  --brand-text-3: #8a90b6;
  --brand-text-off: #5d6390;

  /* Violet. Button fill runs #4f1ee1 -> #7443f0 (comp: #4f1ee1 -> #814efa; the end stop is
     deepened so white 600-weight label text stays >= 5:1 across the whole gradient). */
  --brand-violet-700: #4f1ee1;
  --brand-violet-600: #622cee;
  --brand-violet-500: #7443f0;
  --brand-violet-400: #9c6efe;
  --brand-violet-300: #b79cff;
  --brand-violet-text: #a78bfa;
  --brand-magenta: #c14bff;
  --brand-grad: linear-gradient(135deg, var(--brand-violet-700) 0%, var(--brand-violet-500) 100%);
  --brand-grad-hover: linear-gradient(135deg, #5a25ea 0%, #7c4cf3 100%); /* white text stays >= 5:1 */
  --brand-grad-text: linear-gradient(90deg, #8b5cf6 0%, var(--brand-magenta) 100%);
  --brand-band: linear-gradient(100deg, #120450 0%, #2e128c 100%);

  --brand-bubble: #121b6a;

  /* Glow: the outlined-neon edge used on the hero frame, CTA and QR tile in the comp. */
  --brand-glow-edge: 0 0 0 1px rgba(124, 77, 255, 0.55);
  --brand-glow-soft: 0 0 36px rgba(99, 52, 255, 0.28);
  --brand-glow: var(--brand-glow-edge), var(--brand-glow-soft);

  --brand-ok: #3fd18a;
  --brand-warn: #e0b04a;
  --brand-danger: #ff6b7a;
  --brand-info: #5aa9ff;

  --brand-r-sm: 6px; --brand-r-md: 10px; --brand-r-lg: 14px; --brand-r-xl: 18px;
}

/* Light theme keeps the indigo undertone instead of falling back to neutral grey. */
/* Explicit light, or (when a runtime leaves data-theme unset = "System") an OS that prefers light. */
:root[data-theme="light"] {
  --brand-ink-0: #f7f6ff;
  --brand-ink-1: #f1f0fb;
  --brand-ink-2: #ffffff;
  --brand-ink-3: #ebe9f8;
  --brand-ink-4: #dedbf3;
  --brand-inset: #f3f2fb;
  --brand-line-subtle: rgba(60, 50, 140, 0.08);
  --brand-line: rgba(60, 50, 140, 0.16);
  --brand-line-strong: rgba(79, 30, 225, 0.38);
  --brand-text: #14112e;
  --brand-text-2: #464a6b;
  --brand-text-3: #626890;
  --brand-text-off: #9499b8;
  --brand-violet-text: #5b21d6;
  --brand-grad-text: linear-gradient(90deg, #5b21d6 0%, #a21fe0 100%);
  --brand-band: linear-gradient(100deg, #e8e2ff 0%, #d5c9ff 100%);
  --brand-bubble: #e5e1ff;
  --brand-glow-soft: 0 0 28px rgba(99, 52, 255, 0.16);
  --brand-ok: #15803d; --brand-warn: #92620a; --brand-danger: #c81e3c; --brand-info: #0b62c9;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --brand-ink-0: #f7f6ff;
    --brand-ink-1: #f1f0fb;
    --brand-ink-2: #ffffff;
    --brand-ink-3: #ebe9f8;
    --brand-ink-4: #dedbf3;
    --brand-inset: #f3f2fb;
    --brand-line-subtle: rgba(60, 50, 140, 0.08);
    --brand-line: rgba(60, 50, 140, 0.16);
    --brand-line-strong: rgba(79, 30, 225, 0.38);
    --brand-text: #14112e;
    --brand-text-2: #464a6b;
    --brand-text-3: #626890;
    --brand-text-off: #9499b8;
    --brand-violet-text: #5b21d6;
    --brand-grad-text: linear-gradient(90deg, #5b21d6 0%, #a21fe0 100%);
    --brand-band: linear-gradient(100deg, #e8e2ff 0%, #d5c9ff 100%);
    --brand-bubble: #e5e1ff;
    --brand-glow-soft: 0 0 28px rgba(99, 52, 255, 0.16);
    --brand-ok: #15803d; --brand-warn: #92620a; --brand-danger: #c81e3c; --brand-info: #0b62c9;
  }
}

/* Logo helper: the lockup SVG is the whole logo; size it by height only. */
.brand-logo { display: inline-block; height: 28px; width: auto; vertical-align: middle; }
/* Ship the lockup twice (light-text for dark surfaces, ink-text for light) and show one. */
.brand-logo--ink { display: none; }
:root[data-theme="light"] .brand-logo--paper { display: none; }
:root[data-theme="light"] .brand-logo--ink { display: inline-block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .brand-logo--paper { display: none; }
  :root:not([data-theme]) .brand-logo--ink { display: inline-block; }
}
