/* Consistent desktop-first breakpoints: laptop, tablet, mobile */
@media (max-width: 1180px) {
    :root {
        --header-height: 5.5rem;
    }

    .hero-content {
        width: min(44rem, 78%);
    }

    .trust-grid article {
        padding-inline: 1rem;
    }

    .about-content {
        grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.58fr);
        gap: 2rem;
    }

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

}

@media (max-width: 900px) {
    html,
    .carousel-viewport {
        scroll-behavior: auto;
    }

    [data-reveal],
    [data-reveal].is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .site-header,
    .service-item,
    .service-item p,
    .service-card,
    .service-card > img,
    .project-card img,
    .button,
    .text-link,
    .carousel-button {
        transition: none;
    }

    .service-card:hover,
    .service-card:hover > img,
    .project-card:hover img,
    .button:hover {
        transform: none;
    }

    .standards-grid article,
    .service-item,
    .service-card-content {
        background: rgba(30, 30, 30, 0.92);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .standards-grid article {
        background: rgba(10, 10, 10, 0.94);
    }

    :root {
        --gutter: clamp(1.25rem, 5vw, 2.5rem);
        --section-space: 4.5rem;
    }

    .site-header {
        min-height: 5rem;
        background: rgba(30, 30, 30, 0.92);
        backdrop-filter: none;
    }

    .site-header.is-scrolled {
        color: var(--color-white);
        background: rgba(30, 30, 30, 0.96);
        backdrop-filter: none;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
    }

    .brand,
    .nav-toggle {
        position: relative;
        z-index: 2;
    }

    .header-cta {
        display: none;
    }

    .nav-toggle {
        display: grid;
        width: 3rem;
        height: 3rem;
        padding: 0;
        place-content: center;
        gap: 0.45rem;
        color: inherit;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.25);
        cursor: pointer;
    }

    .nav-toggle span:not(.sr-only) {
        display: block;
        width: 1.25rem;
        height: 1px;
        background: currentColor;
        transition: transform var(--transition);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        transform: translateY(0.23rem) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-0.23rem) rotate(-45deg);
    }

    .primary-nav {
        position: fixed;
        z-index: 1;
        inset: 0;
        display: grid;
        padding: 7rem var(--gutter) 3rem;
        place-items: center;
        color: var(--color-white);
        background: var(--color-ink);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-1rem);
        transition: opacity var(--transition), transform var(--transition);
    }

    .primary-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .primary-nav ul {
        display: grid;
        gap: 1rem;
        text-align: center;
    }

    .primary-nav a {
        display: block;
        font-size: 1.4rem;
        letter-spacing: -0.02em;
        text-transform: none;
    }

    .hero-grid {
        min-height: auto;
        min-height: 100svh;
        padding-block: 9rem 7rem;
    }

    .page-hero-grid {
        min-height: 100svh;
        padding-block: 8rem 4rem;
    }

    .page-hero-services .page-hero-content {
        margin-top: -1rem;
    }

    .page-hero-visual {
        width: 100vw;
        max-width: none;
        height: 100%;
        margin: 0;
    }

    .page-hero-content {
        width: min(40rem, 82%);
    }

    .hero-visual img,
    .page-hero-visual img {
        width: 66%;
    }

    .owner-bio-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .owner-portrait {
        width: min(30rem, 100%);
        margin-inline: auto;
    }

    .hero-content {
        padding-top: 0;
    }

    .hero-content {
        width: min(40rem, 82%);
    }

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

    .trust-grid article,
    .trust-grid article:first-child {
        min-height: 9rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

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

    .section-heading,
    .projects-heading {
        display: grid;
        gap: 2rem;
        margin-bottom: 2.5rem;
    }

    .services-list {
        grid-template-columns: 1fr;
    }

    .service-item {
        min-height: 0;
    }

    .process-list li {
        grid-template-columns: 3rem minmax(12rem, 0.55fr) minmax(15rem, 1fr);
        gap: 1.25rem;
    }

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

    .process-image {
        min-height: 26rem;
    }

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

    .project-card {
        height: 28rem;
    }

    .carousel-track {
        grid-auto-columns: calc(50% - 0.625rem);
        gap: 1.25rem;
    }

    .service-carousel .carousel-track {
        grid-auto-columns: 100%;
        gap: 0;
    }

    .service-carousel .service-card {
        grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
    }

    .service-carousel .service-card-content {
        padding: 2.15rem;
    }

    .carousel-controls {
        position: static;
        grid-row: 2;
        display: flex;
        justify-content: center;
        gap: 1rem;
        pointer-events: auto;
    }

    .carousel-viewport {
        grid-row: 1;
        min-width: 0;
    }

    .carousel-button,
    .carousel-button:hover,
    .carousel-button:focus-visible {
        position: static;
        width: 3rem;
        height: 3rem;
        transform: none;
        box-shadow: none;
    }

    .estimate-intro {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1.4fr 0.7fr;
    }

    .footer-grid > :last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    :root {
        --section-space: 3.75rem;
    }

    h1 {
        font-size: clamp(2.2rem, 9.5vw, 2.75rem);
    }

    h2 {
        font-size: clamp(1.9rem, 8.5vw, 2.8rem);
    }

    body,
    .hero-content,
    .trust-grid article,
    .page-hero-content,
    .owner-bio-copy,
    .section-heading,
    .projects-heading,
    .service-item,
    .estimate-intro,
    .estimate-form,
    .footer-grid,
    .footer-bottom {
        text-align: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .content-image-kitchen {
        width: 100%;
        height: 22rem;
    }

    .button-row,
    .about-content h2,
    .page-hero-content h1,
    .page-hero-content > p,
    .owner-bio-copy h2,
    .owner-bio-copy p,
    .section-services h2,
    .about-statement,
    .section-heading > p,
    .projects-heading > p,
    .estimate-intro h2,
    .estimate-intro > p:not(.section-kicker),
    .footer-intro p {
        margin-inline: auto;
    }

    .brand-icon {
        width: 4.5rem;
    }

    .hero-grid {
        padding-top: 8rem;
        padding-bottom: 5rem;
    }

    .hero-copy {
        margin-block: 2rem;
        font-size: 1rem;
    }

    .hero-visual::after {
        background: linear-gradient(0deg, rgba(20, 20, 20, 0.92) 0%, rgba(20, 20, 20, 0.72) 62%, rgba(20, 20, 20, 0.58) 100%);
    }

    .page-hero-visual::before {
        background: linear-gradient(0deg, rgba(20, 20, 20, 0.94) 0%, rgba(20, 20, 20, 0.78) 68%, rgba(20, 20, 20, 0.62) 100%);
    }

    .hero-content {
        width: 100%;
    }

    .hero-visual img {
        width: 100%;
        object-position: 58% center;
    }

    .page-hero-grid {
        min-height: 100svh;
        padding-block: 7.5rem 3.5rem;
    }

    .page-hero-services .page-hero-content {
        margin-top: 0;
    }

    .page-hero-content {
        width: 100%;
    }

    .page-hero-visual img {
        width: 100%;
        object-position: 58% center;
    }

    .button-row {
        display: grid;
        gap: 1rem;
    }

    .button-row .button,
    .button-row .text-link {
        width: 100%;
    }

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

    .trust-grid article {
        justify-content: center;
        min-height: 0;
    }

    .service-item {
        min-height: 0;
        padding: 1.5rem;
        text-align: center;
    }

    .service-card {
        text-align: center;
    }

    .service-card:hover {
        border-color: rgba(30, 30, 30, 0.12);
        transform: none;
    }

    .service-card:hover > img {
        transform: none;
    }

    .service-card-content {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        padding: 1.25rem;
    }

    .service-item:hover {
        background: rgba(30, 30, 30, 0.92);
        border-color: rgba(255, 255, 255, 0.19);
        transform: none;
    }

    .service-item > div {
        gap: 0.75rem;
        justify-items: center;
    }

    .service-item p {
        max-height: 0;
        margin: 0;
        overflow: hidden;
        opacity: 0;
    }

    .service-item.is-expanded p {
        max-height: 14rem;
        margin-top: 0.35rem;
        opacity: 1;
    }

    .service-more {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        justify-content: center;
        padding: 0.6rem 0;
        color: var(--color-white);
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--color-gold);
        font-family: var(--font-display);
        font-size: 0.68rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        cursor: pointer;
    }

    .service-more .icon {
        font-size: 1rem;
    }

    .service-more[aria-expanded="true"] {
        color: var(--color-gold-light);
        border-color: var(--color-gold-light);
    }

    .service-more[aria-expanded="true"] .icon {
        transform: rotate(270deg);
    }

    .project-card {
        height: 26rem;
    }

    .owner-portrait {
        min-height: 31rem;
    }

    .standards-showcase {
        min-height: auto;
    }

    .standards-content {
        padding-block: 3.75rem;
    }

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

    .standards-grid article {
        grid-template-columns: 1fr;
        min-height: 0;
        text-align: center;
    }

    .standards-placeholder {
        justify-self: center;
    }

    .carousel-controls {
        position: static;
        grid-row: 2;
        display: flex;
        justify-content: center;
        gap: 1rem;
    }

    .carousel-viewport {
        grid-row: 1;
        min-width: 0;
    }

    .carousel-button {
        position: static;
        width: 3rem;
        height: 3rem;
        transform: none;
        box-shadow: none;
    }

    .carousel-button:hover,
    .carousel-button:focus-visible {
        transform: none;
    }

    .carousel-track {
        grid-auto-columns: 100%;
        gap: 1rem;
    }

    .carousel-card {
        height: 27rem;
    }

    .service-carousel .carousel-card {
        display: grid;
        grid-template-columns: 1fr;
        height: auto;
    }

    .service-carousel .service-card > img {
        grid-column: 1;
        height: 19rem;
    }

    .service-carousel .service-card-content {
        position: relative;
        inset: auto;
        grid-column: 1;
        width: 100%;
        margin: 0;
        padding: 1.6rem 1.25rem;
        text-align: center;
    }

    .service-carousel .service-card-cta {
        margin-inline: auto;
    }

    .process-list li {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        justify-items: center;
        text-align: center;
    }

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

    .form-grid label {
        justify-items: center;
    }

    .estimate-form input,
    .estimate-form select,
    .estimate-form textarea {
        text-align: center;
    }

    .form-span {
        grid-column: auto;
    }

    .estimate-form {
        padding: 1.25rem;
    }

    .form-submit {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-contact li {
        justify-items: center;
    }

    .brand-footer,
    .projects-action,
    .footer-social-link {
        justify-content: center;
        margin-inline: auto;
    }

    .projects-action .project-cta {
        width: 100%;
    }

    .footer-grid > :last-child {
        grid-column: auto;
    }

    .footer-bottom {
        display: grid;
        gap: 0.5rem;
    }
}
