/* =====================================================================
   Voice Performance Demo (dev preview)
   Warm, dark, premium. "Bard's Torchlit Hall" theme.
   ===================================================================== */

.vpd-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-lg, 1.5rem);
}

.vpd-hero *,
.vpd-tech *,
.vpd-demos * {
  box-sizing: border-box;
}

/* Guard against any horizontal overflow leaking out to the page width
   (which on mobile forces the browser to zoom the whole page out). */
.vpd-hero,
.vpd-tech,
.vpd-demos { overflow-x: clip; }

.vpd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Inter", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e8b44c;
}
.vpd-eyebrow i { font-size: 0.95rem; }

/* ===================== HERO ===================== */
.vpd-hero {
  text-align: center;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(1200px 520px at 50% -15%, rgba(232, 180, 76, 0.16), transparent 68%),
    radial-gradient(800px 400px at 80% 0%, rgba(232, 145, 76, 0.10), transparent 70%),
    linear-gradient(180deg, #110e1c 0%, #0c0a14 100%);
  border-bottom: 1px solid #221b35;
}
.vpd-hero-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 1.1rem 0 1rem;
  color: #f0e6d3;
}
.vpd-hero-accent {
  background: linear-gradient(100deg, #e8b44c 0%, #e8914c 60%, #e8b44c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #e8b44c;
}
.vpd-hero-sub {
  max-width: 620px;
  margin: 0 auto 1.75rem;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  line-height: 1.6;
  color: #c4b69a;
}
.vpd-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: #0c0a14;
  background: linear-gradient(180deg, #f0c463, #e8b44c);
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 14px 36px -12px rgba(232, 180, 76, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vpd-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px -12px rgba(232, 180, 76, 0.75);
}

/* ===================== SECTION 1: TECH STORY ===================== */
.vpd-tech {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  background: #0c0a14;
}

/* Editorial lead: asymmetric two columns */
.vpd-lead {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.vpd-lead-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  color: #f0e6d3;
  margin: 0.9rem 0 0;
}
.vpd-lead-body {
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.75;
  color: #c4b69a;
  margin: 0;
  padding-left: clamp(0px, 2vw, 1.5rem);
  border-left: 2px solid rgba(232, 180, 76, 0.25);
}

/* Pipeline flow: 6-stage chart with an identity control loop */
.vpd-flow {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.1rem, 2.5vw, 2rem);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(165deg, #15111f 0%, #0e0b17 100%);
  border: 1px solid #221b35;
  border-radius: 20px;
}
.vpd-flow::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(232, 180, 76, 0.5), rgba(232, 145, 76, 0.5), transparent);
}
/* Grid pipeline: 6 stages + two conditioning inputs + dashed feedback */
.vpd-pipe {
  --pipe-gap: clamp(0.45rem, 1.4vw, 1rem);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto clamp(50px, 7vw, 78px) auto;
  column-gap: var(--pipe-gap);
  position: relative;
}

/* Conditioning input boxes (top row) */
.vpd-cond {
  grid-row: 1;
  align-self: start;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: linear-gradient(160deg, #1c1629, #120f1d);
  border: 1px solid #3d3260;
  border-radius: 14px;
}
.vpd-cond-style { grid-column: 2 / 4; }
.vpd-cond-spectral { grid-column: 4 / 6; }
.vpd-cond-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(232, 180, 76, 0.08);
  border: 1px solid rgba(232, 180, 76, 0.3);
  color: #e8b44c;
  font-size: 1.05rem;
}
.vpd-cond-text { display: flex; flex-direction: column; min-width: 0; }
.vpd-cond-name {
  font-family: "Inter", sans-serif;
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  font-weight: 600;
  color: #f0e6d3;
  line-height: 1.2;
}
.vpd-cond-sub {
  font-family: "Inter", sans-serif;
  font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  color: #8a7e6b;
  line-height: 1.3;
  margin-top: 0.1rem;
}

