/* Standard document scrolling for the homepage. The legacy scene classes remain
   as styling hooks, but no longer control navigation or viewport height. */
html {
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: smooth;
  scroll-snap-type: none !important;
  background: #000;
}

body.home-page {
  width: 100%;
  height: auto !important;
  min-height: 100dvh;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
  background: #000 !important;
}

body.home-page::before,
.home-page .scroll-ambient,
.home-page .voice-orb,
.home-page .cursor-dot,
.home-page .cursor-ring,
.home-page .spatial-hint {
  display: none !important;
}

.home-page .app {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
  overscroll-behavior: auto !important;
  perspective: none !important;
  transform-style: flat !important;
}

.home-page .hero.spatial-scene,
.home-page .section.spatial-scene,
.home-page .site-footer.spatial-scene,
.home-page .spatial-scene.is-active,
.home-page .spatial-scene.is-prev,
.home-page .spatial-scene.is-next {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  filter: none !important;
  contain: none !important;
  isolation: isolate;
}

.home-page .section,
.home-page .site-footer {
  scroll-margin-top: 24px;
}

.home-page .section.spatial-scene > .section-shell,
.home-page .section.spatial-scene > .about-card,
.home-page .section.spatial-scene > .site-types-panel,
.home-page .section.spatial-scene > .quick-contact-card,
.home-page .site-footer.spatial-scene > .footer-shell {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.home-page .floating-bar .main-button {
  text-decoration: none;
}

@media (min-width: 1000px) {
  .home-page .hero.spatial-scene {
    min-height: 0 !important;
    padding: clamp(28px, 4vw, 52px) max(30px, 4vw) 112px !important;
  }

  .home-page .hero.spatial-scene > .hero-shell {
    min-height: clamp(650px, 78vh, 800px) !important;
    max-height: none !important;
  }

  .home-page .hero.spatial-scene h1 {
    max-width: 680px !important;
    font-size: clamp(46px, 3.8vw, 60px) !important;
    line-height: 1.04 !important;
    text-wrap: balance;
  }

  .home-page .hero.spatial-scene p {
    max-width: 570px;
    font-size: clamp(16px, 1.2vw, 18px);
  }

  .home-page .about-section.spatial-scene,
  .home-page .services-section.spatial-scene,
  .home-page .offer-section.spatial-scene,
  .home-page .benefits-section.spatial-scene,
  .home-page .testimonial-section.spatial-scene,
  .home-page .cases-section.spatial-scene,
  .home-page .quick-contact-section.spatial-scene,
  .home-page .faq-section.spatial-scene,
  .home-page .site-footer.spatial-scene {
    padding-top: clamp(88px, 9vw, 136px) !important;
    padding-bottom: clamp(88px, 9vw, 136px) !important;
    align-items: center !important;
  }

  .home-page .quick-contact-section.spatial-scene {
    padding-top: clamp(76px, 8vw, 112px) !important;
    padding-bottom: clamp(76px, 8vw, 112px) !important;
  }

  .home-page .site-footer.spatial-scene {
    padding-bottom: max(120px, 10vw) !important;
  }

  .home-page .scroll-progress {
    position: fixed !important;
    z-index: 100 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(202, 243, 137, 0.13) !important;
  }

  .home-page .scroll-progress span {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    background: #CAF389 !important;
    transform: scaleX(0);
    transform-origin: left center !important;
    transition: none !important;
  }
}

@media (min-width: 1000px) and (max-width: 1180px) {
  .home-page .hero.spatial-scene > .hero-shell {
    min-height: 620px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Unified homepage width, contact notches and the compact project brief. */
.home-page {
  --home-content-width: min(1500px, calc(100vw - 104px));
}

.home-page .floating-bar {
  display: none !important;
}

.home-page .scroll-progress {
  position: fixed !important;
  z-index: 100 !important;
  inset: 0 0 auto !important;
  width: 100% !important;
  height: 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(202, 243, 137, 0.13) !important;
}

.home-page .scroll-progress span {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  background: #caf389 !important;
  transform-origin: left center !important;
}

.home-page .hero-promise {
  width: min(100%, 560px);
  margin-top: 30px;
  padding: 20px 22px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(12, 86, 29, 0.24);
  border-left: 5px solid #0c561d;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.home-page .hero-promise strong,
.home-page .hero-promise span {
  display: block;
  letter-spacing: 0;
}

.home-page .hero-promise strong {
  color: #073e14;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 850;
  line-height: 1.05;
}

.home-page .hero-promise span {
  color: rgba(8, 47, 18, 0.7);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.home-page .notch-cta {
  min-width: 300px;
  min-height: 64px;
  padding: 10px 16px 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid rgba(202, 243, 137, 0.8);
  border-radius: 25px 25px 16px 16px;
  background: #0c561d;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 38px rgba(12, 86, 29, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: background-color 180ms ease, transform 180ms ease;
}

.home-page .notch-cta span,
.home-page .notch-cta small,
.home-page .notch-cta strong {
  display: block;
  letter-spacing: 0;
}

.home-page .notch-cta small {
  margin-bottom: 4px;
  color: #caf389;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.home-page .notch-cta strong {
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
}

.home-page .notch-cta b {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: #caf389;
  color: #073e14;
  font-size: 20px;
  font-weight: 600;
}

.home-page .notch-cta:hover,
.home-page .notch-cta:focus-visible {
  background: #073e14;
}

.home-page .notch-cta:active {
  transform: translateY(1px);
}

.home-page .intake-form-body {
  display: grid;
  gap: 16px;
}

.home-page .intake-form-body[hidden],
.home-page .intake-success[hidden],
.home-page .intake-conditional[hidden] {
  display: none !important;
}

.home-page .intake-form h3 {
  margin: 0 0 6px !important;
}

.home-page .intake-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-page .intake-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
}

.home-page .intake-consent input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #caf389;
}

.home-page .intake-form .estimator-submit {
  width: 100%;
  margin-top: 2px !important;
}

.home-page .intake-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.home-page .intake-submit.is-loading span::after {
  content: "...";
}

.home-page .intake-error {
  display: none;
  margin: 0;
  color: #ff9ba4;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.home-page .intake-error.show {
  display: block;
}

.home-page .intake-success {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-page .intake-success > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #caf389;
  color: #082d10;
  font-size: 28px;
  font-weight: 900;
}

.home-page .intake-success h3 {
  margin: 22px 0 8px !important;
}

.home-page .intake-success p {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

@media (min-width: 1000px) {
  .home-page .hero.spatial-scene {
    padding-right: 0 !important;
    padding-left: 0 !important;
    overflow: visible !important;
  }

  .home-page .hero.spatial-scene > .hero-shell,
  .home-page .about-section.spatial-scene > .about-card,
  .home-page .services-section.spatial-scene > .site-types-panel,
  .home-page .content-section.spatial-scene > .section-shell,
  .home-page .quick-contact-section.spatial-scene > .quick-contact-card,
  .home-page .site-footer.spatial-scene > .footer-shell {
    width: var(--home-content-width) !important;
  }

  .home-page .about-section.spatial-scene {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .home-page .hero.spatial-scene > .hero-shell::after {
    left: 50% !important;
    width: min(470px, 40%) !important;
    transform: translateX(-50%);
  }

  .home-page .hero-notch-cta {
    position: absolute;
    z-index: 9;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
  }

  .home-page .hero-notch-cta:hover,
  .home-page .hero-notch-cta:focus-visible {
    transform: translateX(-50%) translateY(-2px);
  }

  .home-page .offer-layout {
    align-items: stretch;
  }

  .home-page .intake-form {
    justify-content: flex-start;
  }

  .home-page .quick-contact-section.spatial-scene {
    padding-bottom: clamp(128px, 12vh, 154px) !important;
    overflow: clip !important;
  }

  .home-page .quick-contact-section.spatial-scene > .quick-contact-card {
    height: auto !important;
    min-height: 500px !important;
    overflow: visible !important;
  }

  .home-page .quick-contact-card::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: -74px;
    width: min(470px, 40%);
    height: 75px;
    pointer-events: none;
    background: #caf389;
    transform: translateX(-50%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M0 0H1000C920 0 950 100 840 100H160C50 100 80 0 0 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M0 0H1000C920 0 950 100 840 100H160C50 100 80 0 0 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  }

  .home-page .quick-contact-notch {
    position: absolute;
    z-index: 8;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
  }

  .home-page .quick-contact-notch:hover,
  .home-page .quick-contact-notch:focus-visible {
    transform: translateX(-50%) translateY(-2px);
  }

  .home-page .site-footer.spatial-scene {
    min-height: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
}

@media (max-width: 999px) {
  .home-page {
    --home-content-width: calc(100vw - 20px);
  }

  .home-page .hero {
    padding-bottom: 46px !important;
  }

  .home-page .hero-shell {
    min-height: 0;
    padding-bottom: 104px;
  }

  .home-page .hero-promise {
    margin-top: 22px;
    padding: 16px;
    border-radius: 12px;
  }

  .home-page .hero-promise strong {
    font-size: 22px;
  }

  .home-page .hero-promise span {
    font-size: 11px;
  }

  .home-page .notch-cta {
    min-width: 0;
    min-height: 60px;
    border-radius: 20px 20px 13px 13px;
  }

  .home-page .hero-notch-cta,
  .home-page .quick-contact-notch {
    position: absolute;
    z-index: 8;
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .home-page .intake-contact-grid {
    grid-template-columns: 1fr;
  }

  .home-page .intake-form-body {
    gap: 15px;
  }

  .home-page .quick-contact-section {
    padding-bottom: 82px !important;
    overflow: hidden !important;
  }

  .home-page .quick-contact-card {
    padding-bottom: 108px !important;
    overflow: hidden !important;
  }

  .home-page .site-footer {
    padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }
}
