:root {
  --green: #38b54a;
  --green-dark: #2c9a3c;
  --green-light: #52c463;
  --cobalt: #38b54a;
  --cobalt-light: #52c463;
  --cobalt-dark: #2c9a3c;
  --navy: #0e1418;
  --red: #38b54a;
  --grey: #6b7280;
  --grey-light: #9ca3af;
  --line: rgba(255,255,255,0.12);
  --shadow-cobalt: 0 10px 30px rgba(56,181,74,0.4);
}
@keyframes fabIn { to { opacity: 1; transform: translateY(0); } }
/* ========== FLOATING TALK BUTTON (Tom on Tap) ========== */
.talk-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 50;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-light));
  color: white;
  padding: 0;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  display: inline-flex; align-items: center;
  box-shadow: var(--shadow-cobalt);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  overflow: hidden;
  opacity: 0; transform: translateY(20px);
  animation: fabIn 0.6s 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.talk-fab:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 48px rgba(27, 77, 219, 0.5);
}
.talk-fab-avatar {
  width: 52px; height: 52px;
  background: url('../assets/tom-mini.png') center/cover no-repeat;
  border-radius: 50%;
  margin: 6px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px white;
}
.talk-fab-avatar::after {
  content: '';
  position: absolute;
  bottom: 2px; right: 2px;
  width: 14px; height: 14px;
  background: #6dffba;
  border-radius: 50%;
  border: 3px solid white;
  animation: livePulse 1.6s ease-out infinite;
}
.talk-fab-text {
  padding: 0 22px 0 6px;
  white-space: nowrap;
  font-weight: 700;
  display: flex; flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.talk-fab-text small {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.02em;
}
@media (max-width: 520px) {
  .talk-fab { bottom: 16px; right: 16px; }
  .talk-fab-text { padding-right: 16px; }
  .talk-fab-text small { display: none; }
}
/* FAB hides when footer is in view (nav.js IntersectionObserver) */
.talk-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.talk-fab {
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s;
}
/* ========== MODAL ========== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 27, 45, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
  opacity: 0; transition: opacity 0.3s;
}
.modal-backdrop.is-open { display: flex; opacity: 1; }
.modal {
  background: white; border-radius: 28px;
  max-width: 480px; width: 100%;
  padding: 44px 40px 36px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(15, 27, 45, 0.4);
  transform: scale(0.85) translateY(40px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-backdrop.is-open .modal {
  transform: scale(1) translateY(0); opacity: 1;
}
.modal-tom {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--cobalt) center/cover no-repeat;
  margin: 0 auto 24px;
  border: 5px solid var(--cobalt);
  box-shadow: var(--shadow-cobalt);
  position: relative;
}
.modal-tom::after {
  content: '';
  position: absolute; bottom: 4px; right: 4px;
  width: 24px; height: 24px;
  background: #6dffba;
  border-radius: 50%;
  border: 4px solid white;
  animation: livePulse 1.6s ease-out infinite;
}
.modal h3 { margin-bottom: 14px; }
.modal p { color: var(--grey); margin-bottom: 28px; font-size: 1.02rem; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; }
.modal .btn { width: 100%; justify-content: center; }
.modal-close {
  margin-top: 20px;
  color: var(--grey); font-size: 0.9rem;
  cursor: pointer;
  background: transparent;
}
.modal-close:hover { color: var(--navy); }
html[data-screenshot="true"] .hero-line,
html[data-screenshot="true"] .hero-sub,
html[data-screenshot="true"] .hero-ctas,
html[data-screenshot="true"] .hero-badge,
html[data-screenshot="true"] .hero-image,
html[data-screenshot="true"] .hero-speech-bubble,
html[data-screenshot="true"] .talk-fab {
  opacity: 1 !important; transform: none !important; animation: none !important;
}
/* ============================================================
   FAB — amped glow
   ============================================================ */
.talk-fab {
  box-shadow:
    0 0 32px rgba(74, 130, 255, 0.55),
    0 12px 40px rgba(27, 77, 219, 0.4) !important;
}
.talk-fab:hover {
  box-shadow:
    0 0 48px rgba(74, 130, 255, 0.8),
    0 0 96px rgba(74, 130, 255, 0.3),
    0 16px 48px rgba(27, 77, 219, 0.5) !important;
}
/* ============================================================
   TOM ON TAP — chat modal UI
   ============================================================ */

.tom-chat-modal {
  max-width: 540px !important;
  width: 100% !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
}
.tom-chat-header {
  background: linear-gradient(135deg, var(--cobalt) 0%, var(--cobalt-dark) 100%);
  color: white;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.tom-chat-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom,
      rgba(255,255,255,0.04) 0px,
      rgba(255,255,255,0.04) 1px,
      transparent 1px,
      transparent 4px);
  background-size: 100% 4px;
  pointer-events: none;
}
.tom-chat-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: white center/cover no-repeat;
  border: 3px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 24px rgba(74, 130, 255, 0.6);
  position: relative;
  flex-shrink: 0;
}
.tom-chat-live {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 14px; height: 14px;
  background: #6dffba;
  border-radius: 50%;
  border: 3px solid var(--cobalt);
  animation: livePulse 1.6s ease-out infinite;
}
.tom-chat-id {
  flex: 1;
  position: relative;
}
.tom-chat-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.tom-chat-status {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tom-chat-status .dots {
  display: inline-flex;
  gap: 2px;
}
.tom-chat-status .dots span {
  animation: dotPulse 1.4s infinite;
}
.tom-chat-status .dots span:nth-child(2) { animation-delay: 0.2s; }
.tom-chat-status .dots span:nth-child(3) { animation-delay: 0.4s; }
.tom-chat-timer {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 6px 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  letter-spacing: 0.04em;
  position: relative;
}
.tom-chat-timer.tom-timer-warn {
  background: var(--red);
  animation: timerPulse 1s ease-in-out infinite;
}
.tom-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  background: linear-gradient(180deg, #f7f4ee 0%, #fbf8f3 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  max-height: 50vh;
}
.tom-chat-form {
  display: flex;
  gap: 10px;
  padding: 16px 22px;
  background: white;
  border-top: 1px solid var(--line);
}
.tom-chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--navy);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tom-chat-form input:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(27, 77, 219, 0.12);
}
.tom-chat-form input:disabled {
  background: #f5f1e8;
  cursor: not-allowed;
}
.tom-chat-form .btn {
  padding: 12px 22px;
  font-size: 0.95rem;
}
.tom-chat-hangup {
  padding: 12px;
  background: #f5f1e8;
  color: var(--red);
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s;
}
.tom-chat-hangup:hover {
  background: #f0e9d8;
}
/* ============================================================
   TOM ON TAP — voice modal additions (v2 — voice-first)
   ============================================================ */

