/* ──────────────────────────────────────────────────────────
   BizTrack design system
   Light-first neutral canvas, single grotesk, hairline lattice.
   Loaded by every page via _partials/head.html.
   ────────────────────────────────────────────────────────── */

/* ── Tokens ─────────────────────────────────────────────── */
:root,
[data-theme="light"] {
  --bt-recessed: #f2f2ef;
  --bt-bg: #fcfcfb;
  --bt-elevated: #f7f7f5;
  --bt-card: #ffffff;
  --bt-card-hover: #f6f6f3;
  --bt-border: #e5e5e0;
  --bt-border-hover: #cfcfc8;
  --bt-text: #14140f;
  --bt-muted: #57574f;
  --bt-dim: #86867c;
  --bt-accent: #5c6d07;
  --bt-accent-fill: #b1cd0c;
  --bt-accent-fill-hover: #9fb90a;
  --bt-accent-ink: #131a00;
  --bt-accent-dim: rgba(177, 205, 12, 0.16);
  --bt-accent-line: rgba(92, 109, 7, 0.35);
  --bt-shadow: 0 1px 2px rgba(20, 20, 15, 0.05);
  --bt-shadow-lg: 0 12px 40px rgba(20, 20, 15, 0.10);
  color-scheme: light;
}

[data-theme="dark"] {
  --bt-recessed: #060605;
  --bt-bg: #0c0c0a;
  --bt-elevated: #121210;
  --bt-card: #161613;
  --bt-card-hover: #1c1c18;
  --bt-border: #262622;
  --bt-border-hover: #3a3a33;
  --bt-text: #f4f4ef;
  --bt-muted: #a3a39a;
  --bt-dim: #76766d;
  --bt-accent: #bcd821;
  --bt-accent-fill: #b1cd0c;
  --bt-accent-fill-hover: #c3e015;
  --bt-accent-ink: #131a00;
  --bt-accent-dim: rgba(177, 205, 12, 0.12);
  --bt-accent-line: rgba(188, 216, 33, 0.35);
  --bt-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --bt-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  background: var(--bt-recessed);
  color: var(--bt-text);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

::selection { background: var(--bt-accent-fill); color: var(--bt-accent-ink); }

a { text-underline-offset: 3px; }

/* ── Typography ─────────────────────────────────────────── */
/* `font-display` is used across every page; it now maps to the
   grotesk instead of a condensed display face, so the tracking
   utilities that shipped with the old Bebas headings are neutralised. */
.font-display {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.032em !important;
  line-height: 1.06;
  text-transform: none;
}

.font-display.text-2xl { font-size: 20px; line-height: 1.2; }
.font-display.text-3xl { font-size: 26px; }
.font-display.text-4xl { font-size: clamp(28px, 3.4vw, 34px); }
.font-display.text-5xl { font-size: clamp(32px, 4.4vw, 44px); }
.font-display.text-6xl { font-size: clamp(34px, 5vw, 50px); }
.font-display.text-7xl { font-size: clamp(38px, 6vw, 60px); }

@media (min-width: 768px) {
  .font-display.md\:text-4xl { font-size: clamp(28px, 3.4vw, 34px); }
  .font-display.md\:text-5xl { font-size: clamp(32px, 4.4vw, 44px); }
  .font-display.md\:text-6xl { font-size: clamp(34px, 5vw, 50px); }
  .font-display.md\:text-7xl { font-size: clamp(38px, 6vw, 60px); }
}

.display-hero {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
@media (max-width: 640px) {
  .display-hero { font-size: clamp(29px, 8vw, 34px); line-height: 1.08; }
  .font-display.text-5xl, .font-display.text-6xl, .font-display.text-7xl { font-size: 27px; }
  .font-display.text-4xl { font-size: 24px; }
  .font-display.text-3xl { font-size: 22px; }
  .lede { font-size: 15.5px; }
}

.lede {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.5;
  color: var(--bt-muted);
  text-wrap: pretty;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bt-dim);
}
.eyebrow-accent { color: var(--bt-accent); }

/* Feature lists inside lattice cells */
.feature-list li { position: relative; padding-left: 17px; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--bt-accent-fill);
}

