/* ==========================================================================
   RewardChain.ai — Rewards as a Service
   Design system: dark editorial fintech. Archivo (display+body) / Spline
   Sans Mono (data, labels, code). Signature motif: the interlocked chain
   link (rc-signet) — every transaction becomes a link.
   ========================================================================== */

:root {
  /* color */
  --bg: #0b0b0a;
  --bg-raised: #131311;
  --surface-a: #161512;
  --surface-b: #0d0d0c;
  --surface-flat: #0f0f0d;
  --card: #131311;

  --text: #f2f0ea;
  --text-dim: #a8a59b;
  --text-dimmer: #8f8c82;
  --text-faint: #817e75;    /* WCAG AA 4.85:1 on --bg (raised from the brand's original #75726a) */
  --text-faintest: #7d7a71; /* WCAG AA 4.59:1 on --bg (raised from the brand's original #5c5a53) */

  --accent: #c2a86e;
  --accent-hover: #d4bd85;
  --accent-wash: rgba(194, 168, 110, 0.14);

  --border: rgba(242, 240, 234, 0.1);
  --border-soft: rgba(242, 240, 234, 0.08);
  --border-strong: rgba(242, 240, 234, 0.16);
  --border-interactive: rgba(242, 240, 234, 0.4); /* WCAG 1.4.11 3:1 — inputs, secondary buttons, chips */
  --border-accent: rgba(194, 168, 110, 0.4);

  --success: #7fae7a;

  /* type */
  --font-display: "Archivo", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* layout */
  --max: 1280px;
  --pad-x: clamp(20px, 5vw, 72px);
  --section-y: clamp(72px, 12vh, 140px);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  color-scheme: dark;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent-wash); color: var(--text); }

/* visible keyboard focus everywhere, invisible for mouse users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 12px;
  z-index: 999;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 12px; }

/* keep in-page anchor targets clear of the sticky nav (WCAG 2.4.11) */
#platform, #build, #team, #demo { scroll-margin-top: 88px; }

/* ---- layout helpers ---- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section-tight { padding-top: clamp(56px, 8vh, 96px); padding-bottom: clamp(56px, 8vh, 96px); }
.divider-top { border-top: 1px solid var(--border-soft); }
.divider-bottom { border-bottom: 1px solid var(--border-soft); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--accent); }
.eyebrow--accent { color: var(--accent); }
.eyebrow--center { justify-content: center; }

h2 {
  font-weight: 700;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lede {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.65;
  color: var(--text-dimmer);
  max-width: 56ch;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  border: 0;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

/* Classic primary action — restrained shape, with movement reserved for hover. */
.btn-corner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 17px;
  border: 1px solid var(--text);
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.btn-corner:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 5px 14px rgba(194, 168, 110, 0.1);
  transform: translateY(-1px);
}
.btn-corner:active { transform: translateY(0); box-shadow: none; }

