/* CloudArmour — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300..700&family=Zilla+Slab:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Instrument+Serif:ital@0;1&family=EB+Garamond:ital,wght@0,400..700;1,400..700&family=Inter+Tight:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

:root, html[data-theme="light"], body[data-theme="light"] {
  --bg: oklch(0.98 0.005 90);
  --bg-elev: oklch(0.995 0.004 90);
  --bg-sunk: oklch(0.955 0.005 90);
  --fg: oklch(0.18 0.01 250);
  --fg-soft: oklch(0.42 0.015 250);
  --fg-muted: oklch(0.58 0.015 250);
  --border: oklch(0.9 0.005 90);
  --border-strong: oklch(0.82 0.008 250);
  --accent: oklch(0.82 0.17 125);
  --accent-ink: oklch(0.3 0.08 125);
  --danger: oklch(0.68 0.18 28);
  --warn: oklch(0.82 0.14 80);
  --code-bg: oklch(0.16 0.01 250);
  --code-fg: oklch(0.92 0.01 90);
  --code-border: oklch(0.26 0.01 250);

  --serif: "Roboto Slab", "Zilla Slab", "Times New Roman", serif;
  --sans: "Inter Tight", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(16px, 2vw, 28px);
  --gutter: clamp(14px, 1.8vw, 24px);
  --maxw: 1240px;
}

html[data-theme="dark"], body[data-theme="dark"] {
  --bg: oklch(0.16 0.012 250);
  --bg-elev: oklch(0.20 0.014 250);
  --bg-sunk: oklch(0.13 0.012 250);
  --fg: oklch(0.96 0.008 90);
  --fg-soft: oklch(0.78 0.012 250);
  --fg-muted: oklch(0.60 0.014 250);
  --border: oklch(0.28 0.012 250);
  --border-strong: oklch(0.40 0.014 250);
  --accent: oklch(0.82 0.17 125);
  --accent-ink: oklch(0.94 0.13 125);
  --code-bg: oklch(0.10 0.012 250);
  --code-fg: oklch(0.92 0.01 90);
  --code-border: oklch(0.28 0.012 250);
}

body { transition: background-color .2s ease, color .2s ease; }

* { box-sizing: border-box; }
html { font-size: 16px; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* === Layout === */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.rule { border-top: 1px solid var(--border); }
.rule-strong { border-top: 1px solid var(--fg); }

/* === Type === */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
}
.display {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.98;
  font-size: clamp(40px, 5vw, 72px) !important;
  margin: 0;
}
.display { font-variation-settings: "opsz" 120, "SOFT" 30; }
.display em { font-style: italic; color: var(--fg-soft); font-variation-settings: "opsz" 120, "SOFT" 60; }
.h2 { font-variation-settings: "opsz" 80; }
.h2 em, .card-title, .road .title { font-variation-settings: "opsz" 60; }
.h2 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.02;
  font-size: clamp(28px, 3.2vw, 42px);
  margin: 0;
}
.h2 em { font-style: italic; color: var(--fg-soft); }
.h3 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}
.lede {
  font-family: var(--sans);
  font-size: clamp(17px, 1.5vw, 20px) !important;
  line-height: 1.5;
  color: var(--fg-soft);
  max-width: 62ch;
}
.small { font-size: 13px; color: var(--fg-soft); }
.text-muted { color: var(--fg-muted); }
.text-soft  { color: var(--fg-soft); }
.mono { font-family: var(--mono); }
.font-serif { font-family: var(--serif); }
.font-mono  { font-family: var(--mono); }
.panel { border: 1px solid var(--border); background: var(--bg-elev); }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none !important;
}
.btn:hover { background: transparent; color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn.ghost:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.btn .arrow { display: inline-block; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* === Nav === */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  position: relative;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}
html[data-theme="dark"] .brand-logo,
body[data-theme="dark"] .brand-logo {
  filter: invert(1) hue-rotate(180deg);
}
.brand-mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--fg);
  position: relative;
  transform: rotate(45deg);
}
.brand-mark::after {
  content: ""; position: absolute;
  inset: 3px;
  background: var(--fg);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px;
  color: var(--fg-soft);
  position: relative;
}
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-links a.active { color: var(--fg); font-weight: 600; }
.nav-links > a.active::after,
.nav-dropdown.dd-active > .dd-trigger::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px; background: var(--fg);
}
.dd-menu a::after { display: none !important; }
.nav-dropdown.dd-active .dd-trigger { color: var(--fg); font-weight: 600; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-cta .btn { height: 38px; padding-top: 0; padding-bottom: 0; }

/* === Dropdown nav === */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.dd-trigger {
  display: flex; align-items: center; gap: 5px;
  font-size: 14px; font-family: var(--sans);
  color: var(--fg-soft);
  background: none; border: none; cursor: pointer; padding: 0;
  line-height: 1;
  position: relative;
  transition: color .15s;
}
.nav-dropdown.dd-active > .dd-trigger {
  position: relative;
  padding-bottom: 8px;
}
.dd-trigger:hover, .nav-dropdown.open .dd-trigger { color: var(--fg); }
.dd-chevron {
  width: 11px; height: 11px;
  flex-shrink: 0;
  transition: transform .18s;
  margin-top: 1px;
}
.nav-dropdown.open .dd-chevron { transform: rotate(180deg); }

.dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px color-mix(in oklab, var(--fg) 10%, transparent);
  padding: 4px;
  z-index: 200;
  flex-direction: column;
}
.nav-dropdown.open .dd-menu { display: flex; }