.mono {
  font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

.section { padding-block: clamp(56px, 6.5vw, 96px); }
.section-tight { padding-block: clamp(40px, 4.5vw, 64px); }

/* ── Sheet shell ────────────────────────────────────────────
   The page is a stack of inset sheets floating on the canvas:
   the canvas shows through as a gutter on every side. */
.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}
@media (max-width: 767px) { .stack { gap: 6px; padding: 6px; } }

.sheet {
  position: relative;
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  overflow: clip;
}
.sheet-tint { background: var(--bt-elevated); }
.sheet-ink { background: var(--bt-text); color: var(--bt-bg); border-color: var(--bt-text); }

/* Legacy alias — inner pages still mark bands with .shell */
.shell { background: var(--bt-bg); }

/* Big section blocks: content anchored to the corners, air in between */
.pane { display: grid; min-height: 520px; }
.pane-sm { min-height: 400px; }
@media (max-width: 767px) { .pane, .pane-sm { min-height: 0; } }

/* ── Lattice — hairline grid of cells, no floating cards ── */
.lattice {
  display: grid;
  gap: 1px;
  background: var(--bt-border);
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  overflow: hidden;
}
.lattice > * { background: var(--bt-bg); }
.lattice-cell { padding: 24px; }
@media (min-width: 768px) { .lattice-cell { padding: 28px; } }

.cell-hover { transition: background-color .18s ease; }
.cell-hover:hover { background: var(--bt-card-hover); }

/* Surface — a single bordered box (forms, quotes, code frames) */
.surface {
  background: var(--bt-card);
  border: 1px solid var(--bt-border);
  border-radius: 4px;
}

/* Legacy card markup on inner pages resolves to the same language */
.bg-bt-card { border-radius: 4px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding-inline: 20px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--bt-accent-fill); color: var(--bt-accent-ink); }
.btn-primary:hover { background: var(--bt-accent-fill-hover); }

.btn-secondary {
  background: var(--bt-card);
  border-color: var(--bt-border-hover);
  color: var(--bt-text);
}
.btn-secondary:hover { background: var(--bt-card-hover); border-color: var(--bt-text); }

.btn-ghost { color: var(--bt-text); padding-inline: 12px; }
.btn-ghost:hover { background: var(--bt-card-hover); }

/* On an inverted (ink) sheet */
.btn-invert {
  background: transparent;
  border-color: color-mix(in srgb, var(--bt-bg) 40%, transparent);
  color: var(--bt-bg);
}
.btn-invert:hover { background: color-mix(in srgb, var(--bt-bg) 12%, transparent); border-color: var(--bt-bg); }

.btn-sm { height: 34px; padding-inline: 14px; font-size: 13px; }
.btn-lg { height: 48px; padding-inline: 26px; font-size: 15px; }
.btn-block { width: 100%; }
@media (max-width: 640px) {
  .btn-lg { width: 100%; }
}

