/*
==================================================
VÄRIMÄÄRITYKSET
==================================================
*/

:root {

    --color-black: #1a1a1a;
    --color-dark: #292929;

    --color-yellow: #ffd428;
    --color-accent-text: #806a14;
    --color-yellow-light: #ffdf5e;

    --color-white: #ffffff;
    --color-light: #f5f5f3;

    --color-border: #ddddda;

    --max-width: 1440px;

}


/*
==================================================
PERUSASETUKSET
==================================================
*/

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


/* Jätetään ankkurikohteiden yläpuolelle tilaa kiinteää headeria varten. */
section[id] {
    scroll-margin-top: 90px;
}


body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: var(--color-white);

    color: var(--color-black);

    line-height: 1.6;

    overflow-wrap: anywhere;

}


a {
    color: inherit;
}


.container {

    width: 90%;
    max-width: var(--max-width);

    margin: 0 auto;

}


/*
==================================================
HEADER
==================================================
*/

.site-header {

    position: sticky;

    top: 0;

    z-index: 1000;

    background: var(--color-black);

    border-bottom:
        4px solid
        var(--color-yellow);

}


.header-content {

    min-height: 78px;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


/*
==================================================
YRITYKSEN NIMI
==================================================
*/

.company-name {
    display: block;
    width: min(250px, 65vw);
    flex-shrink: 0;
}

.company-logo {
    display: block;
    width: 100%;
    height: auto;
}

.company-name:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 4px;
}


/*
==================================================
DESKTOP NAVIGOINTI
==================================================
*/

.desktop-nav {

    display: flex;

    align-items: center;

    gap: 2rem;

}


.desktop-nav a {

    color: var(--color-white);

    text-decoration: none;

    font-size: 0.8rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    transition:
        color
        0.2s ease;

}


.desktop-nav a:hover {

    color: var(--color-yellow);

}


/*
==================================================
MOBIILIVALIKKO
==================================================
*/

.menu-button {
    display: none;
}


.mobile-nav {
    display: none;
}


/*
==================================================
HERO
==================================================
*/

.hero {

    padding:
        clamp(5rem, 12vw, 10rem)
        0;

    background:
        var(--color-black);

    color:
        var(--color-white);

}


.hero-eyebrow {

    margin:
        0
        0
        1.5rem;

    color:
        var(--color-yellow);

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 0.15em;

}


.hero h1 {

    max-width: 1200px;

    margin: 0;

    font-size:
        clamp(1.75rem, 4.5vw, 4rem);

    line-height: 1.15;

    letter-spacing: -0.03em;

    hyphens: none;
    overflow-wrap: normal;

}


.hero-text {

    max-width: 960px;

    margin:
        2rem
        0
        0;

    font-size:
        clamp(1.1rem, 2vw, 1.35rem);

    color:
        #d5d5d5;

}


/*
==================================================
YLEISET OTSIKOT
==================================================
*/

.section-label {

    margin: 0 0 0.8rem;

    color:
        var(--color-accent-text);

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 0.15em;

}


h2 {

    margin:
        0
        0
        3rem;

    font-size:
        clamp(2rem, 4vw, 3.5rem);

    line-height: 1.1;

    letter-spacing: -0.02em;

}


/*
==================================================
PALVELUT
==================================================
*/

.services {

    padding:
        clamp(4rem, 8vw, 8rem)
        0;

}


.services h2 {
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    hyphens: none;
    overflow-wrap: normal;
}


.service-grid {

    display: grid;

    grid-template-columns: minmax(0, 1fr);

    gap: 1.5rem;

}


@media (min-width: 700px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .service-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.service-card {

    position: relative;

    padding: 2.5rem;

    background: var(--color-light);

    border:
        1px solid
        var(--color-border);

    border-top:
        5px solid
        var(--color-yellow);

    transition:
        transform
        0.25s ease,
        box-shadow
        0.25s ease;

}


.service-card:hover {

    transform:
        translateY(-5px);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.08);

}


