/* Veloci landing page. Ports the real app theme (app/src/styles.css)
   verbatim: dark "telemetry console / aurora glass" base, five swappable
   accent themes via [data-theme] on <html>, and a parallel light palette.
   The page is the console: the hero, ticker, and swatches all reuse these
   exact tokens so switching themes here is switching the real product's
   themes, not a copy. */

:root {
  color-scheme: dark;

  --bg: #08090d;
  --rail: rgba(11, 13, 18, 0.72);
  --surface: #12151b;
  --surface-alt: #171b22;
  --surface-hover: rgba(255, 255, 255, 0.045);
  --glass: rgba(17, 20, 27, 0.6);
  --glass-strong: rgba(20, 24, 31, 0.78);
  --border: #262c37;
  --border-soft: #1b202a;
  --grid-line: rgba(200, 255, 61, 0.028);

  --text: #e7ebf1;
  --text-dim: #8a93a6;
  --text-faint: #5b6472;

  --accent: #c8ff3d;
  --accent-strong: #a6e600;
  --accent-soft: rgba(200, 255, 61, 0.12);
  --accent-glow: rgba(200, 255, 61, 0.35);
  --accent-contrast: #08110a;

  --blue: #4fb2ff;
  --blue-soft: rgba(79, 178, 255, 0.14);
  --green: #35d67c;
  --green-soft: rgba(53, 214, 124, 0.14);
  --red: #ff5470;
  --red-soft: rgba(255, 84, 112, 0.14);
  --amber: #ffb454;
  --amber-soft: rgba(255, 180, 84, 0.14);
  --violet: #b98bff;
  --violet-soft: rgba(185, 139, 255, 0.14);
  --gray-soft: rgba(138, 147, 166, 0.14);

  --orb-a: rgba(200, 255, 61, 0.16);
  --orb-b: rgba(79, 178, 255, 0.13);

  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Segoe UI Semibold", "Segoe UI", ui-sans-serif, system-ui, Arial, sans-serif;
  --sans-regular: "Segoe UI", ui-sans-serif, system-ui, Arial, sans-serif;

  font-family: var(--sans-regular);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #eceef2;
    --rail: rgba(233, 235, 240, 0.75);
    --surface: #ffffff;
    --surface-alt: #f4f5f8;
    --surface-hover: rgba(0, 0, 0, 0.04);
    --glass: rgba(255, 255, 255, 0.62);
    --glass-strong: rgba(255, 255, 255, 0.82);
    --border: #d9dde5;
    --border-soft: #e5e8ee;
    --grid-line: rgba(20, 40, 0, 0.03);

    --text: #12151b;
    --text-dim: #565f70;
    --text-faint: #8a93a6;

    --accent: #6f9a00;
    --accent-strong: #567a00;
    --accent-soft: rgba(111, 154, 0, 0.1);
    --accent-glow: rgba(111, 154, 0, 0.25);
    --accent-contrast: #ffffff;

    --blue: #1d6fd1;
    --blue-soft: rgba(29, 111, 209, 0.1);
    --green: #178a4c;
    --green-soft: rgba(23, 138, 76, 0.1);
    --red: #d0264a;
    --red-soft: rgba(208, 38, 74, 0.1);
    --amber: #b06a00;
    --amber-soft: rgba(176, 106, 0, 0.1);
    --violet: #7a3fd6;
    --violet-soft: rgba(122, 63, 214, 0.1);
    --gray-soft: rgba(86, 95, 112, 0.1);

    --orb-a: rgba(111, 154, 0, 0.14);
    --orb-b: rgba(29, 111, 209, 0.1);
  }
}

/* ---- accent themes: identical to app/src/styles.css ---------------------- */

:root[data-theme="cyan"] {
  --accent: #3de8ff;
  --accent-strong: #00c8e6;
  --accent-soft: rgba(61, 232, 255, 0.12);
  --accent-glow: rgba(61, 232, 255, 0.35);
  --accent-contrast: #041012;
  --orb-a: rgba(61, 232, 255, 0.14);
  --grid-line: rgba(61, 232, 255, 0.028);
}

:root[data-theme="magenta"] {
  --accent: #ff4dd8;
  --accent-strong: #e600b8;
  --accent-soft: rgba(255, 77, 216, 0.12);
  --accent-glow: rgba(255, 77, 216, 0.35);
  --accent-contrast: #140410;
  --orb-a: rgba(255, 77, 216, 0.13);
  --grid-line: rgba(255, 77, 216, 0.028);
}

:root[data-theme="amberfire"] {
  --accent: #ffb13d;
  --accent-strong: #e68f00;
  --accent-soft: rgba(255, 177, 61, 0.12);
  --accent-glow: rgba(255, 177, 61, 0.35);
  --accent-contrast: #120b04;
  --orb-a: rgba(255, 177, 61, 0.13);
  --grid-line: rgba(255, 177, 61, 0.028);
}

