/* 1. Reset: remove the browser's default spacing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. Brand colors as variables, defined once */
:root {
    --navy: #0d1f3c;
    --blue: #1565c0;
    --sky: #42a5f5;
    --ice: #e3f2fd;
    --white: #ffffff;
    --muted: #546e8a;
}

/* 3. Base text */
body {
    font-family: system-ui, sans-serif;
    color: var(--navy);
    line-height: 1.6;
}

ul {
    padding-left: 1.25rem;
}

/* 4. Header: logo, nav, and button in one row */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5%;
    background: var(--navy);
}

header a {
    color: var(--white);
    text-decoration: none;
}

nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
}

/* 5. Give every section breathing room */
section {
    padding: 4rem 5%;
}

/* 6. Hero: big, centered first impression */
#hero {
    background:
        linear-gradient(135deg, rgba(13, 31, 60, 0.80), rgba(21, 101, 192, 0.65)),
        url("../images/hero-bg.jpg") center / cover no-repeat;
    color: var(--white);
    text-align: center;
    padding: 6rem 5%;
    position: relative;
}

#hero .hero-logo {
    width: min(100%, 30rem);
    height: auto;
    margin: 0 auto 1.5rem;
}

#hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

#hero .hero-intro {
    display: block;
    font-size: 0.55em;
    margin-bottom: 0.4rem;
}

#hero .hero-service {
    display: block;
}

#hero h1 {
    text-transform: uppercase;
}

#hero p {
    font-size: 1.25rem;
    max-width: 40rem;
    margin: 0 auto 2rem;
}

#hero .hero-tagline {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin: 0 auto 0.5rem;
}

#hero .hero-tagline span {
    display: block;
    font-family: system-ui, sans-serif;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

#hero .hero-wave {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 3rem;
    display: block;
    fill: var(--ice);
    pointer-events: none;
}

/* 7. Button: reusable anywhere with class="btn" */
.btn {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: var(--navy);
    transform: translateY(-2px);
}

/* 8. Alternate section backgrounds so they're easy to tell apart */
section:nth-of-type(even) {
    background: var(--ice);
}

/* 9. Phones and small tablets */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    section {
        padding: 3rem 5%;
    }

    #hero {
        padding: 4rem 5%;
    }
}

/* 10.Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.logo img {
    height: 50px;
    width: auto;
}

.before-after {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

figure img {
    border-radius: 12px;
}

figcaption {
    text-align: center;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* 11. Contact form */
.contact-form {
    display: grid;
    gap: 0.5rem;
    max-width: 32rem;
    margin-top: 2rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    font: inherit;
    padding: 0.75rem;
    border: 1px solid var(--muted);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.contact-form button {
    border: none;
    cursor: pointer;
    justify-self: start;
}

.hp-field {
    display: none;
}

/* 12. Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(13, 31, 60, 0.08);
    border-top: 4px solid var(--sky);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--blue);
}

.card .btn {
    margin-top: 1.5rem;
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 1rem;
}

/* 13. Footer */
footer {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 3rem 5%;
}

footer p+p {
    margin-top: 0.75rem;
}

.footer-name {
    font-size: 1.25rem;
    font-weight: 700;
}

footer a {
    color: var(--white);
    text-underline-offset: 0.2em;
}

footer a:hover {
    text-decoration-thickness: 2px;
}

.copyright {
    font-size: 0.875rem;
}

/* 14. Keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 4px;
}

header a:focus-visible,
footer a:focus-visible,
#hero a:focus-visible {
    outline-color: var(--white);
}

/* 15. Skip navigation */
.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

.card {
    display: flex;
    flex-direction: column;
}

.card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.gallery-grid figure {
    margin: 0;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.gallery-grid figcaption {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 6px;
}

@media (max-width: 700px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

#gallery h3 {
    margin-top: 40px;
}

.reviews-cta {
    text-align: center;
    padding: 60px 20px;
}

.reviews-cta p {
    max-width: 560px;
    margin: 12px auto 24px;
}

/* Sticky mobile call/quote bar */
.mobile-cta {
    display: none;
}

@media (max-width: 768px) {
    .mobile-cta {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(13, 31, 60, 0.25);
    }

    .mobile-cta a {
        flex: 1;
        text-align: center;
        padding: 1rem 0.5rem;
        font-weight: 700;
        text-decoration: none;
        font-size: 1.05rem;
    }

    .mobile-cta-call {
        background: var(--blue);
        color: var(--white);
    }

    .mobile-cta-quote {
        background: var(--white);
        color: var(--navy);
    }

    /* keep the bar from covering the footer */
    body {
        padding-bottom: 4rem;
    }
}

/* Slimmer mobile header */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 5%;
        gap: 0.4rem;
    }

    .logo img {
        height: 40px;
        width: auto;
    }

    nav ul {
        gap: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }

    header>.btn {
        display: none;
    }
}

/* Bolder headings */
h1,
h2,
h3 {
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

h3 {
    font-weight: 700;
}

/* Small label above each section heading */
.eyebrow {
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blue);
    margin-bottom: 0.4rem;
}

/* Softer, deeper cards */
.card {
    border-radius: 16px;
    border-top: none;
    box-shadow:
        0 1px 3px rgba(13, 31, 60, 0.06),
        0 12px 32px rgba(13, 31, 60, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 2px 6px rgba(13, 31, 60, 0.08),
        0 20px 40px rgba(13, 31, 60, 0.14);
}

figure img {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(13, 31, 60, 0.12);
}

/* Dark accent band to break up the page */
#reviews {
    background: var(--navy);
    color: var(--white);
}

#reviews .btn {
    background: var(--white);
    color: var(--navy);
}

#reviews .btn:hover {
    background: var(--sky);
}

/* Contact form as a card */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(13, 31, 60, 0.10);
}

/* No motion for people who turn it off */
@media (prefers-reduced-motion: reduce) {

    .card,
    .btn {
        transition: none;
    }

    .card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Trust strip */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.25rem 5%;
    background: var(--white);
    border-bottom: 1px solid var(--ice);
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--navy);
    font-size: 0.95rem;
}

.trust-item svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--blue);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .trust-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem 5%;
    }

    .trust-item {
        justify-content: flex-start;
        font-size: 0.85rem;
    }
}

/* Scroll fade-ins */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}