/* ═══════════════════════════════════════════════════════════════════
   Jarvis Playground v3 — Theme: Aurora (cool)
   ─────────────────────────────────────────────────────────────────
   The default theme. Cyan → purple → magenta brand ramp over deep
   blue-black surfaces. "Aurora" = the northern-lights palette:
   ice cyan leading, violet body, magenta tail.

   Contract:
     • tokens.css already defines Aurora as the :root default, so
       this file is the *explicit* restatement — self-documenting,
       and it wins by source order (loads last).
     • ACTIVE when <html> is NOT data-theme="ember". The toggle
       either sets data-theme="ember" or removes the attribute
       (aurora = absent), so the partition is:
           aurora ⇔ html:not([data-theme="ember"])
           ember  ⇔ html[data-theme="ember"]
       Every rule in this file is scoped to the aurora side of that
       partition, and every rule in themes/ember.css to the ember
       side. The two files never overlap → load order between them
       is irrelevant, and no !important is ever needed.
     • Only semantic tokens + theme-owned chrome (body background,
       selection, scrollbar) are set here. Components reference
       roles (--v3-accent, --v3-bg-surface…), never raw hues, so this
       remap re-skins the entire v3 layer — including every
       color-mix() tint and glow — with zero component edits.

   Palette:
     bg base      #050507   bg raised    #0a0b10
     bg surface   #0d0f16   bg elevated  #12151f
     text         #f4f7fb   (cool white)
     cyan         #00f2ff   purple       #7000ff
     magenta      #ff006e   emerald      #00e5a0
     amber        #ffb347   rose         #ff5c7a
   ═══════════════════════════════════════════════════════════════════ */

:root:not([data-theme="ember"]) {

  /* ── Backgrounds — cool near-blacks, blue-violet undertone ─── */
  --v3-bg: #050507;
  --v3-bg-raised: #0a0b10;
  --v3-bg-surface: #0d0f16;
  --v3-bg-elevated: #12151f;
  --v3-bg-overlay: rgba(5, 5, 7, 0.92);

  /* ── Text — cool white, blue-grey dimming ──────────────────── */
  --v3-text: #f4f7fb;
  --v3-text-secondary: rgba(244, 247, 251, 0.72);
  --v3-text-muted: rgba(244, 247, 251, 0.55);
  --v3-text-inverse: #050507;

  /* ── Brand hues — the Aurora ramp ───────────────────────────── */
  --v3-cyan: #00f2ff;
  --v3-purple: #7000ff;
  --v3-magenta: #ff006e;
  --v3-emerald: #00e5a0;
  --v3-amber: #ffb347;
  --v3-rose: #ff5c7a;

  /* ── Brand roles ────────────────────────────────────────────── */
  --v3-accent: var(--v3-cyan);
  --v3-accent-2: var(--v3-purple);
  --v3-accent-3: var(--v3-magenta);
  --v3-accent-2-text: #a78bfa;  /* AA-safe small purple text (7.48:1) */

  /* ── Gradients — cool, 135° (top-left → bottom-right) ─────────
     Aurora's signature direction: light enters from the upper
     left, like a display on a dark wall. */
  --v3-grad-angle: 135deg;
  --v3-grad-brand: linear-gradient(var(--v3-grad-angle),
      var(--v3-cyan) 0%, var(--v3-purple) 55%, var(--v3-magenta) 110%);
  --v3-grad-brand-soft: linear-gradient(var(--v3-grad-angle),
      color-mix(in srgb, var(--v3-cyan) 14%, transparent),
      color-mix(in srgb, var(--v3-purple) 16%, transparent));
  --v3-grad-text: linear-gradient(var(--v3-grad-angle),
      var(--v3-cyan) 0%, var(--v3-purple) 45%, var(--v3-magenta) 90%);
  --v3-grad-surface: linear-gradient(165deg,
      rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 100%);

  /* ── Semantic state — cool hues ─────────────────────────────── */
  --v3-success: var(--v3-emerald);
  --v3-warning: var(--v3-amber);
  --v3-error: var(--v3-rose);
  --v3-info: var(--v3-cyan);

  /* ── Borders — cool white lines, cyan focus ─────────────────── */
  --v3-border: rgba(255, 255, 255, 0.09);
  --v3-border-strong: rgba(255, 255, 255, 0.18);
  --v3-border-hover: color-mix(in srgb, var(--v3-cyan) 40%, transparent);
  --v3-border-focus: var(--v3-cyan);

  /* ── Shadow color — cool black ──────────────────────────────── */
  --v3-shadow-color: rgba(0, 0, 0, 0.55);

  /* ── Ambient (page background) — aurora wash ──────────────────
     --v3-ambient-bg: the fixed page backdrop. A faint violet field
     over the base color with a cyan bloom at the bottom-right;
     content sits on top of it. */
  --v3-ambient-bg:
    radial-gradient(ellipse 120% 80% at 50% -20%,
      color-mix(in srgb, var(--v3-purple) 12%, transparent), transparent 60%),
    radial-gradient(ellipse 90% 60% at 85% 110%,
      color-mix(in srgb, var(--v3-cyan) 8%, transparent), transparent 55%),
    var(--v3-bg);

  /* ── Selection & scrollbar tints ────────────────────────────── */
  --v3-selection-bg: color-mix(in srgb, var(--v3-cyan) 30%, transparent);
  --v3-scroll-thumb: linear-gradient(180deg,
      color-mix(in srgb, var(--v3-cyan) 40%, transparent),
      color-mix(in srgb, var(--v3-purple) 40%, transparent));
  --v3-scroll-thumb-hover: linear-gradient(180deg,
      color-mix(in srgb, var(--v3-cyan) 70%, transparent),
      color-mix(in srgb, var(--v3-purple) 70%, transparent));

  /* ── Theme identity (consumed by theme-toggle.js) ───────────── */
  --v3-theme-color: #050507;
}