.dd-menu a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--fg-soft);
  text-decoration: none;
  border: none;
  transition: background .12s, color .12s;
}
.dd-menu a:hover, .dd-menu a.active { background: var(--bg-sunk); color: var(--fg); }
.dd-item-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
  color: var(--fg-soft);
}
.dd-item-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.dd-menu a:hover .dd-item-icon,
.dd-menu a.active .dd-item-icon {
  color: var(--fg);
}
.dd-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dd-item-label { font-size: 13.5px; font-weight: 500; }
.dd-item-desc { display: none; }
.dd-icon {
  width: 11px; height: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 11px;
  margin-left: 6px;
  transition: transform .18s;
}
.dd-icon svg { width: 11px; height: 11px; display: block; }
.nav-dropdown.open > .dd-trigger .dd-icon { transform: rotate(180deg); }

/* === Dataplane diagram (index hero right column) === */
.dataplane {
  width: 100%;
  aspect-ratio: 520 / 340;
  color: var(--fg);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  overflow: hidden;
}

/* === Hero shell === */
.hero {
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--border);
}
.hero .eyebrow { margin-bottom: 24px; display: inline-flex; align-items: center; gap: 10px; }
.hero .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 35%, transparent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .5; }
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
}
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* === Cards === */
.card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--fg); }
.card.link:hover { cursor: pointer; text-decoration: none; }
.card.link:hover .card-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.card .eyebrow { margin: 0; }
.card-icon { width: 26px; height: 26px; stroke: var(--fg); flex-shrink: 0; }
.card-icon svg { width: 100%; height: 100%; }
.card-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.card-desc { color: var(--fg-soft); font-size: 14.5px; line-height: 1.55; }

/* Section blocks */
.section {
  padding: clamp(56px, 8vw, 110px) 0;
  border-bottom: 1px solid var(--border);
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2vw, 28px);
  margin-bottom: clamp(36px, 5vw, 60px);
  max-width: 920px;
}
.section-head > div:first-child { display: flex; flex-direction: column; gap: 14px; }
.section-head .h2 { max-width: none; }
.section-head .lede { max-width: 68ch; }
@media (max-width: 820px) {
  .section-head .h2 { max-width: none; }
}