.service-icon {
    margin-bottom: 2rem;
    color: var(--color-accent-text);
    font-size: 2rem;
    line-height: 1;
}



.service-card h3 {

    margin:
        0
        0
        1rem;

    font-size: 1.4rem;

    letter-spacing: 0.02em;

}


.service-card p {

    margin-bottom: 1.5rem;

}


.service-card ul {

    margin: 0;

    padding: 0;

    list-style: none;

}


.service-card li {

    padding:
        0.45rem
        0;

    border-bottom:
        1px solid
        var(--color-border);

}


.service-card li::before {

    content: "— ";

    color:
        var(--color-yellow);

    font-weight: bold;

}


/*
==================================================
YRITYKSESTÄ
==================================================
*/

.about {

    padding:
        clamp(4rem, 8vw, 8rem)
        0;

    background:
        var(--color-light);

}


.about-content {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 420px), 1fr));

    gap:
        clamp(2rem, 8vw, 8rem);

}


.about h2 {

    margin-bottom: 0;

    font-size: clamp(1.5rem, 3.5vw, 3rem);
    hyphens: none;
    overflow-wrap: normal;

}


.about-text {

    max-width: 600px;

    font-size: 1.1rem;

}


.about-text p:first-child {

    margin-top: 0;

}


/*
==================================================
YHTEYSTIEDOT
==================================================
*/

.contact {

    padding:
        clamp(4rem, 8vw, 8rem)
        0;

}


.contact-intro {

    max-width: 1000px;

    margin-bottom: 3rem;

    font-size: 1.15rem;

    hyphens: none;

}


.contact-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 220px), 1fr));

    gap: 2rem;

}


.contact-grid span {

    display: block;

    margin-bottom: 0.5rem;

    color:
        var(--color-accent-text);

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 0.12em;

}


.contact-grid a {

    font-size: 1.1rem;

    font-weight: 600;

    text-decoration: none;

}


.contact-grid a:hover {

    color:
        var(--color-accent-text);

}


.contact-grid p {

    margin: 0;

    font-size: 1.1rem;

}


/*
==================================================
FOOTER
==================================================
*/

.site-footer {

    padding: 2rem 0;

    background:
        var(--color-black);

    color:
        var(--color-white);

}


.footer-content {

    display: flex;

    justify-content: space-between;

    gap: 1rem;

    font-size: 0.85rem;

    color:
        #7f7f9f;

}


.footer-content p {

    margin: 0;

}


/*
==================================================
MOBIILI
==================================================
*/

