/* Vibra Home page — page-specific styles
 * All colors reference design-system tokens from colors_and_type.css
 * No inline styles should exist in Home.html
 */

/* ── Dark surface tokens (app mock, dark diagrams) ─────────────── */
:root {
  --dark-bg:      var(--gray-950);   /* #0A0D12 */
  --dark-card:    #14181F;
  --dark-border:  #1F242F;
  --dark-text:    rgba(255,255,255,0.85);
  --dark-muted:   rgba(255,255,255,0.5);
  --dark-subtle:  rgba(255,255,255,0.06);
}

/* ── Section modifier classes ───────────────────────────────────── */
.section-ruled {
  background: var(--bg-secondary);
}

/* kicker → h2 spacing without inline margin */
.kicker + .section-h,
.kicker + h2 {
  margin-top: var(--space-4);
}

/* ── Hero ────────────────────────────────────────────────────────── */
/* ── Halide-topo hero ────────────────────────────────────────────── */
.vh-hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  clip-path: inset(0);
  background: #fff;
}

/* Film grain overlay — hidden on light bg */
.vh-grain {
  display: none;
}

/* Concentric rings — same tilt/axis as the hero canvas */
.vh-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2000px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.vh-rings::after {
  content: '';
  width: 1800px;
  height: 1400px;
  flex-shrink: 0;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    transparent 0,
    transparent 78px,
    rgba(127, 86, 217, 0.07) 80px,
    transparent 81px
  );
  transform: rotateX(55deg) rotateZ(-25deg);
}

/* 3D perspective viewport */
.vh-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2000px;
  overflow: hidden;
  z-index: 1;
}

/* 3D canvas — state controlled by JS */
.vh-canvas {
  position: relative;
  width: 900px;
  height: 560px;
  transform-style: preserve-3d;
}

/* Stacked photo layers */
.vh-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.vh-l1 {
  background-image: url('assets/inside-sonic.png');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 32px 80px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.07);
}

/* Interface overlay grid — horizontal padding tracks .container / .nav-inner */
.vh-ui {
  position: absolute;
  inset: 0;
  padding: 80px 2.5rem 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  z-index: 10;
  pointer-events: none;
}

/* Top bar */
.vh-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.vh-eyebrow {
  font: var(--font-text-xs-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quaternary);
}
.vh-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font: var(--font-text-xs-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quaternary);
}

/* Hero heading */
.vh-title {
  grid-column: 1 / -1;
  align-self: center;
  font: 700 clamp(1.9rem, 4.8vw, 5.8rem)/1.0 var(--font-sans);
  letter-spacing: -0.03em;
  color: var(--fg-primary);
  margin: 0;
}
.vh-accent { color: var(--brand-600); }

/* Bottom bar */
.vh-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.vh-tagline {
  font: var(--font-text-sm-regular);
  color: var(--fg-tertiary);
  margin: 0;
  line-height: 1.6;
}

/* Button in vh-bottom needs pointer-events since parent is none */
.vh-bottom .btn {
  pointer-events: auto;
  flex-shrink: 0;
}

/* Scroll hint — animated descending line */
.vh-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
}
.vh-scroll-hint::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.22), transparent);
  animation: vhFlow 2.4s ease-in-out infinite;
}
@keyframes vhFlow {
  0%   { transform: translateY(-100%); }
  50%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ── Logo bar ────────────────────────────────────────────────────── */
.logobar {
  padding: 56px 0;
  background: #fff;
}
.logobar p {
  text-align: center;
  font: var(--font-text-sm-regular);
  color: var(--fg-quaternary);
  margin: 0 0 28px;
}
.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 56px;
  opacity: 0.65;
}
.logos .lm {
  font: 600 20px/1 var(--font-sans);
  color: var(--fg-tertiary);
  letter-spacing: -0.01em;
}

