/* ==========================================================================
   ApexAir Comfort — Ultra-Clean Single-Page HVAC Website
   - Clean Top Navigation ("Brands", "New Install") with zero top bubbles
   - In-Place Interaction Slot: Concise Contact Form gets directly replaced by
     the Live HVAC Dispatch Assistant when the Blue Button is triggered
   - California Rooftop Commercial HVAC Hero Photo with Gentle Pan Only
   ========================================================================== */

:root {
  --bg-page: #dce5f2;
  --bg-surface: #ffffff;
  --bg-frosted: rgba(255, 255, 255, 0.95);

  /* Blue Launch Button & Outline Aesthetic */
  --launch-blue-grad: linear-gradient(135deg, #0d2149 0%, #1d4ed8 100%);
  --launch-blue-border: #38bdf8;
  --outline-blue-active: #1d4ed8;
  --outline-blue-fill: #e0ecff;
  --outline-rest: #94a3b8;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --shadow-sm: 0 4px 14px rgba(15, 33, 73, 0.06);
  --shadow-md: 0 16px 38px rgba(15, 33, 73, 0.13);
  --shadow-blue: 0 14px 32px rgba(29, 78, 216, 0.28);

  --radius-input: 0.55rem;
  --radius-chip: 0.75rem;
  --radius-card: 1.1rem;
  --radius-frame: 1.45rem;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: var(--font-sans);
  background: radial-gradient(circle at 15% 15%, #eef4fc 0%, #d8e3f2 55%, #cbd8ec 100%);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ==========================================================================
   Single-Page Shell
   ========================================================================== */
.single-page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. Clean Top Header Bar with Sleek Navigation ("Brands", "New Install")
   ========================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid #bfd2eb;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.28rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.brand-sub {
  color: var(--outline-blue-active);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding-block: 0.45rem;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--outline-blue-active);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--outline-blue-active);
  outline: none;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* ==========================================================================
   2. Main Single-Page Stage
   ========================================================================== */
.main-stage {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: 1.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  gap: 2rem;
}

/* Left Main Card — Conforms to the blue outline theme */
.hero-content {
  background: var(--bg-frosted);
  backdrop-filter: blur(16px);
  border: 2px solid #93c5fd;
  border-radius: var(--radius-frame);
  padding: 1.65rem 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.95rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.35vw, 2.2rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-block-end: 0.5rem;
}

.text-accent {
  color: var(--outline-blue-active);
}

.hero-description {
  font-size: 0.89rem;
  color: var(--text-secondary);
  line-height: 1.52;
  margin-block-end: 0.35rem;
}

.hero-description strong {
  color: var(--text-primary);
  font-weight: 700;
}

.hero-sub-credential {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e3a8a;
}

/* ==========================================================================
   3. IN-PLACE INTERACTION SLOT
      Holds the Concise Contact Form by default, and swaps directly to the
      HVAC Dispatch Assistant when the Blue Button is clicked/hovered!
   ========================================================================== */
.interaction-slot {
  position: relative;
  min-height: 295px;
  display: flex;
  flex-direction: column;
}

/* VIEW A: CONCISE CONTACT FORM (Name, Email, Phone, Message, GET FREE QUOTE) */
.concise-quote-form {
  flex: 1;
  background: #f4f8fd;
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-card);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: slotFadeIn 0.22s ease-out;
}

.concise-quote-form[hidden] {
  display: none;
}

@keyframes slotFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.concise-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.85rem;
  margin-block-end: 0.8rem;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-block-end: 0.22rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: #ffffff;
  border: 1.5px solid var(--outline-rest);
  border-radius: var(--radius-input);
  padding: 0.52rem 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input {
  height: 38px;
}

.form-field textarea {
  resize: vertical;
  min-height: 52px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #94a3b8;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--outline-blue-active);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.form-field input.is-invalid {
  border-color: #dc2626;
  background: #fef2f2;
}

.btn-get-quote {
  width: 100%;
  height: 42px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--outline-blue-fill);
  color: #1e3a8a;
  border: 2px solid var(--outline-blue-active);
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-get-quote:hover {
  background: var(--outline-blue-active);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.25);
}

