:root {
  --bg:#0A0F1C; --surface:#111A2E; --surfacehi:#1B2740; --borderc:#2C3A57;
  --accent:#22D3EE; --accent2:#8B5CF6; --aurora:#FBBF77; --moon:#FDE68A;
  --up:#34D399; --down:#FB7185; --warn:#FBBF24;
}
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.font-display { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }
.tnum { font-variant-numeric: tabular-nums; }

/* Typographic rhythm */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Brand wordmark gradient (Marama = light) */
.wordmark {
  background: linear-gradient(95deg, #fff 0%, var(--accent) 55%, var(--moon) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Subtle film grain overlay for hero depth */
.grain::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Dawn-light radial wash */
.dawn-wash {
  background:
    radial-gradient(60% 50% at 75% 8%, rgba(251,191,119,.16), transparent 60%),
    radial-gradient(55% 60% at 12% 18%, rgba(34,211,238,.14), transparent 62%),
    radial-gradient(80% 70% at 50% 120%, rgba(139,92,246,.12), transparent 70%);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0A0F1C; }
::-webkit-scrollbar-thumb { background: #2C3A57; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Glow */
.glow-active { box-shadow: 0 0 0 1px rgba(34,211,238,.45), 0 0 28px -6px rgba(34,211,238,.5); }

/* Soft elevation + hover lift for cards */
.card-soft { box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 30px -18px rgba(0,0,0,.7); }
.lift { transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .35s ease; }
.lift:hover { transform: translateY(-4px); }

/* Animated brand mark sheen */
.brand-mark { position: relative; overflow: hidden; }
.brand-mark::after {
  content:''; position:absolute; inset:0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-130%);
}
.group:hover .brand-mark::after { transition: transform .7s ease; transform: translateX(130%); }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: #1E293B; border-radius: 10px; }
.skeleton::after {
  content:''; position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,.12), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton::after { transform: translateX(-100%); }

/* Focus visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #22D3EE; outline-offset: 2px; border-radius: 6px;
}

/* Heatmap cell */
.heat-cell { transition: transform .12s ease; }
.heat-cell:hover { transform: scale(1.18); z-index: 2; position: relative; }

/* Table row hover */
tbody tr { transition: background-color .12s ease; }

/* Landing hero gradient */
.hero-grid {
  background-image:
    linear-gradient(rgba(34,211,238,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 85% at 50% 0%, #000 55%, transparent 100%);
          mask-image: radial-gradient(120% 85% at 50% 0%, #000 55%, transparent 100%);
}
.glass { background: rgba(10,15,28,.72); backdrop-filter: blur(14px) saturate(140%); }

/* Light ray that sweeps the hero (Marama) */
@keyframes marama-ray { 0%,100% { opacity:.35; transform: translateX(-6%) rotate(8deg);} 50% { opacity:.6; transform: translateX(6%) rotate(8deg);} }
.marama-ray { animation: marama-ray 9s ease-in-out infinite; }

[x-cloak] { display: none !important; }

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