/* Text link with arrow — Cloudflare's dominant tertiary action */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-accent);
}
.link-arrow svg { width: 14px; height: 14px; transition: transform .16s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ── Chips & badges ─────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding-inline: 11px;
  border: 1px solid var(--bt-border);
  border-radius: 999px;
  background: var(--bt-card);
  font-size: 12px;
  font-weight: 500;
  color: var(--bt-muted);
}
.chip-accent {
  border-color: var(--bt-accent-line);
  background: var(--bt-accent-dim);
  color: var(--bt-accent);
}
@media (max-width: 640px) {
  .chip {
    height: auto;
    min-height: 28px;
    padding-block: 5px;
    line-height: 1.35;
    text-align: left;
  }
  .chip > span:first-child { flex-shrink: 0; }
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding-inline: 7px;
  border-radius: 3px;
  background: var(--bt-accent-fill);
  color: var(--bt-accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Footer link columns (accordion on mobile) ──────────── */
.foot-col > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
  list-style: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.foot-col > summary::-webkit-details-marker { display: none; }
.foot-col .foot-caret { width: 14px; height: 14px; color: var(--bt-dim); transition: transform .18s ease; }
.foot-col[open] .foot-caret { transform: rotate(180deg); }
.foot-col > .foot-links { padding-bottom: 18px; }

@media (min-width: 768px) {
  .foot-col > summary { padding-block: 0; margin-bottom: 16px; cursor: default; pointer-events: none; }
  .foot-col > .foot-links { display: block; padding-bottom: 0; }
}
/* The ecosystem column sits in a 3-wide cell between md and lg, so it
   splits into two columns there and nowhere else. */
.foot-col > .foot-links-wide > li + li { margin-top: 10px; }
@media (min-width: 768px) and (max-width: 1023px) {
  .foot-col > .foot-links-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
  .foot-col > .foot-links-wide > li + li { margin-top: 0; }
}

/* ── Selectable option cards ────────────────────────────── */
.opt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  background: var(--bt-bg);
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
.opt-card:hover { border-color: var(--bt-border-hover); background: var(--bt-card-hover); }
.opt-card svg { width: 19px; height: 19px; color: var(--bt-dim); transition: color .16s ease; }
.opt-card span { font-size: 12px; font-weight: 600; color: var(--bt-muted); transition: color .16s ease; }
.opt-card.selected { border-color: var(--bt-accent); background: var(--bt-accent-dim); }
.opt-card.selected svg { color: var(--bt-accent); }
.opt-card.selected span { color: var(--bt-text); }

/* ── Stat figures ───────────────────────────────────────── */
.stat-value {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--bt-muted);
  line-height: 1.35;
}

/* ── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  height: 34px;
  padding-inline: 14px;
  border: 1px solid var(--bt-border);
  border-radius: 3px;
  background: var(--bt-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--bt-muted);
  cursor: pointer;
}
.tab:hover { color: var(--bt-text); border-color: var(--bt-border-hover); }
.tab[aria-selected="true"] {
  background: var(--bt-text);
  border-color: var(--bt-text);
  color: var(--bt-bg);
}
.tab-panel[hidden] { display: none; }

/* ── Marquee ────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-slow .marquee-track { animation-duration: 34s; }

/* Client row on an inverted sheet */
.client-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  height: 88px;
  padding-inline: 28px;
  border-right: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  font-size: 15px;
  font-weight: 600;
  opacity: .7;
  transition: opacity .16s ease;
}
.client-cell:hover { opacity: 1; }
/* Client logos are alpha masks painted with currentColor, so they invert
   with the sheet instead of needing per-theme filter hacks. */
