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

/* The hidden attribute must always win. Without this, any class that sets
   display (.field is flex) silently overrides it and "hidden" stays visible. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
kbd { font-family: var(--mono); font-size: 10.5px; }
svg { flex-shrink: 0; }

::selection { background: var(--primary-soft); color: var(--text); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--primary-ring); outline-offset: 2px; border-radius: 6px; }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boot splash ---------- */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: #0c0716;
  transition: opacity 420ms var(--ease), visibility 420ms;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-mark { width: 64px; animation: bootPulse 1.4s var(--ease) infinite; filter: drop-shadow(0 0 24px rgba(167, 139, 250, .55)); }
.boot-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(167, 139, 250, .15); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; background: var(--grad-brand); border-radius: 3px; animation: bootBar 1s var(--ease) infinite; }
@keyframes bootPulse { 50% { transform: scale(.92); opacity: .75; } }
@keyframes bootBar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Shared motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 7px transparent; } }

.reveal { opacity: 0; animation: fadeUp 560ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 55ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .reveal { opacity: 1; }
}

.no-motion *, .no-motion *::before, .no-motion *::after { transition: none !important; animation: none !important; }
.no-motion .reveal { opacity: 1; }

