/*
 * Homepage hero: headline on the left, a live example conversation on the right.
 *
 * The conversation is plain markup that is fully visible by default (reduced
 * motion, print, no CSS animation support). Only for visitors who have not asked
 * for reduced motion does it replay on a CSS loop: voice note, transcript, open
 * times, "2:30 works", booked, in the calendar. Pure CSS on purpose: nothing to
 * load, no flash of the finished chat before it starts, nothing for the CSP to
 * block. The loop timeline is generated at the bottom of this file.
 */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 64px; align-items: center;
}
.hero-copy { text-align: left; }
.hero-copy h1 { font-size: clamp(2.3rem, 3.45vw, 3.2rem); line-height: 1.04; margin-top: 28px; }
.hero-copy .hero-sub { margin: 24px 0 0; max-width: 52ch; font-size: 1.2rem; color: var(--text-muted); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-fine {
  margin-top: 22px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .06em; color: var(--text-muted);
}
.hero-badge {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0;
  border: 1px solid var(--border-strong); border-radius: 99px; padding: 7px 16px;
  font-size: 13px; color: var(--text-muted);
}

.hero-demo { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-demo::before {
  content: ""; position: absolute; inset: 6% 0 14%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(18, 181, 166, .26), rgba(18, 181, 166, 0));
  filter: blur(18px);
}
.hd-phone {
  position: relative; z-index: 1; width: 100%; max-width: 350px;
  background: #0b0e0f; border: 1px solid var(--border-strong); border-radius: 38px;
  padding: 11px; box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03);
}
.hd-top {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px 13px;
  background: #11181a; border-radius: 28px 28px 0 0; border-bottom: 1px solid var(--border);
}
.hd-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--teal); color: #04201e; display: grid; place-items: center;
  font-family: var(--archivo); font-weight: 800; font-size: 15px;
}
.hd-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.hd-status { font-size: 11px; color: var(--ok); line-height: 1.2; margin-top: 2px; }
.hd-screen {
  display: flex; flex-direction: column; gap: 9px; height: 452px; padding: 16px 12px;
  background-color: #0d1214; border-radius: 0 0 28px 28px; overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 14px 14px;
}
.hd-msg {
  position: relative; max-width: 84%; padding: 9px 12px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.4; color: var(--text);
}
.hd-in  { align-self: flex-start; background: #1a2124; border-top-left-radius: 4px; }
.hd-out { align-self: flex-end; background: #0e6f66; border-top-right-radius: 4px; }
.hd-tag {
  display: block; margin-bottom: 3px; font-family: var(--mono); font-size: 9px;
  letter-spacing: .1em; text-transform: uppercase; color: #9fe6dd;
}
.hd-voice { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.hd-play { width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--teal); position: relative; }
.hd-play::after {
  content: ""; position: absolute; left: 10px; top: 7px; border-left: 8px solid #04201e;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.hd-bars { display: flex; align-items: center; gap: 2px; height: 22px; flex: 1; }
.hd-bars i { display: block; width: 3px; border-radius: 2px; background: #6f7d82; height: 8px; }
.hd-bars i:nth-child(3n) { height: 18px; }
.hd-bars i:nth-child(3n+1) { height: 11px; }
.hd-bars i:nth-child(5n) { height: 21px; }
.hd-bars i:nth-child(4n+2) { height: 14px; }
.hd-dur { font-family: var(--mono); font-size: 10px; color: var(--text-muted); }
.hd-transcript {
  align-self: flex-start; max-width: 92%; padding: 2px 4px 0 14px;
  font-size: 12px; line-height: 1.4; color: var(--text-muted); font-style: italic;
  border-left: 2px solid var(--border-strong);
}
.hd-transcript span {
  font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--teal); margin-right: 6px;
}
.hd-text { display: block; }
.hd-dots { display: none; }
.hd-card {
  align-self: stretch; display: flex; align-items: center; gap: 12px; margin-top: 4px;
  padding: 11px 13px; border-radius: 14px;
  background: rgba(79, 208, 193, .10); border: 1px solid rgba(79, 208, 193, .35);
}
.hd-check { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--ok); position: relative; }
.hd-check::after {
  content: ""; position: absolute; left: 10px; top: 6px; width: 6px; height: 12px;
  border: solid #04201e; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.hd-card b { display: block; font-size: 13px; }
.hd-card small {
  display: block; margin-top: 1px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ok);
}
.hd-note {
  position: relative; z-index: 1; margin: 18px 0 0; max-width: 350px; text-align: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--text-muted);
}
.hd-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Trade tabs: radio buttons, switched with :has(), so no script. AC shows by
   default; a browser without :has() keeps AC and the tabs do nothing. */
.hd-tabs { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; position: relative; z-index: 1; }
.hd-cap {
  display: block; width: 100%; padding: 0; margin: 0 0 12px; text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--text-muted);
}
.hd-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hd-tabs input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.hd-tabs label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border-strong); border-radius: 99px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--text-muted); background: rgba(255, 255, 255, .02);
}
.hd-tabs label:hover { color: var(--text); border-color: rgba(255, 255, 255, .32); }
.hd-tabs input:checked + label { background: var(--teal); border-color: var(--teal); color: #04201e; font-weight: 700; }
.hd-tabs input:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 3px; }