.quote-status-msg {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #047857;
  text-align: center;
}

.quote-status-msg[hidden] {
  display: none;
}

/* ==========================================================================
   VIEW B: IN-PLACE HVAC DISPATCH ASSISTANT (Directly replaces the Contact Form!)
   ========================================================================== */
.bot-inline-panel {
  flex: 1;
  background: #ffffff;
  border: 2px solid var(--launch-blue-border);
  border-radius: var(--radius-card);
  box-shadow: 0 14px 36px rgba(13, 33, 73, 0.18), 0 0 18px rgba(56, 189, 248, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slotFadeIn 0.22s ease-out;
}

.bot-inline-panel[hidden] {
  display: none;
}

.bot-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--launch-blue-grad);
  color: #ffffff;
  border-bottom: 1.5px solid var(--launch-blue-border);
}

.bot-header-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  padding: 0.2rem 0;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.2s ease;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bot-header-status-btn:hover {
  opacity: 0.88;
}

.bot-header-status-btn:focus-visible {
  outline: 2px solid #22f5e3;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Active State: Uses Robot Eye Color (Teal: #22f5e3) without circle outline */
.bot-header-status-btn[data-connected="true"] {
  background: transparent;
  border: none;
  box-shadow: none;
}

.bot-header-status-btn[data-connected="true"] .bot-panel-title,
.bot-header-status-btn[data-connected="true"] #botStatusLabel {
  color: #22f5e3;
  text-shadow: 0 0 8px rgba(34, 245, 227, 0.65);
}

.bot-header-status-btn[data-connected="true"] .status-led {
  background: #22f5e3;
  box-shadow: 0 0 8px #22f5e3;
}

.status-led {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.status-led[data-state="listening"] {
  background: #22f5e3;
  box-shadow: 0 0 8px #22f5e3;
}

.status-led[data-state="speaking"] {
  background: #22f5e3;
  box-shadow: 0 0 8px #22f5e3;
}

.bot-panel-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  transition: color 0.22s ease;
}

.bot-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bot-back-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Side-by-Side In-Place Layout so the Robot & Visor fit the exact Contact Form footprint */
.bot-inline-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: stretch;
  flex: 1;
}

/* THE ROBOT STAGE & DIGITAL VISOR OVERLAY */
.bot-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #eef2f6 0%, #dbe4f0 100%);
  border-right: 1.5px solid #cbd5e1;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.bot-character-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.bot-stage[data-bot-state="listening"] .bot-character-img,
.bot-stage[data-bot-state="speaking"] .bot-character-img {
  transform: scale(1.06);
}

.bot-head-halo {
  position: absolute;
  top: 23%;
  left: 25%;
  width: 50%;
  height: 32%;
  border-radius: 28%;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 36px 12px rgba(34, 245, 227, 0.45);
  transition: opacity 0.35s ease;
}

.bot-stage[data-bot-state="listening"] .bot-head-halo,
.bot-stage[data-bot-state="speaking"] .bot-head-halo {
  opacity: 1;
  animation: haloPulse 2s ease-in-out infinite;
}

@keyframes haloPulse {
  0%, 100% {
    box-shadow: 0 0 28px 8px rgba(34, 245, 227, 0.4);
  }
  50% {
    box-shadow: 0 0 46px 16px rgba(6, 182, 212, 0.65);
  }
}