/* Quiet secondary action — same classic shape, transparent surface. */
.btn-bracket {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  background: transparent;
  border: 1px solid var(--border-interactive);
  border-radius: 6px;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.btn-bracket:hover {
  color: var(--text);
  border-color: rgba(242, 240, 234, 0.68);
  background: rgba(242, 240, 234, 0.06);
  transform: translateY(-1px);
}
.btn-bracket:active { transform: translateY(0); }
.bracket-l, .bracket-r { display: none; }
.bracket-text { padding: 0; letter-spacing: 0.01em; }

.btn-ghost {
  background: none;
  border: 1px solid var(--border-interactive);
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-weight: 500;
  font-size: 14.5px;
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 20px;
  padding: clamp(16px, 2.5vh, 20px) var(--pad-x);
  background: rgba(11, 11, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand svg { flex: none; }
.brand-word { height: 18px; width: auto; }
.nav .brand-word { height: 26px; }
.nav .btn-corner { min-height: 34px; padding: 7px 13px; font-size: 12.5px; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-interactive);
  border-radius: var(--radius-sm);
  background: var(--surface-flat);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
.nav-toggle-line {
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 0.22s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.nav-links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px clamp(20px, 3.4vw, 40px);
  font-size: 14px;
}
.nav-link {
  color: var(--text-dim);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: clamp(56px, 9vh, 110px) var(--pad-x) clamp(48px, 8vh, 96px);
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--pad-x) * -1);
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 44%, rgba(194, 168, 110, 0.105), transparent 29%),
    linear-gradient(rgba(242, 240, 234, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 234, 0.022) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 32%, #000 92%, transparent);
  opacity: 0.75;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 13ch;
}
.hero h1 span {
  position: relative;
  color: var(--accent);
  white-space: nowrap;
}
.hero h1 span::after {
  content: "";
  position: absolute;
  left: 2%;
  right: -2%;
  bottom: 0.02em;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.hero p.lede { max-width: 48ch; margin-top: clamp(24px, 4vh, 36px); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 4.5vh, 40px);
}

/* earn panel + forging chain */
.earn-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(194, 168, 110, 0.24);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(24, 22, 18, 0.98), var(--surface-b) 55%);
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(242, 240, 234, 0.015) inset;
}
.earn-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.earn-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.earn-panel-title { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.earn-panel-title small {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faintest);
}
.panel-chrome { display: flex; align-items: center; gap: 14px; }
.panel-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong); }
.live-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 7px;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: rc-pulse 1.6s ease-in-out infinite;
}
.earn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 8px;
}
.earn-chip {
  position: relative;
  display: flex;
  align-items: center;
  padding: 11px 14px 11px 27px;
  border-radius: 10px;
  background: var(--surface-flat);
  border: 1px solid var(--border-strong);
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--text-dimmer);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.earn-chip::before {
  content: "";
  position: absolute;
  left: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(194, 168, 110, 0.32);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.earn-chip:hover { border-color: rgba(194, 168, 110, 0.5); background: rgba(194, 168, 110, 0.055); color: var(--text); transform: translateY(-1px); }
.earn-chip:hover::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(194, 168, 110, 0.1); }
.chain-stage {
  margin: 0 -4px -2px;
  padding: 14px 10px 0;
  border-top: 1px solid var(--border-soft);
  background: radial-gradient(ellipse at 70% 58%, rgba(194, 168, 110, 0.07), transparent 48%);
}
.reward-timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); min-height: 84px; padding-top: 12px; }
.reward-track { position: absolute; top: 20px; left: 8px; right: 8px; height: 1px; background: rgba(242, 240, 234, 0.12); overflow: hidden; }
.reward-signal { position: absolute; top: -1px; left: 0; width: 34%; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: rc-timeline 3s ease-in-out infinite; }
.reward-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.reward-step:nth-child(2) { align-items: flex-start; text-align: left; }
.reward-step:last-of-type { align-items: flex-end; text-align: right; }
.reward-node { width: 16px; height: 16px; margin: 0 3px 14px; border: 1px solid rgba(194, 168, 110, 0.55); border-radius: 3px; background: #15140f; box-shadow: 0 0 0 5px rgba(194, 168, 110, 0.035); transform: rotate(45deg); }
.reward-node::after { content: ""; display: block; width: 4px; height: 4px; margin: 5px; border-radius: 1px; background: var(--accent); }
.reward-step strong { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.reward-step small { margin-top: 3px; font-family: var(--font-mono); font-size: 9px; color: var(--text-faintest); }
.reward-step--rewarded strong { color: var(--accent); }
@keyframes rc-timeline { 0% { transform: translateX(-100%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(300%); opacity: 0; } }

@keyframes rc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.72); }
}
.rc-link { animation: rc-forge 3.2s cubic-bezier(0.4,0,0.2,1) infinite; }
.rc-spark { transform-box: fill-box; transform-origin: center; animation: rc-spark 3.2s ease-out infinite; }
@keyframes rc-forge {
  0% { stroke-dashoffset: 220; opacity: 0.35; }
  8%, 30% { stroke-dashoffset: 0; opacity: 1; }
  70%, 100% { stroke-dashoffset: 0; opacity: 0.35; }
}
@keyframes rc-spark {
  0%, 6% { opacity: 0; transform: scale(0.4); }
  10% { opacity: 1; transform: scale(1.5); }
  20%, 100% { opacity: 0; transform: scale(0.4); }
}

