/* TAO Swarm landing — 2026 premium dark
 *
 * Design language:
 *   - Aurora UI: animated gradient blobs in hero, subtle motion
 *   - Surgical reveals on scroll (one tuned animation per section)
 *   - Dark-dominant palette (#0a0a12) with high-contrast gradient
 *     accents (cyan → violet → pink)
 *   - System fonts only (no external requests, GDPR-clean)
 *   - Reduced-motion aware
 *   - Mobile-first symmetric centering
 */

:root {
  --bg: #0a0a12;
  --bg-2: #11111c;
  --bg-3: #161624;
  --bg-glass: rgba(20, 20, 32, 0.55);
  --fg: #e8e9ee;
  --fg-dim: #a8a9b3;
  --fg-faint: #6e6f7a;
  --line: #23232f;
  --line-soft: #1c1c28;
  --grad-a: #7dd3fc;
  --grad-b: #a78bfa;
  --grad-c: #f472b6;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --code: #d4d4d8;
  --maxw: 1140px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  /* Belt-and-braces horizontal-scroll lock. ``overflow-x: clip`` on
   * both elements is the modern way to prevent any child element
   * (the aurora blobs, long <pre> blocks, code spans, etc.) from
   * pushing a horizontal scrollbar onto the page. ``hidden`` falls
   * back automatically in older browsers. ``max-width: 100%`` is a
   * defensive belt for older WebKit. */
  overflow-x: clip;
  max-width: 100%;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
        system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Fallback for browsers that ignore overflow-x: clip */
  overflow-x: hidden;
}
/* Containers must respect the viewport. ``min-width: 0`` allows
 * grid/flex children to shrink below their intrinsic content size,
 * which is the actual cause of "long terminal blob pushes the
 * column wider than 1fr". */