/* SVG connector overlay (drawn by voice_demo.js) + feedback label */
.vpd-pipe-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.vpd-pipe-label {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0 0.55rem;
  background: #14111d;
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #e8b44c;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}
.vpd-cond,
.vpd-flow-step { z-index: 1; }

/* Stages (row 3) */
.vpd-flow-step {
  grid-row: 3;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 0 0.2rem;
}
.vpd-pc1 { grid-column: 1; }
.vpd-pc2 { grid-column: 2; }
.vpd-pc3 { grid-column: 3; }
.vpd-pc4 { grid-column: 4; }
.vpd-pc5 { grid-column: 5; }
.vpd-pc6 { grid-column: 6; }
.vpd-flow-step:not(.vpd-pc6)::after {
  content: "";
  position: absolute;
  top: clamp(28px, 3.1vw, 38px);
  left: 100%;
  width: 8px;
  height: 8px;
  margin-left: calc(var(--pipe-gap) * 0.5);
  border-top: 2px solid #e8914c;
  border-right: 2px solid #e8914c;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.6;
}
.vpd-flow-icon {
  width: clamp(58px, 6.2vw, 76px);
  height: clamp(58px, 6.2vw, 76px);
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(160deg, #2a2240, #15111f);
  border: 1px solid #3d3260;
  color: #e8b44c;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
}
.vpd-flow-step-end .vpd-flow-icon {
  background: linear-gradient(160deg, #f3c969, #d49a32);
  border-color: #f3c969;
  color: #1a1206;
  box-shadow: 0 0 28px -4px rgba(232, 180, 76, 0.65);
}
.vpd-flow-head {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  gap: 0.4rem;
}
/* Number badge sits on the icon's top-left corner so titles stay centered */
.vpd-flow-num {
  position: absolute;
  top: -6px;
  left: calc(50% - clamp(29px, 3.1vw, 38px) - 4px);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8b44c;
  color: #1a1206;
  border: 2px solid #15111f;
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  z-index: 2;
}
.vpd-flow-name {
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.85rem, 1vw, 0.98rem);
  font-weight: 600;
  color: #f0e6d3;
  line-height: 1.2;
  text-align: center;
}
.vpd-flow-sub {
  width: 100%;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  color: #8a7e6b;
  line-height: 1.35;
}
/* Speed caption under the pipeline */
.vpd-flow-note {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2.75rem, 6vw, 4.5rem);
  font-family: "Inter", sans-serif;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #b9ab8f;
}
.vpd-flow-note strong { color: #e8b44c; font-weight: 600; }

/* The two halves of the promise: balanced, borderless, with a soft divider */
.vpd-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 900px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  position: relative;
}
.vpd-duo::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, #2a2240 18%, rgba(232, 180, 76, 0.3) 50%, #2a2240 82%, transparent);
}
.vpd-duo-point { text-align: center; }
.vpd-duo-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(232, 180, 76, 0.08);
  border: 1px solid rgba(232, 180, 76, 0.3);
  color: #e8b44c;
  font-size: 1.4rem;
  margin-bottom: 1.05rem;
}
.vpd-duo-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #f0e6d3;
  margin: 0 0 0.6rem;
  line-height: 1.12;
}
.vpd-duo-point p {
  font-family: "Inter", sans-serif;
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.7;
  color: #c4b69a;
  margin: 0;
}

/* ===================== SECTION 2: DEMOS ===================== */
.vpd-demos {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(1000px 540px at 50% 0%, rgba(232, 145, 76, 0.10), transparent 68%),
    #110e1c;
  border-top: 1px solid #221b35;
}
.vpd-demos-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}
.vpd-demos-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  color: #f0e6d3;
  margin: 0.8rem 0 0.7rem;
  line-height: 1.05;
}
.vpd-demos-sub {
  font-family: "Inter", sans-serif;
  font-size: 1.06rem;
  line-height: 1.65;
  color: #c4b69a;
  margin: 0;
}

