/* === 1-tokens.css === */
/* ============================================================
   CAASTV design tokens
   Brand ramp is sampled from the CAASTV logo; semantic tokens
   switch with [data-theme] on <html>. All text/background pairs
   pass WCAG AA in both themes.
   ============================================================ */

:root {
  /* Brand (theme-independent) */
  --brand-blue: #1395f0;
  --brand-sky: #17aae4;
  --brand-cyan: #1abfd9;
  --brand-teal: #1ed5cd;
  --brand-mint: #21eac2;
  --brand-green: #25ffb6;

  --grad-brand: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan) 55%, var(--brand-green));
  --grad-btn: linear-gradient(135deg, var(--brand-blue), var(--brand-teal));

  /* Layout */
  --container: 1140px;
  --container-wide: 1240px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 68px;

  /* Type */
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-0: #0a0e17;
  --bg-1: #101724;
  --bg-2: #17202f;
  --bg-3: #1e2938;
  --text-1: #f2f6fa;
  --text-2: #c3cedb;
  --text-3: #8fa0b3;
  --link: #4db2ff;
  --border: #26324a;
  --border-strong: #35435e;
  --accent: var(--brand-blue);
  --accent-soft: rgba(19, 149, 240, 0.12);
  --header-bg: rgba(10, 14, 23, 0.82);
  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-frame: 0 16px 48px rgba(0, 0, 0, 0.5);
  --hero-glow: radial-gradient(ellipse 70% 55% at 50% -10%, rgba(19, 149, 240, 0.16), transparent 70%);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-0: #ffffff;
  --bg-1: #f4f7fb;
  --bg-2: #ffffff;
  --bg-3: #eaf0f7;
  --text-1: #101828;
  --text-2: #3d4a5c;
  --text-3: #4d5d70;
  --link: #0b6fbd;
  --border: #d5deea;
  --border-strong: #b9c7d8;
  --accent: #0b7ed8;
  --accent-soft: rgba(19, 149, 240, 0.1);
  --header-bg: rgba(255, 255, 255, 0.85);
  --shadow-card: 0 6px 20px rgba(16, 24, 40, 0.07);
  --shadow-frame: 0 16px 44px rgba(16, 24, 40, 0.14);
  --hero-glow: radial-gradient(ellipse 70% 55% at 50% -10%, rgba(19, 149, 240, 0.1), transparent 70%);
}

/* === 2-base.css === */
/* ============================================================
   Base: fonts, reset, typography, a11y primitives
   ============================================================ */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-700.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-600.woff2') format('woff2');
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--bg-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4 {
  color: var(--text-1);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 600; }

p { max-width: 68ch; }

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; height: auto; display: block; }

ul[class], ol[class] { padding: 0; list-style: none; }

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

::selection { background: var(--brand-blue); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--bg-2);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* Layout helpers */
.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}
.container--wide {
  width: min(var(--container-wide), 100% - 3rem);
}

