/* ==========================================================================
   US Pool Builder — Homepage
   Brand: #000 bg, #fff text, #4ca1f2 accent
   ========================================================================== */

:root {
  --color-bg: #000000;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.72);
  --color-accent: #4ca1f2;
  --color-accent-soft: rgba(76, 161, 242, 0.18);
  --header-height: 5rem;
  --container-max: 72rem;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --hero-scale: 1;
  --hero-heading-opacity: 0;
  --hero-heading-shift: 1.5rem;
  --float-contact-height: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--float-contact-height) + env(safe-area-inset-bottom, 0px));
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, p {
  margin: 0;
}

.container {
  width: min(100% - 2.5rem, var(--container-max));
  margin-inline: auto;
}

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

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  background: transparent;
  transition: background-color 0.35s var(--ease-out-expo);
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(0, 0, 0, 0.92);
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 101;
}

.site-header__logo-img {
  display: block;
  width: 30vw;
  height: auto;
  max-height: calc(var(--header-height) - 0.75rem);
  object-fit: contain;
  object-position: left center;
}

.site-header__nav {
  display: flex;
  align-items: center;
}

.site-header__menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.site-header__menu a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.site-header__menu a:hover,
.site-header__menu a:focus-visible {
  color: var(--color-text);
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-bg) !important;
  font-weight: 600 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.site-header__cta:hover,
.site-header__cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(76, 161, 242, 0.35);
  color: var(--color-bg) !important;
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.site-header__toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero / Banner scroll animation
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
}

.hero__sticky {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero__stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 110dvh;
  overflow: hidden;
}

.hero__heading {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  font-size: clamp(1.125rem, 2.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-text);
  opacity: var(--hero-heading-opacity);
  transform: translateY(calc(var(--hero-heading-shift) * (1 - var(--hero-heading-opacity))));
  transition: none;
  pointer-events: none;
  padding-inline: clamp(1rem, 4vw, 2rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.hero__heading--top {
  top: calc(var(--header-height) + clamp(1.75rem, 3vh, 0.5rem));
}

.hero__heading--brand {
  font-weight: 700;
  font-size: clamp(0.75rem, 5vw, 1.375rem);
}

.hero__heading--bottom {
  bottom: clamp(1.25rem, 5vh, 2.5rem);
}

.hero__media-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transform: scale(var(--hero-scale));
  transform-origin: center center;
  will-change: transform;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.hero__media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(0, 0, 0, 0.45) 100%
  );
  pointer-events: none;
}

