html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #0F172A;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.display { font-weight: 600; letter-spacing: -0.035em; line-height: 0.98; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.mono-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #6B7280;
}
.grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.grain-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.7; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 600ms cubic-bezier(.2,.7,.2,1), transform 600ms cubic-bezier(.2,.7,.2,1); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }

.section-num {
  display: flex; align-items: center; gap: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.08em; color: #6B7280;
}
.section-num::after { content: ""; display: block; width: 56px; height: 1px; background: currentColor; opacity: 0.4; }
.section-num.dark { color: #A1A6AE; }

.mcard {
  background: #FFFFFF; border: 1px solid #E7E5E4; border-radius: 10px;
  box-shadow: 0 1px 0 rgba(15,23,42,0.02), 0 1px 3px rgba(15,23,42,0.03);
  transition: transform 300ms cubic-bezier(.2,.7,.2,1), box-shadow 300ms ease, border-color 300ms ease;
}
.mcard:hover { border-color: #D6D3CE; box-shadow: 0 2px 0 rgba(15,23,42,0.02), 0 6px 18px rgba(15,23,42,0.05); }
.mcard-dark { background: #1B1F26; border: 1px solid #23272F; border-radius: 10px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; background: #1f5fb8; color: #FFFFFF; font-weight: 500; border-radius: 8px;
  transition: background 200ms ease, transform 200ms ease;
}
.btn-primary:hover { background: #174a93; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; background: transparent; color: #0F172A; font-weight: 500; border: 1px solid #0F172A; border-radius: 8px;
  transition: background 200ms ease, color 200ms ease;
}
.btn-secondary:hover { background: #0F172A; color: #FFFFFF; }

.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: rgba(31,95,184,0.10); color: #1f5fb8;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 999px; border: 1px solid rgba(31,95,184,0.25);
}
.live-badge .dot {
  width: 6px; height: 6px; border-radius: 999px; background: #1f5fb8;
  box-shadow: 0 0 0 0 rgba(31,95,184,0.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31,95,184,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(31,95,184,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,95,184,0); }
}

.icon-tile {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px;
  background: #F5F2EC; color: #0F172A; border: 1px solid #E7E5E4;
}
.icon-tile.active { background: rgba(31,95,184,0.10); color: #1f5fb8; border-color: rgba(31,95,184,0.25); }
.icon-tile.muted { background: #FFFFFF; color: #A1A6AE; }

.field {
  width: 100%; height: 48px; padding: 0 14px;
  background: #FFFFFF; border: 1px solid #E7E5E4; border-radius: 8px; color: #0F172A; font-size: 15px;
  transition: border-color 200ms ease, box-shadow 200ms ease; appearance: none;
}
.field:focus { outline: none; border-color: #1f5fb8; box-shadow: 0 0 0 3px rgba(31,95,184,0.15); }
.field-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%236B7280' stroke-width='1.5' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

.nav-blur {
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(231,229,228,0);
  transition: border-color 200ms ease, background 200ms ease;
}
.nav-blur.scrolled { border-bottom-color: #E7E5E4; background: rgba(255,255,255,0.92); }

.box-stage {
  position: relative; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 80% at 70% 20%, rgba(31,95,184,0.18), transparent 60%), linear-gradient(180deg, #0F1115 0%, #1B1F26 100%);
  border: 1px solid #23272F;
}
.box-stage .gridlines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(80% 60% at 50% 50%, black 40%, transparent 100%);
}

.lift { transition: transform 320ms cubic-bezier(.2,.7,.2,1), box-shadow 320ms ease; }
.lift:hover { transform: translateY(-3px); }

.foot-link { color: #A1A6AE; transition: color 160ms ease; }
.foot-link:hover { color: #FFFFFF; }
::selection { background: rgba(31,95,184,0.25); }
section[id] { scroll-margin-top: 72px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #6B7280; border: 1px solid #E7E5E4; background: #FFFFFF;
}
.chip-dark { color: #A1A6AE; border-color: #23272F; background: #14171C; }
.chip-accent { color: #1f5fb8; border-color: rgba(31,95,184,0.25); background: rgba(31,95,184,0.08); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 18px; border-radius: 10px;
  background: #0F172A; color: #FFFFFF; font-size: 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease; z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