.client-logo {
  height: var(--logo-h, 27px);
  aspect-ratio: var(--logo-ar, 4 / 1);
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
.client-cell img { height: 26px; max-width: 100%; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Terminal / log visual ──────────────────────────────── */
.wire { position: relative; }
.wire::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--bt-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--bt-border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(closest-side at 50% 40%, #000, transparent);
  mask-image: radial-gradient(closest-side at 50% 40%, #000, transparent);
  pointer-events: none;
}

.pulse-dot { position: relative; }
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1px solid var(--bt-accent-line);
  animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(.6); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ── Operations network map ─────────────────────────────── */
.netmap { display: block; width: 100%; height: 100%; }
.netmap .land { fill: var(--bt-elevated); stroke: var(--bt-border-hover); stroke-width: 1.25; }
.netmap .land-hub { fill: var(--bt-accent-dim); stroke: var(--bt-accent-line); }
.netmap .route { fill: none; stroke: var(--bt-border-hover); stroke-width: 1.25; stroke-dasharray: 3 5; }
.netmap .flow {
  fill: none;
  stroke: var(--bt-accent-fill);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 14 182;
  animation: flow 4.6s linear infinite;
}
.netmap .flow-2 { animation-delay: 1.1s; }
.netmap .flow-3 { animation-delay: 2.3s; }
.netmap .flow-4 { animation-delay: 3.2s; }
@keyframes flow { to { stroke-dashoffset: -196; } }

.netmap .node { fill: var(--bt-bg); stroke: var(--bt-text); stroke-width: 2; }
.netmap .node-core { fill: var(--bt-accent-fill); stroke: none; }
.netmap .halo { fill: none; stroke: var(--bt-accent-line); transform-origin: center; animation: halo 3s ease-out infinite; }
.netmap .halo-2 { animation-delay: 1s; }
.netmap .halo-3 { animation-delay: 2s; }
@keyframes halo {
  0% { r: 6; opacity: .9; }
  100% { r: 26; opacity: 0; }
}
.netmap .label {
  fill: var(--bt-muted);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Floating readouts pinned over the map */
.readout {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  background: var(--bt-card);
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  box-shadow: var(--bt-shadow);
  min-width: 132px;
}
.readout-value {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.readout-label { font-size: 11px; color: var(--bt-muted); }

/* ── Beam border (highlighted panel) ────────────────────── */
.beam { position: relative; }
.beam::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent 0 62%, var(--bt-accent-fill) 76%, transparent 88% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: beam-spin 5s linear infinite;
  pointer-events: none;
}
@property --beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes beam-spin { to { --beam-angle: 360deg; } }

/* ── Header scroll state ────────────────────────────────── */
/* The header is solid and flush to the top edge: never transparent,
   never blurred, only a hairline under it. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bt-bg);
  border-bottom: 1px solid var(--bt-border);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--bt-border-hover);
  box-shadow: var(--bt-shadow-lg);
}
.site-header > #mobile-menu { max-height: calc(100vh - 64px); }

/* ── Language selector ──────────────────────────────────── */
/* Header utilities are quiet: no border, no fill until hovered. The only
   filled control in the bar is the primary CTA, so hierarchy reads at a
   glance — utilities | divider | log in | book a demo. */
.nav-ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
  color: var(--bt-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.nav-ctl:hover { background: var(--bt-card-hover); color: var(--bt-text); }
.nav-ctl-icon { width: 34px; padding: 0; }
.nav-ctl-icon svg { width: 16px; height: 16px; }

.nav-div { width: 1px; height: 20px; background: var(--bt-border); margin-inline: 6px; }

.lang-btn { gap: 7px; padding: 0 7px 0 9px; }
.lang-wrap:hover .lang-btn,
.lang-wrap:focus-within .lang-btn { background: var(--bt-card-hover); color: var(--bt-text); }

.flag {
  width: 20px;
  height: 14px;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1px solid rgba(20, 20, 15, .14);
  border-radius: 2px;
  object-fit: cover;
}
[data-theme="dark"] .flag { border-color: rgba(255, 255, 255, .18); }

.lang-menu { opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s ease; }
.lang-wrap:hover .lang-menu,
.lang-wrap:focus-within .lang-menu { opacity: 1; visibility: visible; }

.lang-opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13.5px; color: var(--bt-text); transition: background-color .14s ease; }
.lang-opt:hover { background: var(--bt-card-hover); }
.lang-opt .lang-code {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--bt-dim);
}
.lang-opt.is-active { font-weight: 600; }
.lang-opt.is-active .lang-code { color: var(--bt-accent); }

/* mobile: one hairline row, no wrapping chips */
.lang-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--bt-border);
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  overflow: clip;
}
.lang-row > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: var(--bt-bg);
  padding-block: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: .07em;
  color: var(--bt-muted);
}
.lang-row > a.is-active { background: var(--bt-accent-dim); font-weight: 600; }

/* ── Line rotator ───────────────────────────────────────── */
.rotator-track { transition: transform .5s cubic-bezier(.16, 1, .3, 1); }

/* ── Navigation ─────────────────────────────────────────── */
.nav-group { position: relative; display: flex; align-items: center; gap: 2px; }