.section { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.section--alt { background: var(--bg-1); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head .kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-head p { margin-top: 0.6rem; color: var(--text-3); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center p { margin-inline: auto; }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="light"] .grad-text {
  background: linear-gradient(135deg, #0b6fbd, #0e8f8a);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Scroll reveal (JS adds .reveal-in; motion gated below) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal-in { opacity: 1; transform: none; }

/* Staggered reveal inside grids: each sibling arrives a beat later */
.grid-3 > .reveal:nth-child(2), .grid-4 > .reveal:nth-child(2), .platform-grid > .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid-3 > .reveal:nth-child(3), .grid-4 > .reveal:nth-child(3), .platform-grid > .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid-3 > .reveal:nth-child(4), .grid-4 > .reveal:nth-child(4), .platform-grid > .reveal:nth-child(4) { transition-delay: 0.24s; }
.grid-3 > .reveal:nth-child(5), .platform-grid > .reveal:nth-child(5) { transition-delay: 0.32s; }
.grid-3 > .reveal:nth-child(6), .platform-grid > .reveal:nth-child(6) { transition-delay: 0.4s; }
.platform-grid > .reveal:nth-child(7) { transition-delay: 0.48s; }
.platform-grid > .reveal:nth-child(8) { transition-delay: 0.56s; }

/* Hero entrance on page load — no delay/fill so content is never stuck hidden */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero-inner > *,
.product-hero-inner > * {
  animation: heroRise 0.55s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* === 3-components.css === */
/* ============================================================
   Components: header, buttons, cards, pipeline, spec table,
   accordion, gallery, CTA banner, footer
   ============================================================ */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(4, 8, 16, 0.28); }
[data-theme="light"] .site-header.scrolled { box-shadow: 0 6px 24px rgba(16, 24, 40, 0.1); }
.site-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 34px; width: auto; }
[data-theme="light"] .logo img { filter: none; }

.site-nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
}
.nav-link:hover { color: var(--text-1); background: var(--accent-soft); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--accent); }

/* Products dropdown (hover + focus-within) */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-link { display: inline-flex; align-items: center; gap: 0.35rem; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav-dropdown > .nav-link .caret { transition: transform 0.2s ease; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 300px;
  padding: 0.5rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.nav-dropdown:hover > .nav-link .caret,
.nav-dropdown:focus-within > .nav-link .caret { transform: rotate(180deg); }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-1);
}
.dropdown-item:hover { background: var(--accent-soft); text-decoration: none; }
.dropdown-item[aria-current="page"] { background: var(--accent-soft); }
.dropdown-item .di-icon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); }
.dropdown-item .di-icon svg { width: 18px; height: 18px; }
.dropdown-item strong { display: block; font-size: 0.9rem; font-weight: 600; }
.dropdown-item span.di-sub { display: block; font-size: 0.78rem; color: var(--text-3); }

/* Theme toggle */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: 0.25rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text-1); border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.theme-toggle:hover svg { transform: rotate(20deg); }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }

/* Mobile nav */
.nav-burger {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  cursor: pointer;
}
.nav-burger svg { width: 20px; height: 20px; }

.mobile-drawer {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: var(--bg-0);
  padding: 1.5rem;
  overflow-y: auto;
}
.mobile-drawer.open { display: block; }
.mobile-drawer a {
  display: block;
  padding: 0.85rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}
.mobile-drawer a:hover { text-decoration: none; color: var(--accent); }
.mobile-drawer .drawer-group { padding: 0.85rem 0.5rem 0.35rem; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); }
.mobile-drawer .drawer-sub { padding-left: 1.25rem; font-size: 0.98rem; }
.mobile-drawer .btn { margin-top: 1.25rem; width: 100%; justify-content: center; }
body.drawer-open { overflow: hidden; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-burger { display: grid; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }

.btn--primary {
  background: var(--grad-btn);
  color: #04121f;
  box-shadow: 0 4px 16px rgba(19, 149, 240, 0.3);
}
.btn--primary:hover { box-shadow: 0 6px 22px rgba(19, 149, 240, 0.42); color: #04121f; }

.btn--secondary {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-strong);
}
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn--sm { padding: 0.5rem 1rem; font-size: 0.88rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="light"] .card { box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05); }
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.94rem; color: var(--text-3); }

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  transition: transform 0.2s ease;
}
.card-icon svg { width: 22px; height: 22px; }
.card:hover .card-icon { transform: scale(1.1) rotate(-3deg); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Product card (homepage) */
.product-card { display: flex; flex-direction: column; color: inherit; }
.product-card:hover { text-decoration: none; border-color: var(--accent); }
.product-card .pc-tagline { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); margin-bottom: 0.35rem; }
.product-card p { flex: 1; }
.product-card .pc-more { margin-top: 1rem; font-size: 0.88rem; font-weight: 600; color: var(--accent); display: inline-block; transition: transform 0.2s ease; }
.product-card:hover .pc-more { transform: translateX(5px); }