/* ── Problem / handoff section ──────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; }
.two-col.flip { grid-template-columns: 1.1fr 1fr; }
.two-col h2 { font: 600 44px/1.1 var(--font-sans); letter-spacing: -0.03em; margin: 0 0 20px; text-wrap: balance; }
.two-col .kicker + h2 { margin-top: var(--space-4); }
.two-col p { font: 400 17px/1.6 var(--font-sans); color: var(--fg-tertiary); margin: 0 0 16px; }
.two-col p strong { color: var(--fg-secondary); font-weight: 500; }

.handoff-diagram { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.handoff-col {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: 32px;
}
.handoff-col.good {
  background: #fff;
  border-color: var(--brand-200);
  box-shadow: 0 0 0 4px var(--brand-50), var(--shadow-md);
}
.handoff-col h5 {
  font: var(--font-text-sm-semibold);
  color: var(--fg-quaternary);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}
.handoff-col.good h5 { color: var(--brand-700); }

.doc {
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
}
.doc .src {
  font: var(--font-text-xs-semibold);
  color: var(--fg-quaternary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}
.doc .ttl {
  color: var(--fg-secondary);
  font: var(--font-text-sm-regular);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

/* Vibra token card */
.sonic-token {
  background: #fff;
  border: 1px solid var(--brand-200);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.sonic-token + .sonic-token { margin-top: 12px; }
.sonic-token-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sonic-token-head .name { font: 600 16px var(--font-sans); color: var(--fg-primary); letter-spacing: -0.005em; }
.sonic-token-head .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sonic-token-head .b {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font: var(--font-text-xs-semibold);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.sonic-token-head .b.behavior { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200); }
.sonic-token-head .b.modality { background: var(--success-50); color: var(--success-700); border: 1px solid var(--success-200); }
.sonic-token-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.sonic-token-meta .cell { padding: 14px 20px; border-bottom: 1px solid var(--border-primary); }
.sonic-token-meta .cell:nth-child(odd) { border-right: 1px solid var(--border-primary); }
.sonic-token-meta .cell:nth-last-child(-n+2) { border-bottom: 0; }
.sonic-token-meta .lbl { font: var(--font-text-xs-semibold); color: var(--fg-quaternary); text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; margin-bottom: 4px; }
.sonic-token-meta .val { font: var(--font-text-sm-medium); color: var(--fg-primary); font-size: 14px; }
.sonic-token-platforms {
  display: flex;
  gap: 6px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  flex-wrap: wrap;
  align-items: center;
}
.sonic-token-platforms .lbl { font: var(--font-text-xs-semibold); color: var(--fg-quaternary); text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; margin-right: 4px; }
.sonic-token-platforms .p {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font: var(--font-text-xs-medium);
  font-size: 11px;
  background: #fff;
  border: 1px solid var(--border-primary);
  color: var(--fg-secondary);
}
.sonic-token-platforms .p .dot { width: 5px; height: 5px; border-radius: var(--radius-full); background: var(--success-500); }

/* ── Pillars ─────────────────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar {
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: 32px;
}
.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.pillar h3 { font: 600 22px/1.3 var(--font-sans); margin: 0 0 10px; letter-spacing: -0.01em; }
.pillar p { font: var(--font-text-md-regular); color: var(--fg-tertiary); margin: 0; }

/* ── Showcase ────────────────────────────────────────────────────── */
.showcase-video {
  margin-top: 56px;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-2xl);
  aspect-ratio: 1440 / 1088;
  background: #fff;
  position: relative;
}
.showcase-video img { display: block; width: 100%; height: 100%; object-fit: cover; }
.showcase-caption {
  font: var(--font-text-sm-regular);
  font-style: italic;
  color: var(--fg-quaternary);
  text-align: center;
  margin: 20px auto 0;
  max-width: 600px;
}