/* sliding highlight that follows the hovered / open item */
.nav-pill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 34px;
  border-radius: 4px;
  background: var(--bt-card-hover);
  border: 1px solid var(--bt-border);
  transform: translateY(-50%);
  opacity: 0;
  transition: transform .22s cubic-bezier(.16, 1, .3, 1), width .22s cubic-bezier(.16, 1, .3, 1), opacity .18s ease;
  pointer-events: none;
}
.nav-group.is-hot .nav-pill { opacity: 1; }

.nav-item {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding-inline: 12px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--bt-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity .18s ease;
}
.nav-item:hover { opacity: .82; }
/* Double chevron: no rotation, it fades in instead. */
.nav-caret {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  margin-right: -3px;
  flex-shrink: 0;
  opacity: .3;
  transition: opacity .2s ease;
}
.nav-item:hover .nav-caret,
.nav-item[aria-expanded="true"] .nav-caret { opacity: 1; }

/* Mega panel */
.mega {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  padding-inline: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s cubic-bezier(.16, 1, .3, 1);
}
.mega[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
.mega-inner {
  max-width: 1080px;
  margin-inline: auto;
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  box-shadow: var(--bt-shadow-lg);
  overflow: clip;
}
.mega-grid { display: grid; gap: 1px; background: var(--bt-border); }
.mega-grid > * { background: var(--bt-bg); }

.mega-link { display: block; padding: 14px 16px; transition: background-color .14s ease; }
.mega-link:hover { background: var(--bt-card-hover); }
.mega-link-title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.mega-link-desc { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--bt-muted); }

.mega-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bt-elevated);
  border-top: 1px solid var(--bt-border);
}

/* ── Footer watermark ───────────────────────────────────── */
/* Wordmark sitting on the bottom edge. SVG so it spans the sheet exactly
   at any width, with the baseline flush to the footer edge and a mask that
   dissolves it downward instead of cutting it off. */
.watermark-band { overflow: hidden; line-height: 0; padding-top: 8px; }
.watermark {
  display: block;
  width: min(100%, 520px);
  height: auto;
  fill: var(--bt-text);
  opacity: .06;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(180deg, #000 22%, rgba(0, 0, 0, .3) 100%);
  mask-image: linear-gradient(180deg, #000 22%, rgba(0, 0, 0, .3) 100%);
}
.watermark text {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 200px;
  letter-spacing: -.04em;
}

/* Back to top */
.foot-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--bt-dim);
  cursor: pointer;
  transition: color .16s ease;
}
.foot-top:hover { color: var(--bt-text); }
.foot-top svg { width: 13px; height: 13px; transition: transform .18s ease; }
.foot-top:hover svg { transform: translateY(-2px); }

/* ── Scroll reveal ──────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: none; }
.fade-in-d1 { transition-delay: .07s; }
.fade-in-d2 { transition-delay: .14s; }
.fade-in-d3 { transition-delay: .21s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .pulse-dot::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Details / FAQ ──────────────────────────────────────── */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

.faq-item { border-top: 1px solid var(--bt-border); }
.faq-item:last-child { border-bottom: 1px solid var(--bt-border); }
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 20px 20px 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.012em;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background-color .16s ease, border-color .16s ease;
}
.faq-item > summary:hover { background: var(--bt-card-hover); }
.faq-item[open] > summary { border-left-color: var(--bt-accent-fill); }
.faq-item .faq-mark {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  color: var(--bt-muted);
  transition: border-color .16s ease, color .16s ease;
}
.faq-item .faq-mark svg { transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.faq-item[open] .faq-mark { border-color: var(--bt-accent); color: var(--bt-accent); background: var(--bt-accent-dim); }
.faq-item[open] .faq-mark svg { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 56px 22px 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--bt-muted);
  border-left: 2px solid transparent;
}
.faq-item[open] .faq-body { border-left-color: var(--bt-accent-fill); }

