/* Blue Archmage LLC, bluearchmage.us
   Plain CSS, no build step. Dark, polished, motion-aware. */

:root {
  --bg: #060a14;
  --bg-2: #0a1020;
  --bg-3: #0f172a;
  --ink: #e8edf7;
  --ink-2: #c7d0e3;
  --muted: #8f9bb8;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --line: rgba(148, 163, 184, 0.14);
  --line-2: rgba(148, 163, 184, 0.26);
  --glass: rgba(13, 20, 38, 0.55);
  --glass-2: rgba(13, 20, 38, 0.8);
  --radius: 18px;
  --radius-sm: 12px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --t: 0.5s;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Grain overlay (SVG turbulence, tiny data URI) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 7.2vw, 5.6rem); letter-spacing: -0.035em; line-height: 1.0; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--blue-2); text-decoration: none; }
a:hover { color: var(--cyan); }
strong { color: var(--ink); font-weight: 600; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.35em 0; }
small { font-size: 0.85em; }

::selection { background: rgba(59, 130, 246, 0.45); color: #fff; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.wrap--narrow { max-width: 820px; }

.gradient-text {
  background: linear-gradient(100deg, #ffffff 0%, #bfdbfe 30%, #60a5fa 55%, #22d3ee 80%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.index {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.lede {
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.6;
}

/* Skip link */
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--ink);
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 14px; }

/* Scroll progress */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--violet));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}
@supports (animation-timeline: scroll()) {
  .progress span {
    animation: grow linear both;
    animation-timeline: scroll(root);
  }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), backdrop-filter var(--t) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(6, 10, 20, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 1.02rem;
}
.brand:hover { color: var(--ink); }
.mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.35)); }
.brand:hover .mark { animation: spin-slow 6s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav__links a {
  position: relative;
  padding: 8px 14px;
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--blue-2), var(--cyan));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__cta {
  margin-left: 10px;
  padding: 9px 16px !important;
  border: 1px solid var(--line-2);
  border-radius: 999px !important;
  background: rgba(59, 130, 246, 0.08);
}
.nav__cta::after { display: none; }
.nav__cta:hover { border-color: var(--blue-2); background: rgba(59, 130, 246, 0.16); }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: var(--glass);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.burger span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.25s, top 0.4s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav__links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 24px;
    background: rgba(6, 10, 20, 0.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.3s, visibility 0s linear 0.4s;
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.45s var(--ease), opacity 0.3s, visibility 0s;
  }
  .nav__links a {
    padding: 14px 10px;
    font-size: 1.12rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }
  .nav__links.is-open a { opacity: 1; transform: none; }
  .nav__links.is-open a:nth-child(1) { transition-delay: 0.05s; }
  .nav__links.is-open a:nth-child(2) { transition-delay: 0.1s; }
  .nav__links.is-open a:nth-child(3) { transition-delay: 0.15s; }
  .nav__links.is-open a:nth-child(4) { transition-delay: 0.2s; }
  .nav__links.is-open a:nth-child(5) { transition-delay: 0.25s; }
  .nav__links.is-open a:nth-child(6) { transition-delay: 0.3s; }
  .nav__links a::after { display: none; }
  .nav__cta { margin: 14px 0 0; text-align: center; border-radius: 12px !important; border-bottom: 1px solid var(--line-2) !important; }
  body.menu-open { overflow: hidden; }
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s, background 0.3s;
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary {
  color: #06101f;
  background: linear-gradient(120deg, #93c5fd, #60a5fa 40%, #22d3ee);
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.3), 0 10px 40px -10px rgba(59, 130, 246, 0.7);
}
.btn--primary:hover {
  color: #06101f;
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.5), 0 16px 50px -8px rgba(34, 211, 238, 0.7);
}
.btn--ghost {
  color: var(--ink);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.02);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--blue-2); background: rgba(59, 130, 246, 0.1); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--blue-2);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}
.aurora {
  position: absolute;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  filter: blur(60px) saturate(130%);
  opacity: 0.75;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurora span:nth-child(1) {
  width: 55vw; height: 55vw; left: 5%; top: 10%;
  background: radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.55), transparent 65%);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  width: 48vw; height: 48vw; right: 0; top: 25%;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.38), transparent 65%);
  animation: drift-b 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(3) {
  width: 42vw; height: 42vw; left: 35%; bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.4), transparent 65%);
  animation: drift-c 30s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(14vw, 8vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vw, -10vh) scale(0.9); } }
@keyframes drift-c { to { transform: translate(-8vw, -14vh) scale(1.2); } }

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 180px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero__in { max-width: 920px; }
.hero h1 { margin-bottom: 26px; }
.hero__sub { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--ink-2); max-width: 58ch; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  opacity: 0.8;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%; top: 7px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cyan);
  animation: cue 1.8s var(--ease-io) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* Staggered reveal on load */
.stagger > * {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  animation: rise 1s var(--ease) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.22s; }
.stagger > *:nth-child(3) { animation-delay: 0.36s; }
.stagger > *:nth-child(4) { animation-delay: 0.5s; }
.stagger > *:nth-child(5) { animation-delay: 0.64s; }
@keyframes rise { to { opacity: 1; transform: none; filter: blur(0); } }

