/* Homepage-specific styles */

/* HERO */
.hero {
  padding: 64px 0 80px;
  position: relative;
}
@media (max-width: 640px) { .hero { padding: 40px 0 56px; } }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 1180px) { .hero-cards { display: none; } .hero-inner { grid-template-columns: 1fr; } }

.hero h1 { font-size: clamp(44px, 5.6vw, 76px); line-height: 1.04; margin-bottom: 24px; }
.hero h1 .ai-word {
  font-family: var(--script);
  color: var(--blue);
  display: inline-block;
  position: relative;
  margin: 0 0.32em 0 0.06em;
  font-size: 1.05em;
  line-height: 1;
}
.hero h1 .ai-word .underline {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -0.18em;
  width: 112%;
  height: 14px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.hero .subhead {
  font-size: 18px;
  color: var(--ink-3);
  max-width: 54ch;
  margin-bottom: 28px;
  line-height: 1.55;
}
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 540px; border-top: 1px solid var(--line); padding-top: 22px; }
.hero-meta .stat { font-family: var(--sans); }
.hero-meta .stat .big { font-family: var(--serif); font-size: 26px; color: var(--ink); line-height: 1.05; margin-bottom: 4px; }
.hero-meta .stat .label { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
@media (max-width: 640px) { .hero-meta { grid-template-columns: 1fr; gap: 14px; } }

/* Floating hero cards */
.hero-cards { position: relative; min-height: 480px; }
.float-card {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 44px rgba(26, 35, 50,0.08);
  width: 280px;
  animation: bob 6s ease-in-out infinite;
}
.float-card.chat  { top: 0;    right: 20px; --r: -2deg; }
.float-card.voice { top: 200px; left: 0;     --r: 1.5deg; animation-delay: -2s; }
.float-card.score { bottom: 0;  right: 0;    width: 260px; --r: -1deg; animation-delay: -4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-8px) rotate(var(--r, 0deg)); }
}