/* ── Comparison table ───────────────────────────────────── */
.cmp-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
@media (max-width: 767px) {
  .cmp-scroll:not(.at-end) {
    -webkit-mask-image: linear-gradient(90deg, #000 84%, rgba(0, 0, 0, .25));
    mask-image: linear-gradient(90deg, #000 84%, rgba(0, 0, 0, .25));
  }
}
.cmp-scroll > .cmp-inner { min-width: 640px; }
.cmp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 96px 96px;
  border-top: 1px solid var(--bt-border);
}
@media (min-width: 768px) { .cmp-row { grid-template-columns: minmax(0, 1fr) 150px 150px 150px; } }
.cmp-row:hover { background: var(--bt-card-hover); }
.cmp-head {
  position: sticky;
  top: 64px;
  z-index: 10;
  background: var(--bt-bg);
  border-top: none;
}
.cmp-head:hover { background: var(--bt-bg); }
.cmp-label { padding: 14px 20px; font-size: 14px; color: var(--bt-muted); }
.cmp-cell { display: grid; place-items: center; padding: 14px 8px; font-size: 13px; }
.cmp-pro { background: var(--bt-accent-dim); }
.cmp-row:hover .cmp-pro { background: color-mix(in srgb, var(--bt-accent-fill) 22%, transparent); }
.cmp-group {
  padding: 11px 20px;
  background: var(--bt-elevated);
  border-top: 1px solid var(--bt-border);
}
.cmp-check { width: 17px; height: 17px; color: var(--bt-accent); }
.cmp-none { color: var(--bt-dim); opacity: .5; }

/* ── Forms ──────────────────────────────────────────────── */
.field {
  width: 100%;
  height: 42px;
  padding-inline: 13px;
  background: var(--bt-card);
  border: 1px solid var(--bt-border);
  border-radius: 3px;
  font-size: 14px;
  color: var(--bt-text);
}
.field::placeholder { color: var(--bt-dim); }
.field:focus { outline: none; border-color: var(--bt-accent); box-shadow: 0 0 0 3px var(--bt-accent-dim); }
textarea.field { height: auto; padding-block: 11px; resize: none; }

/* ── Page components ────────────────────────────────────── */
/* Hero lattice backdrop (about, partners, resources) */
.hero-grid {
  background-image:
    linear-gradient(var(--bt-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--bt-border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .6;
}

/* Demo wizard */
.step { display: none; }
.step.active { display: block; animation: step-in .3s cubic-bezier(.16, 1, .3, 1); }
@keyframes step-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--bt-card);
  border: 1px solid var(--bt-border);
  border-radius: 3px;
  cursor: pointer;
}
.radio-card:hover { border-color: var(--bt-border-hover); background: var(--bt-card-hover); }
.radio-card.selected { border-color: var(--bt-accent); background: var(--bt-accent-dim); }
.radio-card .radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--bt-border-hover);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radio-card.selected .radio-dot { border-color: var(--bt-accent); }
.radio-card.selected .radio-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bt-accent);
}

/* Resources filter row — swipeable on phones */
@media (max-width: 640px) {
  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row > .tab { flex: 0 0 auto; }
}

/* Demo wizard rail */
.wiz-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 9px;
  font-size: 14px;
  color: var(--bt-dim);
  transition: color .18s ease;
}
.wiz-num {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.wiz-step.is-active { color: var(--bt-text); font-weight: 600; }
.wiz-step.is-active .wiz-num { border-color: var(--bt-accent); background: var(--bt-accent-dim); color: var(--bt-accent); }
.wiz-step.is-done { color: var(--bt-muted); }
.wiz-step.is-done .wiz-num { border-color: var(--bt-accent-fill); background: var(--bt-accent-fill); color: var(--bt-accent-ink); }

.progress-bar { height: 2px; background: var(--bt-border); }
.progress-fill { height: 100%; background: var(--bt-accent-fill); transition: width .4s cubic-bezier(.16, 1, .3, 1); }

/* Resources video grid */
.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.video-thumb:hover img { transform: scale(1.04); }

.video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-lightbox.active { display: flex; }
.video-lightbox-inner { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; position: relative; }
.video-lightbox-inner iframe { width: 100%; height: 100%; border: none; }
.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

/* ── Focus ring ─────────────────────────────────────────── */
:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 2px solid var(--bt-accent);
  outline-offset: 2px;
}