/* === Status chips === */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  color: var(--fg-soft);
  background: var(--bg-elev);
  border-radius: 2px;
  font-weight: 500;
}
.chip.live { color: var(--accent-ink); border-color: color-mix(in oklab, var(--accent) 60%, var(--border)); background: color-mix(in oklab, var(--accent) 20%, var(--bg-elev)); }
.chip.beta { color: var(--fg); border-color: var(--fg); }
.chip.preview { color: var(--fg-muted); }

/* === Placeholder box for imagery === */
.placeholder {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 8px,
      color-mix(in oklab, var(--border) 60%, transparent) 8px 9px
    ),
    var(--bg-sunk);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
  padding: 20px;
}

/* === Footer === */
.footer {
  padding: 80px 0 40px;
  background: var(--bg-sunk);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--fg-muted);
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 14px; color: var(--fg-soft); }
.footer ul a:hover { color: var(--fg); }
.footer-link {
  display: inline-flex;
  width: fit-content;
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 400;
  opacity: .72;
}
.footer-link.disabled {
  color: var(--fg-muted);
  cursor: default;
  position: relative;
}
.footer-link.disabled::after {
  content: "Coming soon";
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  opacity: 0;
  transform: translateY(-50%) translateX(-2px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  pointer-events: none;
}
.footer-link.disabled:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.footer-link.disabled:hover {
  opacity: .9;
  text-decoration: line-through;
}
.footer-bottom {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--mono);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* === Data strip === */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.strip > div {
  padding: 24px 28px;
  border-right: 1px solid var(--border);
}
.strip > div:last-child { border-right: 0; }
/* Hero stats strip — always 2×2 grid */
.hero-grid .strip {
  grid-template-columns: 1fr 1fr;
  align-self: center;
}
.hero-grid .strip > div:nth-child(2) { border-right: 0; }
.hero-grid .strip > div:nth-child(3),
.hero-grid .strip > div:nth-child(4) { border-top: 1px solid var(--border); }
.strip .num {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.strip .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.strip .num-unit {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  vertical-align: baseline;
}
.strip-3 { grid-template-columns: repeat(3, 1fr); }
.strip-section { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
@media (max-width: 820px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div:nth-child(2) { border-right: 0; }
  .strip > div:nth-child(1), .strip > div:nth-child(2) { border-bottom: 1px solid var(--border); }
  .strip-3 { grid-template-columns: 1fr; }
  .strip-3 > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .strip-3 > div:last-child { border-bottom: 0; }
}

/* === Util === */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* page intro section, same layout pattern */
.page-intro {
  padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 6vw, 70px);
  border-bottom: 1px solid var(--border);
}
.page-intro .eyebrow { margin-bottom: 24px; display: inline-flex; align-items: center; gap: 10px; }

/* Compare table */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.compare th, .compare td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.compare thead th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.75;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.compare tbody tr:nth-child(odd) { background: var(--bg-sunk); }
.compare tbody tr:nth-child(even) { background: transparent; }
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: none; }
.compare tbody th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.85;
  width: 30%;
}
.compare .legacy { color: var(--fg); opacity: 0.45; }
.compare .ours { color: var(--fg); font-weight: 500; opacity: 1; }

/* Code block */
.code {
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: var(--mono);
  font-size: 13px;
  padding: 20px 22px;
  line-height: 1.65;
  overflow-x: auto;
  border: 1px solid var(--code-border);
}
.code .c-comment { color: oklch(0.6 0.02 120); }
.code .c-key { color: oklch(0.82 0.17 125); }
.code .c-str { color: oklch(0.82 0.08 60); }

