/* =============================================================================
   247Aisupports — Landing page styles (LIGHT premium, F1)
   Builds on public/css/theme.css (tokens, primitives, keyframes, reveal rules).
   Faithful vanilla port of the owner's Lovable design (voice-ai-stride). Self-
   authored; no new CDN origin. No secrets / model names / provider URLs anywhere.
   ============================================================================= */

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: var(--primary-foreground);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */
.lnav__logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display);
  font-weight: 800; font-size: 1.08rem; color: var(--foreground); text-decoration: none; }
.lnav__logo:hover { text-decoration: none; }
.lnav__logo img { width: 30px; height: 30px; border-radius: 8px; }
.lnav__actions { display: flex; align-items: center; gap: .75rem; }
.lnav__toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center; color: var(--foreground); }
.lnav__toggle svg { width: 22px; height: 22px; }
@media (max-width: 880px) {
  .nav__links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--background); border-bottom: 1px solid var(--border);
    padding: .5rem clamp(16px, 4vw, 32px) 1rem; box-shadow: var(--shadow-card); }
  .nav__links.open { display: flex; }
  .nav__links a { padding: .8rem 0; border-bottom: 1px solid var(--border); }
  .lnav__toggle { display: inline-flex; }
  .lnav__actions .btn--ghost { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 104px) clamp(40px, 6vw, 72px); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: var(--gradient-radial); pointer-events: none; z-index: -1; }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero__title { font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.04; margin-bottom: 1rem; }
.hero__subtitle { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--muted-foreground); max-width: 38ch; margin-bottom: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.5rem; }
.hero__microline { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted-foreground); }
.hero__microline svg { width: 16px; height: 16px; color: var(--success); flex: none; }

/* Hero illustrative call card */
.callcard { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-elegant); padding: 1.5rem; }
.callcard__tag { position: absolute; top: 14px; right: 14px; }
.callcard__head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.1rem; padding-right: 5rem; }
.callcard__avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--gradient-brand); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; flex: none; }
.callcard__who { line-height: 1.3; }
.callcard__who strong { color: var(--foreground); font-family: var(--font-display); }
.callcard__who span { display: block; font-size: .82rem; color: var(--muted-foreground); }
.callcard__turns { display: grid; gap: .7rem; min-height: 188px; }
.bubble { max-width: 86%; padding: .7rem .95rem; border-radius: var(--radius-lg, 18px); font-size: .93rem; line-height: 1.5;
  opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.bubble.show { opacity: 1; transform: none; }
.bubble--agent { background: var(--muted); color: var(--foreground); border-bottom-left-radius: 6px; align-self: start; border: 1px solid var(--border); }
.bubble--caller { background: var(--gradient-brand); color: #fff; border-bottom-right-radius: 6px; justify-self: end; }
.bubble--caller p, .bubble--agent p { margin: 0; color: inherit; }
.bubble__label { display: block; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin-bottom: .15rem; }
.callcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem;
  padding-top: 1rem; border-top: 1px solid var(--border); }
.callcard__metric { font-size: .8rem; color: var(--muted-foreground); }
.callcard__metric strong { color: var(--success); font-family: var(--font-display); }

/* ---------- Section header ---------- */
.shead { max-width: 720px; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.shead--left { margin-left: 0; text-align: left; }
.shead h2 { margin-bottom: .6rem; }
.shead p { font-size: clamp(1rem, 1.5vw, 1.15rem); margin: 0; }

/* ---------- Trust / capability strip ---------- */
.capstrip { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.capstrip .chip { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-card); font-size: .9rem; font-weight: 500; color: var(--foreground); }
.capstrip .chip svg { width: 17px; height: 17px; color: var(--primary); flex: none; }

/* ---------- Live demo section ---------- */
.demo__layout { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: stretch; }
@media (min-width: 920px) { .demo__layout { grid-template-columns: 1fr 1fr; } }

/* Scripted sample conversation panel */
.scriptpanel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card); padding: 1.5rem; display: flex; flex-direction: column; }
.scriptpanel__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.scriptpanel__meta { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted-foreground); }
.scriptpanel__feed { display: grid; gap: .7rem; min-height: 320px; align-content: start; }
.scriptpanel__caption { margin-top: 1rem; font-size: .8rem; color: var(--muted-foreground); }

/* Typing caret on the latest scripted bubble */
.typing { display: inline-block; }
.typing::after { content: '|'; margin-left: 1px; animation: caret 1s steps(1) infinite; color: currentColor; }
@keyframes caret { 50% { opacity: 0; } }

/* Live agent control (reuses voice-agent.js / voice-client.js IDs + .agent__ classes) */
.agent__widget-inner { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card); padding: clamp(1.25rem, 3.5vw, 2rem) 1.25rem; display: flex; flex-direction: column;
  align-items: center; gap: 1rem; position: relative; overflow: hidden; }