/* ---------- Badge / chips ---------- */
.badge {
  display: inline-block;
  padding: 0.32rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.35rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Stats ---------- */
.stat-row { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.stat .stat-value { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 600; color: var(--text-1); line-height: 1.1; }
.stat .stat-value .grad-text { font-weight: 600; }
.stat .stat-label { font-size: 0.85rem; color: var(--text-3); margin-top: 0.25rem; }

/* ---------- Pipeline strip ---------- */
.pipe {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.pipe-node {
  flex: 1 1 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding: 1rem 0.6rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
a.pipe-node:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.pipe-node--active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.pipe-node-icon { color: var(--accent); }
.pipe-node-icon svg { width: 22px; height: 22px; }
.pipe-node-stage { font-weight: 600; font-size: 0.92rem; color: var(--text-1); }
.pipe-node-sub { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); }
.pipe-arrow { align-self: center; color: var(--text-3); font-size: 1.1rem; }
@media (max-width: 900px) {
  .pipe { display: grid; grid-template-columns: repeat(2, 1fr); }
  .pipe-arrow { display: none; }
}

/* ---------- Spec table ---------- */
.spec-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.spec-table th,
.spec-table td { padding: 0.85rem 1.25rem; text-align: left; vertical-align: top; }
.spec-table th { width: 34%; min-width: 180px; font-weight: 600; color: var(--text-2); }
.spec-table td { font-family: var(--font-mono); font-size: 0.86rem; color: var(--text-1); }
.spec-table tr:nth-child(odd) { background: var(--bg-1); }
.spec-table tr + tr { border-top: 1px solid var(--border); }

/* ---------- Accordion ---------- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }
.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.35rem;
  background: var(--bg-2);
  border: 0;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-1);
  cursor: pointer;
}
.accordion-trigger:hover { color: var(--accent); }
.accordion-trigger .acc-icon { flex-shrink: 0; transition: transform 0.2s ease; color: var(--accent); }
.accordion-trigger[aria-expanded="true"] .acc-icon { transform: rotate(45deg); }
.accordion-panel { padding: 0 1.35rem 1.2rem; background: var(--bg-2); font-size: 0.94rem; color: var(--text-3); }
.accordion-panel[hidden] { display: none; }

/* ---------- Screenshot frame & gallery ---------- */
.screenshot-frame {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-frame);
  background: #0d1420;
  padding-top: 28px;
}
.screenshot-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: #141c2b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.screenshot-frame::after {
  content: '';
  position: absolute;
  top: 11px;
  left: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 13px 0 0 #febc2e, 26px 0 0 #28c840;
}
.screenshot-frame img { width: 100%; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.gallery figure { margin: 0; }
.gallery .screenshot-frame { box-shadow: var(--shadow-card); }
.gallery .screenshot-frame img { transition: transform 0.45s ease; }
.gallery figure:hover .screenshot-frame img { transform: scale(1.035); }
.gallery figcaption { margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); }

/* ---------- Related products ---------- */
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.related-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.related-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.related-card-icon { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); }
.related-card-icon svg { width: 20px; height: 20px; }
.related-card-body strong { display: block; font-size: 0.92rem; color: var(--text-1); }
.related-card-body span { display: block; font-size: 0.78rem; color: var(--text-3); }
@media (max-width: 1024px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- CTA banner (photo: ActionVance on Unsplash, free license) ---------- */
.cta-banner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.5rem;
  background:
    linear-gradient(rgba(7, 11, 19, 0.82), rgba(7, 11, 19, 0.86)),
    url('../images/live-event.jpg') center / cover no-repeat;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { margin-bottom: 0.75rem; color: #f4f8fc; }
.cta-banner p { margin: 0 auto 1.75rem; color: #c9d4e0; }
.cta-banner .cta-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.cta-banner .btn--secondary { color: #f4f8fc; border-color: rgba(255, 255, 255, 0.38); }
.cta-banner .btn--secondary:hover { color: #fff; border-color: #fff; }

/* ---------- Photo band (photo: Frames For Your Heart on Unsplash, free license) ---------- */
.photo-band {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0;
  background:
    linear-gradient(100deg, rgba(7, 11, 19, 0.88) 20%, rgba(7, 11, 19, 0.45)),
    url('../images/broadcast-camera.jpg') center / cover no-repeat;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.photo-band .photo-band-content { max-width: 560px; }
.photo-band h2 { color: #f4f8fc; margin-bottom: 0.9rem; }
.photo-band p { color: #c9d4e0; }
.photo-band .stat-row { margin-top: 1.75rem; }
.photo-band .stat-value { color: #f4f8fc; }
.photo-band .stat-label { color: #9fb0c2; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-1); border-top: 1px solid var(--border); padding: 3.5rem 0 0; font-size: 0.92rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand img { height: 30px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; color: var(--text-3); max-width: 34ch; }
.footer-brand .by-line { margin-top: 0.75rem; font-size: 0.82rem; }
.site-footer h4 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-1); margin-bottom: 1rem; }
.site-footer ul li { margin-bottom: 0.55rem; }
.site-footer ul a { color: var(--text-3); }
.site-footer ul a:hover { color: var(--accent); }
.footer-contact p { margin-bottom: 0.55rem; color: var(--text-3); }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.footer-social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-3); }
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.25rem 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.84rem; color: var(--text-3); }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { color: var(--text-3); }
.footer-legal a:hover { color: var(--accent); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* === 4-pages.css === */
/* ============================================================
   Page-specific layouts: home hero + pipeline diagram,
   product hero, platforms, FAQ, legal, 404
   ============================================================ */

/* ---------- Feature splits (flagship products) ---------- */
.feature-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.feature-split--rev { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.feature-split--rev .fs-text { order: 2; }
.feature-split .kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.feature-split h2 { margin-bottom: 0.9rem; }
.feature-split .fs-text p { color: var(--text-3); }
.feature-split ul.fs-points { margin: 1.25rem 0 0; }
.feature-split ul.fs-points li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  color: var(--text-2);
  font-size: 0.95rem;
}
.feature-split ul.fs-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.85rem;
  height: 0.5rem;
  border-left: 2px solid var(--brand-teal);
  border-bottom: 2px solid var(--brand-teal);
  transform: rotate(-50deg);
}
.feature-split .chip-row { margin-top: 1.25rem; }
.feature-split .fs-cta { margin-top: 1.75rem; }
@media (max-width: 900px) {
  .feature-split, .feature-split--rev { grid-template-columns: 1fr; }
  .feature-split--rev .fs-text { order: 0; }
}

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.hero .badge { margin-bottom: 1.4rem; }
.hero h1 { max-width: 800px; margin-inline: auto; }
.hero .hero-sub {
  max-width: 620px;
  margin: 1.25rem auto 2rem;
  font-size: 1.08rem;
  color: var(--text-3);
}
.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* Animated pipeline diagram in hero */
.hero-pipe { margin-top: clamp(2.5rem, 6vw, 4rem); }
.hero-pipe-line { position: relative; height: 3px; margin: 0 8% 1.1rem; background: var(--border); border-radius: 3px; overflow: hidden; }
.hero-pipe-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-brand);
  transform: translateX(-100%);
  animation: pipeflow 3.2s ease-in-out infinite;
}
@keyframes pipeflow {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-pipe-line::after { animation: none; transform: none; }
}

/* ---------- Product hero ---------- */
.product-hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5rem) 0;
  overflow: hidden;
}
.product-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}
.product-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.product-hero .badge { margin-bottom: 1.1rem; }
.product-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.product-hero .ph-category { margin-top: 0.5rem; font-size: 1.05rem; font-weight: 500; color: var(--text-2); }
.product-hero .ph-desc { margin-top: 1rem; color: var(--text-3); }
.product-hero .hero-actions { justify-content: flex-start; margin-top: 1.75rem; }
.product-hero .stat-row { margin-top: 2.25rem; gap: 2rem; }
@media (max-width: 900px) {
  .product-hero-inner { grid-template-columns: 1fr; }
  .product-hero-visual { order: 2; }
}