/* Roadmap item */
.road {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.road:last-child { border-bottom: 0; }
.road .when { font-family: var(--mono); font-size: 12px; color: var(--fg-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.road .title { font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
.road .body { color: var(--fg-soft); margin-top: 8px; max-width: 60ch; }
@media (max-width: 820px) {
  .road { grid-template-columns: 1fr; gap: 8px; }
}

/* Invariant card */
.invariant {
  border: 1px solid var(--border);
  padding: 22px;
  background: var(--bg-elev);
}
.invariant .n {
  font-family: var(--mono); font-size: 11px; color: var(--fg-muted);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.invariant .k {
  font-family: var(--serif); font-size: 22px; line-height: 1.15;
  margin-top: 4px;
}
.invariant .d { color: var(--fg-soft); font-size: 14px; margin-top: 8px; }

/* Tweaks panel */
.tweaks {
  position: fixed; bottom: 20px; right: 20px;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--fg);
  font-family: var(--sans);
  font-size: 13px;
  z-index: 100;
  display: none;
  box-shadow: 0 20px 60px -20px oklch(0 0 0 / 0.25);
}
.tweaks.active { display: block; }
.tweaks-head {
  padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.tweaks-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.tweaks-row label { display: block; font-size: 12px; color: var(--fg-muted); margin-bottom: 6px; font-family: var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.tweaks-row input[type="range"] { width: 100%; }
.tweaks-row select, .tweaks-row input[type="text"] {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border-strong); background: var(--bg); font-family: var(--mono); font-size: 12px; color: var(--fg);
}

/* Density modes */
body[data-density="compact"] { --pad: clamp(12px, 1.6vw, 20px); --gutter: clamp(10px, 1.4vw, 18px); }
body[data-density="compact"] .section, body[data-density="compact"] .hero, body[data-density="compact"] .page-intro { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(32px, 4vw, 56px); }
body[data-density="compact"] .card { padding: 20px; }
body[data-density="compact"] .strip > div { padding: 18px 22px; }
body[data-density="compact"] .section-head { margin-bottom: clamp(28px, 4vw, 44px); }

/* === Animations === */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  .reveal.in { opacity: 1; transform: none; }

  .reveal-fade { opacity: 0; transition: opacity .8s ease; transition-delay: var(--reveal-delay, 0ms); }
  .reveal-fade.in { opacity: 1; }

  .reveal-left { opacity: 0; transform: translateX(-24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--reveal-delay, 0ms); }
  .reveal-left.in { opacity: 1; transform: none; }

  .reveal-scale { opacity: 0; transform: scale(.96); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--reveal-delay, 0ms); }
  .reveal-scale.in { opacity: 1; transform: none; }

  /* Card hover lift */
  .card { transition: border-color .2s, transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -18px oklch(0 0 0 / 0.22); }

  /* Button micro */
  .btn { transition: all .18s cubic-bezier(.2,.7,.2,1); }
  .btn:hover { transform: translateY(-1px); }

  /* Hero entrance */
  .hero .eyebrow, .hero .display, .hero .lede, .hero .hero-cta, .hero-grid > div:last-child {
    animation: heroIn .9s cubic-bezier(.2,.7,.2,1) both;
  }
  .hero .eyebrow { animation-delay: .05s; }
  .hero .display { animation-delay: .15s; }
  .hero .lede { animation-delay: .3s; }
  .hero .hero-cta { animation-delay: .45s; }
  .hero-grid > div:last-child { animation-delay: .55s; }

  @keyframes heroIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }

  /* Nav fade on load */
  .nav { animation: navIn .5s ease both; }
  @keyframes navIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }

  /* Dot pulse already exists; add subtle diagram drift */
  .hero svg { animation: drift 8s ease-in-out infinite alternate; }
  @keyframes drift {
    from { transform: translateY(0); }
    to   { transform: translateY(-4px); }
  }

  /* Strip numbers count-up hint (just a soft reveal) */
  .strip > div { transition: background-color .3s ease; }
  .strip > div:hover { background: color-mix(in oklab, var(--accent) 8%, var(--bg-elev)); }

  /* Brand mark spin on hover */
  .brand:hover .brand-mark { transform: rotate(135deg); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
  .brand-mark { transition: transform .4s cubic-bezier(.2,.7,.2,1); }

  /* Tab panel fade */
  .uc-panel.active { animation: tabFade .4s ease both; }
  @keyframes tabFade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }
}

/* === Theme toggle button in nav === */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border-strong);
  background: transparent; color: var(--fg);
  cursor: pointer; padding: 0;
  transition: border-color .15s, background-color .15s;
}
.theme-toggle:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun,
body[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon,
body[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* === Mobile menu === */
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--border-strong);
  background: transparent; color: var(--fg);
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle:hover { border-color: var(--fg); }
.nav-toggle svg { width: 16px; height: 16px; }
.nav-backdrop { display: none; }

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: min(88vw, 390px);
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: var(--bg-elev);
    border-left: 1px solid var(--border);
    padding: 18px 0 18px;
    overflow-y: auto;
    max-height: 100vh;
    z-index: 120;
    box-shadow: -18px 0 40px color-mix(in oklab, var(--fg) 18%, transparent);
  }
  .nav-links.open { display: flex; }
  .nav-links > a {
    padding: 14px 24px;
    font-size: 15px;
    color: var(--fg);
    border-bottom: 1px solid var(--border);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
  }
  .nav-links > a:last-child { border-bottom: 0; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--bg-sunk); }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn { display: none; }
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: color-mix(in oklab, var(--bg) 35%, transparent);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 110;
  }
  body.nav-open .nav-backdrop { display: block; }
  body.nav-open { overflow: hidden; }

  /* Mobile dropdowns */
  .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .dd-trigger {
    padding: 0 24px;
    min-height: 56px;
    font-size: 15px;
    color: var(--fg);
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    width: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    text-align: left;
  }
  .dd-label {
    font-size: 15px;
    flex: 1 1 auto;
    text-align: left;
  }
  .dd-icon {
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    border-left: 1px solid var(--border);
    margin-left: 16px;
    margin-right: 0;
    padding-left: 14px;
  }
  .dd-icon svg { width: 18px; height: 18px; display: block; }
  .dd-menu {
    display: none;
    position: static;
    transform: none;
    min-width: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: color-mix(in oklab, var(--bg-sunk) 92%, var(--bg-elev));
    padding: 0;
    width: 100%;
  }
  .nav-dropdown.open .dd-menu { display: flex; }
  .dd-menu a {
    display: flex;
    align-items: center;
    padding: 13px 24px 13px 38px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    text-align: left;
    width: 100%;
  }
  .dd-item-icon {
    margin-top: 0;
  }
  .dd-menu a:last-child { border-bottom: 0; }
}

