/* ============================================
   RESPONSIVE — CNL Construction | Pools
   Mobile-first breakpoints
   ============================================ */

/* ---- Tablet (max 1024px) ---- */
@media (max-width: 64rem) {
  .financing-card {
    right: var(--gutter);
    padding: 12px 14px;
  }
  .financing-card__link {
    width: 100px;
    height: 36px;
    padding: 5px 10px;
  }
  .financing-card__logo {
    max-width: 84px;
    max-height: 24px;
  }

  .hero__content {
    width: 100%;
    padding-inline: var(--gutter);
  }

  .pool-compare__intro {
    grid-template-columns: 1fr;
  }

  .pool-compare__stage {
    height: clamp(48rem, 120vh, 64rem);
  }

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

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl) var(--space-lg);
  }

  .features__layout {
    gap: var(--space-xl);
  }

  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials__grid .testimonial-card:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
    justify-self: center;
  }

  .counter-section__layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .counter-section__header {
    max-width: 100%;
  }

  .counter-section__lead {
    max-width: 100%;
  }

  .credibility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-card--large {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 16 / 9;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .process-line {
    display: none;
  }

  .contact-section__inner {
    grid-template-columns: 1fr;
  }

  .cta-strip__inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-strip__actions {
    justify-content: center;
  }
}