.hero__scroll-space {
  height: 120vh;
  pointer-events: none;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open main {
  pointer-events: none;
}

body.modal-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Content sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(3.5rem, 8vh, 6rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section__lead {
  max-width: 40rem;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: 2.5rem;
}

/* Trust strip */
.trust-strip {
  padding: 2rem 0;
  background: rgba(76, 161, 242, 0.06);
  border-top: 1px solid rgba(76, 161, 242, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.trust-strip__value {
  display: block;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
}

.trust-strip__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Cards / services */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: rgba(76, 161, 242, 0.45);
  background: var(--color-accent-soft);
  transform: translateY(-2px);
}

.icon {
  display: block;
  flex-shrink: 0;
}

.card__icon {
  display: flex;
  align-items: center;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.card__icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Reviews */
.reviews {
  background: rgba(255, 255, 255, 0.02);
}

.reviews__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.reviews__stat {
  text-align: center;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reviews__stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
}

.reviews__stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.review-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.review-card__quote {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.review-card__author {
  font-size: 0.8125rem;
  font-style: normal;
  color: var(--color-accent);
  font-weight: 600;
}

/* Process */
.process__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  counter-reset: process;
  padding-inline-start: 0px;
}
li.process__step::marker {
  
  color: black;
}
.process__step {
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.process__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.process__step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.process__step p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Portfolio */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.portfolio__item {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 4 / 3;
}

.portfolio__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}

.portfolio__item:hover img {
  transform: scale(1.05);
}

.portfolio__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 1.25rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.portfolio__caption h3 {
  font-size: 1rem;
  font-weight: 600;
}

.portfolio__caption p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.portfolio__note {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.about__content p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.about__list {
  margin-top: 1.5rem;
}

.about__list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  font-weight: 500;
}

.about__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.about__visual {
  display: flex;
  justify-content: center;
}

.about__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 16rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(76, 161, 242, 0.5);
  background: radial-gradient(circle at 30% 30%, rgba(76, 161, 242, 0.25), rgba(0, 0, 0, 0.4));
  text-align: center;
  padding: 1.5rem;
}

.about__badge-years {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.about__badge-text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Estimate form */
.estimate {
  background: linear-gradient(180deg, transparent 0%, rgba(76, 161, 242, 0.1) 100%);
}

.estimate__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.estimate__form {
  padding: 2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text-muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(76, 161, 242, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--block {
  width: 100%;
  margin-top: 0.5rem;
}

/* Floating contact bar */
.float-contact {
  position: fixed;
  inset: auto 0 0;
  z-index: 999;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: var(--float-contact-height);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(0, 0, 0, 0.96);
  border-top: 1px solid rgba(76, 161, 242, 0.35);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.float-contact__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.5rem 0.35rem;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.float-contact__btn:last-child {
  border-right: 0;
}

.float-contact__btn:hover,
.float-contact__btn:focus-visible {
  background: rgba(76, 161, 242, 0.15);
  color: var(--color-text);
}

.float-contact__btn--estimate {
  background: var(--color-accent);
  color: var(--color-bg);
}

.float-contact__btn--estimate:hover,
.float-contact__btn--estimate:focus-visible {
  background: #3d8fd9;
  color: var(--color-bg);
}

.float-contact__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.float-contact__icon .icon {
  width: 1.375rem;
  height: 1.375rem;
}

.float-contact__btn--estimate .float-contact__icon {
  color: var(--color-bg);
}

.float-contact__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.float-contact__sub {
  font-size: 0.625rem;
  font-weight: 400;
  opacity: 0.85;
  text-transform: none;
  letter-spacing: 0;
}

/* Text modal (desktop fallback) */
.text-modal[hidden] {
  display: none;
}

.text-modal:not([hidden]) {
  display: block;
}

.text-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.text-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.text-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(22rem, calc(100% - 2rem));
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: #111;
  border: 1px solid rgba(76, 161, 242, 0.35);
  text-align: center;
}

.text-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.text-modal__close:hover {
  color: var(--color-text);
}

.text-modal__panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.text-modal__phone {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.text-modal__phone a {
  color: var(--color-accent);
}

.text-modal__hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.text-modal__qr {
  margin: 0 auto 1rem;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.5rem;
}

.text-modal__sms-link {
  margin-top: 0.5rem;
}

.site-footer {
  padding: 2rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process__steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .process__step:nth-child(4),
  .process__step:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .trust-strip__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews__stats,
  .reviews__grid {
    grid-template-columns: 1fr;
  }

  .portfolio__grid {
    grid-template-columns: 1fr;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .estimate__inner {
    grid-template-columns: 1fr;
  }

  .process__steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 4.25rem;
    --float-contact-height: 4rem;
  }

  .site-header__logo-img {
    width: min(30vw, calc(100vw - 5.5rem));
  }

  .site-header__toggle {
    display: flex;
    margin-left: auto;
  }

  .site-header__nav {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.35s var(--ease-out-expo),
      visibility 0.35s var(--ease-out-expo);
  }

  .site-header__nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header__menu {
    flex-direction: column;
    gap: 1.75rem;
    text-align: center;
    width: 100%;
    max-width: 20rem;
  }

  .site-header__menu a {
    font-size: 1.25rem;
    color: var(--color-text);
  }

  .site-header__cta {
    margin-top: 0.5rem;
    font-size: 1rem !important;
  }

  .hero__heading {
    font-size: clamp(1rem, 4.2vw, 1.25rem);
  }

  .hero__scroll-space {
    height: 100vh;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .form-row--half {
    grid-template-columns: 1fr;
  }

  .float-contact__sub {
    display: none;
  }

  .float-contact__label {
    font-size: 0.6875rem;
  }
}

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

  .hero__media,
  .hero__heading {
    transition: none !important;
  }
}