/* Top bar (status + timer) spans the widget width. */
.agent__topbar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
/* Visualizer + mic orb sit together in a compact stage above the transcript. */
.agent__stage { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.agent__status { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted-foreground); }
.agent__status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-foreground); transition: background .3s; }
.agent__status[data-state="connecting"] .agent__status-dot { background: #d39d00; animation: pulse 1s infinite; }
.agent__status[data-state="active"] .agent__status-dot { background: var(--success); animation: pulse 2s infinite; }
.agent__status[data-state="speaking"] .agent__status-dot { background: var(--primary); animation: pulse .8s infinite; }
.agent__status[data-state="error"] .agent__status-dot { background: var(--destructive); }
.agent__visualizer { width: 100%; max-width: 300px; height: 72px; display: flex; align-items: center; justify-content: center; opacity: .4; transition: opacity .6s; }
.agent__visualizer.active { opacity: 1; }
.agent__orb-wrapper { position: relative; width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; }
.agent__orb-ring { position: absolute; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--primary) 22%, transparent); }
.agent__orb-ring--1 { width: 100%; height: 100%; animation: orbRing 3s ease-in-out infinite; }
.agent__orb-ring--2 { width: 130%; height: 130%; animation: orbRing 3s ease-in-out infinite .5s; }
.agent__orb-ring--3 { width: 160%; height: 160%; animation: orbRing 3s ease-in-out infinite 1s; }
@keyframes orbRing { 0%,100% { transform: scale(.92); opacity: .7; } 50% { transform: scale(1.04); opacity: .25; } }
.agent__orb { width: 76px; height: 76px; border-radius: 50%; background: var(--gradient-brand); border: none; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .3s, box-shadow .3s;
  box-shadow: var(--shadow-glow); position: relative; z-index: 1; }
.agent__orb:hover { transform: scale(1.08); }
.agent__orb:active { transform: scale(.95); }
.agent__orb.active { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 4px 24px rgba(239,68,68,.35); }
.agent__orb.active .agent__orb-mic { display: none; }
.agent__orb.active .agent__orb-end { display: block !important; }
.agent__controls { display: flex; gap: 1rem; }
.agent__control-btn { display: flex; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--border);
  color: var(--muted-foreground); padding: .5rem 1.25rem; border-radius: var(--radius-xl); cursor: pointer;
  font-family: var(--font-sans); font-size: .85rem; transition: all .3s; }
.agent__control-btn:hover { color: var(--foreground); border-color: color-mix(in oklab, var(--primary) 40%, var(--border)); }
.agent__control-btn.muted { border-color: color-mix(in oklab, var(--destructive) 40%, var(--border)); color: var(--destructive); }
.agent__timer { font-size: .85rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; font-weight: 500; }
.agent__hint { font-size: .82rem; color: var(--muted-foreground); text-align: center; max-width: 30ch; }

/* ---------- Live transcript (priority space, PERMANENT fixed size) ----------
   The box height never changes; overflowing conversation scrolls inside it. */
.agent__transcript { width: 100%; height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem;
  padding: .9rem; border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: color-mix(in oklab, var(--muted) 45%, var(--card)); scroll-behavior: smooth; }
.agent__transcript::-webkit-scrollbar { width: 8px; }
.agent__transcript::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--primary) 30%, transparent); border-radius: 999px; }
.agent__transcript-empty { margin: auto; text-align: center; font-size: .85rem; color: var(--muted-foreground); max-width: 28ch; }
.agent__msg { display: flex; flex-direction: column; gap: .15rem; max-width: 88%; }
.agent__msg--agent { align-self: flex-start; align-items: flex-start; }
.agent__msg--customer { align-self: flex-end; align-items: flex-end; }
.agent__msg-who { font-size: .68rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted-foreground); padding: 0 .25rem; }
.agent__msg-text { font-size: .92rem; line-height: 1.45; padding: .55rem .85rem; border-radius: var(--radius); word-break: break-word; }
.agent__msg--agent .agent__msg-text { background: color-mix(in oklab, var(--primary) 12%, var(--card)); color: var(--foreground); border-top-left-radius: 4px; }
.agent__msg--customer .agent__msg-text { background: var(--gradient-brand); color: #fff; border-top-right-radius: 4px; }

/* ---------- Feature / why-us cards ---------- */
.feature-card h3 { margin-bottom: .4rem; }
.feature-card p { margin: 0; font-size: .95rem; }

/* ---------- How it works ---------- */
.steps { counter-reset: step; }
.step { position: relative; }
.step__num { width: 40px; height: 40px; border-radius: 50%; background: var(--gradient-brand); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; margin-bottom: 1rem; }
.step h3 { margin-bottom: .35rem; }
.step p { margin: 0; font-size: .95rem; }

/* ---------- Industries ---------- */
.industry-card h3 { margin-bottom: .6rem; }
.industry-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.industry-card li { font-size: .92rem; color: var(--muted-foreground); display: flex; gap: .5rem; align-items: center; }
.industry-card li svg { width: 14px; height: 14px; color: var(--primary); flex: none; }

/* ---------- ROI calculator ---------- */
.roi { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 880px) { .roi { grid-template-columns: 1fr 1fr; } }
.roi__inputs { display: grid; gap: 1.5rem; align-content: start; }
.roi__field label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 600;
  font-family: var(--font-display); margin-bottom: .5rem; color: var(--foreground); }