/* Small page hero (inner pages) */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(56px, 10vw, 120px)) 0 clamp(40px, 7vw, 80px);
  overflow: hidden;
  isolation: isolate;
}
.page-hero .aurora { opacity: 0.5; }
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); margin-bottom: 20px; }
.page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.page-hero__art {
  position: absolute;
  right: -6vw;
  top: 50%;
  width: clamp(280px, 38vw, 560px);
  transform: translateY(-50%);
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 860px) {
  .page-hero__art { right: -30vw; opacity: 0.3; width: 420px; }
}

/* Ticker */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 32, 0.6);
  overflow: hidden;
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: ticker 40s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.ticker__track span::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* Sections */
.section { position: relative; padding: clamp(72px, 10vw, 140px) 0; overflow-x: clip; }
/* Decorations may bleed past the edge; never let them widen the page (clip keeps position: sticky working). */
html, body { overflow-x: clip; }
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section__head p { color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; }
@media (max-width: 860px) { .section__head { grid-template-columns: 1fr; } }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(5px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; filter: blur(0); }
.reveal-group > * { opacity: 0; transform: translateY(24px); filter: blur(4px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease); }
.reveal-group.is-in > * { opacity: 1; transform: none; filter: blur(0); }
.reveal-group.is-in > *:nth-child(1) { transition-delay: 0s; }
.reveal-group.is-in > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-group.is-in > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-group.is-in > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-group.is-in > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-group.is-in > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-group.is-in > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-group.is-in > *:nth-child(8) { transition-delay: 0.56s; }

/* Cards */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid, .grid--2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(20, 30, 56, 0.55), rgba(10, 16, 32, 0.55));
  border: 1px solid var(--line);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.25s var(--ease);
  --mx: 50%;
  --my: 50%;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(96, 165, 250, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(34, 211, 238, 0.8), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover::before, .card:hover::after, .card:focus-within::before, .card:focus-within::after { opacity: 1; }
.card:hover { box-shadow: 0 30px 60px -30px rgba(59, 130, 246, 0.45); }
.card > * { position: relative; z-index: 1; }
.card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.card__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: var(--cyan);
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 0.98rem; }
.card--link { display: block; color: inherit; }
.card--link:hover { color: inherit; }
.card .link-arrow { margin-top: 18px; }
.card__tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.06);
  padding: 4px 10px;
  border-radius: 999px;
}
.card__tag--violet { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.08); }
.card__tag--muted { color: var(--muted); border-color: var(--line-2); background: transparent; }
.card--feature { padding: 36px 34px; }
.card--feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

/* Sticky scroller */
.sticky-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 72px;
  align-items: start;
}
.sticky-section__visual {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}
.sticky-section__visual svg { width: 100%; height: auto; display: block; }
.steps { display: grid; gap: 14px; }
.step {
  padding: 26px 26px 26px 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(10, 16, 32, 0.4);
  position: relative;
  transition: border-color 0.5s, background 0.5s, transform 0.5s var(--ease), opacity 0.5s;
  opacity: 0.55;
}
.step::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-2), var(--cyan));
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 0.6s var(--ease);
}
.step.is-active { opacity: 1; border-color: var(--line-2); background: rgba(20, 30, 56, 0.55); transform: translateX(6px); }
.step.is-active::before { transform: scaleY(1); }
.step h3 { margin: 6px 0 8px; }
.step p { color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 900px) {
  .sticky-section { grid-template-columns: 1fr; }
  .sticky-section__visual { position: relative; top: auto; max-width: 520px; margin-inline: auto; }
  .step { opacity: 1; }
}

/* Diagram animation */
.flow { stroke-dasharray: 6 10; animation: flow 1.6s linear infinite; }
.flow--slow { animation-duration: 2.6s; }
.flow--rev { animation-direction: reverse; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.node-glow { animation: node-glow 3s ease-in-out infinite; }
.node-glow:nth-of-type(2n) { animation-delay: 0.8s; }
.node-glow:nth-of-type(3n) { animation-delay: 1.5s; }
@keyframes node-glow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.orbit { transform-origin: center; animation: orbit 40s linear infinite; }
.orbit--rev { animation-direction: reverse; animation-duration: 28s; }
@keyframes orbit { to { transform: rotate(360deg); } }
.breathe { transform-origin: center; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.06); opacity: 1; } }
.draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.is-in .draw, .reveal.is-in .draw { animation: draw 2.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Parallax decoration */
.deco {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
  will-change: transform;
}
.deco--lattice { right: -8vw; top: 10%; width: 46vw; max-width: 620px; }
.deco--ring { left: -10vw; bottom: -10%; width: 40vw; max-width: 520px; }

/* Principle list */
.principles { display: grid; gap: 0; counter-reset: p; }
.principle {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 20px 28px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle .index { padding-top: 10px; font-size: 0.8rem; }
.principle h3 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin-bottom: 10px; }
.principle p { color: var(--ink-2); max-width: 64ch; }
@media (max-width: 640px) { .principle { grid-template-columns: 1fr; gap: 6px; padding: 28px 0; } }

/* Stack layers (technology) */
.layers { display: grid; gap: 12px; }
.layer {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(20, 30, 56, 0.5), rgba(10, 16, 32, 0.3));
  transition: border-color 0.4s, transform 0.4s var(--ease), background 0.4s;
}
.layer:hover { border-color: var(--line-2); transform: translateX(6px); background: linear-gradient(90deg, rgba(30, 44, 80, 0.55), rgba(10, 16, 32, 0.35)); }
.layer__n { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--cyan); }
.layer h3 { font-size: 1.15rem; margin-bottom: 4px; }
.layer p { color: var(--ink-2); font-size: 0.95rem; }
.layer__tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .layer { grid-template-columns: 44px 1fr; } .layer__tag { grid-column: 2; } }

