/* Home (W1): hero with the live call demo + the trust strip. Built on site.css brand tokens and motion.css; loaded on the home page only.
   While .hc--anim is on (motion allowed, set before first paint), the card has a fixed size and every change is transform / opacity / text,
   so nothing shifts. Without it (no JS, reduced motion) the finished conversation is shown in full. */

/* ---------------------------------------------------------------- hero layout */
.l-hero--call { padding-top: calc(var(--space-6) + var(--space-2)); padding-bottom: var(--space-4); overflow: hidden; }
.l-hero--call .l-hero__bg {
  background:
    radial-gradient(ellipse 45% 55% at 78% 40%, rgba(232, 168, 87, 0.11), transparent 65%),
    radial-gradient(ellipse 40% 40% at 15% 85%, rgba(79, 209, 174, 0.06), transparent 65%);
}
.l-hero__split { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); gap: clamp(2rem, 4.5vw, 4.5rem); align-items: center; position: relative; z-index: 1; }
.l-hero--call h1 { font-size: clamp(2.5rem, 4.7vw, 4.6rem); max-width: 13ch; line-height: 1.02; }
.l-hero--call .l-hero__tagline { font-size: clamp(1.35rem, 2.3vw, 2rem); max-width: 22ch; }
.l-hero--call .l-hero__sub { font-size: clamp(1rem, 1.25vw, 1.125rem); max-width: 36rem; }