.tom-voice-body {
  background: linear-gradient(180deg, #f7f4ee 0%, #fbf8f3 100%);
  padding: 24px 22px 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.tom-voice-tom {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(74, 130, 255, 0.3) 0%,
    rgba(217, 35, 64, 0.1) 50%,
    transparent 70%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
  flex-shrink: 0;
}
.tom-voice-tom img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(74, 130, 255, 0.45))
          drop-shadow(0 12px 22px rgba(15, 27, 45, 0.3));
  position: relative;
  z-index: 1;
  transform: none;
}
.tom-voice-aura {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(27, 77, 219, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.tom-voice-tom.is-live {
  transform: scale(1.05);
  animation: tomBreath 3s ease-in-out infinite;
}
.tom-voice-tom.is-live .tom-voice-aura {
  opacity: 1;
  animation: tomAuraPulse 1.8s ease-out infinite;
}
.tom-voice-helper {
  text-align: center;
  font-size: 0.95rem;
  color: var(--grey);
  max-width: 360px;
  line-height: 1.5;
}
.tom-voice-helper strong {
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
}
.tom-voice-mic-note {
  font-size: 0.82rem;
  color: var(--grey-light);
  display: inline-block;
  margin-top: 6px;
}
.tom-voice-controls {
  padding: 14px 22px 18px;
  background: white;
  border-top: 1px solid var(--line);
}
.tom-voice-call {
  width: 100%;
  justify-content: center;
  padding: 18px 28px;
  font-size: 1.05rem;
}
/* Status states */
.tom-chat-status.is-live {
  color: #6dffba;
  font-weight: 600;
}
.tom-chat-status.is-error {
  color: #ffb38a;
  font-weight: 600;
}
.tom-chat-status.is-connecting {
  opacity: 0.85;
}
@media (max-width: 540px) {
  .tom-voice-body { padding: 20px 16px 16px; min-height: 180px; gap: 14px; }
  .tom-voice-tom { width: 120px; height: 120px; }
  .tom-voice-helper strong { font-size: 0.95rem; }
}
/* ============================================================
   TOM ON TAP — consent box (single-checkbox, human verify proxy)
   ============================================================ */
.tom-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(74, 130, 255, 0.06);
  border: 1px solid rgba(74, 130, 255, 0.18);
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.tom-consent:hover {
  background: rgba(74, 130, 255, 0.1);
  border-color: rgba(74, 130, 255, 0.3);
}
.tom-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--cobalt, #1b4ddb);
  cursor: pointer;
}
.tom-consent span {
  flex: 1;
}
/* Armed (consent given) button glow */
.tom-voice-call.is-armed {
  box-shadow:
    0 0 0 0 rgba(74, 130, 255, 0),
    0 12px 36px rgba(27, 77, 219, 0.5);
  animation: tomArmedPulse 2.4s ease-out infinite;
}
.tom-voice-call:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
/* ============================================================
   TOM ON TAP — pre-call intake form (name, email, phone, topic)
   Added 2026-07-23. Runs BEFORE the voice call panel.
   ============================================================ */

.tom-intake {
  background: linear-gradient(180deg, #f9f6f0 0%, #fbf8f3 100%);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}
.tom-intake-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy, #002868);
  line-height: 1.2;
}
.tom-intake-sub {
  font-size: 0.92rem;
  opacity: 0.75;
  margin-bottom: 8px;
}
.tom-intake-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--navy, #002868);
  opacity: 0.75;
  margin-top: 4px;
}
.tom-intake-label small {
  font-weight: 500;
  opacity: 0.7;
  text-transform: none;
  letter-spacing: 0;
}
.tom-intake-input {
  width: 100%;
  padding: 11px 13px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  border: 1px solid #d8d0c0;
  border-radius: 8px;
  color: #1a1a1a;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tom-intake-input:focus {
  outline: none;
  border-color: var(--red, #d4202c);
  box-shadow: 0 0 0 3px rgba(212, 32, 44, 0.12);
}
.tom-intake-textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}
.tom-intake-topics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 4px 0;
}
.tom-intake-topic {
  padding: 12px 10px;
  background: #fff;
  border: 1px solid #d8d0c0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy, #002868);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  line-height: 1.3;
}
.tom-intake-topic small {
  display: block;
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.78rem;
  margin-top: 3px;
}
.tom-intake-topic:hover {
  border-color: var(--red, #d4202c);
  background: #fff8f0;
}
.tom-intake-topic.is-selected {
  border-color: var(--red, #d4202c);
  background: linear-gradient(180deg, #fff2ec 0%, #fee 100%);
  box-shadow: 0 2px 8px rgba(212, 32, 44, 0.15);
}
.tom-intake-continue {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}
.tom-intake-continue:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tom-intake-edit {
  background: transparent;
  border: none;
  color: rgba(0, 40, 104, 0.6);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px;
  margin-top: -6px;
  text-decoration: underline;
}
.tom-intake-edit:hover { color: var(--red, #d4202c); }
@media (max-width: 540px) {
  .tom-intake-topics { grid-template-columns: 1fr; }
  .tom-intake { padding: 18px 16px 14px; }
  .tom-intake-title { font-size: 1.15rem; }
}

/* ---- Strong Roofing brand (green) ---- */
.talk-fab { background:linear-gradient(135deg,#38b54a,#2c9a3c) !important; }
.tom-intake-continue, .tom-voice-call { background:#38b54a !important; border-color:#38b54a !important; color:#fff !important; }
.tom-intake-continue:hover, .tom-voice-call:hover { background:#2c9a3c !important; }
.tom-intake-topic.is-selected { border-color:#38b54a !important; box-shadow:0 0 0 2px rgba(56,181,74,.35) !important; }
