/* =========================================================
   NOVARA · main.css — tokens, reset, base, utilities
   ========================================================= */

:root {
  /* Backgrounds */
  --bg-0: #07070C;
  --bg-1: #0E0B1F;
  --bg-2: #141132;
  --bg-3: #1C1840;
  --bg-4: #24204A;

  /* Strokes & text */
  --stroke: #2A2350;
  --stroke-soft: rgba(255, 255, 255, 0.06);
  --text-0: #F8F7FF;
  --text-1: #B8B4D8;
  --text-2: #6E6A92;

  /* Accents */
  --accent-1: #7C3AED;
  --accent-1-soft: #A855F7;
  --accent-2: #22D3EE;
  --accent-2-soft: #67E8F9;

  /* Semantic */
  --success: #10B981;
  --warn: #F59E0B;
  --danger: #EF4444;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #7C3AED 0%, #22D3EE 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(34,211,238,0.18));
  --grad-brand-flat: linear-gradient(90deg, #7C3AED 0%, #22D3EE 100%);

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Radius */
  --r-1: 6px; --r-2: 12px; --r-3: 20px; --r-pill: 999px;

  /* Shadows */
  --shadow-card: 0 12px 32px rgba(0,0,0,0.35);
  --shadow-lifted: 0 20px 48px rgba(0,0,0,0.45);
  --glow-violet: 0 0 32px rgba(124, 58, 237, 0.35);
  --glow-cyan: 0 0 32px rgba(34, 211, 238, 0.35);
  --glow-mix: 0 0 40px rgba(124, 58, 237, 0.3), 0 0 80px rgba(34, 211, 238, 0.2);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-micro: 120ms;
  --dur-std: 240ms;
  --dur-lg: 400ms;
  --dur-hero: 800ms;

  /* Layout */
  --container: 1280px;
  --container-pad: 24px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* ---------- Body ambient background ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(124,58,237,0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34,211,238,0.12), transparent 60%),
    radial-gradient(800px 800px at 50% 100%, rgba(124,58,237,0.10), transparent 60%),
    linear-gradient(180deg, #07070C 0%, #0A0816 100%);
  z-index: -2;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  z-index: -1;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Unbounded', 'Inter', sans-serif;
  letter-spacing: -0.01em;
  color: var(--text-0);
}
h1 { font-weight: 700; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-weight: 600; font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.15; }
h3 { font-weight: 600; font-size: 1.375rem; line-height: 1.25; }
h4 { font-weight: 600; font-size: 0.875rem; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-1); }

/* ---------- Layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
.section-head h2 { margin-bottom: var(--s-2); }
.section-head p { color: var(--text-1); max-width: 56ch; }

/* ---------- Text gradient helper ---------- */
.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Badges ---------- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.35);
  color: var(--text-0);
  font-size: 0.8125rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}
.badge-pill.badge-live {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.35);
}
.badge-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}
.badge-pill.badge-live .dot { background: var(--danger); box-shadow: 0 0 12px var(--danger); }

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger);
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  animation: pulse 1.8s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent-1), var(--accent-2)); border-radius: 10px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { filter: brightness(1.15); }

/* ---------- Selection ---------- */
::selection { background: var(--accent-1); color: var(--text-0); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 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;
  }
  .reveal { opacity: 1; transform: none; }
}