:root[data-theme="violetstorm"] {
  --accent: #a06bff;
  --accent-strong: #7e3fff;
  --accent-soft: rgba(160, 107, 255, 0.14);
  --accent-glow: rgba(160, 107, 255, 0.38);
  --accent-contrast: #0d0614;
  --orb-a: rgba(160, 107, 255, 0.15);
  --grid-line: rgba(160, 107, 255, 0.03);
}

@media (prefers-color-scheme: light) {
  :root[data-theme="cyan"] {
    --accent: #0090a8;
    --accent-strong: #007285;
    --accent-soft: rgba(0, 144, 168, 0.1);
    --accent-glow: rgba(0, 144, 168, 0.25);
    --accent-contrast: #ffffff;
    --orb-a: rgba(0, 144, 168, 0.12);
    --grid-line: rgba(0, 60, 70, 0.03);
  }

  :root[data-theme="magenta"] {
    --accent: #c2189e;
    --accent-strong: #9c0f7e;
    --accent-soft: rgba(194, 24, 158, 0.1);
    --accent-glow: rgba(194, 24, 158, 0.25);
    --accent-contrast: #ffffff;
    --orb-a: rgba(194, 24, 158, 0.11);
    --grid-line: rgba(80, 10, 65, 0.03);
  }

  :root[data-theme="amberfire"] {
    --accent: #b06a00;
    --accent-strong: #8f5600;
    --accent-soft: rgba(176, 106, 0, 0.1);
    --accent-glow: rgba(176, 106, 0, 0.25);
    --accent-contrast: #ffffff;
    --orb-a: rgba(176, 106, 0, 0.11);
    --grid-line: rgba(70, 45, 0, 0.03);
  }

  :root[data-theme="violetstorm"] {
    --accent: #6d2fd6;
    --accent-strong: #5722ab;
    --accent-soft: rgba(109, 47, 214, 0.1);
    --accent-glow: rgba(109, 47, 214, 0.25);
    --accent-contrast: #ffffff;
    --orb-a: rgba(109, 47, 214, 0.11);
    --grid-line: rgba(45, 15, 90, 0.03);
  }
}

/* ---- reset ---------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-strong) transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent-soft);
}

/* Themed scrollbar. Recolors live with the accent, matching the app's own
   .video-list scrollbar treatment (app/src/styles.css) but tying the hover
   state to --accent-strong so it always reflects the active theme. */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
  border: 2px solid var(--bg);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-strong);
  background-clip: padding-box;
}

/* ---- ambient background: aurora orbs + instrument grid -------------------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(130px);
  will-change: transform;
}

.orb-a {
  background: var(--orb-a);
  top: -220px;
  left: -160px;
  animation: orb-drift-a 28s ease-in-out infinite alternate;
}

.orb-b {
  background: var(--orb-b);
  bottom: -260px;
  right: -180px;
  animation: orb-drift-b 36s ease-in-out infinite alternate;
}

@keyframes orb-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(240px, 150px, 0) scale(1.15); }
}

@keyframes orb-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-260px, -130px, 0) scale(0.95); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
  .orb-a, .orb-b {
    animation: none;
  }
}

/* ---- layout shell ----------------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

section {
  padding: clamp(64px, 10vw, 120px) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

h1, h2, h3 {
  font-family: var(--sans);
  margin: 0;
  letter-spacing: -0.01em;
}

.section-head {
  max-width: 640px;
  margin: 0 0 2.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-head p {
  color: var(--text-dim);
  font-size: 1.02rem;
  margin: 0;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

/* ---- nav -------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--rail);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(155deg, var(--accent), var(--accent-strong));
  color: var(--accent-contrast);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.nav-links a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* ---- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.72em 1.35em;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 12px 30px -12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text-faint);
  background: var(--surface-hover);
}

.btn-sm {
  padding: 0.5em 0.9em;
  font-size: 0.82rem;
}

/* ---- badges --------------------------------------------------------------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.6rem 0 2.2rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35em 0.85em;
}

/* ---- hero ------------------------------------------------------------------ */

.hero {
  padding-top: clamp(56px, 9vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  margin: 0.55rem 0 1.1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 0 1.6rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---- console mockup ---------------------------------------------------- */

.console {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-soft);
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-soft);
}

.console-bar-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.console-body {
  display: flex;
  background: var(--surface);
  min-height: 360px;
}

.console-rail {
  flex: 0 0 128px;
  background: var(--rail);
  border-right: 1px solid var(--border-soft);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.console-rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  color: var(--text-dim);
}

.console-rail-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.console-rail-item b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

.console-rail-item.is-active b {
  color: var(--accent);
}

