/**
 * Aquila brand tokens - the night sky.
 * Dark is the default theme (Aquila lives at night); light is a sunlit variant.
 * See brand/BRAND.md for usage rules.
 *
 * Color roles: gold is the action accent (buttons, markers, attention);
 * constellation blue is for links and secondary marks. Everything else
 * stays in the navy ground family. One action accent per view.
 */
:root {
  color-scheme: dark;

  /* grounds */
  --bg: #050a18;            /* midnight - page ground */
  --surface: #0b1226;       /* nebula - cards, panels */
  --surface-2: #111a33;     /* deeper panels, inputs */
  --surface-3: #16203d;     /* hover / active surfaces */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --overlay: rgba(5, 10, 24, 0.84); /* sticky header scrim */

  /* text */
  --text: #f2f5ff;          /* star white */
  --text-muted: #b9c3dd;    /* moon grey - body copy on dark */
  --text-faint: #8b96b6;    /* metadata; AA on dark grounds */

  /* accents */
  --accent: #f5b942;        /* eagle gold - the thunderbolt, primary action */
  --accent-strong: #ffd166; /* lit gold - hover, highlight */
  --accent-soft: rgba(245, 185, 66, 0.12);
  --accent-line: rgba(245, 185, 66, 0.38);
  --accent-2: #7c9cff;      /* constellation blue - links, secondary marks */
  --accent-2-soft: rgba(124, 156, 255, 0.14);
  --star: #ffffff;

  /* semantic */
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --warning: #fbbf24;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);

  /* focus + elevation */
  --focus-ring: 0 0 0 3px rgba(245, 185, 66, 0.34);
  --shadow-card: 0 22px 54px rgba(2, 5, 14, 0.5);
  --shadow-pop: 0 26px 70px rgba(2, 5, 14, 0.62);

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.18s;
  --dur: 0.3s;
  --dur-slow: 0.7s;

  /* type */
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;

  /* spacing & radii */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 20px; --radius-full: 999px;

  /* gradients */
  --sky: radial-gradient(1200px 600px at 70% -10%, rgba(72, 96, 190, 0.25), transparent 60%),
         radial-gradient(900px 500px at 8% 110%, rgba(245, 185, 66, 0.08), transparent 60%);
  --gold-line: linear-gradient(90deg, transparent, var(--accent), transparent);
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f9;
  --surface-3: #e4e9f5;
  --line: rgba(11, 18, 38, 0.10);
  --line-strong: rgba(11, 18, 38, 0.18);
  --overlay: rgba(246, 247, 251, 0.86);

  --text: #0b1226;
  --text-muted: #3d4763;
  --text-faint: #5b6580;    /* AA on light grounds */

  --accent: #8a6008;        /* darkened gold for contrast on light */
  --accent-strong: #6d4c06;
  --accent-soft: rgba(138, 96, 8, 0.12);
  --accent-line: rgba(138, 96, 8, 0.35);
  --accent-2: #3b5bdb;
  --accent-2-soft: rgba(59, 91, 219, 0.12);
  --star: #0b1226;

  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.10);
  --warning: #a16207;
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.10);

  --focus-ring: 0 0 0 3px rgba(138, 96, 8, 0.30);
  --shadow-card: 0 22px 54px rgba(20, 28, 55, 0.14);
  --shadow-pop: 0 26px 70px rgba(20, 28, 55, 0.18);

  --sky: radial-gradient(1200px 600px at 70% -10%, rgba(72, 96, 190, 0.12), transparent 60%),
         radial-gradient(900px 500px at 8% 110%, rgba(245, 185, 66, 0.10), transparent 60%);
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]):not([data-theme="light"]) {
    color-scheme: light;

    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef1f9;
    --surface-3: #e4e9f5;
    --line: rgba(11, 18, 38, 0.10);
    --line-strong: rgba(11, 18, 38, 0.18);
    --overlay: rgba(246, 247, 251, 0.86);

    --text: #0b1226;
    --text-muted: #3d4763;
    --text-faint: #5b6580;

    --accent: #8a6008;
    --accent-strong: #6d4c06;
    --accent-soft: rgba(138, 96, 8, 0.12);
    --accent-line: rgba(138, 96, 8, 0.35);
    --accent-2: #3b5bdb;
    --accent-2-soft: rgba(59, 91, 219, 0.12);
    --star: #0b1226;

    --success: #15803d;
    --success-soft: rgba(21, 128, 61, 0.10);
    --warning: #a16207;
    --danger: #b91c1c;
    --danger-soft: rgba(185, 28, 28, 0.10);

    --focus-ring: 0 0 0 3px rgba(138, 96, 8, 0.30);
    --shadow-card: 0 22px 54px rgba(20, 28, 55, 0.14);
    --shadow-pop: 0 26px 70px rgba(20, 28, 55, 0.18);

    --sky: radial-gradient(1200px 600px at 70% -10%, rgba(72, 96, 190, 0.12), transparent 60%),
           radial-gradient(900px 500px at 8% 110%, rgba(245, 185, 66, 0.10), transparent 60%);
  }
}