/* ── Behavior sets ───────────────────────────────────────────────── */
.bset-diagram {
  position: relative;
  min-height: 460px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-3xl);
  padding: 40px;
  overflow: hidden;
}
.bset-card-main {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 240px;
  background: #fff;
  border: 2px solid var(--brand-500);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 0 0 6px var(--brand-50), var(--shadow-lg);
}
.bset-card-main .lbl { font: var(--font-text-xs-semibold); color: var(--brand-700); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.bset-card-main .nm { font: var(--font-text-md-semibold); color: var(--fg-primary); margin-bottom: 12px; }
.bset-card-main ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.bset-card-main ul li { font: var(--font-text-sm-regular); color: var(--fg-tertiary); display: flex; justify-content: space-between; }
.bset-card-main ul li b { color: var(--fg-primary); font-weight: 500; }
.bset-tokens {
  position: absolute;
  right: 40px;
  top: 40px;
  bottom: 40px;
  width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.bset-token {
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 10px;
}
.bset-token .ic {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bset-token .meta { flex: 1; }
.bset-token .nm { font: var(--font-text-sm-semibold); color: var(--fg-primary); }
.bset-token .typ { font: var(--font-text-xs-regular); color: var(--fg-quaternary); }
.bset-svg { position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; overflow: visible; }
.bset-svg path { stroke: var(--brand-500); stroke-width: 2.5; fill: none; opacity: 0.85; stroke-linecap: round; stroke-dasharray: 8 6; }
.bset-svg .endpoint { fill: var(--brand-500); }
.bset-examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; }
.bset-ex { padding: 20px; background: #fff; border: 1px solid var(--border-primary); border-radius: var(--radius-xl); }
.bset-ex .ex-tit { font: var(--font-text-sm-semibold); color: var(--fg-primary); font-style: italic; margin-bottom: 6px; }
.bset-ex p { font: var(--font-text-sm-regular); color: var(--fg-tertiary); margin: 0; }

/* ── Modality / behavior-not-assets ─────────────────────────────── */
.bna-image {
  border-radius: var(--radius-3xl);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-2xl);
  background: #fff;
  aspect-ratio: 1000 / 717;
}
.bna-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Dev handoff cards ───────────────────────────────────────────── */
.handoff-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hc {
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hc-vis {
  background: var(--dark-bg);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.hc-vis::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(127,86,217,0.18), transparent 65%);
  pointer-events: none;
}
.hc-icon-stack { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }
.hc-icon-tile {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-300);
  flex-shrink: 0;
}
.hc-icon-tile.lg { width: 72px; height: 72px; }
.hc-icon-tile.text { color: #fff; font-weight: 700; letter-spacing: -0.04em; font-size: 18px; }
.hc-icon-link {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-500), transparent);
  position: relative;
  min-width: 56px;
}
.hc-icon-link .lbl {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--dark-bg);
  color: var(--brand-300);
  padding: 2px 10px;
  font: var(--font-text-xs-semibold);
  border-radius: var(--radius-full);
  border: 1px solid rgba(127,86,217,0.3);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}