.console-main {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.console-scanbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.console-scanbar .caret {
  color: var(--text);
}

.console-scanbar .cursor {
  display: inline-block;
  width: 6px;
  height: 13px;
  background: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
  vertical-align: -2px;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.console-scanbar .scan-btn {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-contrast);
  background: var(--text-faint);
  border-radius: 5px;
  padding: 4px 10px;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.console-scanbar .scan-btn.is-live {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.console-table {
  flex: 1;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.console-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 64px 78px 46px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.72rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.console-row.is-in {
  opacity: 1;
  transform: none;
}

.console-row:last-child {
  border-bottom: none;
}

.console-row .thumb {
  width: 26px;
  height: 18px;
  border-radius: 3px;
  background: var(--surface-alt);
  overflow: hidden;
  position: relative;
}

.console-row .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface-hover), transparent);
  transform: translateX(-100%);
}

.console-row.is-loading .thumb::after {
  animation: shimmer 1.3s ease-in-out infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.console-row .title {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-row.is-loading .title {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-alt);
}

.console-row .size,
.console-row .len {
  font-family: var(--mono);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.console-row .bar {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-alt);
  overflow: hidden;
  position: relative;
}

.console-row .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--text-faint);
  border-radius: 3px;
  transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s ease;
}

.console-row.is-active .bar i {
  background: var(--accent);
}

.console-row.is-done .bar i {
  background: var(--green);
  width: 100% !important;
}

.pill {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  text-align: center;
  color: var(--text-faint);
  background: var(--gray-soft);
}

.pill.is-active { color: var(--accent); background: var(--accent-soft); }
.pill.is-done { color: var(--green); background: var(--green-soft); }
.pill.is-queued { color: var(--blue); background: var(--blue-soft); }

.console-session {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  padding-top: 4px;
}

.console-session b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.console-session .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 5px;
  box-shadow: 0 0 0 3px var(--green-soft);
}

@media (prefers-reduced-motion: reduce) {
  .console-scanbar .cursor {
    animation: none;
  }
  .console-row.is-loading .thumb::after {
    animation: none;
  }
}

/* ---- ticker ------------------------------------------------------------- */

.ticker {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  padding: 0;
  background: var(--surface);
}

.ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  width: max-content;
  padding: 0.9rem 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  animation: ticker-scroll 32s linear infinite;
}

.ticker-track span.sep {
  color: var(--accent);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* ---- feature grid ------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}

.feature-card {
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -24px var(--accent-glow);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.55;
}

/* ---- pipeline ------------------------------------------------------------ */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.pipeline-line {
  position: absolute;
  top: 28px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--border);
  overflow: hidden;
}

.pipeline-line i {
  position: absolute;
  top: 0;
  left: -10%;
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
}

.pipeline-line.is-live i {
  animation: pulse-travel 2.6s ease-in-out infinite;
}

@keyframes pulse-travel {
  0% { left: -10%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  padding: 0 0.8rem;
  position: relative;
  z-index: 1;
}

.pipeline-node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
}

.pipeline-node svg {
  width: 24px;
  height: 24px;
}

.pipeline-step h3 {
  font-size: 0.95rem;
}

.pipeline-step p {
  color: var(--text-dim);
  font-size: 0.84rem;
  margin: 0;
  max-width: 22ch;
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-line.is-live i {
    animation: none;
    opacity: 0.5;
    left: 0;
    width: 100%;
  }
}

/* ---- theme switcher -------------------------------------------------------- */

.theme-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding: 2.4rem;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  padding: 0.3rem;
}

.swatch-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.swatch:hover .swatch-dot {
  transform: translateY(-2px);
}

.swatch.is-active .swatch-dot {
  border-color: var(--text);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.swatch.is-active {
  color: var(--text);
}

.theme-preview {
  padding: 1.2rem;
}

.theme-preview-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.theme-preview-row:last-child {
  margin-bottom: 0;
}

.theme-preview .chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.4em 0.8em;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}

.theme-preview .bar-demo {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-alt);
  overflow: hidden;
}

.theme-preview .bar-demo i {
  display: block;
  height: 100%;
  width: 64%;
  background: var(--accent);
  border-radius: 4px;
}

.theme-preview .ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--surface-alt);
  border-top-color: var(--accent);
}

/* ---- screenshot showcase --------------------------------------------------- */

.showcase {
  perspective: 1400px;
}

.showcase-frame {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-soft);
  transition: transform 0.25s ease;
  will-change: transform;
}

.showcase-frame img {
  display: block;
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .showcase-frame {
    transition: none;
  }
}

/* ---- architecture --------------------------------------------------------- */

.arch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  align-items: stretch;
}

.arch-node {
  padding: 1.6rem 1.3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.arch-node .k {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.arch-node h3 {
  font-size: 1rem;
}

.arch-node p {
  color: var(--text-dim);
  font-size: 0.84rem;
  margin: 0;
}

.arch-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  text-align: center;
}

/* ---- footer ----------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2.6rem 0;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-tagline {
  color: var(--text-faint);
  font-size: 0.82rem;
  font-family: var(--mono);
}

/* ---- responsive ------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .theme-panel {
    grid-template-columns: 1fr;
    padding: 1.6rem;
  }

  .pipeline {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pipeline-line {
    display: none;
  }

  .arch {
    grid-template-columns: 1fr;
  }

  .console-rail {
    flex-basis: 100px;
  }

  .console-row {
    grid-template-columns: 22px minmax(0, 1fr) 50px;
  }

  .console-row .size,
  .console-row .len {
    display: none;
  }
}