/* Horizontal scrollable strip */
.vpd-strip-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-lg, 1.5rem);
}
.vpd-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.75rem 0.25rem 1.5rem;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  cursor: grab;
  /* Drag-to-scroll carousel: never let a drag turn into a text selection,
     which would hijack the pointer and stop the strip from scrolling. */
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  scrollbar-width: auto;
  scrollbar-color: #e8b44c rgba(255, 255, 255, 0.05);
}
.vpd-strip:active { cursor: grabbing; }
.vpd-strip.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.vpd-strip.is-dragging .vpd-card { pointer-events: none; }
.vpd-strip::-webkit-scrollbar { height: 10px; }
.vpd-strip::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 5px; }
.vpd-strip::-webkit-scrollbar-thumb { background: #e8b44c; border-radius: 5px; min-width: 60px; }
.vpd-strip::-webkit-scrollbar-thumb:hover { background: #d4a03a; }

/* Persona card */
.vpd-card {
  flex: 0 0 300px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(170deg, #1a1528 0%, #110e1c 100%);
  border: 1px solid #2a2240;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.vpd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.7);
}
.vpd-card.is-playing {
  border-color: rgba(232, 180, 76, 0.6);
  box-shadow: 0 0 0 1px rgba(232, 180, 76, 0.3), 0 22px 56px -22px rgba(232, 180, 76, 0.45);
}

/* Shared-link arrival: the linked card glows so it is clear which one was
   shared. Applied (via the is-linked class) only when the page is opened from
   a ?voice= deep link, never during normal browsing. A few attention pulses
   settle into a steady amber glow that persists for the visit. */
.vpd-card.is-linked {
  border-color: rgba(232, 180, 76, 0.7);
  box-shadow:
    0 0 0 1px rgba(232, 180, 76, 0.45),
    0 0 32px -2px rgba(232, 180, 76, 0.5),
    0 22px 56px -22px rgba(232, 180, 76, 0.5);
  animation: vpd-linked-pulse 2.4s ease-in-out 0.15s 3;
}
@keyframes vpd-linked-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(232, 180, 76, 0.4),
      0 0 20px -4px rgba(232, 180, 76, 0.4),
      0 22px 56px -22px rgba(232, 180, 76, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(232, 180, 76, 0.85),
      0 0 48px 2px rgba(232, 180, 76, 0.75),
      0 22px 60px -20px rgba(232, 180, 76, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vpd-card.is-linked { animation: none; }
}

/* Card art (portrait) */
.vpd-card-art {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 230px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #3d3260, #1a1528);
  display: flex;
  align-items: flex-end;
}
.vpd-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.vpd-card:hover .vpd-card-photo { transform: scale(1.06); }
/* Gold filament along the top edge of the portrait */
.vpd-card-art::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(232, 180, 76, 0.7), transparent);
}
/* Melt the bottom of the portrait into the card so the figure emerges from shadow */
.vpd-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 10, 20, 0) 42%, rgba(17, 14, 28, 0.55) 74%, #15111f 100%);
}
.vpd-card-id {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.15rem 0.9rem;
  width: 100%;
}
.vpd-card-text { display: flex; flex-direction: column; min-width: 0; }
.vpd-card-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #f0e6d3;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.vpd-card-tagline {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-style: italic;
  color: #e0d4bd;
  line-height: 1.3;
  margin-top: 0.15rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

/* Copy-link button: a quiet glass disc in the portrait's top-right corner.
   Hidden until the card is hovered/focused, but always shown on touch devices
   where there is no hover. Click copies a deep link to this card. */