/* ---------- Platform grid (TV App) ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.platform-card { text-align: center; padding: 1.4rem 1rem; }
.platform-card .card-icon { margin-inline: auto; }
.platform-card h3 { font-size: 0.98rem; }
.platform-card p { font-size: 0.82rem; }
@media (max-width: 1024px) { .platform-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .platform-grid { grid-template-columns: 1fr; } }

/* Module chips (CMS) */
.module-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

/* ---------- FAQ ---------- */
.faq-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.faq-columns h3 { margin-bottom: 1rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
@media (max-width: 900px) { .faq-columns { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.legal-body { max-width: 780px; }
.legal-body h2 { margin: 2.25rem 0 0.75rem; font-size: 1.25rem; }
.legal-body h3 { margin: 1.5rem 0 0.5rem; }
.legal-body p, .legal-body li { color: var(--text-2); font-size: 0.95rem; }
.legal-body ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
.legal-body .legal-updated { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-3); margin-bottom: 2rem; }

/* ---------- Device showcase (homepage) ---------- */
.device-showcase {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}
.device {
  position: relative;
  background: #0b111c;
  box-shadow: var(--shadow-frame);
}
.device img { width: 100%; border-radius: inherit; }
.device--tv {
  width: 52%;
  border: 10px solid #0b111c;
  border-radius: 10px;
  z-index: 2;
}
.device--tv::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -24px;
  width: 34%;
  height: 14px;
  background: linear-gradient(#0b111c, #1e2938);
  border-radius: 0 0 10px 10px;
}
.device--laptop {
  width: 33%;
  margin-right: -4%;
  z-index: 1;
  border: 8px solid #0b111c;
  border-radius: 12px 12px 4px 4px;
}
.device--laptop::before {
  content: '';
  position: absolute;
  left: -7%;
  right: -7%;
  bottom: -16px;
  height: 10px;
  background: #182233;
  border-radius: 0 0 12px 12px;
}
.device--phone {
  width: 19%;
  margin-left: -4.5%;
  z-index: 3;
  border: 6px solid #0b111c;
  border-radius: 16px;
}
.device-showcase-cta { margin-top: 3rem; text-align: center; }

/* ---------- Network diagram (Trunk) ---------- */
.net-diagram { width: 100%; max-width: 860px; margin-inline: auto; display: block; height: auto; }
.net-diagram .net-link { stroke: var(--border-strong); stroke-width: 1.5; fill: none; }
.net-diagram .net-flow {
  stroke: url(#net-grad);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 6 10;
  animation: netdash 1.1s linear infinite;
}
@keyframes netdash { to { stroke-dashoffset: -16; } }
.net-diagram .net-node { fill: var(--bg-2); stroke: var(--border-strong); stroke-width: 1.5; }
.net-diagram .net-node--accent { stroke: var(--accent); }
.net-diagram .net-dot { fill: var(--accent); }
.net-diagram text { font-family: var(--font-mono); font-size: 13px; fill: var(--text-2); }
.net-diagram .net-label-strong { fill: var(--text-1); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .net-diagram .net-flow { animation: none; stroke-dasharray: none; }
}

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.error-tv { display: block; margin: 0 auto 2rem; width: 190px; height: auto; }
.error-tv .tv-body { fill: var(--bg-2); stroke: var(--border-strong); stroke-width: 2; }
.error-tv .tv-detail { stroke: var(--border-strong); stroke-width: 2; fill: none; }
.error-tv .tv-dot { fill: var(--text-3); }
.error-page .error-code { font-family: var(--font-mono); font-size: clamp(4rem, 14vw, 7rem); font-weight: 600; line-height: 1; }
.error-page p { margin: 1rem auto 2rem; color: var(--text-3); }