.hd-conv { display: none; }
.hd-conv-ac { display: flex; }
.hero-demo:has(input:checked:not(#hd-t-ac)) .hd-conv-ac { display: none; }
.hero-demo:has(#hd-t-ac:checked) .hd-conv-ac,
.hero-demo:has(#hd-t-plumbing:checked) .hd-conv-plumbing,
.hero-demo:has(#hd-t-electrical:checked) .hd-conv-electrical,
.hero-demo:has(#hd-t-pest:checked) .hd-conv-pest { display: flex; }

/*
 * The VSL poster under the hero reuses the voice section's facade (.vd-*). Its
 * frame is light, so the dimming gradient goes, the play button sits under the
 * frame's headline instead of over the chat, and the duration moves left so the
 * frame's own "Demo account" tag stays readable.
 */
#hero-demo { scroll-margin-top: 88px; }
.hero-vsl .vd-facade::after { display: none; }
.hero-vsl .vd-play { left: 64%; top: 71%; }
.hero-vsl .vd-dur { right: auto; left: 14px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { text-align: center; }
  .hero-copy .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}
@media (max-width: 400px) { .hd-screen { height: 486px; } }

@media (prefers-reduced-motion: no-preference) {
  .hd-dots {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
    background: #0e6f66; border-radius: inherit;
  }
  .hd-dots i {
    width: 6px; height: 6px; border-radius: 50%; background: #bff3ec; opacity: .45;
    animation: hd-blink 1s infinite;
  }
  .hd-dots i:nth-child(2) { animation-delay: .15s; }
  .hd-dots i:nth-child(3) { animation-delay: .3s; }
  @keyframes hd-blink { 50% { opacity: 1; transform: translateY(-2px); } }
  .hd-bars i { animation: hd-bar 1.1s ease-in-out infinite; }
  .hd-bars i:nth-child(odd) { animation-delay: .25s; }
  .hd-bars i:nth-child(3n) { animation-delay: .5s; }
  @keyframes hd-bar { 50% { transform: scaleY(.55); background: var(--teal); } }
  .hd-s1 { animation: hd-s1 18.0s infinite both; }
  .hd-s2 { animation: hd-s2 18.0s infinite both; }
  .hd-s3 { animation: hd-s3 18.0s infinite both; }
  .hd-s3 .hd-text { animation: hd-s3-text 18.0s infinite both; }
  .hd-s3 .hd-dots { animation: hd-s3-dots 18.0s infinite both; }
  .hd-s4 { animation: hd-s4 18.0s infinite both; }
  .hd-s5 { animation: hd-s5 18.0s infinite both; }
  .hd-s5 .hd-text { animation: hd-s5-text 18.0s infinite both; }
  .hd-s5 .hd-dots { animation: hd-s5-dots 18.0s infinite both; }
  .hd-s6 { animation: hd-s6 18.0s infinite both; }
}

/* Generated: the loop timeline (18 s), one keyframe set per step. */
@media (prefers-reduced-motion: no-preference) {
@keyframes hd-s1 {
  0%, 1.611% { opacity: 0; transform: translateY(10px) scale(.97); }
  3.611%, 90.000% { opacity: 1; transform: none; }
  95.556%, 100% { opacity: 0; transform: none; }
}
@keyframes hd-s2 {
  0%, 14.389% { opacity: 0; transform: translateY(10px) scale(.97); }
  16.389%, 90.000% { opacity: 1; transform: none; }
  95.556%, 100% { opacity: 0; transform: none; }
}
@keyframes hd-s3 {
  0%, 19.944% { opacity: 0; transform: translateY(10px) scale(.97); }
  21.944%, 90.000% { opacity: 1; transform: none; }
  95.556%, 100% { opacity: 0; transform: none; }
}
@keyframes hd-s3-text {
  0%, 27.167% { opacity: 0; }
  28.333%, 90.000% { opacity: 1; }
  95.556%, 100% { opacity: 0; }
}
@keyframes hd-s3-dots {
  0%, 21.111% { opacity: 0; }
  22.222%, 26.944% { opacity: 1; }
  27.778%, 100% { opacity: 0; }
}
@keyframes hd-s4 {
  0%, 39.944% { opacity: 0; transform: translateY(10px) scale(.97); }
  41.944%, 90.000% { opacity: 1; transform: none; }
  95.556%, 100% { opacity: 0; transform: none; }
}
@keyframes hd-s5 {
  0%, 44.389% { opacity: 0; transform: translateY(10px) scale(.97); }
  46.389%, 90.000% { opacity: 1; transform: none; }
  95.556%, 100% { opacity: 0; transform: none; }
}
@keyframes hd-s5-text {
  0%, 50.500% { opacity: 0; }
  51.667%, 90.000% { opacity: 1; }
  95.556%, 100% { opacity: 0; }
}
@keyframes hd-s5-dots {
  0%, 45.556% { opacity: 0; }
  46.667%, 50.278% { opacity: 1; }
  51.111%, 100% { opacity: 0; }
}
@keyframes hd-s6 {
  0%, 58.833% { opacity: 0; transform: translateY(10px) scale(.97); }
  60.833%, 90.000% { opacity: 1; transform: none; }
  95.556%, 100% { opacity: 0; transform: none; }
}
}