/* ==========================================================================
   RAILS (trusted-by marquee)
   ========================================================================== */
.rails {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.rails-row {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(22px, 3.5vh, 32px) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px clamp(16px, 3vw, 36px);
}
.rails-label {
  flex: none;
  padding-left: var(--pad-x);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.marquee-mask {
  flex: 1 1 340px;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 92%, transparent);
}
/* Rails strip reuses the logo pill component with payment-network artwork. */
.marquee-track {
  display: inline-flex;
  width: max-content;
  animation: rc-marquee 75s linear infinite;
}
.rails-logos .logo-pill img {
  max-width: 96px;
  max-height: 22px;
}
.rails-logos .logo-pill img.rail-logo--compact {
  max-width: 88px;
  max-height: 20px;
}
@keyframes rc-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   WHY (2-card showcase)
   ========================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3vw, 36px);
}
.showcase-frame {
  position: relative;
  height: 340px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-a), var(--surface-b));
}
.showcase-frame h3, .why-grid h3 {
  margin: 26px 0 10px;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.why-grid p { font-size: 14.5px; line-height: 1.6; color: var(--text-dimmer); max-width: 34ch; }

.feed-badge {
  position: absolute;
  top: 20px; left: 22px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.feed-viewport {
  position: absolute;
  inset: 56px 0 0;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}
.feed-track {
  animation: rc-feed 14s linear infinite;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}
/* margin-bottom (not a track-level gap) so the two stacked halves are identical
   heights and translateY(-50%) lands exactly on the seam — see .logo-pill comment. */
.feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: rgba(242, 240, 234, 0.02);
}
.feed-net {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 7px;
  background: rgba(242, 240, 234, 0.06);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.feed-last4 { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.feed-amt { font-weight: 700; font-size: 14px; color: var(--accent); margin-left: auto; }
/* Fixed box + object-fit:contain so every partner wordmark — regardless of its
   native aspect ratio — reads at the same optical size instead of the longer
   ones (e.g. Zalando, IKEA) outweighing shorter ones (e.g. Uber). */
.feed-merchant { flex: none; width: 60px; height: 30px; display: flex; align-items: center; justify-content: flex-end; }
.feed-merchant img { max-width: 60px; max-height: 14px; width: auto; height: auto; object-fit: contain; opacity: 0.82; }

@keyframes rc-feed {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.network-frame { display: flex; align-items: center; justify-content: center; }
.rc-dash { stroke-dasharray: 7 33; animation: rc-dash 1.4s linear infinite; }
@keyframes rc-dash { to { stroke-dashoffset: -40; } }

/* ==========================================================================
   PLATFORM CARDS
   9 capabilities, fixed at 3 or 1 columns (never 2) so the count — which
   divides cleanly by 3 and by 1 but not by 2 — never leaves an orphan card
   stranded alone in the last row. See the responsive block for the collapse.
   ========================================================================== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.2vw, 28px);
}
.platform-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface-a), var(--surface-b));
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.platform-card:hover { border-color: rgba(194, 168, 110, 0.55); transform: translateY(-2px); }

.platform-visual {
  position: relative;
  height: 176px;
  margin: 16px 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(194, 168, 110, 0.06), transparent 65%),
    var(--surface-flat);
  overflow: hidden;
}
/* faint blueprint grid behind every icon, echoing the platform's own
   card/network diagrams elsewhere on the page — masked so it fades before
   the card edge instead of cutting off hard. */
.platform-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 240, 234, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 234, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000, transparent 85%);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000, transparent 85%);
}
.platform-visual svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }

.platform-card-body { padding: 16px 22px 24px; }
.platform-num { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 10px; }
.platform-title { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; color: var(--text); margin: 0 0 8px; }
.platform-desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-dimmer); }