main, .section, .hero, .section-inner, .hero-inner {
  max-width: 100%;
  min-width: 0;
}
main { overflow-x: clip; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code, pre {
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}
/* Inline code can be longer than mobile column width — break
 * cleanly so it never pushes the parent. */
:not(pre) > code { word-break: break-word; overflow-wrap: anywhere; }
/* Pre blocks scroll internally; never let their content push
 * the page width. */
pre { max-width: 100%; }
.skip {
  position: absolute; top: -40px; left: 0;
  background: var(--grad-a); color: var(--bg); padding: 8px 12px; z-index: 100;
}
.skip:focus { top: 0; }

/* Scroll-progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 60; pointer-events: none;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
  width: 0%;
  transition: width 80ms linear;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(10, 10, 18, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand-mark {
  /* Real logo PNG. Sized 32px in nav, contained, with a soft glow
   * that matches the rest of the cyan/violet palette. The image
   * is served at 128px source so it stays sharp on 4x devices. */
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(125, 211, 252, 0.35));
  flex-shrink: 0;
}
img.brand-mark { background: transparent; }
.brand-text { font-size: 1.02rem; }
.nav nav {
  display: flex; align-items: center; gap: 22px;
  font-size: 0.93rem;
}
.nav nav a {
  color: var(--fg-dim);
  transition: color .2s var(--ease);
  position: relative;
}
.nav nav a:hover { color: var(--fg); }
.nav nav a:not(.cta):not(.lang)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav nav a:not(.cta):not(.lang):hover::after { transform: scaleX(1); }
.nav .cta {
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px;
  transition: border-color .2s var(--ease), background .2s var(--ease),
              transform .15s var(--ease);
}
.nav .cta:hover {
  border-color: var(--grad-a);
  background: rgba(125, 211, 252, 0.06);
  transform: translateY(-1px);
}
.lang {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.82rem; color: var(--fg-faint);
}
.lang a {
  color: var(--fg-dim); padding: 3px 7px; border-radius: 5px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang a:hover { color: var(--fg); background: var(--bg-3); }
.lang a.active {
  color: var(--fg); background: var(--bg-3);
}

/* Hero — Aurora UI: centred, single viewport, animated mesh */
.hero {
  position: relative;
  /* ``clip`` instead of ``hidden`` — doesn't create a scroll
   * containing block, so no chance of the aurora blobs or any
   * other absolutely-positioned child leaking sideways. */
  overflow: clip;
  /* Modern containment: tells the browser the hero's painted
   * children cannot affect layout outside this box. */
  contain: paint;
  min-height: clamp(560px, 88vh, 820px);
  display: grid; place-items: center;
  padding: clamp(60px, 12vh, 120px) var(--pad) clamp(60px, 10vh, 100px);
  width: 100%;
}
.hero-inner {
  max-width: 880px; margin: 0 auto; position: relative; z-index: 2;
  text-align: center;
  animation: fade-up 1.1s var(--ease) both;
}
.hero-bg {
  position: absolute; inset: -10% -5%; z-index: 1; pointer-events: none;
  filter: blur(60px) saturate(120%);
  opacity: 0.85;
}
.hero-bg::before, .hero-bg::after, .hero-bg span {
  content: ""; position: absolute; border-radius: 50%;
  mix-blend-mode: screen;
}
.hero-bg::before {
  width: 50vw; height: 50vw; max-width: 700px; max-height: 700px;
  left: -10%; top: -15%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.55), transparent 65%);
  animation: drift-a 18s ease-in-out infinite;
}
.hero-bg::after {
  width: 55vw; height: 55vw; max-width: 760px; max-height: 760px;
  right: -12%; top: 5%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.55), transparent 65%);
  animation: drift-b 22s ease-in-out infinite;
}
.hero-bg span {
  width: 45vw; height: 45vw; max-width: 620px; max-height: 620px;
  left: 50%; top: 70%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(244, 114, 182, 0.40), transparent 65%);
  animation: drift-c 26s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(8%, 6%) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-6%, 8%) scale(0.94); }
}
@keyframes drift-c {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-46%, -54%) scale(1.10); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero-logo {
  display: block;
  /* Bigger and more present. On phones the lower bound dominates;
   * on desktop the upper bound; tablet sizes interpolate via vw. */
  width: clamp(112px, 22vw, 152px);
  height: clamp(112px, 22vw, 152px);
  margin: 0 auto 28px;
  object-fit: contain;
  filter:
    drop-shadow(0 16px 40px rgba(125, 211, 252, 0.40))
    drop-shadow(0 8px 20px rgba(167, 139, 250, 0.28));
  animation: hero-logo-float 6s ease-in-out infinite;
}
@keyframes hero-logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; margin: 0 auto 32px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

h1 {
  font-size: clamp(2rem, 5.6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-weight: 700;
  margin: 0 auto;
  max-width: 18ch;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(120deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-2 {
  background: linear-gradient(120deg, var(--grad-b), var(--grad-c));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead {
  margin: 28px auto 0; max-width: 60ch;
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  color: var(--fg-dim); line-height: 1.65;
  text-wrap: pretty;
}
.cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 36px;
  justify-content: center;
}
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 11px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease),
              box-shadow .2s var(--ease);
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(120deg, var(--grad-a), var(--grad-b));
  color: var(--bg);
  box-shadow: 0 4px 24px -8px rgba(125, 211, 252, 0.5);
}
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left .55s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -6px rgba(125, 211, 252, 0.6);
}
.btn-primary:hover::before { left: 100%; }
.btn-secondary {
  border-color: var(--line); color: var(--fg);
  background: var(--bg-glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  border-color: var(--grad-a);
  background: rgba(125, 211, 252, 0.08);
  transform: translateY(-2px);
}

.badges {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 36px auto 0;
  justify-content: center;
}
.badge {
  font-size: 0.78rem; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-glass); color: var(--fg-dim);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.badge:hover { border-color: var(--grad-a); color: var(--fg); }

/* Sections */
.section {
  padding: clamp(72px, 12vh, 120px) var(--pad);
  position: relative;
}
.section + .section { border-top: 1px solid var(--line-soft); }
.section-alt { background: var(--bg-2); }
.section-inner {
  max-width: var(--maxw); margin: 0 auto;
}
.section-head {
  margin: 0 auto 56px;
  max-width: 60ch;
  text-align: center;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--grad-a); margin-bottom: 14px;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15; letter-spacing: -0.02em; font-weight: 700;
  text-wrap: balance;
}
.subhead {
  margin: 18px auto 0; color: var(--fg-dim);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  max-width: 62ch;
  text-wrap: pretty;
}