/* === Mobile polish === */
@media (max-width: 820px) {
  body { font-size: 15px; }
  .hero { padding: clamp(40px, 9vw, 80px) 0 clamp(32px, 6vw, 56px); }
  .hero-cta { gap: 10px; }
  .btn { padding: 11px 16px; font-size: 13.5px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .section { padding: clamp(40px, 8vw, 80px) 0; }
  .section-head { margin-bottom: clamp(28px, 5vw, 40px); }
  .compare th, .compare td { padding: 14px 12px; font-size: 14px; }
  .compare tbody th { width: 40%; }
  .strip .num { font-size: 34px; }
  .card { padding: 22px; }
  .card-title { font-size: 24px; }
  .road { padding: 22px 0; }
  .road .title { font-size: 26px; }
  .footer { padding: 56px 0 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .tweaks {
    left: 12px; right: 12px; bottom: 12px; width: auto;
  }
  /* Override inline 2-col layouts inside sections */
  section .wrap > div[style*="grid-template-columns: 1fr 1fr"],
  section .wrap div[style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
  }
  section .wrap div[style*="grid-template-columns: 1fr 1fr"] > * + * {
    margin-top: 24px;
  }
}

@media (max-width: 540px) {
  .display { font-size: clamp(34px, 8vw, 48px) !important; }
  .h2 { font-size: clamp(28px, 7vw, 38px) !important; }
  .lede { font-size: 15.5px !important; }
  .nav-inner { height: 56px; padding-left: 0; }
  .nav-links { top: 56px; }
  .brand span:not(.brand-mark) { font-size: 14px; }
}