.vpd-share {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(232, 180, 76, 0.35);
  background: rgba(12, 10, 20, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f0e6d3;
  font-size: 0.92rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease,
              background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.vpd-card:hover .vpd-share,
.vpd-share:focus-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  .vpd-share { opacity: 1; transform: none; }
}
.vpd-share:hover {
  background: rgba(232, 180, 76, 0.18);
  border-color: #e8b44c;
  color: #e8b44c;
}
.vpd-share.is-copied {
  opacity: 1;
  transform: translateY(0);
  background: #e8b44c;
  border-color: #e8b44c;
  color: #0c0a14;
}

/* Tiny label under the button: "Copy link", swapping to "Copied!" on success */
.vpd-share::after {
  content: "Copy link";
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 0.28rem 0.5rem;
  border-radius: 7px;
  background: #14111d;
  border: 1px solid #2a2240;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e0d4bd;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.vpd-share:hover::after,
.vpd-share:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.vpd-share.is-copied::after {
  content: "Copied!";
  opacity: 1;
  transform: translateY(0);
  color: #e8b44c;
}

/* Card body */
.vpd-card-body {
  padding: 1.1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}
.vpd-emotions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.vpd-emotion {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: #c4b69a;
  background: rgba(12, 10, 20, 0.5);
  border: 1px solid #2a2240;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.vpd-emotion:hover { color: #f0e6d3; border-color: #3d3260; transform: translateY(-1px); }
.vpd-emotion.is-active {
  color: #0c0a14;
  background: #e8b44c;
  border-color: #e8b44c;
  font-weight: 600;
}

/* Player row */
.vpd-player {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 0.4rem;
}
.vpd-play {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #3d3260;
  background: radial-gradient(circle at 30% 25%, #231c35, #110e1c);
  color: #e8b44c;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.vpd-play:hover { transform: scale(1.07); border-color: #e8b44c; }
.vpd-card.is-playing .vpd-play {
  background: #e8914c;
  border-color: #e8914c;
  color: #0c0a14;
  box-shadow: 0 0 18px -2px rgba(232, 145, 76, 0.6);
}

.vpd-viz {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  flex: 1 1 auto;
  overflow: hidden;
}
.vpd-viz span {
  flex: 1 1 auto;
  min-width: 2px;
  height: 18%;
  border-radius: 2px;
  background: linear-gradient(180deg, #f0c463, #e8914c);
  opacity: 0.3;
  transform-origin: center;
}
.vpd-card.is-playing .vpd-viz span { opacity: 0.95; }

/* Primary: JavaScript drives bar heights from the real audio (class "js"
   is added to .vpd-viz once the analyser is wired up). A short transition
   smooths the per-frame updates into a flowing wave. */
.vpd-viz.js span { transition: height 0.08s linear; }

/* Fallback (no Web Audio): each bar pulses like a live equalizer via CSS.
   Staggered delays plus varied durations read as an organic sound wave. */
.vpd-card.is-playing .vpd-viz:not(.js) span {
  animation: vpd-eq 0.8s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.09s);
}
.vpd-card.is-playing .vpd-viz:not(.js) span:nth-child(3n)   { animation-duration: 0.62s; }
.vpd-card.is-playing .vpd-viz:not(.js) span:nth-child(4n)   { animation-duration: 1.05s; }
.vpd-card.is-playing .vpd-viz:not(.js) span:nth-child(5n+2) { animation-duration: 0.72s; }
.vpd-card.is-playing .vpd-viz:not(.js) span:nth-child(7n)   { animation-duration: 0.92s; }
@keyframes vpd-eq {
  0%   { height: 12%; }
  100% { height: 96%; }
}
.vpd-now {
  flex: 0 0 auto;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a7e6b;
  min-width: 4.5em;
  text-align: right;
}
.vpd-card.is-playing .vpd-now { color: #e8b44c; }

@media (prefers-reduced-motion: reduce) {
  .vpd-card.is-playing .vpd-viz:not(.js) span { animation: none; height: 52%; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .vpd-container,
  .vpd-strip-wrap {
    width: 100%;
    max-width: none;
    padding-left: clamp(1.25rem, 4vw, 2.5rem);
    padding-right: clamp(1.25rem, 4vw, 2.5rem);
  }

  .vpd-lead { grid-template-columns: 1fr; }
  .vpd-lead-body { border-left: none; padding-left: 0; }

  /* Pipeline becomes a compact vertical list of stages */
  .vpd-flow {
    width: 100%;
    padding: 1.15rem;
    border-radius: 16px;
    overflow: hidden;
  }
  .vpd-pipe {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 1rem;
    min-width: 0;
  }
  .vpd-pipe-svg,
  .vpd-pipe-label { display: none !important; }
  .vpd-cond, .vpd-flow-step { grid-column: 1; grid-row: auto; }
  .vpd-link { display: none; }
  .vpd-cond {
    width: 100%;
    min-width: 0;
    padding: 0.85rem;
    border-radius: 14px;
  }
  .vpd-cond-spectral { margin-bottom: 0.25rem; }
  .vpd-cond-name { font-size: 0.98rem; }
  .vpd-cond-sub { font-size: 0.86rem; }

  /* Each stage as a row: icon on the left, number + title, sub-label below */
  .vpd-flow-step {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    row-gap: 0.1rem;
    align-items: center;
    text-align: left;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 0.85rem;
    background: rgba(12, 10, 20, 0.32);
    border: 1px solid rgba(61, 50, 96, 0.72);
    border-radius: 15px;
  }
  .vpd-flow-icon { grid-column: 1; grid-row: 1 / 3; width: 54px; height: 54px; font-size: 1.35rem; border-radius: 15px; }
  .vpd-flow-head { grid-column: 2; grid-row: 1; width: auto; justify-content: flex-start; align-items: center; gap: 0.45rem; }
  .vpd-flow-num { position: static; border: none; width: 23px; height: 23px; margin: 0; font-size: 0.78rem; }
  .vpd-flow-name { width: auto; text-align: left; font-size: 1rem; line-height: 1.28; }
  .vpd-flow-sub { grid-column: 2; grid-row: 2; width: auto; text-align: left; font-size: 0.9rem; line-height: 1.45; }

  /* Down chevron between stacked stages, aligned under the icon column */
  .vpd-flow-step:not(.vpd-pc6)::after {
    top: auto; bottom: -0.65rem; left: 27px; margin-left: 0;
    transform: translate(-50%, 50%) rotate(135deg);
  }

  .vpd-duo { grid-template-columns: 1fr; gap: 2.25rem; }
  .vpd-duo::before {
    top: 50%; bottom: auto; left: 15%; right: 15%; width: auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 180, 76, 0.3), transparent);
  }
}
@media (max-width: 620px) {
  .vpd-hero {
    padding-top: 6.5rem;
    padding-bottom: 3rem;
    text-align: center;
  }
  .vpd-hero-title {
    font-size: clamp(2.45rem, 14vw, 3.35rem);
    line-height: 1.02;
    margin-top: 0.9rem;
  }
  .vpd-hero-sub,
  .vpd-lead-body,
  .vpd-demos-sub,
  .vpd-duo-point p {
    font-size: 1.04rem;
    line-height: 1.65;
  }
  .vpd-hero-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
    border-radius: 16px;
    padding: 0.95rem 1rem;
  }
  .vpd-eyebrow {
    font-size: 0.78rem;
    line-height: 1.35;
    letter-spacing: 0.12em;
  }
  .vpd-tech {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }
  .vpd-lead {
    gap: 1.15rem;
    padding-bottom: 2rem;
  }
  .vpd-lead-title,
  .vpd-demos-title {
    font-size: clamp(2.05rem, 10vw, 2.65rem);
    line-height: 1.08;
  }
  .vpd-flow {
    padding: 1rem 0.85rem;
  }
  .vpd-cond {
    align-items: flex-start;
    gap: 0.75rem;
  }
  .vpd-cond-icon {
    width: 44px;
    height: 44px;
  }
  .vpd-cond-name { font-size: 1rem; line-height: 1.25; }
  .vpd-cond-sub { font-size: 0.9rem; line-height: 1.4; }
  .vpd-flow-step {
    max-width: none;
    grid-template-columns: 50px minmax(0, 1fr);
    column-gap: 0.75rem;
    padding: 0.8rem;
  }
  .vpd-flow-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  .vpd-flow-name { font-size: 1rem; }
  .vpd-flow-sub { font-size: 0.92rem; color: #b8aa91; }
  .vpd-flow-note {
    font-size: 1rem;
    margin-bottom: 2.5rem;
  }
  .vpd-duo {
    margin-bottom: 2rem;
  }
  .vpd-duo-point {
    text-align: left;
  }
  .vpd-duo::before {
    left: 0;
    right: 0;
  }
  .vpd-demos {
    padding-top: 3rem;
    padding-bottom: 4rem;
  }
  .vpd-demos-intro {
    text-align: left;
    margin-bottom: 1.4rem;
  }
  .vpd-strip-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .vpd-strip {
    gap: 1rem;
    padding-bottom: 1.25rem;
  }
  .vpd-card { flex: 0 0 min(70vw, 272px); border-radius: 16px; }
  .vpd-card-art { min-height: 0; }
  .vpd-card-body {
    padding: 1rem;
  }
  .vpd-emotion {
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
  }
  .vpd-player {
    gap: 0.7rem;
  }
  .vpd-now {
    min-width: 0;
    max-width: 6.5rem;
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .vpd-flow-step {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 0.7rem;
  }
  .vpd-flow-icon {
    width: 46px;
    height: 46px;
  }
  .vpd-flow-name { font-size: 0.96rem; }
  .vpd-flow-sub { font-size: 0.88rem; }
}
