/*
  Solid Rock Contracting & Remodeling
  Mobile-first. From 1100px up the page switches to "canvas" mode: every size is expressed in
  mockup pixels (--u = 1px of the 1536px-wide design), so text lines up with the background art
  that was cut from the mockup at any desktop width.
*/

:root {
    --navy-950: #011a38;
    --navy-900: #042a51;
    --navy-800: #0a3463;
    --navy-700: #0b4a7b;
    --ink: #0b1b33;
    --heading: #0a2547;
    --icon: #17467e;
    --rule: #7d9fbb;
    --sky-50: #f1f7fd;
    --white: #fff;
    --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    --font-serif: "Bitter", Georgia, serif;
    --font-script: "Great Vibes", "Brush Script MT", cursive;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--sky-50);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

figure {
    margin: 0;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page {
    position: relative;
    container-type: inline-size;
    --u: calc(100cqw / 1536);
    overflow-x: clip;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0, 30, 70, 0.45);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 25, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn .mdi {
    font-size: 1.15em;
    line-height: 1;
    margin-right: -0.2em;
}

.btn:hover,
.btn:focus-visible {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 25, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.btn--deep {
    background: linear-gradient(180deg, #45a1d0 0%, #1d78b0 38%, #0a5c93 55%, #00487a 100%);
}

.btn--glossy {
    background: linear-gradient(180deg, #8ad2f4 0%, #5aaad8 36%, #2f88c0 52%, #1076ad 100%);
}

/* ---------- Top bar ---------- */
.topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 20px;
    padding: 8px 16px;
    background: var(--navy-900);
    color: var(--white);
    font-size: 14px;
}

.topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.topbar__item .mdi {
    font-size: 18px;
    line-height: 1;
}

a.topbar__item:hover {
    text-decoration: underline;
}

.topbar__social {
    display: inline-flex;
    gap: 10px;
}

.topbar__social a {
    display: inline-flex;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.topbar__social a:hover {
    opacity: 0.8;
}

.topbar__social .mdi {
    font-size: 22px;
    line-height: 1;
}

/* ---------- Header / nav ---------- */
.site-header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: linear-gradient(180deg, #c9def5 0%, #eef5fc 100%);
}

.site-header__logo img {
    width: 200px;
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle__btn {
    display: inline-flex;
    padding: 8px;
    border-radius: 6px;
    color: var(--navy-900);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.nav-toggle:focus-visible + .nav-toggle__btn {
    outline: 2px solid var(--navy-700);
}

.site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0 16px;
}

.nav-toggle:checked ~ .site-nav {
    display: flex;
    animation: drop-in 0.2s ease;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(11, 74, 123, 0.12);
}

.site-nav__link.is-active {
    color: var(--navy-700);
}

.site-nav__menu {
    display: flex;
    flex-direction: column;
    padding-left: 16px;
}

.site-nav__menu a {
    padding: 8px 4px;
    color: var(--ink);
    text-decoration: none;
}

.site-nav__cta {
    margin-top: 16px;
    align-self: flex-start;
}

@keyframes drop-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 70vh;
    width: 100%;
    background: url("../img/hero-house.jpg") 55% 50% / cover no-repeat;
}

.br-desk {
    display: none;
}

/* ---------- Services strip ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 8px;
    padding: 24px 16px;
    background-color: #efeeec;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0) 88%, rgba(0, 0, 0, 0.05)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1536' height='160'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .022' numOctaves='5' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .45 0 0 0 0 .47 1.3 0 0 0 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
    background-size: 100% 100%, cover;
}

.svc {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--heading);
    text-align: center;
    text-decoration: none;
}

.svc .mdi {
    color: var(--icon);
    font-size: 56px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.svc span {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.05;
    text-shadow: 0 0 3px #fff, 0 0 6px #fff;
}

.svc:hover .mdi {
    transform: translateY(-3px);
}

/* ---------- About / quote / work / CTA ---------- */
.bottom {
    position: relative;
}

.rule-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 12px;
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.rule-heading::after {
    content: "";
    flex: 1;
    height: 2px;
    background: currentColor;
    opacity: 0.85;
}

.about {
    padding: 40px 16px 32px;
    background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 60%, #2c6597 100%);
    color: var(--white);
}

.about p {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.4;
}

.about .btn {
    margin-top: 8px;
}

.quote {
    padding: 24px 16px;
    background: linear-gradient(180deg, #2c6597 0%, #9fc2e2 45%, var(--sky-50) 100%);
}

.quote img {
    width: min(100%, 440px);
    margin: 0 auto;
    filter: drop-shadow(0 8px 14px rgba(0, 20, 50, 0.3));
}

.work {
    padding: 24px 16px 40px;
    background: var(--sky-50);
    color: var(--heading);
}

.work .rule-heading::after {
    background: #08356e;
}

.work__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.work__photo {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 25, 60, 0.18);
}

.work__photo img {
    width: 100%;
    height: 100%;
    aspect-ratio: 27 / 21;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.work__photo:hover img {
    transform: scale(1.04);
}

.work__photo figcaption {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    padding: 3px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.work__photo--before figcaption {
    background: rgba(40, 46, 56, 0.88);
}

.work__photo--after figcaption {
    background: #1d5d98;
}

.cta-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    background: url("../img/mountains.jpg") 50% 70% / cover no-repeat, var(--navy-900);
    text-align: center;
}

.tagline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    color: var(--white);
    font-family: var(--font-script);
    font-size: 40px;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0, 20, 50, 0.6);
}

.tagline::before,
.tagline::after {
    content: "";
    width: 32px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
    .services {
        grid-template-columns: repeat(3, 1fr);
    }

    .about,
    .quote,
    .work {
        padding-left: 32px;
        padding-right: 32px;
    }

    .about p {
        max-width: 640px;
    }
}

/* ---------- Desktop: scaled canvas matching the 1536px mockup ---------- */
@media (min-width: 1100px) {
    /* top bar: 47px tall, mockup outer margins; items spread evenly so the configurable service area can change length */
    .topbar {
        position: relative;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0 calc(24 * var(--u));
        height: calc(47 * var(--u));
        padding: 0 calc(58 * var(--u)) 0 calc(96 * var(--u));
        font-size: calc(19.5 * var(--u));
    }

    .topbar__item,
    .topbar__social {
        gap: calc(15 * var(--u));
        line-height: 1;
        white-space: nowrap;
    }

    .topbar__item .mdi {
        font-size: calc(27 * var(--u));
    }

    .topbar__item--area {
        gap: calc(12 * var(--u));
    }

    .topbar__social {
        gap: calc(20 * var(--u));
    }

    .topbar__social .mdi {
        font-size: calc(37 * var(--u));
    }

    /* header overlays the hero art (logo is part of the hero image on desktop) */
    .site-header {
        position: absolute;
        top: calc(47 * var(--u));
        left: 0;
        right: 0;
        z-index: 5;
        display: block;
        height: calc(452 * var(--u));
        padding: 0;
        background: none;
        pointer-events: none;
    }

    .site-header__logo {
        position: absolute;
        left: calc(25 * var(--u));
        top: 0;
        width: calc(575 * var(--u));
        height: calc(440 * var(--u));
        pointer-events: auto;
    }

    .site-header__logo img,
    .nav-toggle__btn {
        display: none;
    }

    .site-nav,
    .nav-toggle:checked ~ .site-nav {
        position: absolute;
        top: calc(13 * var(--u));
        right: calc(28 * var(--u));
        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto;
        height: calc(50 * var(--u));
        padding: 0;
        animation: none;
        pointer-events: auto;
    }

    .site-nav__link {
        position: relative;
        height: 100%;
        padding: 0 calc(10 * var(--u));
        margin-right: calc(20 * var(--u));
        border: 0;
        white-space: nowrap;
        font-size: calc(20 * var(--u));
        letter-spacing: -0.005em;
        text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
        transition: color 0.15s ease;
    }

    .site-nav__link::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(1 * var(--u));
        height: calc(4 * var(--u));
        background: var(--navy-700);
        transform: scaleX(0);
        transition: transform 0.2s ease;
    }

    .site-nav__link.is-active::after,
    .site-nav__link:hover::after {
        transform: scaleX(1);
    }

    .site-nav__link.is-active {
        color: var(--ink);
    }

    .site-nav__link .mdi {
        font-size: calc(24 * var(--u));
        margin-left: calc(2 * var(--u));
    }

    .site-nav__dropdown {
        position: relative;
        height: 100%;
    }

    .site-nav__dropdown > .site-nav__link {
        margin-right: calc(15 * var(--u));
    }

    .site-nav__menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: calc(260 * var(--u));
        padding: calc(8 * var(--u)) 0;
        border-radius: 8px;
        background: var(--white);
        box-shadow: 0 10px 30px rgba(0, 25, 60, 0.22);
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    }

    .site-nav__dropdown:hover .site-nav__menu,
    .site-nav__dropdown:focus-within .site-nav__menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-nav__menu a {
        padding: calc(8 * var(--u)) calc(18 * var(--u));
        font-size: calc(18 * var(--u));
        font-weight: 600;
    }

    .site-nav__menu a:hover {
        background: var(--sky-50);
        color: var(--navy-700);
    }

    .site-nav__cta {
        width: calc(284 * var(--u));
        height: calc(47 * var(--u));
        margin: 0 0 0 calc(4 * var(--u));
        padding: 0;
        border-radius: calc(7 * var(--u));
        font-size: calc(20.5 * var(--u));
    }

    /* hero: the full mockup band (logo + house), nav painted out */
    .hero {
        aspect-ratio: 1536 / 452;
        max-height: none;
        background: url("../img/hero.jpg") 0 0 / 100% 100% no-repeat;
    }

    .br-desk {
        display: inline;
    }

    /* services strip */
    .services {
        grid-template-columns: 309.5fr repeat(4, 239.5fr) 268.5fr;
        gap: 0;
        height: calc(135 * var(--u));
        padding: 0;
    }

    .svc {
        justify-content: flex-start;
        padding-top: calc(5 * var(--u));
    }

    .svc:first-child {
        padding-left: calc(70 * var(--u));
    }

    .svc:last-child {
        padding-right: calc(29 * var(--u));
    }

    .svc + .svc::before {
        content: "";
        position: absolute;
        left: 0;
        top: calc(21 * var(--u));
        bottom: calc(22 * var(--u));
        width: max(1px, calc(1.5 * var(--u)));
        background: var(--rule);
    }

    .svc .mdi {
        font-size: calc(72 * var(--u));
        height: calc(64 * var(--u));
        display: flex;
        align-items: center;
    }

    .svc span {
        font-size: calc(25.5 * var(--u));
        line-height: calc(25 * var(--u));
    }

    /* bottom: one background plate, content pinned to mockup coordinates */
    .bottom {
        aspect-ratio: 1536 / 390;
        background: url("../img/bottom.jpg") 0 0 / 100% 100% no-repeat;
    }

    .about,
    .quote,
    .work,
    .cta-band {
        position: absolute;
        padding: 0;
        background: none;
    }

    .rule-heading {
        gap: calc(16 * var(--u));
        margin: 0;
        font-size: calc(41 * var(--u));
        line-height: calc(46 * var(--u));
    }

    .rule-heading::after {
        height: max(1px, calc(2 * var(--u)));
        margin-top: calc(4 * var(--u));
    }

    .about {
        left: calc(56 * var(--u));
        top: calc(12 * var(--u));
        width: calc(442 * var(--u));
    }

    .about .rule-heading {
        margin-bottom: calc(6 * var(--u));
    }

    .about p {
        margin: 0 0 calc(7 * var(--u));
        white-space: nowrap;
        font-size: calc(18.6 * var(--u));
        line-height: calc(23.5 * var(--u));
    }

    .about .btn {
        width: calc(289 * var(--u));
        height: calc(44 * var(--u));
        margin-top: calc(8 * var(--u));
        padding: 0;
        border-radius: calc(7 * var(--u));
        font-size: calc(20 * var(--u));
    }

    .quote {
        inset: 0;
        pointer-events: none;
    }

    .quote img {
        display: none;
    }

    .work {
        left: calc(946 * var(--u));
        top: calc(10 * var(--u));
        width: calc(556 * var(--u));
    }

    .work__grid {
        grid-template-columns: 259fr 287fr;
        gap: calc(11 * var(--u));
        margin-top: calc(7 * var(--u));
    }

    .work__photo {
        height: calc(212 * var(--u));
        border-radius: calc(10 * var(--u));
        box-shadow: none;
    }

    .work__photo img {
        aspect-ratio: auto;
    }

    .work__photo figcaption {
        bottom: calc(8 * var(--u));
        width: calc(94 * var(--u));
        padding: calc(4 * var(--u)) 0;
        border-width: max(1px, calc(1.6 * var(--u)));
        font-size: calc(18.5 * var(--u));
        text-align: center;
    }

    .work__photo--after figcaption {
        margin-left: calc(-5 * var(--u));
    }

    .cta-band {
        left: 0;
        right: 0;
        top: calc(296 * var(--u));
        height: calc(94 * var(--u));
        display: block;
    }

    .cta-band .tagline {
        position: absolute;
        left: calc(382 * var(--u));
        width: calc(754 * var(--u));
        top: 0;
        height: calc(88 * var(--u));
        justify-content: center;
        gap: calc(18 * var(--u));
        white-space: nowrap;
        font-size: calc(68 * var(--u));
        line-height: 1;
    }

    .cta-band .tagline::before,
    .cta-band .tagline::after {
        width: calc(56 * var(--u));
        height: max(1px, calc(2.5 * var(--u)));
        margin-top: calc(6 * var(--u));
    }

    .cta-band__btn {
        position: absolute;
        left: calc(1202 * var(--u));
        top: calc(21 * var(--u));
        width: calc(298 * var(--u));
        height: calc(49 * var(--u));
        padding: 0;
        border-radius: calc(8 * var(--u));
        font-size: calc(20.5 * var(--u));
    }
}

/* ---------- Testimonials carousel ---------- */
.testimonials {
    padding: 48px 4px 56px;
    background: linear-gradient(180deg, #eef5fc 0%, var(--sky-50) 100%);
}

.testimonials__inner {
    max-width: 880px;
    margin: 0 auto;
}

.testimonials__heading {
    margin: 0 12px 16px;
    color: var(--heading);
    font-size: 30px;
}

.testimonials__heading::after {
    background: #08356e;
}

.testimonials__viewport {
    overflow: hidden;
    touch-action: pan-y;
}

.testimonials__track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* padding keeps each card's shadow inside its own slide so neighbours never peek in */
.testimonials__slide {
    flex: 0 0 100%;
    padding: 8px 12px 24px;
}

.testimonials__card {
    height: 100%;
    margin: 0;
    padding: 40px 24px 32px;
    text-align: center;
}

.testimonials__mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 65%, #2c6597 100%);
    color: var(--white);
    font-size: 32px;
}

.testimonials__card blockquote {
    margin: 0;
}

.testimonials__card blockquote p {
    margin: 0 0 24px;
    color: #33475f;
    font-family: var(--font-serif);
    font-size: 19px;
    font-style: italic;
    line-height: 1.6;
}

.testimonials__card figcaption {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.testimonials__card figcaption strong {
    color: var(--heading);
    font-size: 18px;
}

.testimonials__card figcaption span {
    color: var(--icon);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.testimonials__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.testimonials__arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(11, 74, 123, 0.25);
    border-radius: 50%;
    background: var(--white);
    color: var(--navy-700);
    font-size: 26px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.testimonials__arrow:hover,
.testimonials__arrow:focus-visible {
    background: var(--navy-700);
    color: var(--white);
}

.testimonials__arrow:active {
    transform: scale(0.94);
}

.testimonials__dots {
    display: flex;
    gap: 8px;
}

.testimonials__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: #b9d2ea;
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.testimonials__dot[aria-current="true"] {
    width: 28px;
    background: var(--navy-700);
}

@supports (animation-timeline: view()) {
    .testimonials__card {
        animation: media-rise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 70%;
    }
}

@media (min-width: 640px) {
    .testimonials {
        padding: 64px 20px 72px;
    }

    .testimonials__heading {
        font-size: 38px;
    }

    .testimonials__card {
        padding: 48px 56px 40px;
    }

    .testimonials__card blockquote p {
        font-size: 21px;
    }
}

/* ---------- Estimate page ---------- */
.estimate {
    padding: 32px 16px 48px;
    background: linear-gradient(180deg, #eef5fc 0%, var(--sky-50) 100%);
}

.estimate__inner {
    max-width: 1160px;
    margin: 0 auto;
}

.estimate__intro {
    margin-bottom: 24px;
    color: var(--heading);
}

.estimate__intro .rule-heading {
    font-size: 30px;
}

.estimate__intro .rule-heading::after {
    background: #08356e;
}

.estimate__intro p {
    max-width: 640px;
    margin: 0;
    font-size: 18px;
    color: #33475f;
}

.estimate__grid {
    display: grid;
    gap: 24px;
}

.card {
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 25, 60, 0.06), 0 8px 24px rgba(0, 25, 60, 0.1);
}

.estimate-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px;
}

.field-row {
    display: grid;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    color: var(--heading);
    font-size: 15px;
    font-weight: 700;
}

.req {
    color: #b42318;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c3d2e2;
    border-radius: 8px;
    background: #fbfdff;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field textarea {
    min-height: 144px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #1d78b0;
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(29, 120, 176, 0.2);
}

.field .input-validation-error {
    border-color: #b42318;
}

.select {
    position: relative;
}

.select select {
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.select .mdi {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--navy-700);
    font-size: 22px;
    pointer-events: none;
}

.field__error {
    color: #b42318;
    font-size: 14px;
}

.field__error:empty {
    display: none;
}

.form-alert {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #f4c7c3;
    border-radius: 8px;
    background: #fef3f2;
    color: #7a271a;
    animation: drop-in 0.2s ease;
}

.form-alert .mdi {
    font-size: 22px;
    line-height: 1;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.estimate-form__submit {
    align-self: flex-start;
    min-width: 200px;
    padding: 14px 28px;
    font-size: 18px;
    cursor: pointer;
}

.estimate-form__submit:disabled {
    cursor: wait;
    filter: saturate(0.7);
    transform: none;
}

.spinner {
    display: none;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.is-loading .spinner {
    display: inline-block;
}

.is-loading .mdi {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.estimate__done {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 32px 24px;
    animation: drop-in 0.25s ease;
}

.estimate__done > .mdi {
    color: #1f8a4c;
    font-size: 56px;
    line-height: 1;
}

.estimate__done h2 {
    margin: 0;
    color: var(--heading);
    font-family: var(--font-serif);
    font-size: 28px;
}

.estimate__done p {
    margin: 0 0 16px;
    color: #33475f;
    font-size: 18px;
}

.estimate__done a:not(.btn),
.form-alert a {
    color: inherit;
    font-weight: 700;
}

.estimate__aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 65%, #2c6597 100%);
    color: var(--white);
}

.estimate__aside h2 {
    margin: 0 0 4px;
    font-family: var(--font-serif);
    font-size: 26px;
}

.estimate__contact {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.estimate__contact .mdi {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 20px;
}

a.estimate__contact:hover {
    text-decoration: underline;
}

.estimate__aside blockquote {
    margin: 8px 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.estimate__aside blockquote p {
    margin: 0 0 4px;
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    font-weight: 700;
}

.estimate__aside blockquote footer {
    color: #b9d2ea;
    font-size: 15px;
}

.foot-band {
    display: flex;
    justify-content: center;
    padding: 28px 16px;
    background: url("../img/mountains.jpg") 50% 70% / cover no-repeat, var(--navy-900);
}

/* ---------- Service pages ---------- */
.service-page {
    padding: 32px 16px 48px;
    background: linear-gradient(180deg, #eef5fc 0%, var(--sky-50) 100%);
}

.service-page__inner {
    max-width: 1160px;
    margin: 0 auto;
}

.service-page__intro {
    margin-bottom: 24px;
    color: var(--heading);
}

.service-page__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--icon);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-page__eyebrow .mdi {
    font-size: 24px;
}

.service-page__intro .rule-heading {
    font-size: 30px;
}

.service-page__intro .rule-heading::after {
    background: #08356e;
}

.service-page__grid {
    display: grid;
    gap: 24px;
}

.service-page__main,
.service-page__side {
    display: grid;
    gap: 24px;
}

.service-page__copy {
    padding: 24px;
    animation: drop-in 0.4s ease both;
}

/* photo slot: the icon shows as a placeholder until the image exists (img removes itself on error) */
.service-page__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(160deg, #e3eef9 0%, #bcd4ec 100%);
    animation: media-reveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.service-page__media > .mdi {
    color: rgba(23, 70, 126, 0.3);
    font-size: 96px;
}

.service-page__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: 60% 40%;
    animation: media-drift 24s ease-in-out 0.9s infinite alternate;
}

.service-page__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: media-shine 1.4s ease 0.7s both;
    pointer-events: none;
}

@keyframes media-reveal {
    from {
        clip-path: inset(0 0 100% 0);
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        clip-path: inset(0);
        opacity: 1;
        transform: none;
    }
}

@keyframes media-drift {
    from {
        transform: scale(1.02);
    }

    to {
        transform: scale(1.1) translate(-1.5%, -1%);
    }
}

@keyframes media-shine {
    to {
        transform: translateX(100%);
    }
}

@keyframes media-rise {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.97);
    }
}

/* on phones the photo sits below the text, so play the reveal as it scrolls into view where supported */
@supports (animation-timeline: view()) {
    .service-page__media {
        animation: media-rise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 80%;
    }

    .service-page__media::after {
        animation: media-shine linear both;
        animation-timeline: view();
        animation-range: entry 60% cover 55%;
    }
}

.service-page__copy p {
    margin: 0 0 16px;
    color: #33475f;
    font-size: 18px;
    line-height: 1.6;
}

.service-page__copy p:last-child {
    margin-bottom: 0;
}

.service-page__copy .service-page__tagline {
    margin: 24px 0 0;
    padding: 8px 0 8px 16px;
    border-left: 4px solid var(--navy-700);
    color: var(--heading);
    font-family: var(--font-serif);
    font-size: 21px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.35;
}

.service-page__copy .service-page__signoff {
    margin: 16px 0 0;
    color: #4f6278;
    font-size: 16px;
    font-weight: 600;
}

.service-page__copy h2 {
    margin: 0 0 16px;
    color: var(--heading);
    font-family: var(--font-serif);
    font-size: 24px;
}

.service-page__list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-page__list li {
    display: flex;
    gap: 12px;
    color: #33475f;
    font-size: 17px;
    line-height: 1.5;
}

.service-page__list .mdi {
    flex: none;
    color: var(--navy-700);
    font-size: 22px;
    line-height: 1.15;
}

.service-page__list strong {
    display: block;
    color: var(--heading);
}

.service-page__copy * + h2 {
    margin-top: 32px;
}

.service-page__copy .service-page__list:not(:last-child) {
    margin-bottom: 24px;
}

.service-page__urgent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    background: var(--sky-50);
    box-shadow: inset 0 0 0 1px rgba(11, 74, 123, 0.15);
}

.service-page__copy .service-page__urgent p {
    flex: 1 1 240px;
    margin: 0;
    color: var(--heading);
    font-weight: 600;
}

.service-page__aside-btn {
    margin-top: 8px;
}

@media (min-width: 640px) {
    .estimate {
        padding: 48px 32px 64px;
    }

    .estimate__intro .rule-heading,
    .service-page__intro .rule-heading {
        font-size: 38px;
    }

    .service-page {
        padding: 48px 32px 64px;
    }

    .service-page__copy {
        padding: 40px;
    }

    .service-page__list {
        grid-template-columns: 1fr 1fr;
        gap: 24px 32px;
    }

    .estimate-form {
        padding: 32px;
    }

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

    .foot-band .tagline {
        font-size: 56px;
    }

    .foot-band .tagline::before,
    .foot-band .tagline::after {
        width: 56px;
    }
}

@media (min-width: 900px) {
    .estimate__grid,
    .service-page__grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
    }

    .service-page__media {
        aspect-ratio: 4 / 3;
    }

    .service-page__media > .mdi {
        font-size: 72px;
    }
}

/* desktop: pages without the home hero get a compact sky header with the logo */
@media (min-width: 1100px) {
    .page--sub .site-header {
        position: relative;
        top: 0;
        height: calc(170 * var(--u));
        background: linear-gradient(180deg, #c9def5 0%, #eef5fc 100%);
        box-shadow: 0 1px 0 rgba(11, 74, 123, 0.12);
    }

    .page--sub .site-header__logo {
        left: calc(48 * var(--u));
        top: calc(8 * var(--u));
        width: auto;
        height: calc(156 * var(--u));
    }

    .page--sub .site-header__logo img {
        display: block;
        width: auto;
        height: 100%;
    }

    .page--sub .site-nav,
    .page--sub .nav-toggle:checked ~ .site-nav {
        top: calc(60 * var(--u));
    }

    .page--sub .site-nav__link {
        text-shadow: none;
    }

    .foot-band {
        padding: 32px 16px;
    }

    .foot-band .tagline {
        font-size: 64px;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 32px 16px;
    background: var(--navy-950);
    color: #c9dbee;
    font-size: 15px;
}

.site-footer__inner {
    display: grid;
    gap: 16px;
    max-width: 1160px;
    margin: 0 auto;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-footer__brand strong {
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 18px;
}

.site-footer__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.site-footer__contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-decoration: none;
}

.site-footer__contact a:hover {
    text-decoration: underline;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #8fa9c4;
    font-size: 14px;
}

.site-footer__link {
    padding: 0;
    border: 0;
    background: none;
    color: #c9dbee;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.site-footer__link:hover {
    color: var(--white);
}

.site-footer__credit {
    margin-left: auto;
}

@media (min-width: 900px) {
    .site-footer__inner {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .site-footer__legal {
        grid-column: 1 / -1;
    }
}

/* ---------- Privacy policy ---------- */
.legal {
    max-width: 880px;
}

.legal ul {
    margin: 0 0 16px;
    padding-left: 24px;
    color: #33475f;
    font-size: 18px;
    line-height: 1.6;
}

.legal li + li {
    margin-top: 6px;
}

.legal a,
.legal .legal__link {
    color: var(--navy-700);
}

.service-page__copy .legal__updated {
    color: #4f6278;
    font-size: 15px;
    font-weight: 600;
}

/* ---------- Cookie consent ---------- */
.consent {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 1000;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 16px;
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 2px 4px rgba(0, 25, 60, 0.08), 0 16px 48px rgba(0, 25, 60, 0.28);
    animation: consent-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.consent[hidden] {
    display: none;
}

.consent__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sky-50);
    color: var(--navy-700);
    font-size: 26px;
}

.consent__text strong {
    display: block;
    margin-bottom: 4px;
    color: var(--heading);
    font-family: var(--font-serif);
    font-size: 18px;
}

.consent__text p {
    margin: 0;
    color: #33475f;
    font-size: 15px;
    line-height: 1.5;
}

.consent__text a {
    color: var(--navy-700);
    font-weight: 600;
}

.consent__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    grid-column: 1 / -1;
}

.consent__actions .btn {
    min-width: 120px;
}

.consent__decline {
    border-color: rgba(11, 74, 123, 0.3);
    background: var(--white);
    color: var(--navy-700);
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(0, 25, 60, 0.12);
}

.consent__decline:hover,
.consent__decline:focus-visible {
    background: var(--sky-50);
}

@keyframes consent-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