.float-card .fc-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 12px; }
.float-card .msg { font-size: 13.5px; padding: 9px 12px; border-radius: 12px; margin-bottom: 8px; line-height: 1.4; }
.float-card .msg.user { background: var(--paper-2); color: var(--ink-2); border-bottom-right-radius: 4px; margin-left: 30px; }
.float-card .msg.bot { background: var(--blue); color: #fff; border-bottom-left-radius: 4px; margin-right: 30px; }
.float-card .line { font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; line-height: 1.45; }
.float-card .line .who { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); display: block; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px; }
.float-card .score-row { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.float-card .score-row:last-child { border-bottom: none; }
.float-card .score-row b { color: var(--blue); font-weight: 600; font-family: var(--mono); }

/* WHY NOW */
.why { background: var(--paper-2); }
.why .split { gap: 64px; align-items: start; }
.why .split h2 { max-width: 14ch; margin-bottom: 0; }
.why .split p { font-size: 17px; color: var(--ink-2); line-height: 1.6; }
.why .split p:first-child { margin-top: 4px; }
@media (max-width: 1080px) { .why .split { gap: 24px; } }

/* SERVICES section */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
@media (max-width: 1080px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}
.svc-card:hover { border-color: var(--blue); box-shadow: 0 14px 34px rgba(74, 144, 196,0.08); transform: translateY(-2px); }
.svc-visual {
  height: 120px;
  background: linear-gradient(135deg, var(--paper-2), #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.svc-card h3 { font-size: 22px; margin-bottom: 10px; min-height: 1.6em; }
.svc-card p { color: var(--ink-3); font-size: 14.5px; line-height: 1.55; margin: 0 0 16px; }
.svc-card .svc-cta { font-family: var(--mono); font-size: 12px; color: var(--blue); text-transform: uppercase; letter-spacing: 0.1em; margin-top: auto; }

/* CHAT DEMO */
.demo-chat { background: var(--paper-2); }
.demo-chat > .container > h2 { margin-bottom: 14px; }
.demo-chat > .container > p { font-size: 17px; color: var(--ink-3); margin: 0; max-width: 60ch; line-height: 1.55; }
.demo-chat .split { grid-template-columns: 1.4fr 1fr; gap: 48px; margin-top: 36px !important; align-items: stretch; }
.demo-chat .split > div:last-child { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 1080px) { .demo-chat .split { grid-template-columns: 1fr; gap: 28px; } .demo-chat .split > div:last-child { justify-content: flex-start; } }
.chat-window {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

/* GHL inline embed mount — hosts widget B (embedded display type in GHL admin) */
.ghl-mount {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}
.ghl-mount > div { width: 100%; height: 100%; min-height: 456px; }
.ghl-mount chat-widget { display: block; width: 100%; height: 100%; min-height: 456px; }
.chat-feed { flex: 1; overflow-y: auto; padding-right: 6px; min-height: 260px; }
.chat-feed .m { padding: 10px 14px; border-radius: 14px; margin-bottom: 10px; max-width: 80%; font-size: 14.5px; line-height: 1.45; }
.chat-feed .m.bot { background: var(--paper-2); color: var(--ink-2); border-bottom-left-radius: 4px; }
.chat-feed .m.user { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; margin-left: auto; }
.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chat-chips button {
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: var(--sans);
}
.chat-chips button:hover { border-color: var(--blue); color: var(--blue); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14.5px;
  outline: none;
}
.chat-input-row input:focus { border-color: var(--blue); }

.whats-happening { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.whats-happening .step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.whats-happening .step .n { font-family: var(--mono); color: var(--blue); font-size: 13px; }
.whats-happening .step b { font-family: var(--sans); display: block; margin-bottom: 4px; }
.whats-happening .step p { font-size: 14px; color: var(--ink-3); margin: 0; line-height: 1.5; }

/* VOICE DEMO — dark section, prominent unified play+mute control */
.demo-voice {
  background: linear-gradient(180deg, #2E4A6B 0%, #3B5A82 100%);
  color: #fff;
  transition: background 0.6s ease;
}
.demo-voice.is-playing {
  background: linear-gradient(180deg, #355476 0%, #45669A 100%);
}
.demo-voice .eyebrow { color: rgba(255,255,255,0.65); }
.demo-voice h2 { color: #fff; }
.demo-voice p { color: rgba(255,255,255,0.78); }
.demo-voice .voice-timer { color: rgba(255,255,255,0.85); }

.voice-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; min-height: 400px; }
@media (max-width: 1080px) { .voice-grid { grid-template-columns: 1fr; gap: 32px; } }

.voice-controls {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Unified control: locked-width pill containing play + mute + volume */
.voice-control-group {
  display: inline-flex;
  align-items: center;
  background: var(--blue);
  border-radius: 999px;
  padding: 4px;
  height: 64px;
  box-sizing: border-box;
  box-shadow: 0 6px 20px rgba(74,144,196,0.35);
  transition: box-shadow 0.2s;
  flex-shrink: 0;
}
.voice-control-group:hover { box-shadow: 0 10px 28px rgba(74,144,196,0.45); }

.demo-voice.is-playing .voice-control-group {
  animation: voicePulse 1.8s ease-out infinite;
}
@keyframes voicePulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,144,196,0.6), 0 6px 20px rgba(74,144,196,0.35); }
  70%  { box-shadow: 0 0 0 14px rgba(74,144,196,0), 0 6px 20px rgba(74,144,196,0.35); }
  100% { box-shadow: 0 0 0 0 rgba(74,144,196,0), 0 6px 20px rgba(74,144,196,0.35); }
}

.voice-play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  border: none;
  color: var(--blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.voice-play .play-icon { font-size: 18px; line-height: 1; margin-left: 2px; }
.voice-play:hover { background: #FAFBFC; }

.voice-mute {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: transparent;
  border: none;
  color: #fff;
  padding: 0 18px;
  height: 56px;
  min-width: 138px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-left: 1px solid rgba(255,255,255,0.25);
  margin-left: 4px;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.voice-mute:hover { opacity: 0.85; }
.voice-mute .speaker-icon { display: block; }
.voice-mute .mute-label { white-space: nowrap; }
.voice-mute.is-unmuted .mute-slash { display: none; }

@media (max-width: 480px) {
  .voice-mute .mute-label { display: none; }
  .voice-mute { padding: 0 16px; }
}

/* Transcript viewport: chat-feed style, scrolls bottom-up as audio plays */
.transcript {
  position: relative;
  height: 400px;
  overflow: hidden;
  /* Layered mask: vertical fade for top/bottom of the scroll feed +
     horizontal fade so the highlighted line's glow falls off softly on left/right
     instead of being chopped at the container edge. */
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%),
    linear-gradient(90deg,  transparent 0%, #000 6%,  #000 94%, transparent 100%);
          mask-image:
    linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%),
    linear-gradient(90deg,  transparent 0%, #000 6%,  #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.transcript .stack {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.3, 1);
  will-change: transform;
  transform: translateY(0);
}
.transcript .line {
  padding: 12px 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  opacity: 0.12;
  transition: opacity 0.6s ease, background 0.5s, transform 0.5s, box-shadow 0.5s;
  flex: 0 0 auto;
  max-width: 92%;
}
.transcript .line.is-current {
  opacity: 1;
  background: rgba(140,197,232,0.18);
  border-color: rgba(140,197,232,0.45);
  box-shadow: 0 10px 28px rgba(140,197,232,0.28), 0 0 0 1px rgba(140,197,232,0.32);
  transform: scale(1.015);
}
.transcript .line.is-prev   { opacity: 0.42; }
.transcript .line.is-prev-2 { opacity: 0.16; }
.transcript .line.is-next   { opacity: 0.42; }
.transcript .line.is-next-2 { opacity: 0.16; }

.transcript .line .who {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}
.transcript .line.is-current .who { color: #8CC5E8; }
.transcript .line .what { color: #fff; font-size: 13px; line-height: 1.45; }

@media (max-width: 1080px) {
  .transcript { height: 340px; }
  .voice-grid { min-height: 0; align-items: start; }
}

/* AIO CHECKER */
.aio { background: var(--paper-2); }
.aio > .container > h2 { margin-bottom: 14px; }
.aio > .container > p { font-size: 17px; line-height: 1.55; }
.aio-form {
  display: flex;
  max-width: 600px;
  margin: 32px auto 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  align-items: center;
}
.aio-form .prefix { padding: 0 14px; color: var(--ink-4); font-family: var(--mono); font-size: 14px; }
.aio-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 6px;
  font-size: 15px;
  font-family: var(--sans);
  outline: none;
  min-width: 0;
}
.aio-form button { white-space: nowrap; }
.aio-result { max-width: 840px; margin: 40px auto 0; display: none; }
.aio-result.show { display: block; }
.aio-score-big { font-family: var(--serif); font-size: 80px; line-height: 1; color: var(--blue); text-align: center; }
.aio-summary { text-align: center; color: var(--ink-2); max-width: 58ch; margin: 14px auto 28px; }
.aio-engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 880px) { .aio-engines { grid-template-columns: 1fr 1fr; } }
.aio-engine { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.aio-engine .name { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); }
.aio-engine .score { font-family: var(--serif); font-size: 34px; color: var(--ink); margin: 6px 0; line-height: 1; }
.aio-engine .note { font-size: 13px; color: var(--ink-3); line-height: 1.45; }

/* PROCESS */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 28px; }
.process-step { padding: 32px 26px; border-right: 1px solid var(--line); }
.process-step:last-child { border-right: none; }
.process-step .n { font-family: var(--mono); font-size: 12.5px; color: var(--blue); margin-bottom: 14px; }
.process-step h3 { font-size: 22px; margin-bottom: 10px; }
.process-step p { font-size: 14.5px; color: var(--ink-3); margin: 0; line-height: 1.55; }
@media (max-width: 1080px) {
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-step:nth-child(2) { border-right: none; }
  .process-step:nth-child(1), .process-step:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .process-grid { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid var(--line); padding: 26px 0; }
  .process-step:last-child { border-bottom: none; }
}

/* TESTIMONIALS */
.testi { background: var(--paper-2); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 28px; }
@media (max-width: 1080px) { .testi-grid { grid-template-columns: 1fr; } }
.testi-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.testi-card blockquote { margin: 0 0 18px; font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--ink); }
.testi-card .by { font-size: 13.5px; color: var(--ink-3); }
.testi-card .by b { color: var(--ink); }

/* ===== LEAD MAGNET ===== */
.lead-magnet { padding: 80px 0; }
.lead-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
  position: relative;
}
@media (max-width: 1080px) { .lead-grid { grid-template-columns: 1fr; gap: 36px; } }

.lead-grid h2 { max-width: 18ch; margin-top: 4px; }
.lead-checks { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.lead-checks li {
  font-size: 15.5px;
  color: var(--ink-2);
  padding-left: 26px;
  position: relative;
  line-height: 1.5;
}
.lead-checks li::before {
  content: '✓';
  position: absolute;
  left: 12px;
  top: 0;
  color: var(--blue);
  font-weight: 700;
}

.lead-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lead-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(74, 144, 196, 0.10);
  padding: 7px 12px;
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 8px;
}
.lead-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lead-form input {
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  outline: none;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}
.lead-form input:focus { border-color: var(--blue); }
.lead-form button { margin-top: 6px; align-self: flex-start; }
.lead-fine { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; line-height: 1.5; }

.lead-success {
  display: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 32px;
  text-align: center;
}
.lead-success.show { display: block; }
.lead-success .check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(74,144,196,0.12);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
}
.lead-success h3 { font-size: 24px; margin: 0 0 8px; }
.lead-success p { color: var(--ink-3); margin: 0; }

/* Volume slider inside the play/mute pill */
.voice-volume {
  display: inline-flex;
  align-items: center;
  padding: 0 18px 0 12px;
  height: 56px;
  border-left: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.voice-volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 0;
}
.voice-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
}
.voice-volume input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}
@media (max-width: 640px) {
  .voice-volume input[type="range"] { width: 70px; }
}


/* Home voice-demo play button: loading state */
.voice-play.is-loading { cursor: progress; }
.voice-play.is-loading::before {
  content: "";
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: voicePlaySpin 0.7s linear infinite;
}
.voice-play.is-loading .play-icon { display: none; }
@keyframes voicePlaySpin { to { transform: rotate(360deg); } }
