/* Homepage — full-screen sections (same feel as city unified pages) */

html:has(body.page-home-unified) {
  scroll-snap-type: y proximity;
  scroll-padding-top: 0;
  overflow-x: hidden;
}

body.page-home-unified {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body.page-home-unified .home-hero-stack {
  display: flex;
  flex-direction: column;
  height: 100svh;
  min-height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
}

body.page-home-unified .home-hero-stack .hero {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

body.page-home-unified .home-hero-stack .stats-bar {
  flex-shrink: 0;
  margin-top: auto;
}

body.page-home-unified .section-screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: calc(var(--nav-h) + 20px) clamp(20px, 4vw, 40px) clamp(28px, 4vw, 48px);
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

body.page-home-unified .section-screen > .section-inner {
  flex: 0 1 auto;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  min-width: 0;
}

body.page-home-unified .home-contact-screen {
  padding-bottom: 0;
}

body.page-home-unified .home-contact-screen__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100svh - var(--nav-h) - 48px);
  gap: 0;
}

body.page-home-unified .home-contact-screen .cta-box {
  flex: 0 0 auto;
  margin: auto 0;
}

body.page-home-unified .home-contact-screen footer {
  width: 100%;
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-home-unified .fab-bar {
  right: 20px;
  bottom: 20px;
  left: auto;
  z-index: 160;
}

/* —— Tablet: compact desktop, keep full-screen hero —— */
@media (max-width: 900px) {
  body.page-home-unified nav {
    max-width: 100%;
    overflow: hidden;
  }

  body.page-home-unified .nav-brand {
    transform: none;
    flex-shrink: 0;
  }

  body.page-home-unified .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    overscroll-behavior-x: contain;
  }

  body.page-home-unified .site-van-bg {
    inset: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
  }

  body.page-home-unified .site-van-bg[data-tone="light"],
  body.page-home-unified .site-van-bg[data-tone="dark"] {
    transform: none;
  }

  body.page-home-unified .fab-bar {
    right: 16px;
    bottom: 16px;
  }
}

