/* Responsive Styles - Mobile First */
/* Base: 320px+ (mobile) - styles are in component files */

/* Mobile: max 767px - iOS background-attachment fix */
@media (max-width: 767px) {
    .hero {
        background-attachment: scroll;
        min-height: 100vh;
    }
}

/* Tablet: 768px+ */
@media (min-width: 768px) {

    /* Nav: show menu, hide toggle */
    .nav__menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--space-md);
    }

    .nav__toggle {
        display: none;
    }

    .nav__logo {
        height: 57px;
    }

    /* Hero: larger text, text-align left */
    .hero {
        min-height: 90vh;
        padding: var(--space-3xl) var(--space-md);
    }

    .hero__container {
        text-align: left;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        margin-left: 0;
        margin-right: auto;
    }

    .hero__cta-group {
        flex-direction: row;
        justify-content: flex-start;
    }

    .hero__trust {
        justify-content: flex-start;
    }

    /* Services: 2-column grid */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* How it works: row direction */
    .how-it-works__steps {
        flex-direction: row;
        align-items: stretch;
    }

    .how-it-works__step {
        max-width: none;
    }

    /* Connector line between steps on tablet+ */
    .how-it-works__step:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 24px;
        right: -1rem;
        width: 2rem;
        height: 0;
        border-top: 2px dashed var(--primary-teal);
    }

    /* Why us: 2-column grid */
    .why-us__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Areas: 3-column grid */
    .areas__list {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Testimonials: stays 1 col on tablet */

    /* Form: 2-column grid */
    .quote__form {
        grid-template-columns: repeat(2, 1fr);
    }

    .quote__title {
        font-size: 2.25rem;
    }

    /* Footer: 2-column grid */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__brand {
        grid-column: 1 / -1;
    }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {

    /* Nav: show phone link */
    .nav__phone {
        display: flex;
    }

    /* Hero: even larger text */
    .hero__title {
        font-size: 3rem;
    }

    /* Services: 4-column grid */
    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .services__title {
        font-size: 2.25rem;
    }

    /* How it works title */
    .how-it-works__title {
        font-size: 2.25rem;
    }

    /* Why us: 3-column grid */
    .why-us__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .why-us__title {
        font-size: 2.25rem;
    }

    /* Areas: 4-column grid */
    .areas__list {
        grid-template-columns: repeat(4, 1fr);
    }

    .areas__title {
        font-size: 2.25rem;
    }

    /* Testimonials: 3-column grid */
    .testimonials__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonials__title {
        font-size: 2.25rem;
    }

    /* Footer: 4-column grid */
    .footer__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer__brand {
        grid-column: auto;
    }
}

/* Wide: 1440px+ */
@media (min-width: 1440px) {

    /* Max widths and larger spacing */
    .hero__container {
        max-width: 1400px;
    }

    .hero__title {
        font-size: 3.5rem;
    }

    .hero__subtitle {
        font-size: 1.25rem;
    }

    .services__container,
    .how-it-works__container,
    .why-us__container,
    .areas__container,
    .testimonials__container,
    .footer__container {
        max-width: 1400px;
    }

    .nav__container {
        max-width: 1400px;
    }

    .services {
        padding: 5rem var(--space-md);
    }

    .how-it-works {
        padding: 5rem var(--space-md);
    }

    .why-us {
        padding: 5rem var(--space-md);
    }

    .areas {
        padding: 5rem var(--space-md);
    }

    .testimonials {
        padding: 5rem var(--space-md);
    }

    .quote {
        padding: 5rem var(--space-md);
    }

    .quote__container {
        max-width: 900px;
    }
}

/* Reduced motion - accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    html {
        scroll-behavior: auto;
    }
}