.hc-vis-cap {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font: var(--font-text-xs-medium);
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  z-index: 1;
}
.hc-body {
  padding: 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hc-tag {
  font: 600 20px/1.3 var(--font-sans);
  color: var(--fg-primary);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.hc p { font: var(--font-text-sm-regular); color: var(--fg-tertiary); margin: 0; }

/* Kicker variant for dark sections */
.kicker-on-dark {
  background: rgba(127,86,217,0.16);
  color: var(--brand-300);
  border-color: rgba(127,86,217,0.3);
}

/* ── Testimonials Columns (Voices from the field) ───────────────── */
.tc-section {
  background: var(--bg-secondary);
}
.tc-cols {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-height: 740px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}
.tc-col {
  display: flex;
  flex-direction: column;
  width: min(300px, calc(100vw - 64px));
  flex-shrink: 0;
}
.tc-col--2,
.tc-col--3 { display: none; }

@media (min-width: 640px)  { .tc-col--2 { display: flex; } }
@media (min-width: 960px)  { .tc-col--3 { display: flex; } }

.tc-track {
  display: flex;
  flex-direction: column;
  gap: 20px;
  will-change: transform;
  animation: tcScrollUp linear infinite;
}
.tc-col--1 .tc-track { animation-duration: 30s; }
.tc-col--2 .tc-track { animation-duration: 38s; }
.tc-col--3 .tc-track { animation-duration: 34s; }

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

@media (prefers-reduced-motion: reduce) {
  .tc-track { animation-play-state: paused; }
}

.tc-card {
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.tc-text {
  font: 400 15px/1.65 var(--font-sans);
  color: var(--fg-secondary);
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}
.tc-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tc-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--av, var(--brand-500));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 12px var(--font-sans);
  color: #fff;
  letter-spacing: -0.01em;
}
.tc-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tc-name { font: var(--font-text-sm-medium); color: var(--fg-primary); }
.tc-role {
  font: var(--font-text-xs-regular);
  color: var(--fg-quaternary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq { max-width: 720px; margin: 0 auto; }
details.q { border-bottom: 1px solid var(--border-primary); padding: 24px 0; }
details.q:last-of-type { border-bottom: 0; }
details.q summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font: 600 18px/1.4 var(--font-sans);
  color: var(--fg-primary);
}
details.q summary::-webkit-details-marker { display: none; }
details.q summary .ic {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--fg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 200ms ease-out;
}
details.q[open] summary .ic { transform: rotate(45deg); background: var(--brand-50); color: var(--brand-700); }
details.q .a { font: 400 16px/1.6 var(--font-sans); color: var(--fg-tertiary); margin-top: 12px; }

/* ── Final CTA ───────────────────────────────────────────────────── */
.final-cta {
  background: var(--dark-bg);
  border-radius: var(--radius-4xl);
  padding: 96px 64px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 100%, rgba(127,86,217,0.4), transparent 70%);
  pointer-events: none;
}
.final-cta h2 { font: 600 48px/1.1 var(--font-sans); letter-spacing: -0.03em; color: #fff; margin: 0 0 20px; position: relative; }
.final-cta p { font: 400 18px/1.55 var(--font-sans); color: rgba(255,255,255,0.7); margin: 0 auto 32px; max-width: 560px; position: relative; }
.final-cta .waitlist-form { margin: 0 auto 12px; position: relative; }
.final-cta small { font: var(--font-text-sm-regular); color: rgba(255,255,255,0.45); position: relative; }
.wl-error {
  font: var(--font-text-sm-regular);
  color: #FCA5A5;
  margin: 10px 0 0;
  position: relative;
}
.wl-success {
  margin: 0 auto;
  max-width: 480px;
  position: relative;
}
.wl-success p {
  font: 400 16px/1.65 var(--font-sans);
  color: rgba(255,255,255,0.85);
  margin: 0;
}

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .vh-canvas { transition: none !important; }
  .vh-scroll-hint::after { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════
   COMPONENT ANIMATIONS
   Ported from React components (Button, Accordion, Ship_sound_Section,
   Logo display, Product video)
   ════════════════════════════════════════════════════════════════════ */

/* ── Flow-hover button (Components/button) ───────────────────────── */
.btn-flow {
  position: relative;
  overflow: hidden;
}
.btn-flow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 100%;
  transform: translate(150%, 150%) scale(2.5);
  transition: transform 1000ms ease-out;
}
.btn-flow svg,
.btn-flow span { position: relative; }
.btn-flow:hover::before { transform: translate(0, 0) scale(1); }
.btn-flow:active { transform: scale(0.97); }

/* Secondary variant: white base → brand purple fill */
.btn-secondary.btn-flow::before { background: var(--brand-500); }
.btn-secondary.btn-flow:hover   { color: #fff; border-color: var(--brand-500); background: transparent; }

/* Primary variant: brand purple base → brand-700 fill */
.btn-primary.btn-flow::before { background: var(--brand-700); }

/* On-dark variant */
.btn-on-dark.btn-flow::before { background: rgba(255,255,255,0.25); }

/* ── Accordion chevron (Components/Accordian) ────────────────────── */
/* Replaces the + rotate-45 pattern with chevron rotate-180 */
details.q summary .ic {
  transition: transform 200ms ease-out, background 150ms ease-out, color 150ms ease-out;
}
details.q[open] summary .ic {
  transform: rotate(180deg);
  background: var(--brand-50);
  color: var(--brand-700);
}
details.q .a { overflow: hidden; }
/* Smooth open/close: JS toggles .is-closing and uses max-height transition */
details.q .a-inner {
  padding-top: 0;
  transition: none;
}

/* ── Scrolling token loop (Components/Ship_sound_Section) ──────────── */
.token-scroll-section {
  background: var(--bg-secondary);
}
.token-scroll-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.token-scroll-card {
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  height: 320px;
  position: relative;
}
.token-loop-track {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.token-loop {
  display: flex;
  flex-direction: column;
  animation: tokenScrollLoop 14s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .token-loop { animation: none; } }
.token-loop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-primary);
  flex-shrink: 0;
}
.tl-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--fg-tertiary);
}
.tl-meta { flex: 1; min-width: 0; }
.tl-name { font: var(--font-text-sm-medium); color: var(--fg-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-sub  { font: var(--font-text-xs-regular); color: var(--fg-quaternary); margin-top: 2px; }

/* Fade masks */
.token-loop-track::before,
.token-loop-track::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 56px;
  z-index: 2;
  pointer-events: none;
}
.token-loop-track::before { top: 0;    background: linear-gradient(to bottom, #fff 0%, transparent 100%); }
.token-loop-track::after  { bottom: 0; background: linear-gradient(to top, #fff 0%, transparent 100%); }

.token-scroll-content h2 {
  font: 600 44px/1.1 var(--font-sans);
  letter-spacing: -0.03em;
  margin: 16px 0 20px;
  text-wrap: balance;
}
.token-scroll-content p { font: 400 17px/1.6 var(--font-sans); color: var(--fg-tertiary); margin: 0 0 28px; }
.token-scroll-badges { display: flex; gap: 8px; flex-wrap: wrap; }

@keyframes tokenScrollLoop {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* ── Clip-path logo grid (Components/Logo display) ───────────────── */
.logo-clip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 28px;
}
.logo-clip-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  cursor: default;
  border-right: 1px solid var(--border-primary);
  background: #fff;
  overflow: hidden;
}
.logo-clip-cell:last-child { border-right: 0; }
.logo-clip-base {
  font: 600 13px/1 var(--font-sans);
  color: var(--fg-quaternary);
  letter-spacing: -0.01em;
  text-align: center;
  padding: 0 10px;
  user-select: none;
  pointer-events: none;
}
.logo-clip-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  /* starts collapsed — JS drives clip-path */
  clip-path: polygon(0 0, 100% 0, 0 0, 0% 100%);
  pointer-events: none;
}
.logo-clip-overlay .logo-clip-base {
  color: var(--brand-700);
}

/* ── Container scroll 3D (Components/Product video) ─────────────── */
.scroll-3d-section { padding: 112px 0 0; }
.scroll-3d-header  { margin-bottom: 56px; }
.scroll-3d-perspective { perspective: 1200px; padding-bottom: 112px; }
.scroll-3d-card {
  max-width: 1180px;
  margin: 0 auto;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow:
    0 0 #0000004d,
    0 9px 20px #0000004a,
    0 37px 37px #00000042,
    0 84px 50px #00000026,
    0 149px 60px #0000000a;
  will-change: transform;
  transform-origin: 50% 0%;
  transform: perspective(1200px) rotateX(20deg) scale(1.05);
  transition: transform 50ms linear;
}
.scroll-3d-inner {
  border-radius: 20px;
  overflow: hidden;
  background: var(--gray-100);
}
.scroll-3d-inner img { display: block; width: 100%; height: auto; }

/* ── Card Stack (Dev Handoff section) ───────────────────────────── */
.cs-wrap {
  margin-top: 64px;
}

.cs-stage {
  position: relative;
  height: 440px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  perspective: 1100px;
  outline: none;
  /* prevent tab outline — we show a custom focus style */
}
.cs-stage:focus-visible {
  border-radius: 24px;
  box-shadow: 0 0 0 2px var(--brand-400);
}

.cs-glow-top {
  pointer-events: none;
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 192px;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  filter: blur(40px);
}
.cs-glow-bottom {
  pointer-events: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 76%;
  height: 160px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  filter: blur(40px);
}

/* Individual card */
.cs-card {
  position: absolute;
  bottom: 0;
  width: 520px;
  height: 320px;
  border-radius: 20px;
  border: 3px solid rgba(255,255,255,0.08);
  background: #0A0D12;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(0,0,0,0.6), 0 6px 16px rgba(0,0,0,0.4);
  transition: transform 400ms cubic-bezier(0.34, 1.1, 0.64, 1), opacity 200ms ease-out;
  will-change: transform;
}
.cs-card:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 4px;
}

.cs-card-inner {
  padding: 32px 36px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

/* Integration type badge */
.cs-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font: var(--font-text-xs-semibold);
  background: rgba(127,86,217,0.18);
  color: #C4B5FD;
  border: 1px solid rgba(127,86,217,0.35);
  width: fit-content;
}
.cs-tag-sdk {
  background: rgba(5,150,105,0.15);
  color: #6EE7B7;
  border-color: rgba(5,150,105,0.3);
}
.cs-tag-mcp {
  background: rgba(8,145,178,0.15);
  color: #67E8F9;
  border-color: rgba(8,145,178,0.3);
}

.cs-title {
  font: 600 21px/1.3 var(--font-sans);
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

/* Plain-text description */
.cs-desc {
  flex: 1;
  font: 400 14px/1.65 var(--font-sans);
  color: rgba(255,255,255,0.65);
  margin: 0;
}

/* Badge pill (shared across all three cards) */
.cs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(127,86,217,0.12);
  border: 1px solid rgba(127,86,217,0.25);
  border-radius: 8px;
  font: var(--font-text-xs-medium);
  color: #C4B5FD;
  width: fit-content;
}
.cs-badge-sdk {
  background: rgba(5,150,105,0.12);
  border-color: rgba(5,150,105,0.25);
  color: #6EE7B7;
}
.cs-badge-mcp {
  background: rgba(8,145,178,0.12);
  border-color: rgba(8,145,178,0.25);
  color: #67E8F9;
}

/* Inline code within cs-desc */
.cs-inline-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 1px 5px;
  color: #C4B5FD;
}

/* Stack compat line at bottom of each card */
.cs-compat {
  font: var(--font-text-xs-regular);
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* Dots navigation */
.cs-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.cs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 200ms ease-out, transform 200ms ease-out;
}
.cs-dot[aria-selected="true"] {
  background: #fff;
  transform: scale(1.3);
}
.cs-dot:hover { background: rgba(255,255,255,0.55); }
.cs-dot:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
  border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
  .cs-card { transition: none; }
  .cs-dot  { transition: none; }
}

