/* ===========================
   Haglunds Måleri AB – Styles
   Mobile-first, WCAG 2.1 AA
   =========================== */

/* --- Custom Properties --- */

:root {
    --color-primary: #2c3e50;
    --color-accent: #c9a96e;
    --color-bg: #fafafa;
    --color-text: #1a1a1a;
    --color-text-light: #3a3a3a;
    --color-border: #e0ddd8;

    --font-heading: "DM Serif Display", Georgia, serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;

    --max-width: 54rem;
    /* ~864px */
    --page-width: 75rem;
    /* ~1200px */
    --gap: 1.5rem;
    --gap-lg: 3rem;
}

/* --- Reset & Base --- */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: #eee;
    -webkit-font-smoothing: antialiased;
}

main,
.site-footer {
    max-width: var(--page-width);
    margin-inline: auto;
    background-color: var(--color-bg);
}

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

a {
    color: var(--color-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent);
}

a:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- Layout --- */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--gap);
}

/* --- Hero --- */

.hero {
    position: relative;
    line-height: 0;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 30%,
            rgba(0, 0, 0, 0.25) 60%,
            rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

.hero-img {
    width: 100%;
    height: 50vh;
    min-height: 240px;
    max-height: 500px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding: var(--gap) var(--gap) 15% var(--gap);
}

.hero-overlay h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* --- Intro --- */

.intro {
    padding: var(--gap-lg) 0;
}

.intro h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.intro p {
    color: var(--color-text-light);
    max-width: 42rem;
    margin-bottom: 1rem;
}

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

/* --- Contact --- */

.contact {
    background-color: #f0ede8;
    padding: var(--gap-lg) 0;
}

.contact h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

address {
    font-style: normal;
    line-height: 1.9;
    color: var(--color-text-light);
}

.phone-icon {
    text-decoration: none;
    display: inline-block;
    margin-right: 0.4em;
}

.phone-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
}

.phone-link:hover {
    color: var(--color-accent);
}

/* --- Map --- */

.map-wrapper {
    margin-top: var(--gap-lg);
    line-height: 0;
}

.map-wrapper iframe {
    width: 100%;
    height: 300px;
    display: block;
}

/* --- Footer --- */

.site-footer {
    padding: var(--gap-lg) 0 var(--gap) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.aaa-logo {
    width: 100px;
    height: auto;
    margin-inline: auto;
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* --- Responsive: Tablet & up (≥600px) --- */

@media (min-width: 600px) {
    :root {
        --gap: 2rem;
        --gap-lg: 4rem;
    }

    .hero-overlay h1 {
        font-size: 2.4rem;
    }

    .hero-overlay {
        padding-bottom: 9%;
    }

    .intro h2,
    .contact h2 {
        font-size: 2rem;
    }

    .hero-img {
        height: 55vh;
        max-height: 560px;
    }
}

/* --- Responsive: Desktop (≥900px) --- */

@media (min-width: 900px) {
    :root {
        --gap-lg: 5rem;
    }

    .hero-overlay h1 {
        font-size: 2.8rem;
    }

    .hero-overlay {
        padding-bottom: 5%;
    }

    .intro h2,
    .contact h2 {
        font-size: 2.2rem;
    }

    .hero-img {
        max-height: 620px;
    }

    .aaa-logo {
        width: 120px;
    }
}