.bot-face-visor {
  position: absolute;
  left: 29.8%;
  top: 26.2%;
  width: 40.2%;
  height: 28.4%;
  border-radius: 24% / 28%;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.bot-stage[data-bot-state="listening"] .bot-face-visor,
.bot-stage[data-bot-state="speaking"] .bot-face-visor {
  opacity: 1;
  transform: scale(1.06);
}

.visor-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.eye-left,
.eye-right {
  transform-box: fill-box;
  transform-origin: center;
  animation: visorBlink 4.2s infinite;
}

@keyframes visorBlink {
  0%, 46%, 50%, 96%, 100% {
    transform: scaleY(1);
  }
  48% {
    transform: scaleY(0.08);
  }
}

.visor-mouth-smile {
  opacity: 1;
}

.brow-left,
.brow-right {
  transition: transform 0.3s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.bot-stage[data-bot-state="listening"] .brow-left {
  transform: translateY(-3px) rotate(-4deg);
}

.bot-stage[data-bot-state="listening"] .brow-right {
  transform: translateY(-3px) rotate(4deg);
}

.stage-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 33, 73, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  border: 1px solid var(--launch-blue-border);
}

.stage-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
}

.bot-stage[data-bot-state="listening"] .stage-badge-dot {
  background: #22f5e3;
  box-shadow: 0 0 8px #22f5e3;
}

.bot-stage[data-bot-state="speaking"] .stage-badge-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Right Side of In-Place Assistant: Conversation Transcript & 2 End-User Buttons */
.bot-conversation-box {
  padding: 1rem 1.15rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}

.bot-transcript {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-chip);
  padding: 0.85rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.chat-default-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.chat-company-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.chat-company-phone {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--outline-blue-active);
  letter-spacing: 0.01em;
}

.chat-will-pay-prompt {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.chat-will-pay-prompt strong {
  color: var(--outline-blue-active);
  font-weight: 800;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* Inline Fallback Text Input (For typing a phone number or address & pressing Enter) */
.bot-text-entry {
  display: flex;
  align-items: center;
  width: 100%;
}

.bot-text-entry[hidden] {
  display: none;
}

.bot-text-input {
  width: 100%;
  height: 38px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-primary);
  background: #ffffff;
  border: 1.5px solid var(--outline-blue-active);
  border-radius: var(--radius-input);
  padding: 0.4rem 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bot-text-input:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.16);
}

/* Two End-User Action Buttons ("Type Info" and "Disconnect") */
.bot-user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.55rem 0.5rem;
  border-radius: var(--radius-chip);
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.mode-chip:hover {
  border-color: var(--outline-blue-active);
  color: #1e3a8a;
}

.mode-chip.active {
  background: var(--outline-blue-fill);
  border-color: var(--outline-blue-active);
  color: #1e3a8a;
}

/* Highlight "Type Info" when bot is collecting parameters ($callback_num, $cust_email, $cust_address) */
.mode-chip.highlight-pulse {
  border-color: #0284c7;
  background: #f0f9ff;
  color: #0369a1;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), 0 0 12px rgba(56, 189, 248, 0.45);
  animation: typeInfoPulse 1.7s ease-in-out infinite;
}

@keyframes typeInfoPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), 0 0 8px rgba(56, 189, 248, 0.3);
    border-color: #0284c7;
  }
  50% {
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.45), 0 0 16px rgba(34, 245, 227, 0.7);
    border-color: #0ea5e9;
  }
}

/* Type Info morphs into active Enter button while typing */
.mode-chip.mode-chip-enter {
  background: var(--outline-blue-active);
  border-color: var(--outline-blue-active);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
  animation: none;
}

.mode-chip.mode-chip-enter:hover {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #ffffff;
}

.mode-chip-disconnect {
  background: #fef2f2;
  border-color: #dc2626;
  color: #b91c1c;
}

.mode-chip-disconnect:hover {
  background: #fee2e2;
  border-color: #b91c1c;
  color: #991b1b;
}

/* ==========================================================================
   4. THE BLUE URGENT DISPATCH LAUNCH BUTTON
      Original blue gradient & cyan/white two-line typography with a single
      thin coral accent highlight on the outside border.
   ========================================================================== */
.contact-dispatch-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-align: left;
  font-family: var(--font-sans);
  cursor: pointer;
  background: var(--launch-blue-grad);
  border: 1.5px solid #ff6b6b;
  border-radius: var(--radius-card);
  color: #ffffff;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.35), var(--shadow-blue);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.contact-dispatch-trigger:hover,
