/* ============================================================
   components.css — Reusable UI building blocks
   ------------------------------------------------------------
   Goal: define each reusable element ONCE as a class. The HTML
   only composes these classes — no block re-styles them and no
   raw values are hardcoded (everything is a var(--…) token).

   Contains: buttons + button row, full-width strip, fine print,
   the status pill, the feature card, the industry card (incl.
   its hover-slideshow layers), the pricing card, and the FAQ
   accordion item.

   Each component is self-contained: its own responsive rules sit
   next to the component, so it can be reused without hunting
   down media queries elsewhere.

   Depends on: tokens.css (loads after base.css, before sections.css).
   ============================================================ */

/* ─── buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: var(--radius-md);
  font-family: inherit; font-weight: 600; font-size: 16px; line-height: 20px;
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--motion-base) var(--ease-out),
              box-shadow var(--motion-base) var(--ease-out),
              transform 150ms var(--ease-out);
}
/* Primary — white-on-Rausch gradient */
.btn-coral {
  background: var(--gradient-rausch);
  color: #fff; border: none;
}
.btn-coral:hover {
  background: var(--gradient-rausch-hover);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.btn-coral:active { background: var(--color-rausch-deep); }
/* Secondary — outline */
.btn-outline {
  background: transparent; color: var(--color-ink);
  border: 1px solid var(--color-ink);
}
.btn-outline:hover { background: var(--color-bg-secondary); }
.btn-outline:active { background: var(--color-bg-tertiary); }
.btn-lg { padding: 16px 28px; font-size: 16px; }

.cta-row { display: inline-flex; gap: 12px; flex-wrap: wrap; }

/* ─── full-width strip ─── */
.strip { width: 100%; }
.strip-soft { background: var(--color-bg-secondary); }

/* ─── fine print ─── */
.fine { color: var(--color-ink-secondary); font-size: 14px; line-height: 18px; }

/* ─── status pill — dark waveform pill (the voice-demo trigger).
   Rendered as a <button>, so the button defaults are reset here: no border,
   pointer cursor, inherited font. Sits below the portrait, in normal flow. ─── */
.hero-status-pill {
  margin-top: 32px;
  background: var(--color-ink);
  color: #fff;
  font-family: var(--font-cereal);
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.01em;
  padding: 16px 28px;
  border: none;
  border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--motion-base) var(--ease-out),
              box-shadow var(--motion-base) var(--ease-out);
}
.hero-status-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hero-status-pill:disabled { cursor: default; opacity: 0.75; transform: none; box-shadow: var(--shadow-md); }

/* the 6 animated bars on the left of the pill — a continuous "voice" indicator */
.hero-status-bars {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px;
}
.hero-status-bars span {
  display: block; width: 4px;
  background: var(--color-rausch);
  border-radius: 3px;
  transform-origin: center;
  animation: heroBars 1.1s ease-in-out infinite;
}
.hero-status-bars span:nth-child(1) { animation-delay: 0s;    height: 30%; }
.hero-status-bars span:nth-child(2) { animation-delay: 0.12s; height: 65%; }
.hero-status-bars span:nth-child(3) { animation-delay: 0.24s; height: 95%; }
.hero-status-bars span:nth-child(4) { animation-delay: 0.36s; height: 70%; }
.hero-status-bars span:nth-child(5) { animation-delay: 0.48s; height: 45%; }
.hero-status-bars span:nth-child(6) { animation-delay: 0.60s; height: 25%; }
@keyframes heroBars {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1.2); }
}

/* ─── feature card ───
   .feat-head is fixed-height so headers line up and the first bullet
   starts at the same y-position across every card in a row. */
.feat {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--motion-base) var(--ease-standard);
}
.feat:hover { box-shadow: var(--shadow-md); }
.feat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 72px;          /* fixed — identical header height across cards */
  margin-bottom: 16px;
}
.feat-icon {
  font-size: 30px;
  line-height: 1;
  color: var(--color-rausch);
  flex: 0 0 auto;
}
.feat h3 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
}
.feat-list { list-style: none; padding: 0; margin: 0; }
.feat-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--color-ink-secondary);
  font-size: 15px;
  line-height: 1.5;
}
.feat-list li:last-child { margin-bottom: 0; }
.feat-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-rausch);
}

/* ─── industry card — square-ish photo card, 16px image radius ─── */
.ind-card {
  background: var(--color-bg);
  display: flex; flex-direction: column;
}
.ind-img {
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--color-bg-secondary);
}
.ind-card h3 {
  margin: 0; padding: 12px 0 2px;
  font-size: 16px; line-height: 20px; font-weight: 600;
  letter-spacing: 0;
  color: var(--color-ink);
}
.ind-examples {
  margin: 0; padding: 0 0 4px;
  font-size: 14px; line-height: 18px; font-weight: 400;
  color: var(--color-ink-secondary);
}
/* Middot separator between adjacent sub-industry spans */
.ind-examples span + span::before {
  content: " · ";
  color: var(--color-ink-secondary);
  font-weight: 400;
}
.ind-examples span { transition: color var(--motion-base) var(--ease-standard); }
.ind-examples span.is-active {
  color: var(--color-rausch);
  font-weight: 600;
}