/* ─────────────────────────────────────────────────────────────────
   Aurora chrome — body background, selection, scrollbar.
   Scoped to the aurora partition so ember's chrome (same
   properties, different values) never bleeds through.
   ───────────────────────────────────────────────────────────────── */
html:not([data-theme="ember"]) body {
  background: var(--v3-ambient-bg);
  background-attachment: fixed;
  color: var(--v3-text);
}

html:not([data-theme="ember"]) ::selection {
  background: var(--v3-selection-bg);
  color: var(--v3-text);
}

/* scrollbar — cool gradient thumb */
html:not([data-theme="ember"]) {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--v3-accent) 35%, transparent)
                   color-mix(in srgb, var(--v3-text) 4%, transparent);
}
html:not([data-theme="ember"]) ::-webkit-scrollbar { width: 10px; height: 10px; }
html:not([data-theme="ember"]) ::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--v3-text) 2%, transparent);
}
html:not([data-theme="ember"]) ::-webkit-scrollbar-thumb {
  background: var(--v3-scroll-thumb);
  border-radius: var(--v3-radius-full);
  border: 2px solid var(--v3-bg);
}
html:not([data-theme="ember"]) ::-webkit-scrollbar-thumb:hover {
  background: var(--v3-scroll-thumb-hover);
}

/* ─────────────────────────────────────────────────────────────────
   Reduced motion
   ─────────────────────────────────────────────────────────────────
   This file ships no keyframe animations (ambient orbs live in a
   future effects layer); the global kill switch in tokens.css
   covers everything. This block exists so the theme file stays
   self-contained if ambient rules land here. */
@media (prefers-reduced-motion: reduce) {
  html:not([data-theme="ember"]) *,
  html:not([data-theme="ember"]) *::before,
  html:not([data-theme="ember"]) *::after {
    animation: none !important;
    transition: none !important;
  }
}