/* ---------------------------------------------------------------- the call card */
.hc { position: relative; width: 100%; max-width: 34rem; justify-self: end; }
.hc::before {                                                           /* soft glow behind the card */
  content: ""; position: absolute; inset: 8% -6% -4% -6%; z-index: -1; pointer-events: none; filter: blur(48px);
  background: radial-gradient(closest-side, rgba(232, 168, 87, 0.22), transparent), radial-gradient(closest-side at 80% 90%, rgba(79, 209, 174, 0.16), transparent);
}
.hc__card {
  background: var(--m-glass); border: 1px solid var(--m-glass-border); border-radius: 22px; padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 30px 80px -40px rgba(232, 168, 87, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.hc__top { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8125rem; }
.hc__live { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--action); }
.hc__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--action); box-shadow: 0 0 0 0 rgba(79, 209, 174, 0.6); }
.hc--anim .hc__dot { animation: hc-ping 1.8s var(--m-ease-out) infinite; }
.m-paused-tab .hc__dot, .hc.is-paused .hc__dot { animation-play-state: paused; }
@keyframes hc-ping { 0% { box-shadow: 0 0 0 0 rgba(79, 209, 174, 0.55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(79, 209, 174, 0); } }
.hc__title { color: var(--text); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc__timer { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hc__pause {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; min-height: 32px; border-radius: 999px;
  border: 1px solid var(--border-strong) !important; color: var(--text) !important; font-size: 0.75rem; font-weight: 600;
  transition: border-color var(--m-dur-2) ease, background-color var(--m-dur-2) ease;
}
.hc__pause:hover { border-color: var(--voice) !important; background: var(--voice-dim) !important; }
.hc__pause svg { width: 10px; height: 10px; fill: currentColor; }
.hc__icon-play { display: none !important; }
.hc__pause[aria-pressed="true"] .hc__icon-pause { display: none !important; }
.hc__pause[aria-pressed="true"] .hc__icon-play { display: block !important; }
.hc:not(.hc--anim) .hc__pause, .hc:not(.hc--anim) .hc__timer { display: none; }

.hc__wave { margin: 0.9rem 0 0.75rem; --m-wave-h: 46px; }

/* transcript: chat bubbles; Clio on the left (amber), the caller on the right (teal) */
.hc__window { position: relative; }
.hc--anim .hc__window {
  height: 14rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 2.2rem); mask-image: linear-gradient(180deg, transparent 0, #000 2.2rem);
}
.hc__lines { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; transition: transform var(--m-dur-3) var(--m-ease-out); }
.hc__line { display: flex; flex-direction: column; gap: 0.2rem; max-width: 86%; }
.hc__line--caller { align-self: flex-end; text-align: right; }
.hc__who { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.hc__line--agent .hc__who { color: var(--voice); }
.hc__line--caller .hc__who { color: var(--action); }
.hc__text {
  position: relative; display: block; padding: 0.55rem 0.8rem; border-radius: 14px; font-size: 0.9375rem; line-height: 1.45; text-align: left;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border);
}
.hc__line--agent .hc__text { background: rgba(232, 168, 87, 0.09); border-color: rgba(232, 168, 87, 0.22); border-top-left-radius: 4px; }
.hc__line--caller .hc__text { background: rgba(79, 209, 174, 0.07); border-color: rgba(79, 209, 174, 0.2); border-top-right-radius: 4px; }
.hc__typed { display: none; }
.hc--anim .hc__typed { display: block; position: absolute; inset: 0; padding: inherit; color: var(--text); }
.hc--anim .hc__full { visibility: hidden; }
.hc--anim .hc__line.is-done .hc__full { visibility: visible; }
.hc--anim .hc__line.is-done .hc__typed { visibility: hidden; }
.hc--anim .hc__line { opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity var(--m-dur-2) var(--m-ease-out), transform var(--m-dur-2) var(--m-ease-out); }
.hc--anim .hc__line.is-on { opacity: 1; transform: none; }

/* status chips */
.hc__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.85rem; }
.hc--anim .hc__chips { min-height: 3.9rem; align-content: flex-start; }
.hc__chip {
  font-family: var(--font-mono); font-size: 0.7rem; padding: 0.28rem 0.6rem; border-radius: 999px; color: var(--action);
  border: 1px solid rgba(79, 209, 174, 0.35); background: rgba(79, 209, 174, 0.06); white-space: nowrap;
}
.hc__chip::before { content: "✓ "; }
.hc__chip--done { color: #1a1206; background: var(--voice); border-color: var(--voice); font-weight: 600; }
.hc--anim .hc__chip { opacity: 0; transform: scale(0.85); transition: opacity var(--m-dur-2) var(--m-ease-out), transform var(--m-dur-2) var(--m-ease-spring); }
.hc--anim .hc__chip.is-on { opacity: 1; transform: none; }

/* result card */
.hc__result {
  display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; padding: 0.75rem 0.9rem; border-radius: 16px;
  background: linear-gradient(135deg, rgba(79, 209, 174, 0.12), rgba(232, 168, 87, 0.08)); border: 1px solid rgba(79, 209, 174, 0.3);
}
.hc__result-icon { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--action); color: #04130e; }
.hc__result-icon svg { width: 18px; height: 18px; }
.hc__result-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.hc__result-body strong { font-size: 0.95rem; }
.hc__result-body span { font-size: 0.85rem; color: var(--text); }
.hc__result-body em { font-style: normal; font-size: 0.75rem; color: var(--muted); }
.hc--anim .hc__result { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.98); transition: opacity var(--m-dur-3) var(--m-ease-out), transform var(--m-dur-3) var(--m-ease-spring); }
.hc--anim .hc__result.is-on { opacity: 1; transform: none; }

/* scenario switcher + note */
.hc__switch { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.9rem; flex-wrap: wrap; }
.hc__pick {
  padding: 0.35rem 0.85rem; min-height: 32px; border-radius: 999px; font-size: 0.8rem; color: var(--muted) !important;
  border: 1px solid var(--border) !important; transition: color var(--m-dur-2) ease, border-color var(--m-dur-2) ease, background-color var(--m-dur-2) ease;
}
.hc__pick:hover { color: var(--text) !important; border-color: var(--border-strong) !important; }
.hc__pick[aria-pressed="true"] { color: #1a1206 !important; background: var(--voice) !important; border-color: var(--voice) !important; font-weight: 600; }
.hc__note { margin-top: 0.6rem; text-align: center; font-size: 0.72rem; color: var(--muted-2); }

/* ---------------------------------------------------------------- trust strip */
.ts { padding-top: var(--space-3); padding-bottom: var(--space-4); display: grid; gap: var(--space-3); }
.ts__row { display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap; justify-content: center; }
.ts__label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); text-align: center; }
.ts__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.ts__chip {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.95rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.02); overflow: hidden;
}
.ts__icon { width: 18px; height: 18px; color: var(--voice); flex: none; }
.ts__langs { display: grid; gap: 0.7rem; }
.ts__marquee { --m-gap: 0.6rem; --m-marquee-dur: 46s; }
.ts__marquee li {
  white-space: nowrap; padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.875rem; color: var(--text);
  border: 1px solid var(--border); background: rgba(232, 168, 87, 0.05);
}
.ts__numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--space-2); border-top: 1px solid var(--border); padding-top: var(--space-3); }
.ts__number { display: flex; flex-direction: column-reverse; align-items: center; gap: 0.2rem; text-align: center; }
.ts__number dd { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem); color: var(--voice); line-height: 1; font-variant-numeric: tabular-nums; }
.ts__number dt { font-size: 0.875rem; color: var(--muted); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1023px) {
  .l-hero__split { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .l-hero--call .l-hero__content--left { max-width: none; }
  .hc { justify-self: center; }
}
@media (max-width: 640px) {
  .l-hero--call { padding-top: calc(var(--space-5) + var(--space-2)); }
  .l-hero--call h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .l-hero--call .l-hero__tagline { font-size: 1.25rem; margin-top: 0.6rem; }
  .l-hero--call .l-hero__sub { font-size: 0.975rem; margin-top: 0.9rem; }
  .l-hero--call .l-hero__ctas { margin-top: var(--space-3); }
  .l-hero__split { gap: var(--space-3); }
  .hc__card { padding: 0.9rem; border-radius: 18px; }
  .hc--anim .hc__window { height: 13.5rem; }
  .hc__text { font-size: 0.9rem; }
  .hc__line { max-width: 92%; }
  .hc__timer { display: none; }
  .hc__pause { margin-left: auto; }
}

/* reduced motion: hc--anim is never added; this also stops the live dot */
@media (prefers-reduced-motion: reduce) {
  .hc__dot { animation: none !important; }
  .hc__lines { transition: none; }
}