/* small "live" indicator dot reused across several platform-card icons —
   same pulse keyframes as the hero's live-dot, just detached from that
   component so it can sit anywhere inside an inline SVG. */
.rc-pulse-dot { animation: rc-pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* ==========================================================================
   MARKETPLACE (partner logo marquee)
   ========================================================================== */
.marketplace-rows { display: flex; flex-direction: column; gap: 18px; margin-top: clamp(36px, 5vh, 52px); }
.logo-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.logo-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  animation: rc-marquee 195s linear infinite;
}
.logo-track--reverse { animation-direction: reverse; animation-duration: 230s; }
/* Loop math: the track is two identical halves, and translateX(-50%) has to land
   exactly on the seam between them. A flex `gap` (or padding) on the track would
   add space that isn't duplicated on both halves, landing short and producing a
   visible snap on every loop — so spacing lives on each pill's own margin instead,
   which keeps both halves byte-for-byte the same width. */
.logo-pill {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-right: 10px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: rgba(242, 240, 234, 0.015);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.logo-pill:hover { border-color: var(--accent); background: rgba(194, 168, 110, 0.06); }
/* max-height + max-width (not a fixed height) so wide wordmarks (Ticket, Imerco,
   Whiteaway, Blockbuster…) get capped down instead of towering over narrow ones
   like H&M — the box shrinks whichever axis needs it, aspect ratio stays intact. */
.logo-pill img { max-height: 14px; max-width: 68px; width: auto; height: auto; object-fit: contain; opacity: 0.88; transition: opacity 0.18s ease; }
.logo-pill:hover img { opacity: 1; }

/* ==========================================================================
   BUILD / API
   ========================================================================== */
.build-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 34%, rgba(194, 168, 110, 0.09), transparent 28%),
    var(--bg-raised);
}
.build-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(242, 240, 234, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 234, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent 8%, #000 55%, transparent 100%);
}
/* Fixed 2 columns, not auto-fit: at wide desktop, auto-fit(minmax(320px,1fr))
   had room to open a 3rd empty track (build-copy and code-panel only ever
   fill 2), which auto-fit doesn't collapse because .endpoints spans 1/-1
   into it — so the section rendered with a dead gap on the right. Pinning
   the column count removes that phantom track at every width; the
   breakpoint below collapses to 1 column in step with .platform-grid. */
.build-grid {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(48px, 7vw, 88px);
  row-gap: clamp(52px, 7vh, 80px);
  align-items: center;
}
.build-title { max-width: 16ch; margin-bottom: 30px; }
.build-title span {
  position: relative;
  color: var(--accent);
  white-space: nowrap;
}
.build-title span::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 0;
  bottom: 0.04em;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.build-copy p.lede { max-width: 48ch; margin-bottom: clamp(34px, 4.5vh, 44px); }
