/* ============================================================
   overrides.css — production fixes on top of the design CSS
   ============================================================ */

/* The design CSS references var(--brand-red) (hero "#1-Reviewed",
   form phone banner) but the token was never defined in
   colors_and_type.css. Map it to the brand emergency red. */
:root {
  --brand-red: var(--uh-red-600);
}

html, body { min-height: 100%; }

/* Review cards in the prototype used <image-slot> placeholders for
   customer photos — no real images were provided. Render a clean
   initial-avatar instead. */
.lp-avatar-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--uh-blue-300), var(--brand));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* Tech portraits fill their 3/4 frame */
.lp-tech-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lead-form success state spacing */
.lp-form-success { text-align: center; padding: 32px 24px; }

/* ------------------------------------------------------------
   Mobile responsive fixes for inline two-column grids.
   These sections used inline `grid-template-columns` (e.g.
   1fr 1.8fr, repeat(6,1fr)) with no breakpoint, so on phones
   they stayed multi-column — causing horizontal overflow and
   cramped, unreadable columns. Collapse them on small screens.
   ------------------------------------------------------------ */
@media (max-width: 860px) {
  .lp-split { grid-template-columns: 1fr !important; gap: 28px !important; }
  .lp-split-sticky { position: static !important; top: auto !important; }
}
@media (max-width: 860px) {
  .lp-team-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
/* On phones, show the techs as a horizontal swipeable row */
@media (max-width: 600px) {
  .lp-team-grid {
    display: flex !important;
    overflow-x: auto;
    gap: 14px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }
  .lp-team-grid > * {
    flex: 0 0 60%;
    scroll-snap-align: start;
  }
}

/* On phones, keep the trust badges in a single horizontal row
   (swipeable) instead of wrapping to two rows. */
@media (max-width: 600px) {
  .lp-partners-row {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    gap: 20px !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .lp-partners-row > * { flex: 0 0 auto; scroll-snap-align: start; }
  .lp-partners img.lp-badge { height: 76px; }
}

/* Review cards as a horizontal swipeable slider (scroll-snap, no JS).
   A peek of the next card invites the user to scroll. Cards keep equal
   height via align-items:stretch. */
.lp-reviews-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 12px;
  scroll-padding-left: 2px;
  align-items: stretch;
}
.lp-reviews-slider > .lp-card {
  flex: 0 0 58%;
  scroll-snap-align: start;
}
@media (max-width: 600px) {
  .lp-reviews-slider > .lp-card { flex: 0 0 86%; }
}

/* Sticky mobile call/text bar: keep it pinned to the viewport at all
   times (fixed), not just when scrolled to the bottom of the page.
   The design CSS used position:sticky on the last element, so it only
   appeared at the very end of the page. */
@media (max-width: 720px) {
  .lp-mobile-bar {
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  /* Reserve space so the fixed bar never covers the footer/last content. */
  .lp { padding-bottom: 84px; }
}

/* TCPA fine-print links (Privacy Policy / Terms) are intentionally small
   (11px). On touch devices a 15px-tall inline link is below the ~44px
   tap-target guideline, so taps miss and the links feel "unclickable".
   Expand the hit area vertically with a transparent ::after overlay —
   keeps the visible text small while making the link easy to tap.
   position:relative + z-index keeps it above adjacent inline text. */
.lp-tcpa a {
  position: relative;
  z-index: 1;
}
.lp-tcpa a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -11px;
  bottom: -11px;
}

/* ------------------------------------------------------------
   Soft attention pulse on the PRIMARY call-to-action buttons only
   (hero call, form submit, sticky-bar call). A gentle "breathing"
   glow — not a harsh on/off blink — to draw the eye without hurting
   trust. The design referenced an `animation: pulseCTA` but never
   defined the keyframes, so we define them here.
   ------------------------------------------------------------ */
@keyframes pulseCTA {
  0%, 100% { box-shadow: 0 8px 22px rgba(225,29,44,0.30); transform: translateZ(0) scale(1); }
  50%      { box-shadow: 0 10px 30px rgba(225,29,44,0.55); transform: translateZ(0) scale(1.015); }
}

/* Hero primary call + form submit + sticky-bar call button */
.lp-hero-v2-ctas a.lp-btn-red,
form.lp-lead-form button.lp-btn-red,
.lp-mobile-bar a.lp-btn-red {
  animation: pulseCTA 2.4s ease-in-out infinite;
}

/* Respect users who prefer reduced motion: no pulsing. */
@media (prefers-reduced-motion: reduce) {
  .lp-hero-v2-ctas a.lp-btn-red,
  form.lp-lead-form button.lp-btn-red,
  .lp-mobile-bar a.lp-btn-red {
    animation: none;
  }
}

/* Coverage map (Leaflet / OpenStreetMap) */
.lp-coverage-map {
  height: 340px;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #0d2b52;
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 0;
}
.lp-coverage-map .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255,255,255,0.78);
}
@media (max-width: 600px) {
  .lp-coverage-map { height: 260px; }
}
/* City tooltips on the coverage map */
.leaflet-tooltip.lp-map-tip {
  background: #0b1220;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 9px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.leaflet-tooltip.lp-map-tip::before { border-top-color: #0b1220; }

/* ------------------------------------------------------------
   Nicer FAQ: each item is its own rounded card with a soft shadow,
   a colored accent bar when open, and a smooth expand. Overrides the
   flat single-card design in landing.css.
   ------------------------------------------------------------ */
.lp-faq {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lp-faq-item {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  overflow: hidden;
  position: relative;
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.lp-faq-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1);
}
.lp-faq-item:hover {
  box-shadow: 0 8px 22px rgba(11,18,32,0.08);
  border-color: rgba(11,18,32,0.16) !important;
}
.lp-faq-item.open {
  box-shadow: 0 12px 30px rgba(11,18,32,0.10);
  border-color: transparent !important;
}
.lp-faq-item.open::before { transform: scaleY(1); }

.lp-faq-q { padding: 20px 22px !important; gap: 18px !important; align-items: flex-start !important; }
.lp-faq-q span:first-child { line-height: 1.35; }

/* Round +/- icon chip; turns accent-red when open */
.lp-faq-q-icon {
  border-radius: 999px !important;
  width: 30px !important; height: 30px !important;
}
.lp-faq-item.open .lp-faq-q-icon {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Smooth reveal of the answer */
.lp-faq-a {
  padding: 0 22px 0 22px !important;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 240ms ease, opacity 200ms ease, padding 240ms ease;
}
.lp-faq-item.open .lp-faq-a {
  max-height: 320px;
  opacity: 1;
  padding-bottom: 20px !important;
}

/* ------------------------------------------------------------
   Floating widgets: accessibility (green) + cookies (blue)
   ------------------------------------------------------------ */
.lp-fab-dock {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lp-fab {
  width: 52px; height: 52px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(11,18,32,0.28);
  transition: transform 130ms ease, box-shadow 130ms ease;
}
.lp-fab:hover { transform: scale(1.06); box-shadow: 0 10px 24px rgba(11,18,32,0.34); }
.lp-fab-a11y { background: #3f7e5e; }
.lp-fab-cookie { background: #2a5bd7; }

/* Raise the dock above the sticky mobile bar on phones */
@media (max-width: 720px) {
  .lp-fab-dock { bottom: 86px; left: 14px; }
  .lp-fab { width: 46px; height: 46px; }
}

/* Accessibility panel */
.lp-a11y-panel {
  position: fixed;
  left: 18px; bottom: 84px;
  z-index: 61;
  width: 250px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(11,18,32,0.22);
  padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
@media (max-width: 720px) { .lp-a11y-panel { bottom: 150px; } }
.lp-a11y-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; }
.lp-a11y-head strong { font-family: var(--font-display); font-size: 16px; color: var(--fg); }
.lp-a11y-close { font-size: 22px; line-height: 1; color: var(--fg-muted); background: none; border: none; cursor: pointer; padding: 0 4px; }
.lp-a11y-opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff; color: var(--fg);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.lp-a11y-opt:hover { background: var(--bg-alt); }
.lp-a11y-opt.active { background: #eaf3ee; border-color: #3f7e5e; color: #2c5b43; }
.lp-a11y-reset { margin-top: 4px; padding: 9px; border: none; background: none; color: var(--accent); font-weight: 700; font-size: 13px; cursor: pointer; }

/* Cookie banner */
.lp-cookie {
  position: fixed;
  left: 18px; right: 18px; bottom: 18px;
  max-width: 560px;
  margin: 0 auto;
  z-index: 62;
  background: #0b1220;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.35);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.lp-cookie-text { font-size: 13.5px; line-height: 1.5; flex: 1; min-width: 220px; color: rgba(255,255,255,0.88); }
.lp-cookie-text a { color: #fff; }
.lp-cookie-actions { display: flex; align-items: center; gap: 10px; }
.lp-cookie-decline { background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.lp-cookie-decline:hover { background: rgba(255,255,255,0.08); }
@media (max-width: 720px) { .lp-cookie { bottom: 150px; } }

/* The hidden attribute must win over the display:flex above, otherwise the
   cookie banner won't dismiss on Accept/Decline and the a11y panel stays
   permanently open. Class+attribute specificity beats the bare class rules. */
.lp-cookie[hidden],
.lp-a11y-panel[hidden] { display: none; }

/* ---- Accessibility modes applied to <html> ---- */
html.a11y-bigtext .lp { zoom: 1.15; }
html.a11y-contrast .lp { filter: contrast(1.18) saturate(1.12); }
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 2px; }
html.a11y-readable .lp,
html.a11y-readable .lp * { font-family: Verdana, Tahoma, "Segoe UI", sans-serif !important; letter-spacing: 0.01em; }
html.a11y-nomotion * { animation: none !important; transition: none !important; }

/* Guard against any residual horizontal scroll on mobile */
html, body { max-width: 100%; overflow-x: hidden; }

/* ============================================================
   Desktop sticky call-bar — slides in after the hero scrolls off.
   Hidden on mobile (the fixed bottom Call/Text/$69 bar covers it).
   ============================================================ */
.lp-callbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 55;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(11,18,32,0.12);
  transform: translateY(-100%);
  transition: transform 260ms cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.lp-callbar.show { transform: translateY(0); }
.lp-callbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 9px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.lp-callbar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lp-callbar-logo { border-radius: 8px; flex: none; }
.lp-callbar-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lp-callbar-txt strong { font-family: var(--font-display); font-size: 15.5px; color: var(--fg); white-space: nowrap; }
.lp-callbar-txt span { font-size: 12.5px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-callbar-cta { display: flex; align-items: center; gap: 10px; flex: none; }
.lp-callbar-quote {
  font-size: 14px; padding: 10px 16px;
  background: #fff; color: var(--brand-deep);
  border: 1.5px solid var(--border);
}
.lp-callbar-quote:hover { background: var(--bg-alt); }
.lp-callbar-call { font-size: 15px; padding: 11px 18px; display: inline-flex; align-items: center; gap: 8px; }
/* Mobile already has the fixed bottom bar — never show the top call-bar there. */
@media (max-width: 899px) { .lp-callbar { display: none; } }

/* ============================================================
   Exit-intent modal (desktop only). Easy to dismiss; fires once
   per session, only after engagement — Google Ads compliant.
   ============================================================ */
.lp-exit { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lp-exit[hidden] { display: none; }
.lp-exit-backdrop { position: absolute; inset: 0; background: rgba(7,10,18,0.62); animation: lpExitFade 180ms ease; }
.lp-exit-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: #fff; border-radius: 18px;
  padding: 30px 28px 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  text-align: center;
  animation: lpExitPop 220ms cubic-bezier(.22,.61,.36,1);
}
.lp-exit-x { position: absolute; top: 12px; right: 14px; font-size: 26px; line-height: 1; color: var(--fg-muted); background: none; border: none; cursor: pointer; padding: 2px 6px; }
.lp-exit-x:hover { color: var(--fg); }
.lp-exit-eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-red); margin-bottom: 8px; }
.lp-exit-title { font-family: var(--font-display); font-size: 27px; line-height: 1.15; color: var(--fg); margin: 0 0 10px; }
.lp-exit-title span { color: var(--brand-red); }
.lp-exit-sub { font-size: 14.5px; line-height: 1.5; color: var(--fg-muted); margin: 0 0 20px; }
.lp-exit-call { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.lp-exit-dismiss { display: block; width: 100%; margin-top: 12px; padding: 8px; background: none; border: none; color: var(--fg-muted); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.lp-exit-dismiss:hover { color: var(--fg); }
.lp-exit-trust { margin-top: 14px; font-size: 12px; color: var(--fg-muted); }
@keyframes lpExitFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lpExitPop { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
html.a11y-nomotion .lp-exit-backdrop, html.a11y-nomotion .lp-exit-card { animation: none !important; }