.contact-dispatch-trigger:focus-visible {
  transform: translateY(-2px);
  border-color: #ff8585;
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.55), 0 18px 36px rgba(13, 33, 73, 0.4);
  outline: none;
}

.dispatch-card-avatar {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid var(--launch-blue-border);
  overflow: hidden;
  flex-shrink: 0;
}

.dispatch-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dispatch-live-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
}

.dispatch-card-copy {
  flex: 1;
  min-width: 0;
}

.dispatch-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #38bdf8;
  margin-block-end: 0.18rem;
}

.dispatch-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22f5e3;
  box-shadow: 0 0 8px #22f5e3;
  flex-shrink: 0;
}

.dispatch-headline {
  display: block;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.015em;
  line-height: 1.22;
}

.dispatch-mic-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.16);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.contact-dispatch-trigger:hover .dispatch-mic-badge {
  background: #22f5e3;
  color: #0d2149;
  transform: scale(1.08);
}

/* ==========================================================================
   5. Right Hero Visual Column — California Rooftop Photo with Gentle Pan Only
   ========================================================================== */
.hero-visual {
  display: flex;
}

.hero-image-frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius-frame);
  border: 2px solid #38bdf8;
  box-shadow: 0 18px 42px rgba(13, 33, 73, 0.22);
  overflow: hidden;
  background: #0d2149;
  display: flex;
}

/* Slight, smooth ambient pan & warm golden-hour California color grading (No 3D tilt) */
.hero-img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: center center;
  filter: contrast(1.06) saturate(1.14) brightness(1.02) sepia(0.06);
  transform: scale(1.06);
  animation: heroSubtlePan 16s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroSubtlePan {
  0% {
    transform: scale(1.06) translate3d(-6px, 0px, 0px);
  }
  100% {
    transform: scale(1.1) translate3d(6px, -4px, 0px);
  }
}