/* Reveal animation (Intersection Observer toggles .visible) */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.06s; }
.reveal.delay-2 { transition-delay: 0.12s; }
.reveal.delay-3 { transition-delay: 0.18s; }
.reveal.delay-4 { transition-delay: 0.24s; }
.reveal.delay-5 { transition-delay: 0.30s; }
.reveal.delay-6 { transition-delay: 0.36s; }

/* Cards grid. ``minmax(0, …)`` — not ``minmax(280px, …)`` — is the
 * fix for "wide pre / long inline code blows the column wider
 * than 1fr". The minimum-track-size of an auto-fit grid defaults
 * to ``min-content`` which lets the content push the grid wider
 * than the container. ``0`` overrides that. The visible look is
 * the same; the no-horizontal-scroll guarantee is real.
 */
.grid-3 {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.grid-2 {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}
/* Grid/flex items: allow shrink below content size. */
.grid-3 > *, .grid-2 > *, .steps > *, .roadmap > *, .metrics > * {
  min-width: 0;
}
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(140px 140px at var(--mx, 50%) var(--my, 0%),
              rgba(125, 211, 252, 0.10), transparent 70%);
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
.card:hover {
  border-color: rgba(125, 211, 252, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(125, 211, 252, 0.15);
}
.card:hover::before { opacity: 1; }
.card-num {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--fg-faint); margin-bottom: 16px;
  letter-spacing: 0.1em;
}
.card h3 {
  font-size: 1.13rem; margin-bottom: 12px; letter-spacing: -0.01em;
}
.card p { color: var(--fg-dim); font-size: 0.95rem; line-height: 1.65; }
.card code {
  background: var(--bg-3); padding: 2px 7px; border-radius: 5px;
  color: var(--code); font-size: 0.86em;
  border: 1px solid var(--line);
}

/* Steps */
.steps { display: grid; gap: 18px; max-width: 800px; margin: 0 auto; }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.step:hover {
  border-color: rgba(125, 211, 252, 0.30);
  transform: translateX(2px);
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: var(--bg); font-weight: 700;
  box-shadow: 0 4px 14px -4px rgba(125, 211, 252, 0.4);
}
.step h3 { font-size: 1.05rem; margin-bottom: 12px; }
/* Inner grid track sizing — without ``min-width: 0`` the 1fr column
   would inherit the intrinsic width of its longest child (a long
   URL inside the <pre>), pushing the whole step beyond the viewport
   on narrow screens. */
.step > * { min-width: 0; }
.step pre {
  background: #050510; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px;
  color: var(--code);
  font-size: 0.86rem; line-height: 1.6;
  -webkit-overflow-scrolling: touch;
  /* Mobile: wrap long lines so install commands stay visible.
     ``overflow-wrap: anywhere`` breaks even URL-like tokens that
     have no natural break point. ``overflow-x: auto`` is still set
     as a fallback in case a token still doesn't wrap. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Terminal */
.terminal {
  background: #050510; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
  /* Allow the terminal to shrink below its content's intrinsic
     width — the inner pre will then handle horizontal scrolling. */
  min-width: 0;
  max-width: 100%;
}
.terminal:hover {
  border-color: rgba(125, 211, 252, 0.30);
  transform: translateY(-2px);
}
.term-bar {
  background: var(--bg-3); padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; gap: 6px;
}
.term-bar span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #45454f;
}
.term-bar span:first-child { background: #f87171; }
.term-bar span:nth-child(2) { background: #fbbf24; }
.term-bar span:nth-child(3) { background: #4ade80; }
.terminal pre {
  padding: 18px; color: var(--code);
  font-size: 0.84rem; line-height: 1.55;
  /* Terminal output uses ASCII-aligned tables — keep monospace
     layout, allow horizontal scroll inside the box rather than
     wrapping (which would break the column alignment). */
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
/* Smaller font on narrow viewports so a 70-column ASCII table
   fits without sideways scrolling for most cases. */
@media (max-width: 480px) {
  .terminal pre { font-size: 0.72rem; padding: 14px; }
}
.term-prompt { color: var(--grad-a); }
.term-warn { color: var(--warn); font-weight: 600; }

/* Metrics */
.metrics {
  display: grid; gap: 14px; margin-top: 56px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.metric {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.metric:hover {
  border-color: rgba(125, 211, 252, 0.30);
  transform: translateY(-2px);
}
.metric-value {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric-label {
  margin-top: 8px; font-size: 0.84rem; color: var(--fg-dim);
  line-height: 1.5;
}

/* License */
.lic-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.lic-card:hover { transform: translateY(-2px); }
.lic-allowed:hover { border-color: rgba(74, 222, 128, 0.35); }
.lic-denied:hover  { border-color: rgba(248, 113, 113, 0.35); }
.lic-card h3 {
  font-size: 1.1rem; margin-bottom: 16px; text-align: center;
}
.lic-card ul { list-style: none; }
.lic-card li {
  padding: 10px 0 10px 28px; position: relative;
  color: var(--fg-dim); font-size: 0.94rem;
  border-bottom: 1px solid var(--line-soft);
}
.lic-card li:last-child { border-bottom: none; }
.lic-allowed li::before {
  content: "✓"; position: absolute; left: 4px; top: 10px;
  color: var(--good); font-weight: 700;
}
.lic-denied li::before {
  content: "✕"; position: absolute; left: 4px; top: 10px;
  color: var(--bad); font-weight: 700;
}
.callout {
  margin: 32px auto 0; padding: 24px 28px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--fg-dim);
  font-size: 0.96rem; line-height: 1.7;
  max-width: 800px; text-align: center;
}
.callout a {
  color: var(--grad-a);
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color .2s var(--ease);
}
.callout a:hover { color: var(--fg); }
.callout strong { color: var(--fg); }

/* Roadmap */
.roadmap { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; }
.rm-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 28px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.rm-row:hover {
  border-color: rgba(125, 211, 252, 0.30);
  transform: translateX(3px);
}
.rm-when {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  color: var(--grad-a); padding-top: 4px;
}
.rm-what h3 {
  font-size: 1.07rem; margin-bottom: 8px; letter-spacing: -0.01em;
}
.rm-what p { color: var(--fg-dim); font-size: 0.95rem; line-height: 1.65; }
.rm-not {
  margin: 36px auto 0; padding: 28px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: rgba(248, 113, 113, 0.04);
  border-radius: var(--radius);
  max-width: 880px;
}
.rm-not h4 {
  font-size: 0.92rem; color: var(--bad);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 14px;
  text-align: center;
}
.rm-not ul { list-style: none; max-width: 640px; margin: 0 auto; }
.rm-not li {
  padding: 7px 0 7px 24px; position: relative;
  color: var(--fg-dim); font-size: 0.93rem;
}
.rm-not li::before {
  content: "—"; position: absolute; left: 0; color: var(--bad);
}
.rm-not em { font-style: italic; color: var(--fg); }

/* CTA section */
.section-cta { text-align: center; }
.cta-block { max-width: 640px; margin: 0 auto; }
.cta-block h2 { margin-bottom: 28px; }
.cta-block .cta-row { justify-content: center; }

/* Footer */
.foot {
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  padding: 56px var(--pad);
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: 24px;
  text-align: center;
}
.foot-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg-dim); font-size: 0.92rem;
  justify-content: center;
}
.foot-nav {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 0.88rem;
  justify-content: center;
}
.foot-nav a {
  color: var(--fg-dim);
  transition: color .2s var(--ease);
}
.foot-nav a:hover { color: var(--fg); }
.foot-fine {
  font-size: 0.8rem; color: var(--fg-faint);
  max-width: 80ch; line-height: 1.65;
  margin: 0 auto;
}

/* Legal pages */
.legal {
  max-width: 760px; margin: 0 auto;
  padding: 64px var(--pad) 96px;
}
.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.legal h2 {
  font-size: 1.18rem; margin: 36px 0 12px;
  letter-spacing: -0.005em;
}
.legal h3 { font-size: 1rem; margin: 20px 0 8px; color: var(--fg); }
.legal p, .legal li {
  color: var(--fg-dim); font-size: 0.96rem; line-height: 1.7;
}
.legal ul, .legal ol { padding-left: 22px; margin: 8px 0 16px; }
.legal li { margin: 4px 0; }
.legal a {
  color: var(--grad-a);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal hr { border: none; border-top: 1px solid var(--line); margin: 48px 0; }
.legal .lang-toggle {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 999px; margin-bottom: 32px;
}
.legal .lang-toggle a {
  padding: 7px 16px; border-radius: 999px;
  font-size: 0.85rem; color: var(--fg-dim);
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.legal .lang-toggle a:hover { color: var(--fg); }
.legal .lang-toggle a.active {
  background: var(--bg);
  color: var(--fg);
}
.legal section { display: none; }
.legal section.active { display: block; }
.legal-back {
  display: inline-block; margin-top: 48px; font-size: 0.9rem;
  color: var(--fg-dim);
  transition: color .2s var(--ease);
}
.legal-back:hover { color: var(--fg); }

/* Mobile — symmetric centered, tighter, no horizontal scroll */
@media (max-width: 880px) {
  .nav-inner { padding: 12px var(--pad); }
  .nav nav { gap: 12px; }
  /* Only hide DIRECT anchor children of <nav> (the section links).
   * The previous selector ``a:not(.cta):not(.lang)`` matched every
   * descendant <a>, including the EN/DE switcher anchors inside
   * ``<span class="lang">``, which made the language toggle vanish
   * on mobile. ``> a`` restricts the rule to top-level nav links. */
  .nav nav > a:not(.cta) { display: none; }
  /* Lang switcher must always show, including on mobile. */
  .nav nav .lang { display: inline-flex; }

  .hero {
    min-height: 0;
    padding: clamp(56px, 12vh, 88px) var(--pad) clamp(56px, 9vh, 88px);
  }
  .hero-inner { padding: 0 4px; }
  h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
    line-height: 1.08;
    max-width: 16ch;
  }
  .lead {
    font-size: 0.98rem;
    margin-top: 24px;
    padding: 0 8px;
  }
  .cta-row {
    margin-top: 32px;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .btn-primary, .btn-secondary {
    width: 100%; padding: 14px 20px;
  }
  .badges {
    margin-top: 28px; gap: 6px;
  }
  .badge { font-size: 0.74rem; padding: 5px 10px; }

  .section { padding: 64px var(--pad); }
  .section-head { margin-bottom: 40px; }

  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 40px 1fr;
    padding: 20px;
    gap: 16px;
  }
  .step pre { font-size: 0.8rem; padding: 14px; }
  .terminal pre { font-size: 0.78rem; padding: 14px; }

  .rm-row {
    grid-template-columns: 1fr;
    gap: 8px; padding: 22px;
    text-align: left;
  }
  .rm-row:hover { transform: none; }
  .rm-when { padding-top: 0; }

  .lic-card { padding: 24px; }

  .metric { padding: 24px 14px; }
  .metric-value { font-size: 1.7rem; }

  .legal { padding: 48px var(--pad) 72px; }
  .legal h1 { font-size: 1.7rem; }
  .legal h2 { font-size: 1.05rem; }
}

@media (max-width: 480px) {
  :root { --pad: 18px; }
  .brand-text { font-size: 0.95rem; }
  .nav .cta { padding: 7px 14px; font-size: 0.85rem; }
  .lang { font-size: 0.78rem; }
  h1 { font-size: clamp(1.7rem, 9vw, 2.2rem); }
  .eyebrow { font-size: 0.72rem; padding: 6px 12px; margin-bottom: 24px; }
}

/* Reduced motion: preserve information, kill movement */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-inner { animation: none; }
  .hero-logo { animation: none; }
  .hero-bg::before, .hero-bg::after, .hero-bg span { animation: none; }
}

/* Print: clean monochrome */
@media print {
  body { background: white; color: black; }
  .nav, .hero-bg, .progress, .foot, .badges, .cta-row { display: none; }
  .section, .hero { page-break-inside: avoid; }
}

/* ─────────────────────────────────────────────────────────────────────
   Live-in-Action demo + Dashboard mockup (PR 2R)
   ─────────────────────────────────────────────────────────────────────
   Two reusable widgets:
   1. .live-ticker — animated "tao_in" feed mimicking what the runner
      ingests every tick. Plays a loop of realistic momentum.
   2. .dash-mockup — a static HTML reproduction of the Streamlit
      Trading panel (sidebar + main). Same dark-theme + Inter font
      as the real dashboard so the visitor sees what they'd get.
   Both honour prefers-reduced-motion. */

/* ── Live ticker ─────────────────────────────────────────────────── */

.live-demo {
  background: linear-gradient(180deg, #050510 0%, #0a0a18 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 880px) {
  .live-demo { grid-template-columns: 1fr 1.1fr; gap: 24px; }
}

.live-ticker-head {
  display: flex; gap: 10px; align-items: center;
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.live-ticker-head .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 10px rgba(63, 185, 80, 0.6);
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.78); }
}

.live-ticker {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.85rem;
  color: var(--code);
  background: #050510;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}
.live-ticker-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(125, 211, 252, 0.07);
  align-items: baseline;
}
.live-ticker-row:last-child { border-bottom: none; }
.lt-id    { color: var(--muted); }
.lt-name  { color: #c9d1d9; }
.lt-tao   { color: var(--code); text-align: right; font-feature-settings: "tnum"; }
.lt-delta { font-size: 0.78rem; padding: 1px 7px; border-radius: 8px; min-width: 56px; text-align: right; }
.lt-up    { color: #3fb950; background: rgba(63, 185, 80, 0.10); }
.lt-down  { color: #f85149; background: rgba(248, 81, 73, 0.10); }
.lt-flat  { color: var(--muted); background: rgba(155, 166, 184, 0.07); }

/* Cycling animation — the "live" feel without JavaScript. We rotate
   the visible row by reordering with a CSS animation. */
.live-ticker-stream {
  position: absolute;
  inset: 14px 16px;
  animation: ticker-stream 12s linear infinite;
}
@keyframes ticker-stream {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* Animated equity curve — SVG path stroke-dashoffset trick. */
.live-equity {
  background: #050510;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}
.live-equity-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.live-equity-value {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  color: #3fb950; font-weight: 600;
  font-size: 1.1rem; font-feature-settings: "tnum";
}
.live-equity svg { width: 100%; height: 140px; display: block; }
.live-equity .eq-path {
  fill: none;
  stroke: url(#eq-grad);
  stroke-width: 2;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: eq-draw 4.5s ease-out forwards 0.2s, eq-draw-loop 8s ease-in-out infinite 4.7s;
}
@keyframes eq-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes eq-draw-loop {
  0%, 100% { stroke-dashoffset: 0; }
  50%      { stroke-dashoffset: 0; opacity: 1; }
}
.live-equity .eq-fill {
  fill: url(#eq-fill-grad);
  opacity: 0;
  animation: eq-fill-fade 5s ease-out forwards 1.2s;
}
@keyframes eq-fill-fade {
  to { opacity: 0.18; }
}

/* ── Dashboard mockup ────────────────────────────────────────────── */

.dash-mockup {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1220;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #e6edf3;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 880px) {
  .dash-mockup { grid-template-columns: 240px 1fr; }
}
.dash-mockup .dm-bar {
  background: #161b22;
  border-bottom: 1px solid #1f2942;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: #9ba6b8;
}
.dm-bar-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dm-bar-dot.r { background: #f87171; } .dm-bar-dot.y { background: #fbbf24; } .dm-bar-dot.g { background: #4ade80; }
.dm-bar-url { margin-left: 12px; color: #6b7280; font-family: ui-monospace, monospace; font-size: 0.74rem; }

.dm-sidebar {
  background: #121a2c;
  border-right: 1px solid #1f2942;
  padding: 18px 16px;
  font-size: 0.84rem;
  display: flex; flex-direction: column; gap: 14px;
}
.dm-side-title {
  color: #9ba6b8; font-size: 0.74rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 600;
}
.dm-nav { display: flex; flex-direction: column; gap: 4px; }
.dm-nav-item {
  padding: 6px 10px; border-radius: 8px;
  color: #9ba6b8; cursor: default;
}
.dm-nav-item.active { background: #1a2540; color: #e6edf3; }

.dm-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.dm-pill-success { color: #3fb950; background: rgba(63,185,80,0.14); border-color: rgba(63,185,80,0.25); }
.dm-pill-warn    { color: #d29922; background: rgba(210,153,34,0.14); border-color: rgba(210,153,34,0.25); }
.dm-pill-danger  { color: #f85149; background: rgba(248,81,73,0.14); border-color: rgba(248,81,73,0.25); }
.dm-pill-muted   { color: #9ba6b8; background: rgba(155,166,184,0.10); border-color: rgba(155,166,184,0.18); }

.dm-cmd-group {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #9ba6b8;
}
.dm-cmd-group-title { color: #c9d1d9; font-weight: 500; }

.dm-main { padding: 22px 24px; min-width: 0; }
.dm-main h2 {
  font-weight: 600; font-size: 1.25rem;
  border-bottom: 1px solid #1f2942; padding-bottom: 10px;
  margin: 0 0 6px 0; color: #e6edf3;
}
.dm-caption { color: #9ba6b8; font-size: 0.86rem; margin: 0 0 18px 0; }

.dm-hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px; margin: 14px 0 16px 0;
}
.dm-hero-cell {
  background: #121a2c; border: 1px solid #1f2942;
  border-radius: 12px; padding: 12px 14px;
}
.dm-hero-label {
  color: #9ba6b8; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.dm-hero-value {
  color: #e6edf3; font-weight: 700; font-size: 1.2rem;
  font-feature-settings: "tnum";
}

.dm-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  border-left: 3px solid #3fb950;
  background: rgba(63,185,80,0.08);
  font-size: 0.84rem; margin: 12px 0;
}

.dm-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 10px 0;
}
@media (max-width: 720px) { .dm-row { grid-template-columns: 1fr; } }

.dm-card {
  background: #121a2c; border: 1px solid #1f2942;
  border-radius: 12px; padding: 14px;
}
.dm-card-title {
  font-size: 0.78rem; color: #9ba6b8;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.dm-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem; font-feature-settings: "tnum";
}
.dm-table th, .dm-table td {
  text-align: left; padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.dm-table th { color: #9ba6b8; font-weight: 500; font-size: 0.74rem; text-transform: uppercase; }
.dm-table td.num { text-align: right; font-feature-settings: "tnum"; }
.dm-pos { color: #3fb950; }
.dm-neg { color: #f85149; }

.dm-bar-stack { display: flex; flex-direction: column; gap: 8px; }
.dm-bar-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 0.82rem; }
.dm-bar-track { height: 8px; background: rgba(124, 92, 255, 0.15); border-radius: 999px; overflow: hidden; grid-column: 1 / 2; }
.dm-bar-fill { height: 100%; background: linear-gradient(90deg, #7c5cff, #58a6ff); border-radius: 999px; }
.dm-bar-pct { color: #e6edf3; font-weight: 600; font-feature-settings: "tnum"; min-width: 48px; text-align: right; }

.dm-chart-wrap {
  background: #121a2c; border: 1px solid #1f2942;
  border-radius: 12px; padding: 14px; margin-top: 12px;
}
.dm-chart-wrap svg { width: 100%; height: 140px; display: block; }

/* Reduced motion: stop the ticker + curve animations */
@media (prefers-reduced-motion: reduce) {
  .live-ticker-stream { animation: none !important; }
  .live-equity .eq-path { animation: none !important; stroke-dashoffset: 0; }
  .live-equity .eq-fill { animation: none !important; opacity: 0.18; }
  .live-ticker-head .live-dot { animation: none !important; }
}
