/* Reset + base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #0D1628;
}
body {
  margin: 0;
  min-height: 100dvh;
  position: relative;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--fg);
  background-color: #0D1628;
  background:
    radial-gradient(ellipse 38rem 48rem at -10rem 28%, rgba(56,189,248,0.18), rgba(56,189,248,0) 66%),
    radial-gradient(ellipse 42rem 56rem at calc(100% + 10rem) 18%, rgba(212,166,86,0.18), rgba(212,166,86,0) 66%),
    linear-gradient(90deg, rgba(31, 50, 82, 0.82), rgba(16, 26, 46, 0.50) 18%, rgba(16, 26, 46, 0.50) 82%, rgba(31, 50, 82, 0.78)),
    linear-gradient(180deg, #111D33 0%, var(--ink-1) 38%, #0D1628 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11", "ss03";
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg,
      rgba(47, 72, 113, 0.88) 0%,
      rgba(35, 56, 91, 0.70) 10%,
      rgba(18, 30, 53, 0.20) 28%,
      rgba(18, 30, 53, 0.20) 72%,
      rgba(35, 56, 91, 0.66) 90%,
      rgba(47, 72, 113, 0.84) 100%),
    radial-gradient(ellipse 26rem 46rem at 0% 66%, rgba(56, 189, 248, 0.14), rgba(56, 189, 248, 0) 68%),
    radial-gradient(ellipse 28rem 50rem at 100% 50%, rgba(212, 166, 86, 0.12), rgba(212, 166, 86, 0) 70%),
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0) 95px,
      rgba(145, 169, 208, 0.050) 96px,
      rgba(255, 255, 255, 0) 97px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg,
      rgba(125, 211, 252, 0.08) 0,
      rgba(125, 211, 252, 0.030) 14%,
      rgba(255, 255, 255, 0) 32%,
      rgba(255, 255, 255, 0) 68%,
      rgba(232, 197, 126, 0.030) 86%,
      rgba(232, 197, 126, 0.075) 100%);
  mix-blend-mode: screen;
}

body > * {
  position: relative;
  z-index: 1;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }

/* Selection */
::selection { background: var(--gold); color: var(--ink-0); }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--fg);
  margin: 0;
  line-height: 1.08;
}
h1 { font-size: var(--text-hero); letter-spacing: -0.025em; line-height: 1.02; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: var(--text-xl); letter-spacing: -0.012em; }
h4 { font-size: var(--text-lg); letter-spacing: -0.008em; }
p { margin: 0 0 1em; max-width: 64ch; }

/* Layout helpers */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: var(--maxw-narrow); margin: 0 auto; padding-inline: var(--gutter); }

/* Section rhythm */
section { padding-block: clamp(4rem, 8vw, 6.75rem); }
.section-tight { padding-block: clamp(3rem, 6vw, 5rem); }

/* Eyebrow / labels */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  text-align: center;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gold);
  color: var(--ink-0);
  border-color: var(--gold);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 14px 30px -10px rgba(212,166,86,0.45);
}
.btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border-color: transparent;
  padding-inline: 0.6rem;
}
.btn-ghost:hover { color: var(--fg); }

/* Links */
.link-inline {
  color: var(--cyan);
  border-bottom: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.link-inline:hover { color: var(--cyan-soft); border-color: var(--cyan-soft); }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.6rem;
}

/* Blueprint grid background */
.bp-grid {
  background-image:
    linear-gradient(to right, rgba(56,189,248,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56,189,248,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
}

/* Scan line accent (for proof panels / hero) */
.bp-corners {
  position: relative;
}
.bp-corners::before, .bp-corners::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--gold);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  opacity: 0.85;
}
.bp-corners::before { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.bp-corners::after  { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }

/* Mono tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-2) 70%, transparent);
}
.tag-gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.tag-cyan { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 35%, transparent); }

/* Divider */
.hr-line {
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  border: 0;
  margin-block: 0;
}

/* Utility */
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--fg-muted); }
.text-faint { color: var(--fg-faint); }
.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }
.tabular { font-variant-numeric: tabular-nums lining-nums; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Screen reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