/* ── Responsive additions ────────────────────────────────────────── */
@media (max-width: 920px) {
  .vh-ui { padding: 72px 32px 48px; }
  .pillars,
  .bset-examples { grid-template-columns: 1fr; }
  .tc-col { width: calc(50vw - 32px); }
  .tc-card { padding: 20px; }
  .two-col,
  .two-col.flip { grid-template-columns: 1fr; gap: 48px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .bset-card-main,
  .bset-tokens { position: static; transform: none; width: 100%; }
  .bset-svg { display: none; }
  .bset-diagram { padding: 24px; }
  .final-cta { padding: 64px 32px; }
  .final-cta h2 { font-size: 36px; }
  /* Component responsive */
  .token-scroll-layout  { grid-template-columns: 1fr; gap: 40px; }
  .logo-clip-grid       { grid-template-columns: repeat(3, 1fr); }
  .logo-clip-cell:nth-child(3) { border-right: 0; }
  .logo-clip-cell:nth-child(4),
  .logo-clip-cell:nth-child(5),
  .logo-clip-cell:nth-child(6) { border-top: 1px solid var(--border-primary); }
  .scroll-3d-card { transform: perspective(1200px) rotateX(8deg) scale(0.98) !important; }
  /* Card stack — narrow viewports */
  .cs-stage { height: 380px; }
  .cs-card  { width: min(calc(100vw - 48px), 400px); height: 280px; }
  .cs-card-inner { padding: 24px 22px; }
  .cs-title { font-size: 18px; }
}

@media (max-width: 580px) {
  /* Break hero out of stacked absolute layout into a vertical flow */
  .vh-hero { height: auto; min-height: auto; display: flex; flex-direction: column; }
  .vh-rings { display: none; }
  .vh-scroll-hint { display: none; }

  /* Text block: order 1 so it renders above the image */
  .vh-ui {
    order: 1;
    position: relative;
    inset: auto;
    padding: 88px 24px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    pointer-events: auto;
  }
  .vh-top { display: none; }
  .vh-title { align-self: auto; text-align: center; }
  .vh-bottom { order: 3; flex-direction: column; align-items: center; justify-content: center; gap: 16px; width: 100%; }
  .vh-bottom .btn { display: none; }
  .vh-tagline { text-align: center; }

  /* Image block: order 2 so it sits below the text */
  .vh-viewport { order: 2; position: relative; height: 260px; overflow: hidden; }
  .vh-canvas { width: 100%; height: 100%; transform: none !important; transition: none !important; }
  .vh-l1 { border-radius: 0; box-shadow: none; border: none; }
}