@media (max-width: 700px) {


    /*
    Piilotetaan normaali navigointi
    */

    .desktop-nav {
        display: none;
    }


    /*
    Header
    */

    .header-content {
        min-height: 70px;
        gap: 1rem;
    }

    .company-name {
        min-width: 0;
        flex-shrink: 1;
    }


    /*
    Hampurilaispainike

    Painike on samalla rivillä logon kanssa.
    */

    .menu-button {

        position: relative;

        display: flex;

        flex-direction: column;

        justify-content: center;

        align-items: center;

        gap: 5px;

        flex-shrink: 0;

        width: 58px;

        height: 58px;

        background:
            var(--color-yellow);

        border: 0;
        border-radius: 4px;
        padding: 0;

        cursor: pointer;

        z-index: 1002;

        box-shadow:
            0 8px 20px
            rgba(0, 0, 0, 0.15);

    }


    /*
    Hampurilaisviivat
    */

    .menu-button span {

        display: block;

        width: 24px;

        height: 2px;

        background:
            var(--color-black);

        transition:
            transform 0.25s ease,
            opacity 0.25s ease;

    }


    /*
    Sivusta avautuva valikko
    */

    .mobile-nav {

        position: fixed;

        top: 0;

        right: 0;

        width:
            min(80vw, 360px);

        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior-y: contain;

        padding: 9rem clamp(1rem, 5vw, 2.5rem) 1.5rem;

        display: flex;

        flex-direction: column;

        gap: 2rem;

        background:
            var(--color-dark);

        visibility: hidden;
        pointer-events: none;

        transform:
            translateX(100%);

        transition:
            transform
            0.3s ease;

        z-index: 1001;

        box-shadow:
            -10px 0 30px
            rgba(0, 0, 0, 0.2);

    }


    .mobile-nav a {

        flex-shrink: 0;

        color:
            var(--color-white);

        text-decoration: none;

        font-size: 1.4rem;

        font-weight: 700;

        text-transform: uppercase;

        letter-spacing: 0.05em;

    }


    .mobile-nav a:hover {

        color:
            var(--color-yellow);

    }


    /*
    Valikon avaus
    */

    .menu-button[aria-expanded="true"] ~ .mobile-nav {

        visibility: visible;
        pointer-events: auto;

        transform:
            translateX(0);

    }


    /*
    Hampurilainen -> X
    */

    .menu-button[aria-expanded="true"] span:nth-child(1) {

        transform:
            translateY(7px)
            rotate(45deg);

    }


    .menu-button[aria-expanded="true"] span:nth-child(2) {

        opacity: 0;

    }


    .menu-button[aria-expanded="true"] span:nth-child(3) {

        transform:
            translateY(-7px)
            rotate(-45deg);

    }


    /*
    Hero
    */

    .hero {

        padding-top:
            6rem;

    }


    /*
    Footer
    */

    .footer-content {

        flex-direction: column;

    }

}

.menu-button:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 3px;
}

/* Somekuvakkeet yhteystietojen alapuolella */
.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #666666;
    font-size: 28px;
    text-decoration: none;
}

.social-link[href]:hover {
    color: #333333;
}

.social-link:focus-visible {
    outline: 2px solid #666666;
    outline-offset: 3px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.contact-icon {
    width: 1.25em;
    margin-right: 0.4rem;
    color: #666666;
    font-size: 1rem;
    text-align: center;
    vertical-align: -0.1em;
}

.hero-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 2rem;
    padding: 0.85rem 1.5rem;
    border-radius: 4px;
    background: var(--color-yellow);
    color: var(--color-black);
    font-weight: 700;
    text-decoration: none;
}

.hero-contact-button:hover {
    background: var(--color-yellow-light);
}

.hero-contact-button:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 4px;
}

.service-card .service-bullet-list {
    padding-left: 1.25rem;
    list-style: disc outside;
}

.service-card .service-bullet-list li {
    padding: 0.3rem 0;
    border-bottom: 0;
}

.service-card .service-bullet-list li::before {
    content: none;
}

.service-card .service-bullet-list li::marker {
    color: var(--color-accent-text);
}

/* Pitkien suomenkielisten sanojen rivitys kapeilla näytöillä. */
h1, h2, h3,
.service-card p,
.service-card li,
.about-text p {
    hyphens: auto;
}

/* Suurilla näytöillä palvelulaatikoiden sanat pidetään kokonaisina. */
@media (min-width: 1340px) {
    .service-card h3,
    .service-card p,
    .service-card li {
        hyphens: none;
    }
}

.contact-grid > div,
.about-content > div {
    /* Sallii grid-sarakkeiden kutistua myös pitkän sisällön kanssa. */
    min-width: 0;
}

/* Matalassa mobiilinäkymässä jätetään enemmän tilaa valikon linkeille. */
@media (max-width: 700px) and (max-height: 500px) {
    .mobile-nav {
        gap: 0.75rem;
        padding-bottom: 1rem;
    }
}

/* Kunnioitetaan käyttäjän käyttöjärjestelmässä valitsemaa vähennettyä liikettä. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .desktop-nav a,
    .service-card,
    .menu-button span,
    .mobile-nav {
        transition: none;
    }
}
