/* TIEDOSTO: /fi_uusi/css/style.css */

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-soft: #eef2f6;

    --text: #17212b;
    --text-soft: #5f6b76;

    --primary: #1f5f8b;
    --primary-dark: #164564;
    --accent: #d98d2b;

    --border: #dfe5ea;

    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.10);

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;

    --container: 1180px;

    --transition: 180ms ease;
}


/* =========================================================
   RESET / PERUSASETUKSET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

p {
    margin-top: 0;
}

h1,
h2,
h3 {
    margin-top: 0;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 750;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 720;
}

h3 {
    font-size: 1.35rem;
}


/* =========================================================
   YHTEINEN CONTAINER
========================================================= */

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(223, 229, 234, 0.85);
}

.header-inner {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;

    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
    );

    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;

    box-shadow: var(--shadow-sm);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 0.98rem;
}

.brand-text small {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 0.78rem;
}


/* =========================================================
   NAVIGAATIO
========================================================= */

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link,
.language-link {
    position: relative;

    text-decoration: none;

    color: var(--text-soft);

    font-size: 0.95rem;
    font-weight: 600;

    transition:
        color var(--transition),
        transform var(--transition);
}

.nav-link:hover,
.language-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -8px;

    width: 100%;
    height: 2px;

    border-radius: 999px;

    background: var(--primary);

    transform: scaleX(0);
    transform-origin: center;

    transition: transform var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--text);
}

.language-link {
    padding: 8px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #fff;
}


/* =========================================================
   MOBIILIVALIKON PAINIKE
========================================================= */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 10px;

    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;

    width: 23px;
    height: 2px;

    margin: 5px auto;

    background: var(--text);

    border-radius: 999px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    overflow: hidden;

    padding: 42px 0 38px;

    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(31, 95, 139, 0.14),
            transparent 28%
        ),
        radial-gradient(
            circle at 15% 85%,
            rgba(217, 141, 43, 0.10),
            transparent 24%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f5f8fb 100%
        );
}

.hero::after {
    content: "";

    position: absolute;
    right: -90px;
    bottom: -130px;

    width: 390px;
    height: 390px;

    border-radius: 50%;

    border: 1px solid rgba(31, 95, 139, 0.12);
}

.hero-content {
    position: relative;
    z-index: 1;

    max-width: 850px;
}

.eyebrow {
    margin-bottom: 18px;

    color: var(--primary);

    font-size: 0.8rem;
    font-weight: 800;

    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 900px;
    margin-bottom: 18px;
}

.hero-lead {
    max-width: 760px;

    margin-bottom: 12px;

    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    line-height: 1.5;

    color: #2e3a45;
}

.hero-text {
    max-width: 700px;

    margin-bottom: 0;

    color: var(--text-soft);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}


/* =========================================================
   PAINIKKEET
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 12px 20px;

    border-radius: 12px;

    text-decoration: none;
    font-weight: 700;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        color var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;

    box-shadow: 0 10px 30px rgba(31, 95, 139, 0.22);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--text);

    border: 1px solid var(--border);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-sm);
}

.btn-light {
    background: #fff;
    color: var(--primary-dark);
}

.btn-light:hover {
    box-shadow: var(--shadow-md);
}


/* =========================================================
   YLEISET SECTIONIT
========================================================= */

.section {
    padding: 95px 0;
}

#palvelut {
    padding-top: 52px;
}

.section-muted {
    background: var(--surface-soft);
}

.section-tools {
    background: #fff;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 45px;
}

.section-heading p:last-child {
    color: var(--text-soft);
}


/* =========================================================
   PALVELUKORTIT
========================================================= */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    display: flex;
    flex-direction: column;

    min-height: 320px;

    padding: 32px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);

    border-color: rgba(31, 95, 139, 0.28);

    box-shadow: var(--shadow-md);
}

.service-card h3 {
    margin-bottom: 16px;
}

.service-card p {
    color: var(--text-soft);
}

.text-link {
    margin-top: auto;

    color: var(--primary);

    font-weight: 700;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}


/* =========================================================
   SPLIT-OSUUDET
========================================================= */

.split {
    display: grid;

    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(0, 1.1fr);

    gap: 70px;

    align-items: start;
}

.split p {
    color: var(--text-soft);
    font-size: 1.04rem;
}


/* =========================================================
   TEKNOLOGIAT
========================================================= */

.tool-list {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
}

.tool-list span {
    display: inline-flex;
    align-items: center;

    min-height: 42px;

    padding: 8px 15px;

    background: var(--surface-soft);

    border: 1px solid var(--border);
    border-radius: 999px;

    color: #33404c;

    font-weight: 700;
    font-size: 0.92rem;
}


/* =========================================================
   CTA
========================================================= */

.cta {
    padding: 85px 0;

    background:
        linear-gradient(
            135deg,
            var(--primary-dark),
            var(--primary)
        );

    color: #fff;
}

.cta .eyebrow {
    color: rgba(255, 255, 255, 0.70);
}

.cta h2 {
    max-width: 800px;
    margin-bottom: 0;
}

.cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 50px;
}


/* =========================================================
   FOOTERIN POHJA
========================================================= */

.site-footer {
    padding: 45px 0;

    background: #101820;
    color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;

    font-size: 0.9rem;
}


/* =========================================================
   FOCUS / SAAVUTETTAVUUS
========================================================= */

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(31, 95, 139, 0.35);
    outline-offset: 4px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .service-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: auto;
    }

    .split {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .cta-content {
        align-items: flex-start;
        flex-direction: column;
    }

}


/* =========================================================
   MOBIILI
========================================================= */

@media (max-width: 760px) {

    .container {
        width: min(calc(100% - 28px), var(--container));
    }

    .header-inner {
        min-height: 70px;
    }

    .brand-text small {
        display: none;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;

        position: absolute;

        top: 70px;
        left: 0;
        right: 0;

        padding: 18px 20px 24px;

        background: rgba(255, 255, 255, 0.98);

        border-bottom: 1px solid var(--border);

        box-shadow: var(--shadow-md);

        flex-direction: column;
        align-items: stretch;

        gap: 0;
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link,
    .language-link {
        padding: 13px 4px;

        border-radius: 0;

        border: 0;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        color: var(--primary);
    }

    .language-link {
        margin-top: 6px;

        color: var(--primary);
    }

    .hero {
        padding: 45px 0 40px;
    }

    .hero h1 {
        margin-bottom: 22px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: 70px 0;
    }

    .service-card {
        padding: 26px;
    }

    .cta {
        padding: 65px 0;
    }

    .footer-inner {
        flex-direction: column;
    }

}