/* And-More placeholder: soft panel with a centered arrow.
   :has() auto-hides the arrow once real slides appear. */
.ind-more {
  display: grid;
  place-items: center;
  color: var(--color-ink-secondary);
}
.ind-more::before {
  content: "→";
  font-size: 60px;
  font-weight: 300;
  line-height: 1;
}
.ind-img:has(.ind-slide)::before { display: none; }

/* Slideshow layers — image scales restrained, slides translate horizontally.
   The translate targets are pushed --ind-slide-gap past the parent edge so a
   strip of white panel stays visible between the photos during transit. */
.ind-static-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  pointer-events: none;
  transform: translateX(0);
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.ind-card:hover .ind-static-bg {
  transform: translateX(calc(-100% - var(--ind-slide-gap)));
}
/* On mouseleave the JS adds .is-snap-back for one frame so the static-bg
   returns to translateX(0) instantly, with no exit animation. */
.ind-card.is-snap-back .ind-static-bg { transition: none; }
.ind-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: translateX(calc(100% + var(--ind-slide-gap)));
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  pointer-events: none;
}
.ind-slide.is-in  { transform: translateX(0); }
.ind-slide.is-out { transform: translateX(calc(-100% - var(--ind-slide-gap))); }
/* Subtle image-scale lift on the photo, true to Airbnb's restraint */
.ind-card:hover .ind-img { box-shadow: var(--shadow-card); }

/* ─── pricing card ─── */
.price-card {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  max-width: 720px; margin: 0 auto 18px;
  box-shadow: var(--shadow-card);
  text-align: left;
}
.price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 24px; border-bottom: 1px solid var(--color-divider);
  flex-wrap: wrap; gap: 16px;
}
.price-num {
  font-size: 48px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--color-ink); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price-num span { font-size: 18px; color: var(--color-ink-secondary); font-weight: 500; margin-left: 4px; }
.price-anchor { color: var(--color-ink-secondary); margin-top: 6px; font-size: 15px; }
.price-list { list-style: none; padding: 24px 0 0; }
.price-list li {
  padding: 10px 0; font-size: 16px; line-height: 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.price-list .check { color: var(--color-ink); font-weight: 700; }
.price-list .check.coral { color: var(--color-rausch); }

@media (max-width: 744px) {
  .price-card { padding: 28px 24px; }
}

/* ─── FAQ accordion item ─── */
.faq-item { border-top: 1px solid var(--color-divider); }
.faq-item:last-of-type { border-bottom: 1px solid var(--color-divider); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 24px 40px 24px 0;
  font-weight: 600; font-size: 18px; line-height: 24px; color: var(--color-ink);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-bg-secondary); color: var(--color-ink);
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  transition: background var(--motion-base) var(--ease-standard);
}
.faq-item[open] summary::after {
  content: "−"; background: var(--color-rausch); color: #fff;
}
.faq-item .faq-body {
  padding: 0 40px 24px 0; color: var(--color-ink-secondary);
  font-size: 16px; line-height: 24px;
}

/* ─── live transcript popover — modal lightbox for the voice demo.
   The overlay dims and blocks the whole page; the centered panel holds the
   live transcript. Hidden until js/transcript_popover.js adds .is-open. */
.transcript-popover {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-popover);
  background: var(--color-scrim);
  align-items: center;
  justify-content: center;
}
.transcript-popover.is-open { display: flex; }

/* the centered panel — 65% of the viewport in each axis */
.transcript-panel {
  display: flex;
  flex-direction: column;
  width: var(--transcript-width);
  height: var(--transcript-height);
  overflow: hidden;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* header — title + ✕ (the ✕ ends the call) */
.transcript-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.transcript-title { font-size: 14px; font-weight: 600; color: var(--color-ink); }
.transcript-close {
  background: none; border: none; cursor: pointer;
  padding: var(--space-1);
  font-size: 16px; line-height: 1; color: var(--color-ink-secondary);
  transition: color var(--motion-fast) var(--ease-standard);
}
.transcript-close:hover { color: var(--color-ink); }

/* scrollable message list — flex:1 + min-height:0 lets it scroll inside the
   panel's fixed height instead of clipping the newest messages */
.transcript-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4);
  overflow-y: auto;
}

/* footer — the "End call" button */
.transcript-foot {
  flex: 0 0 auto;
  display: flex; justify-content: flex-end;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
}

/* one chat bubble — speaker label above the text */
.transcript-msg {
  display: flex; flex-direction: column;
  max-width: var(--transcript-bubble-max);
}
.transcript-msg-speaker {
  margin-bottom: var(--space-1);
  font-size: 12px; font-weight: 600; color: var(--color-ink-secondary);
}
.transcript-msg-text {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 14px; line-height: 1.4;
}
/* Maya — left side, neutral surface */
.transcript-msg-agent { align-self: flex-start; }
.transcript-msg-agent .transcript-msg-text {
  background: var(--color-bg-secondary); color: var(--color-ink);
}
/* visitor — right side, brand surface */
.transcript-msg-user { align-self: flex-end; }
.transcript-msg-user .transcript-msg-speaker { text-align: right; }
.transcript-msg-user .transcript-msg-text {
  background: var(--color-rausch); color: #fff;
}
