/* FOX TERMINAL theme layer (2026-10-30). Loaded after style.css on every page.
   Colours only + glow: no layout, no animation changes. Dark = deep navy-black + orange/amber glow.
   Light = white-ish + orange accents. Brand assets live in /brand/ (see brand/README.md). */
:root,
:root[data-theme="dark"] {
  --fox-orange: #ff8a1f;
  --fox-amber: #ffb020;
  --fox-ember: #ff5f0f;
  --fox-grad: linear-gradient(135deg, #ff6a13 0%, #ff8a1f 45%, #ffb020 100%);
  --fox-glow: 0 0 18px rgba(255, 138, 31, 0.35), 0 0 2px rgba(255, 176, 32, 0.6);
  --fox-glow-soft: 0 0 24px rgba(255, 122, 26, 0.18);
  --fox-ink: #0a0e17;
}
:root[data-theme="light"] {
  --fox-glow: 0 4px 14px rgba(255, 122, 26, 0.28);
  --fox-glow-soft: 0 2px 10px rgba(194, 65, 12, 0.10);
}

/* Deep navy-black canvas behind the (recoloured) wave animation */
html[data-theme="dark"] body,
html:not([data-theme]) body {
  background-color: #0a0e17;
  background-image: radial-gradient(120% 80% at 50% 115%, rgba(255, 106, 19, 0.10) 0%, rgba(10, 14, 23, 0) 60%);
  background-attachment: fixed;
}
html[data-theme="light"] body {
  background-color: #fcfbf9;
  background-image: radial-gradient(120% 70% at 50% 120%, rgba(255, 138, 31, 0.07) 0%, rgba(252, 251, 249, 0) 60%);
  background-attachment: fixed;
}

/* Primary actions: orange -> amber gradient with soft glow (both themes) */
.btn.primary,
a.btn.primary,
a.btn.primary:hover,
a.btn.primary:visited,
a.btn.primary:active {
  background: var(--fox-grad);
  border-color: transparent;
  color: var(--fox-ink);
  box-shadow: var(--fox-glow);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.primary:disabled { box-shadow: none; }

/* Cards: faint warm rim light in dark mode */
html[data-theme="dark"] .card,
html:not([data-theme]) .card { box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 138, 31, 0.06); }

/* Brand logo: fox icon with glow */
.brand-logo,
.login-logo img { filter: drop-shadow(0 0 10px rgba(255, 122, 26, 0.45)); }
html[data-theme="light"] .brand-logo,
html[data-theme="light"] .login-logo img { filter: drop-shadow(0 2px 6px rgba(194, 65, 12, 0.25)); }
.brand-logo { object-fit: contain; border-radius: 8px; }
.brand h1 { letter-spacing: 0.06em; }
html[data-theme="dark"] .brand h1 { background: var(--fox-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* AI Studio mind-map: each domain keeps its own neon colour at rest (sample look); hover/active unchanged */
.ai-node[data-domain="STRATEGY"] { --node-hot: #4ade80; }
html[data-theme="dark"] body.page-ai .ai-node:not(.is-on):not(.is-done) {
  border-color: color-mix(in srgb, var(--node-hot) 70%, transparent);
  color: color-mix(in srgb, var(--node-hot) 55%, #ffffff);
  background: color-mix(in srgb, var(--node-hot) 8%, #0b0f19);
  box-shadow: 0 0 10px color-mix(in srgb, var(--node-hot) 35%, transparent);
}

/* Focus ring in brand colour */
:focus-visible { outline-color: var(--fox-orange); }

/* ---------- Login: split layout (banner shown whole + form) ----------
   Desktop >= 900px: banner left, form right, over the dark brand background.
   Below 900px: banner on top at full width, form below. The banner is never cropped or stretched
   (width 100%, height auto, native 2:1 ratio). Its baked-in CTA is decorative: no link, no pointer events. */
html, body.page-login { max-width: 100%; }
body.page-login { overflow-x: hidden; }
body.page-login .login-wrap.login-split {
  min-height: calc(100vh - 60px);
  min-height: calc(100dvh - 60px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  align-content: start;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 8px;
  box-sizing: border-box;
}
body.page-login .login-banner {
  margin: 0;
  width: 100%;
  max-width: 100%;
  line-height: 0;
  background: #0a0e17;
  overflow: hidden;
  pointer-events: none;      /* artwork only: the drawn "Discover Fox Terminal" button is not clickable */
  user-select: none;
  -webkit-user-select: none;
}
body.page-login .login-banner picture,
body.page-login .login-banner-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1774 / 887;
  object-fit: contain;
}
body.page-login .login-split .login-card {
  width: min(420px, calc(100vw - 24px));
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  body.page-login .login-wrap.login-split {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    align-content: center;
    gap: clamp(24px, 3vw, 48px);
    max-width: 1440px;
    padding: 32px clamp(20px, 3vw, 48px) 8px;
  }
  body.page-login .login-banner {
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 31, 0.22);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 42px rgba(255, 122, 26, 0.16);
  }
  body.page-login .login-split .login-card { width: 100%; }
}
html[data-theme="light"] body.page-login .login-banner {
  border-color: rgba(194, 65, 12, 0.18);
  box-shadow: 0 18px 44px rgba(10, 14, 23, 0.18), 0 0 30px rgba(255, 138, 31, 0.12);
}
@media (max-width: 899px) {
  body.page-login .login-split .login-card { margin: 0 auto; }
}
/* Wordmark under the icon on login */
.login-wordmark { text-align: center; margin: 6px 0 4px; }
.login-wordmark strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: 0.14em; background: var(--fox-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-wordmark span { display: block; font-size: 10px; letter-spacing: 0.22em; color: var(--muted); margin-top: 2px; }
body.page-login .login-logo img { width: min(128px, 40%); }

/* Light mode: keep the wave animation but draw it as warm orange lines on white (was a grey veil). */
html[data-theme="light"] body #wave-bg.wave-bg,
html[data-theme="light"] body #studio-wave-bg.studio-wave-bg,
html[data-theme="light"] body #studio-wave-bg.wave-bg {
  filter: invert(1) hue-rotate(180deg) saturate(1.2);
  opacity: 0.22;
}
html[data-theme="light"] body:has(.ai-desk[data-state="speaking"]) #wave-bg,
html[data-theme="light"] body:has(.ai-desk[data-state="listening"]) #wave-bg,
html[data-theme="light"] body:has(.ai-desk[data-state="working"]) #wave-bg,
html[data-theme="light"] body:has(.ai-desk.is-speaking) #wave-bg { opacity: 0.32; }

/* Home > Engine: News window / News trade pills — spacing, wrap on narrow screens */
#engine .news-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; max-width: 100%; }
#engine .news-chip-row > .chip { margin: 0; max-width: 100%; }