/* —— Phone only: compact nav + hero CTA, keep one-screen sections —— */
@media (max-width: 600px) {
  html:has(body.page-home-unified) {
    scroll-snap-type: y proximity;
  }

  body.page-home-unified .home-hero-stack {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
    scroll-snap-stop: always;
  }

  body.page-home-unified .home-hero-stack .hero {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    padding: calc(var(--nav-h) + 4px) 16px 6px;
  }

  body.page-home-unified .home-hero-stack .hero-content {
    margin-left: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
    gap: 10px;
    min-height: 0;
  }

  body.page-home-unified .home-hero-stack .hero-eyebrow {
    position: absolute;
    top: calc(var(--nav-h) + 6px);
    left: 16px;
    right: 16px;
    z-index: 3;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: nowrap;
    font-size: clamp(13px, 3.6vw, 16px);
    letter-spacing: 0.8px;
  }

  body.page-home-unified .home-hero-stack .hero-title {
    width: 100%;
    max-width: 100%;
    font-size: clamp(30px, 8.5vw, 42px);
    gap: 4px;
    align-items: flex-start;
    text-align: left;
    margin-top: 28px;
  }

  body.page-home-unified .home-hero-stack .hero-title__line {
    width: 100%;
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  body.page-home-unified .home-hero-stack .hero-lead {
    max-width: 100%;
  }

  body.page-home-unified .home-hero-stack .hero-phone-big {
    margin-top: 8px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.page-home-unified .home-hero-stack .hero-phone-label {
    width: 100%;
    text-align: left;
    position: static;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: nowrap;
    border: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #93d4ff;
    text-shadow:
      0 1px 2px rgba(0, 0, 0, 0.9),
      0 2px 8px rgba(0, 0, 0, 0.55);
  }

  body.page-home-unified .home-hero-stack .hero-phone-number {
    font-size: clamp(22px, 6.5vw, 34px);
    flex-wrap: nowrap;
    white-space: nowrap;
    width: auto;
    max-width: 100%;
    gap: 8px;
    justify-content: flex-start;
    text-shadow:
      0 1px 2px rgba(0, 0, 0, 0.9),
      0 2px 10px rgba(0, 0, 0, 0.65),
      0 0 24px rgba(15, 35, 64, 0.8);
  }

  body.page-home-unified .home-hero-stack .hero-phone-icon svg {
    width: 22px;
    height: 22px;
  }

  body.page-home-unified .home-hero-stack .hero-callback-btn {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    flex-shrink: 0;
    min-height: 0;
    padding: 14px 16px;
    border-color: rgba(167, 220, 255, 0.95);
    background: linear-gradient(
      145deg,
      rgba(91, 163, 217, 0.72) 0%,
      rgba(126, 196, 239, 0.55) 55%,
      rgba(245, 166, 35, 0.35) 100%
    );
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.34),
      0 0 30px rgba(91, 163, 217, 0.55);
  }

  body.page-home-unified .home-hero-stack .hero-callback-btn .stat-num {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 5px;
    color: #ffffff;
    text-shadow:
      0 1px 2px rgba(0, 0, 0, 0.75),
      0 0 12px rgba(91, 163, 217, 0.45);
    letter-spacing: 0.6px;
  }

  body.page-home-unified .home-hero-stack .hero-callback-btn .stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    color: rgba(230, 245, 255, 1);
  }

  body.page-home-unified .home-hero-stack .stats-bar {
    margin-top: 0;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-shrink: 0;
  }

  body.page-home-unified .home-hero-stack .stats-inner--with-handyman {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px;
  }

  body.page-home-unified .home-hero-stack .stat-item--reviews {
    grid-column: 2;
    grid-row: 2;
  }

  body.page-home-unified .home-hero-stack .stat-item--parts-warranty {
    grid-column: 1;
    grid-row: 2;
  }

  body.page-home-unified .home-hero-stack .stats-handyman-slot {
    display: none;
  }

  body.page-home-unified .section-screen {
    min-height: 100svh;
    padding: calc(var(--nav-h) + 16px) 16px 28px;
    scroll-snap-stop: always;
    overflow: hidden;
  }

  body.page-home-unified .fab-bar {
    max-width: min(158px, calc(100% - 88px));
  }

  body.page-home-unified .nav-link--desktop,
  body.page-home-unified .nav-links .nav-anchor {
    display: none;
  }

  body.page-home-unified .nav-link--mobile {
    display: list-item;
  }

  body.page-home-unified .nav-label-full { display: none; }
  body.page-home-unified .nav-label-short { display: inline; }

  body.page-home-unified .nav-links {
    flex-wrap: nowrap;
    gap: 8px;
    max-width: calc(100% - 168px);
    overflow: visible;
  }

  body.page-home-unified .nav-links a {
    font-size: 9px;
    letter-spacing: 0.15px;
  }

  body.page-home-unified .nav-deals-btn__sub {
    display: none;
  }

  body.page-home-unified .nav-deals-btn {
    padding: 8px 12px;
  }

  body.page-home-unified .nav-deals-btn__title {
    font-size: 16px;
  }

  body.page-home-unified .home-hero-stack .hero-title {
    font-size: clamp(30px, 8.5vw, 42px);
    gap: 6px;
  }

  body.page-home-unified .home-hero-stack .hero-title__line--accent {
    margin-top: 30px;
  }

  body.page-home-unified .home-hero-stack .hero-lead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  body.page-home-unified .home-hero-stack .stat-item {
    min-height: 58px;
    padding: 8px 6px;
  }

  body.page-home-unified .home-hero-stack .stat-label {
    font-size: 10px;
    letter-spacing: 0.5px;
    line-height: 1.25;
    width: 100%;
    text-align: center;
    hyphens: auto;
    overflow-wrap: break-word;
  }

  body.page-home-unified .home-hero-stack .stat-num {
    font-size: clamp(24px, 6vw, 30px);
    width: 100%;
    text-align: center;
  }

  body.page-home-unified .services-grid {
    grid-template-columns: 1fr;
  }
}