/* ==========================================================================
   6. Responsive Breakpoints (Tablet & Mobile Phone Optimization)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .hero-img {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  .container {
    padding-inline: 0.9rem;
  }

  /* Sleek single-line mobile top header & navigation */
  .nav-container {
    min-height: 3.4rem;
    gap: 0.65rem;
  }

  .brand-logo {
    font-size: 1.08rem;
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .logo-icon {
    width: 1.65rem;
    height: 1.65rem;
  }

  .main-nav {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.88rem;
    padding-block: 0.4rem;
    white-space: nowrap;
  }

  /* Main stage & hero card spacing for phone screens */
  .main-stage {
    padding-block: 0.75rem 1.25rem;
  }

  .hero-content {
    padding: 1.1rem 1rem;
    border-radius: 1.15rem;
    gap: 0.85rem;
  }

  .hero-title {
    font-size: clamp(1.38rem, 6vw, 1.72rem);
    line-height: 1.18;
    margin-block-end: 0.4rem;
  }

  .hero-description {
    font-size: 0.85rem;
    line-height: 1.48;
  }

  .hero-sub-credential {
    font-size: 0.78rem;
    line-height: 1.38;
  }

  /* Contact form mobile optimization (16px inputs prevent iOS Safari auto-zoom) */
  .interaction-slot {
    min-height: auto;
  }

  .concise-quote-form {
    padding: 0.9rem;
  }

  .concise-fields-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-block-end: 0.75rem;
  }

  .form-field input,
  .form-field textarea,
  .bot-text-input {
    font-size: 1rem; /* 16px prevents iOS zoom on focus */
  }

  .form-field input {
    height: 42px;
  }

  .btn-get-quote {
    height: 44px;
    font-size: 0.86rem;
  }

  /* In-place HVAC Dispatch Assistant mobile & Android layout */
  .bot-panel-header {
    padding: 0.6rem 0.75rem;
    gap: 0.45rem;
  }

  .bot-header-status-btn {
    min-width: 0;
    flex: 1;
    padding: 0.15rem 0;
    gap: 0.4rem;
  }

  .bot-panel-title {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bot-back-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.32rem 0.6rem;
    font-size: 0.72rem;
    min-height: 36px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .bot-inline-body {
    grid-template-columns: 1fr;
    background: #f8fafc;
  }

  .bot-stage {
    border-right: none;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.9rem;
    max-width: 175px;
    margin: 0.7rem auto 0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .bot-conversation-box {
    padding: 0.75rem 0.8rem;
    gap: 0.55rem;
  }

  .bot-transcript {
    min-height: 72px;
    padding: 0.7rem 0.8rem;
    font-size: 0.84rem;
  }

  .mode-chip {
    min-height: 44px;
    font-size: 0.82rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* High-urgency dispatch button mobile optimization */
  .contact-dispatch-trigger {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
    border-radius: 0.95rem;
  }

  .dispatch-card-avatar {
    width: 46px;
    height: 46px;
  }

  .dispatch-kicker {
    font-size: 0.7rem;
    gap: 0.35rem;
    letter-spacing: 0.02em;
  }

  .dispatch-headline {
    font-size: 0.95rem;
    line-height: 1.24;
  }

  .dispatch-mic-badge {
    width: 36px;
    height: 36px;
  }

  .dispatch-mic-badge svg {
    width: 17px;
    height: 17px;
  }

  /* Compact hero photo on mobile */
  .hero-image-frame {
    border-radius: 1.15rem;
  }

  .hero-img {
    min-height: 250px;
    max-height: 310px;
  }
}

@media (max-width: 380px) {
  .brand-logo {
    font-size: 0.98rem;
  }

  .main-nav {
    gap: 0.75rem;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .dispatch-kicker {
    font-size: 0.65rem;
  }

  .dispatch-headline {
    font-size: 0.88rem;
  }

  /* Android 360px screen specific fine-tuning */
  .bot-panel-header {
    padding: 0.5rem 0.6rem;
    gap: 0.35rem;
  }

  .bot-header-status-btn {
    padding: 0.1rem 0;
    gap: 0.35rem;
  }

  .bot-panel-title {
    font-size: 0.72rem;
  }

  .bot-back-btn {
    padding: 0.28rem 0.5rem;
    font-size: 0.68rem;
  }

  .bot-stage {
    max-width: 155px;
  }

  .bot-conversation-box {
    padding: 0.65rem;
  }

  .bot-transcript {
    min-height: 64px;
    padding: 0.6rem 0.65rem;
    font-size: 0.8rem;
  }

  .mode-chip {
    font-size: 0.78rem;
    padding: 0.45rem 0.3rem;
  }
}

/* ==========================================================================
   6. Cinema Lightbox & Hero Video Playhead Overlay
   ========================================================================== */
.hero-image-frame {
  cursor: pointer;
}

.hero-image-frame:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: radial-gradient(circle at center, rgba(13, 33, 73, 0.25) 0%, rgba(5, 11, 20, 0.55) 100%);
  transition: background 0.3s ease;
  z-index: 5;
  pointer-events: none;
}

.hero-image-frame:hover .video-play-overlay {
  background: radial-gradient(circle at center, rgba(13, 33, 73, 0.15) 0%, rgba(5, 11, 20, 0.45) 100%);
}

.play-ripple {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.3);
  animation: playPulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes playPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.play-disc-btn {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.65), 0 8px 24px rgba(13, 33, 73, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.play-disc-btn svg {
  margin-left: 3px;
}

.hero-image-frame:hover .play-disc-btn {
  transform: scale(1.12);
  box-shadow: 0 0 42px rgba(56, 189, 248, 0.85), 0 12px 32px rgba(13, 33, 73, 0.5);
}

.play-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(5, 11, 20, 0.82);
  color: #38bdf8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.hero-image-frame:hover .play-badge {
  border-color: #38bdf8;
  color: #ffffff;
}

/* Lightbox Modal */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.video-lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.25s ease-out;
}

.lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #000000;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 189, 248, 0.25);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.lightbox-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(13, 33, 73, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: #0d2149;
  color: #38bdf8;
  border-color: #38bdf8;
  transform: scale(1.04);
}

.lightbox-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000000;
}

.lightbox-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
