/* ============================================================
   Base — reset, typography, global affordances
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html { height: 100%; }

body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden; /* the app shell manages its own scroll regions */
  transition: background-color var(--dur-slow) var(--ease-out),
              color var(--dur-slow) var(--ease-out);
}

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

p  { color: var(--text-secondary); }

a  { color: var(--text-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(46, 107, 255, 0.35); }

/* ---------- Eyebrow / overline label ---------- */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Keyboard focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -48px;
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--blue-500);
  color: var(--text-on-brand);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-medium);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-3); text-decoration: none; }

/* ---------- Beautiful scrollbars ---------- */
.scroll-y { overflow-y: auto; overflow-x: hidden; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ---------- Signature: ambient aurora backdrop ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--aurora-opacity);
  transition: opacity var(--dur-slow) var(--ease-out);
}
.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  will-change: transform;
}
.aurora__blob--1 {
  width: 560px; height: 560px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(46,107,255,.28), transparent 65%);
  animation: aurora-drift 26s var(--ease-out) infinite alternate;
}
.aurora__blob--2 {
  width: 480px; height: 480px;
  bottom: -160px; right: -100px;
  background: radial-gradient(circle, rgba(53,214,240,.2), transparent 65%);
  animation: aurora-drift 32s var(--ease-out) infinite alternate-reverse;
}
.aurora__blob--3 {
  width: 380px; height: 380px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(31,84,214,.16), transparent 65%);
  animation: aurora-drift 40s var(--ease-out) infinite alternate;
}
@keyframes aurora-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
