/* 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);
}