.roi__field label strong { color: var(--primary); font-variant-numeric: tabular-nums; }
.roi__range { width: 100%; accent-color: var(--primary); height: 6px; cursor: pointer; }
.roi__out { background: var(--gradient-soft); }
.roi__big { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1; color: var(--primary); }
.roi__row { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.roi__row:last-of-type { border-bottom: none; }
.roi__row span { color: var(--muted-foreground); font-size: .95rem; }
.roi__row strong { font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--foreground); }
.roi__note { font-size: .8rem; color: var(--muted-foreground); margin: 1rem 0 0; }

/* ---------- Comparison table ---------- */
.compare td:last-child { font-weight: 600; color: var(--primary); }
.compare .compare__col-ai { background: color-mix(in oklab, var(--primary) 5%, white); }
@media (max-width: 600px) { .compare th, .compare td { padding: .65rem .7rem; font-size: .88rem; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: stretch; }
@media (min-width: 720px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .pricing-grid { grid-template-columns: repeat(4, 1fr); } }
.pricing-card__tier { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.pricing-card__usd { font-size: .85rem; color: var(--muted-foreground); font-weight: 500; }
.pricing-card__desc { font-size: .9rem; color: var(--muted-foreground); margin: .35rem 0 0; min-height: 2.6em; }
.pricing-card li svg { width: 16px; height: 16px; color: var(--primary); flex: none; margin-top: 2px; }
.pricing-card__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient-brand); color: #fff; font-size: .72rem; font-weight: 700; padding: .3rem .8rem;
  border-radius: 999px; white-space: nowrap; }
.pricing-card .btn { margin-top: auto; }
.pricing__note { text-align: center; font-size: .9rem; color: var(--muted-foreground); max-width: 760px; margin: 2rem auto 0; }

/* ---------- Testimonials ---------- */
.tcard { position: relative; }
.tcard__illus { position: absolute; top: 14px; right: 14px; }
.tcard__stars { color: #e6a700; letter-spacing: 2px; margin-bottom: .75rem; }
.tcard__quote { font-size: 1rem; color: var(--foreground); margin: 0 0 1.1rem; line-height: 1.55; }
.tcard__author { display: flex; align-items: center; gap: .7rem; }
.tcard__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-foreground);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; flex: none; }
.tcard__name { font-family: var(--font-display); font-weight: 700; color: var(--foreground); font-size: .95rem; }
.tcard__role { font-size: .82rem; color: var(--muted-foreground); }

/* ---------- Final CTA ---------- */
.finalcta { text-align: center; }
.finalcta__inner { background: var(--gradient-brand); border-radius: var(--radius-3xl); padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  box-shadow: var(--shadow-glow); }
.finalcta__inner h2, .finalcta__inner p { color: #fff; }
.finalcta__inner p { opacity: .92; max-width: 48ch; margin-inline: auto; }
.finalcta__actions { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; margin-top: 1.75rem; }
.finalcta .btn--primary { background: #fff; color: var(--primary); }
.finalcta .btn--primary:hover { box-shadow: 0 12px 36px rgba(0,0,0,.18); }
.finalcta .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.finalcta .btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---------- Footer ---------- */
.lfooter__top { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2rem; }
@media (min-width: 720px) { .lfooter__top { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.lfooter__brand strong { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--foreground); }
.lfooter__brand p { font-size: .9rem; max-width: 34ch; margin: .6rem 0 0; }
.lfooter__contact { font-size: .88rem; margin-top: .8rem; }
.lfooter__col h4 { font-family: var(--font-display); font-size: .95rem; color: var(--foreground); margin: 0 0 .8rem; }
.lfooter__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.lfooter__col a { font-size: .9rem; }
.lfooter__bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: .75rem; font-size: .85rem; }

/* ---------- Section anchor offset (sticky nav) ---------- */
[id] { scroll-margin-top: 80px; }
