:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5b6676;
  --border: #dde2e9;
  --accent: #1f6feb;
  --accent-soft: #e6effd;
  --hero-from: #0b2545;
  --hero-to: #13315c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e27;
    --text: #e6ebf1;
    --muted: #9aa6b5;
    --border: #2a3441;
    --accent: #5aa2ff;
    --accent-soft: #1b2a3f;
    --hero-from: #08182e;
    --hero-to: #10264a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

nav.site a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
}

nav.site a:hover,
nav.site a[aria-current="page"] { color: var(--text); }

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 40%, #13315c 0%, var(--hero-from) 60%, #050d19 100%);
  color: #fff;
  padding: 120px 0 104px;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 13, 25, 0.85) 0%, rgba(5, 13, 25, 0.35) 55%, rgba(5, 13, 25, 0) 100%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 207, 92, 0.5);
  border-radius: 999px;
  color: #ffcf5c;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .caption {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.hero p {
  margin: 0;
  max-width: 620px;
  font-size: 1.1rem;
  color: #c9d6e8;
}

main.wrap { padding-top: 48px; padding-bottom: 48px; }

section + section { margin-top: 48px; }

h2 { margin: 0 0 8px; font-size: 1.4rem; }

.lede { margin: 0 0 24px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}

.card {
  display: block;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

a.card:hover { border-color: var(--accent); }

.card h3 { margin: 0 0 6px; font-size: 1.05rem; }

.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.note {
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

.viz {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.viz svg {
  display: block;
  width: 100%;
  height: auto;
  background: #0b1626;
}

.viz .body { padding: 16px 20px 20px; }

.viz h3 { margin: 0 0 6px; font-size: 1.05rem; }

.viz p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.radar-sweep {
  transform-origin: 160px 90px;
  animation: sweep 4s linear infinite;
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

.draw {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw 2.5s ease-out forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .draw { animation: none; stroke-dashoffset: 0; }
}