/* ---- Mobile Large (max 768px) ---- */
@media (max-width: 48rem) {
  .testimonial-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .testimonial-layout__content {
    align-items: center;
  }
  .testimonial-video {
    width: 220px;
  }
  .hero {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
  .financing-card {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding: 0;
    padding-inline: var(--gutter);
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    animation: financeCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
  }
  .financing-card::before {
    display: none;
  }
  .financing-card__title {
    padding: calc(var(--space-sm) * 0.9) calc(var(--space-xl) * 0.9);
    font-size: calc(var(--text-base) * 0.9);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    position: relative;
  }
  .financing-card__title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 40%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.12) 60%, transparent 100%);
    animation: mobileFinanceShimmer 4s ease-in-out infinite;
    pointer-events: none;
  }
  .financing-card__title::after {
    content: '+';
    position: relative;
    width: auto;
    height: auto;
    top: auto;
    left: auto;
    background: none;
    animation: none;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.6;
    transition: transform 0.3s ease;
    line-height: 1;
  }
  .financing-card.is-open .financing-card__title::after {
    transform: rotate(45deg);
  }
  @keyframes mobileFinanceShimmer {
    0%   { left: -100%; }
    30%  { left: 100%; }
    100% { left: 100%; }
  }
  .financing-card__logos {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
    margin-top: 0;
  }
  .financing-card.is-open .financing-card__logos {
    max-height: 50px;
    opacity: 1;
    margin-top: 10px;
  }
  .financing-card__link {
    width: auto;
    height: 32px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.95);
    border-radius: 8px;
  }
  .financing-card__logo {
    max-width: 68px;
    max-height: 20px;
  }
  .financing-card__disclaimer {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer__grid > :nth-child(2),
  .footer__grid > :nth-child(3) {
    display: none;
  }

  .footer__grid > :first-child,
  .footer__grid > :last-child {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
    text-align: center;
  }

  .footer__brand-desc {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .footer__social {
    justify-content: center;
  }

  .footer__grid > :last-child .footer__heading,
  .footer__grid > :last-child .footer__link,
  .footer__grid > :last-child p.footer__link {
    text-align: center;
  }

  .hero__content {
    padding-block: clamp(4rem, 9vw, 6.25rem);
  }

  .hero__badge {
    padding: calc(var(--space-xs) * 0.9) calc(var(--space-md) * 0.9);
    font-size: calc(var(--text-xs) * 0.9);
    margin-bottom: calc(var(--space-lg) * 0.9);
  }

  .hero__badge-dot {
    width: 5px;
    height: 5px;
  }

  .hero__title {
    font-size: clamp(2.2rem, 7.6vw, 2.95rem);
    margin-bottom: calc(var(--space-md) * 0.9);
  }

  .hero__description {
    font-size: calc(var(--text-lg) * 0.855);
    margin-bottom: calc(var(--space-xl) * 0.9);
    max-width: 36rem;
  }

  .hero__actions {
    gap: calc(var(--space-md) * 0.9);
  }

  .hero__actions .btn {
    padding: calc(var(--space-sm) * 0.9) calc(var(--space-xl) * 0.9);
    font-size: calc(var(--text-base) * 0.9);
  }

  .pool-compare__stage {
    height: auto;
  }

  .pool-compare__sticky {
    position: static;
  }

  .pool-compare-block .compare-section {
    min-height: clamp(24rem, 78vh, 36rem);
  }

  .pool-compare-block .image-container {
    border-radius: var(--radius-xl);
  }

  .pool-compare-block .tag {
    top: 1rem;
    padding: 0.625rem 1rem;
  }

  .pool-compare-block .tag-before {
    right: 1rem;
  }

  .pool-compare-block .tag-after {
    left: 1rem;
  }

  .pool-compare-block .separator-handle {
    width: 3.25rem;
    height: 3.25rem;
  }

  .trust-strip {
    padding-block: var(--space-md);
  }

  .trust-strip__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md) var(--space-sm);
    border: none;
  }

  .trust-strip__item {
    width: auto;
    justify-content: flex-start;
    align-items: flex-start;
    min-width: 0;
    padding: var(--space-md);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    gap: 0.75rem;
  }

  .trust-strip__icon {
    width: 1.625rem;
    height: 1.625rem;
    margin-top: 0.125rem;
  }

  .trust-strip__title {
    font-size: var(--text-sm);
    line-height: 1.25;
  }

  .trust-strip__sub {
    font-size: 0.8125rem;
    line-height: 1.25;
  }

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

  .credibility-card {
    padding: var(--space-lg);
    background: oklch(0.18 0.04 230 / 0.24);
    border-color: oklch(0.99 0 0 / 0.05);
    box-shadow: 0 6px 18px oklch(0.08 0.03 230 / 0.08);
  }

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

  .gallery-card--large {
    aspect-ratio: 4 / 3;
  }

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

  .process-card {
    text-align: center;
    justify-items: center;
  }

  .process-card__icon {
    margin-left: auto;
    margin-right: auto;
  }

  .process-card__title {
    text-align: center;
  }

  .process-card__text {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: var(--space-lg);
  }

  .cta-strip__phone {
    font-size: var(--text-xl);
  }

  .nav__toggle {
    display: flex;
  }

  .site-header.is-scrolled {
    background: oklch(0.12 0.03 230 / 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 8px 24px oklch(0.08 0.03 230 / 0.22);
  }

  .site-header.is-scrolled .logo-img--white {
    display: block;
  }

  .site-header.is-scrolled .logo-img--color {
    display: none;
  }

  .site-header.is-scrolled .nav__toggle span {
    background: var(--color-white);
  }

  .nav__menu {
    position: fixed;
    inset: 0;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(5.5rem, calc(env(safe-area-inset-top) + 5rem)) var(--gutter)
      max(2.5rem, calc(env(safe-area-inset-bottom) + 2rem));
    background:
      radial-gradient(circle at top right, oklch(0.22 0.09 215 / 0.18), transparent 26%),
      linear-gradient(180deg, oklch(0.11 0.03 230 / 0.985), oklch(0.09 0.025 235 / 0.995));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-out),
                visibility var(--duration-normal);
    z-index: calc(var(--z-nav) - 1);
  }

  @supports not (color: oklch(0.5 0.1 200)) {
    .nav__menu {
      background:
        radial-gradient(circle at top right, rgba(58, 143, 183, 0.16), transparent 26%),
        linear-gradient(180deg, rgba(12, 18, 31, 0.985), rgba(8, 13, 24, 0.995));
    }
  }

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

  .site-header.is-menu-open {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .site-header.is-menu-open .logo-img--white {
    display: block;
  }

  .site-header.is-menu-open .logo-img--color {
    display: none;
  }

  .nav__list {
    flex-direction: column;
    width: min(100%, 21rem);
    gap: var(--space-xl);
    margin: 0 auto;
    text-align: center;
  }

  .nav__menu .nav__link,
  .site-header.is-scrolled .nav__menu .nav__link,
  .site-header.is-menu-open .nav__menu .nav__link,
  .site-header.is-menu-open.is-scrolled .nav__menu .nav__link {
    font-size: var(--text-xl);
    color: var(--color-white);
  }

  .nav__menu .nav__cta {
    font-size: var(--text-lg);
    padding: var(--space-sm) var(--space-xl);
    margin-top: var(--space-md);
  }

  .site-header.is-menu-open .nav__toggle span,
  .site-header.is-menu-open.is-scrolled .nav__toggle span {
    background: var(--color-white);
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

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

  .features__layout--reverse {
    direction: ltr;
  }

  .features__visual {
    order: -1;
  }

  .value-prop {
    grid-template-columns: 1fr;
  }

  .value-prop__accent-box {
    position: relative;
    bottom: auto;
    right: auto;
    display: inline-block;
    margin-top: var(--space-md);
  }

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

  .testimonials__grid .testimonial-card:last-child {
    max-width: none;
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    align-items: start;
  }

  .footer__grid > :first-child,
  .footer__grid > :last-child {
    grid-column: 1 / -1;
  }

  .footer__grid > :nth-child(2),
  .footer__grid > :nth-child(3) {
    width: min(100%, 14rem);
    justify-self: center;
  }

  .footer__grid > :last-child {
    width: min(100%, 18rem);
    justify-self: center;
    text-align: center;
  }

  .footer__grid > :last-child .footer__heading {
    text-align: center;
  }

  .footer__grid > :last-child .footer__link {
    text-align: center;
  }

  .footer__grid > :last-child p.footer__link {
    padding-inline: 0;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .cta-section__title {
    font-size: var(--text-3xl);
  }
}

/* ---- Mobile Small (max 480px) ---- */
@media (max-width: 30rem) {
  .pool-compare__summary {
    font-size: var(--text-base);
  }

  .pool-compare-block .image-container {
    aspect-ratio: 4 / 5;
  }

  .pool-compare-block .tag {
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
  }

  .counter-section__title {
    font-size: clamp(1.75rem, 7vw, 2.2rem);
    max-width: 11ch;
  }

  .hero__title {
    font-size: clamp(2.125rem, 7.6vw, 2.8rem);
    line-height: 1.06;
    max-width: 12ch;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    text-align: center;
  }

  .benefit-card {
    padding: var(--space-lg);
  }

  .section {
    padding-block: var(--space-2xl);
  }
}