.build-demo { min-width: 0; }
.integration-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
  width: 100%;
  padding: 0 4px;
}
.integration-path::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(194, 168, 110, 0.2));
}
.integration-step { position: relative; display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.integration-step:nth-child(2) { align-items: center; text-align: center; }
.integration-step:nth-child(3) { align-items: flex-end; text-align: right; }
.integration-marker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(194, 168, 110, 0.45);
  border-radius: 4px;
  background: var(--bg-raised);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--accent);
  transform: rotate(45deg);
}
.integration-marker > span { display: flex; align-items: center; justify-content: center; transform: rotate(-45deg); }
.integration-marker--live > span {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(126, 174, 117, 0.12), 0 0 9px rgba(126, 174, 117, 0.38);
  transform: rotate(0);
}
.integration-step strong { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.integration-step small { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 9.5px; line-height: 1.35; color: var(--text-faintest); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: clamp(24px, 3vw, 36px);
}
.stat {
  padding-top: 0;
}
.stat-num {
  font-weight: 800;
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.stat-label { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-dimmer); }
/* tabular-nums keeps digit width constant while count-up animates the text,
   so neighboring labels don't jitter as the number gains/loses digits. */
.count-num { font-variant-numeric: tabular-nums; }

.code-panel {
  position: relative;
  border: 1px solid rgba(194, 168, 110, 0.25);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(155deg, rgba(20, 19, 16, 0.98), var(--bg) 52%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(242, 240, 234, 0.015) inset;
}
.code-panel::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.code-dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3a37; }
.code-dot:nth-child(1) { background: rgba(194, 168, 110, 0.82); }
.code-dot:nth-child(2) { background: rgba(159, 184, 154, 0.6); }
.code-dot:nth-child(3) { background: rgba(242, 240, 234, 0.18); }
.code-filename { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.code-copy {
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid var(--border-interactive);
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dimmer);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.code-copy:hover { border-color: var(--border-accent); color: var(--accent); }
.code-copy[data-copied="true"] { border-color: var(--border-accent); color: var(--accent); }
.code-body {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.1vw, 12px);
  line-height: 1.65;
  color: var(--text-dim);
  white-space: pre;
}
/* thin branded scrollbar — the panel scrolls horizontally on narrow
   viewports (the curl command doesn't wrap), so this makes that fact
   visible instead of relying on an invisible OS scrollbar. */
.code-body::-webkit-scrollbar { height: 6px; }
.code-body::-webkit-scrollbar-track { background: transparent; }
.code-body::-webkit-scrollbar-thumb { background: rgba(194, 168, 110, 0.35); border-radius: 3px; }
.code-comment { color: var(--text-faintest); }
.code-key { color: var(--accent); }
.code-str { color: #9fb89a; }
.code-num { color: #e0c088; }
.code-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-soft);
}
.code-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--success);
}
.code-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: rc-pulse 1.6s ease-in-out infinite; }
.code-footer-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-faintest); }

.endpoints {
  grid-column: 1 / -1;
  margin-top: clamp(4px, 1vh, 12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-flat);
  overflow: hidden;
}
.endpoints.is-animating {
  overflow: hidden;
}
.endpoints > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 21px 24px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.endpoints > summary::-webkit-details-marker { display: none; }
.endpoints > summary::marker { content: ""; }
.endpoints > summary:hover { background: rgba(194, 168, 110, 0.05); }
.acc-sign {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
  flex: none;
  width: 1em;
  text-align: center;
}
.endpoints:not([open]) .acc-sign .minus { display: none; }
.endpoints[open] .acc-sign .plus { display: none; }
.endpoints-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--accent); }
.endpoints-meta { flex: 1; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-faintest); text-align: left; }
/* Fixed 2 columns for the same reason as .build-grid above: the 16 example
   rows divide evenly by 2 (8 + 8), so a pinned column count never strands
   an orphan row — auto-fit could open a 3rd track on very wide screens and
   leave one row alone in the last line. Collapses to 1 column at 640px. */