/* Split (text + visual) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 72px;
  align-items: center;
}
.split svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* Checklist */
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.checks li::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.5);
  background: radial-gradient(circle, var(--cyan) 0 3px, transparent 3.5px);
}

/* Big CTA */
.cta {
  position: relative;
  padding: clamp(56px, 8vw, 96px) clamp(24px, 5vw, 72px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 10% 0%, rgba(59, 130, 246, 0.22), transparent 60%),
    radial-gradient(50% 100% at 100% 100%, rgba(139, 92, 246, 0.2), transparent 60%),
    rgba(10, 16, 32, 0.6);
  overflow: hidden;
  text-align: center;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000, transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { margin-bottom: 16px; }
.cta p { color: var(--ink-2); max-width: 52ch; margin-inline: auto; margin-bottom: 30px; }

/* Contact */
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: start;
}
.email-big {
  display: inline-block;
  font-size: clamp(1.3rem, 3.4vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  word-break: break-all;
  color: var(--ink);
  background: linear-gradient(90deg, #fff, #93c5fd 50%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.3s;
}
.email-big:hover { border-color: var(--cyan); }
.topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.topics li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 32, 0.5);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: baseline;
}
.topics li strong { display: block; }
.topics li span { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; } }

/* Legal pages */
.legal {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px 72px;
  align-items: start;
  padding: clamp(32px, 5vw, 64px) 0 clamp(72px, 10vw, 120px);
}
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  padding: 18px 0 18px 18px;
  border-left: 1px solid var(--line);
}
.toc h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 6px 10px;
  margin-left: -19px;
  border-left: 1px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
  border-radius: 0 8px 8px 0;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--cyan); border-left-color: var(--cyan); background: rgba(34, 211, 238, 0.05); }
.prose { max-width: 72ch; }
.prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  margin: 2.4em 0 0.7em;
  padding-top: 0.8em;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose h2:first-of-type { margin-top: 0.6em; border-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 1.6em 0 0.5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { margin: 0.6em 0 1em; }
.prose code { font-family: var(--mono); font-size: 0.88em; color: var(--cyan); word-break: break-all; }
.prose a { text-decoration: underline; text-decoration-color: rgba(96, 165, 250, 0.4); text-underline-offset: 3px; word-break: break-word; }
.prose .meta { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-bottom: 1.5em; }
.callout {
  margin: 1.4em 0;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.05);
}
.callout p { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.prose th { color: var(--ink); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em; }
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; }
  .toc { position: relative; top: auto; border-left: 0; padding: 0; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { margin: 0; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; }
  .toc a.is-active { border-color: rgba(34, 211, 238, 0.5); }
  .prose table { display: block; overflow-x: auto; }
}

/* 404 */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.notfound__code {
  font-size: clamp(6rem, 22vw, 15rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin-bottom: 20px;
}
.notfound p { color: var(--ink-2); max-width: 44ch; margin-inline: auto; margin-bottom: 28px; }

/* Footer */
.footer {
  position: relative;
  margin-top: clamp(40px, 6vw, 80px);
  padding: clamp(48px, 6vw, 72px) 0 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(10, 16, 32, 0.7));
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 36px 48px;
}
.footer__brand p { color: var(--muted); font-size: 0.95rem; max-width: 36ch; margin-top: 14px; }
.footer h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer li { margin: 0; }
.footer ul a { color: var(--ink-2); font-size: 0.95rem; }
.footer ul a:hover { color: var(--cyan); }
.footer__bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer__bottom .disclaimer { max-width: 100ch; line-height: 1.55; }
.footer__bottom .legal-line { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__bottom .legal-line a { color: var(--muted); }
.footer__bottom .legal-line a:hover { color: var(--cyan); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* Utilities */
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 40px; }
.center { text-align: center; }
.center .lede, .center .eyebrow { margin-inline: auto; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .stagger > *, .reveal, .reveal-group > * { opacity: 1; transform: none; filter: none; }
  .aurora span { animation: none; }
  .ticker__track { animation: none; }
  .gradient-text { animation: none; }
  .card { transform: none !important; }
  .deco { transform: none !important; }
  .scroll-cue::after { animation: none; }
  .draw { stroke-dashoffset: 0; }
}