.endpoints-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 4vw, 56px);
  padding: 4px 22px 20px;
  border-top: 1px solid var(--border-soft);
}
.endpoint-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 -14px;
  border-radius: 8px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s ease;
}
.endpoint-row:hover { background: rgba(194, 168, 110, 0.05); }
.endpoint-method {
  flex: none;
  width: 40px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.endpoint-method--get { color: #9fb89a; }
.endpoint-path { display: block; font-family: var(--font-mono); font-size: 12.5px; color: #e6e2d8; word-break: break-word; }
.endpoint-desc { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.4; color: var(--text-faint); }

/* ==========================================================================
   TEAM
   ========================================================================== */
.team-block + .team-block { margin-top: clamp(48px, 7vh, 80px); }
.team-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(24px, 3vh, 32px);
}
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(24px, 3vw, 36px);
}
.leader-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: linear-gradient(160deg, var(--surface-a), var(--surface-b));
  display: flex;
  align-items: center;
  justify-content: center;
}
.leader-photo img { width: 100%; height: 100%; object-fit: cover; }
.leader-monogram {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  color: var(--accent);
}
.leader-name { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.leader-role { margin-top: 4px; font-size: 13.5px; color: var(--text-dimmer); }

.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(16px, 2vw, 32px);
}
.crew-grid + .crew-grid { margin-top: clamp(16px, 2vw, 32px); }
.crew-card { border-top: 1px solid var(--border); padding-top: 16px; }
.crew-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.crew-role {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section { position: relative; }
.cta-inner { max-width: 1000px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.cta-inner h2 { font-weight: 800; font-size: clamp(34px, 6vw, 84px); line-height: 1; letter-spacing: -0.035em; }
.cta-inner p.lede { margin: 22px auto 0; max-width: 46ch; text-align: center; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 40px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-soft);
  padding: clamp(48px, 7vh, 72px) var(--pad-x);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 38%, rgba(194, 168, 110, 0.105), transparent 29%),
    linear-gradient(rgba(242, 240, 234, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 234, 0.022) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  opacity: 0.75;
}
.footer-top {
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.footer-brand { max-width: 34ch; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand-word { height: clamp(28px, 3vw, 36px); }
.footer-brand p { font-size: 14px; line-height: 1.6; color: var(--text-faint); }
.footer-cols { display: flex; gap: clamp(40px, 6vw, 88px); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.footer-col a { font-size: 14px; color: var(--text-dim); transition: color 0.18s ease; padding: 3px 0; min-height: 24px; display: inline-flex; align-items: center; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   MODAL (Book a demo / Explore the API)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 6, 5, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.modal-overlay.is-open {
  opacity: 1;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #1a1813, #0d0d0c);
  padding: clamp(28px, 3.5vw, 40px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(-14px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.is-open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-interactive);
  background: none;
  color: var(--text-dimmer);
  font-size: 16px;
  line-height: 1;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }

.form-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.form-kicker { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.form-title { font-weight: 700; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.15; letter-spacing: -0.03em; }
.form-blurb { font-size: 14.5px; line-height: 1.6; color: var(--text-dimmer); }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-interactive);
  background: var(--surface-flat);
  color: var(--text);
  font-size: 14.5px;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238f8c82' stroke-width='1.4' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
}
.field input:focus-visible, .field select:focus-visible { border-color: var(--border-accent); outline: none; }
.field input::placeholder { color: var(--text-faintest); }

.interests-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.interests-head span:first-child { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.toggle-all {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 4px 2px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.toggle-all:hover { color: var(--accent-hover); }
.interest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 8px; margin-bottom: 24px; }
.chip {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--border-interactive);
  background: var(--surface-flat);
  color: var(--text-dim);
  transition: all 0.15s ease;
}
.chip[aria-pressed="true"] {
  border-color: rgba(194, 168, 110, 0.7);
  background: var(--accent-wash);
  color: var(--accent);
}

.form-footer { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-footer .btn-corner { padding: 9px 17px; font-size: 13.5px; }
.form-note { font-size: 13px; color: var(--text-faintest); }

.form-success { display: flex; flex-direction: column; gap: 16px; padding: 14px 0 6px; }
.form-success .btn-ghost { align-self: flex-start; margin-top: 6px; }

/* honeypot field — hidden from everyone but bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 760px) {
  .platform-grid { grid-template-columns: 1fr; }
  .build-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; }
  .nav .brand-word { height: 22px; }
  .nav-toggle { display: inline-flex; flex: 0 0 auto; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px var(--pad-x) 20px;
    background: rgba(11, 11, 10, 0.97);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-link::after { display: none; }
  .nav-links .btn-corner { min-height: 44px; margin-top: 14px; }
  .rails-label { display: none; }
  .cta-actions .btn, .cta-actions .btn-corner, .cta-actions .btn-bracket,
  .hero-actions .btn, .hero-actions .btn-corner, .hero-actions .btn-bracket { flex: 0 0 auto; justify-content: center; }
  .endpoints-list { grid-template-columns: 1fr; }
  .integration-step small { font-size: 9px; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding-top: 0; }
  .stat-num { font-size: clamp(20px, 7vw, 28px); }
  .stat-label { font-size: 11px; }
}

/* ==========================================================================
   MOTION SAFETY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track, .logo-track, .feed-track { animation: none !important; }
}
