/* ==================================================
   HEADER BASE
================================================== */

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(20, 35, 55, 0.65);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ==================================================
   LOGO
================================================== */

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px;
    transition: transform 0.25s ease;
}

.logo:hover img {
    transform: scale(1.05);
}


/* ==================================================
   NAVIGATION – DESKTOP
================================================== */

.nav {
    display: flex;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 48px;
}

.nav-links a {
    position: relative;
    font-size: 1.15rem;
    font-weight: 500;
    color: #f1f5f9;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0ea5a4, #22d3ee);
    transition: width 0.25s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a:hover::after {
    width: 100%;
}


/* CTA */
.nav-cta {
    padding: 14px 26px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5a4, #22d3ee);
    color: #022c2c !important;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}

.nav-cta::after {
    display: none;
}


/* ==================================================
   HAMBURGER
================================================== */

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100; /* overlayn päällä */
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #f1f5f9;
    margin: 7px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* ==================================================
   MOBILE NAV – FULLSCREEN OVERLAY
================================================== */
@media (max-width: 800px) {

    .hamburger {
        display: block;
    }

    /* fullscreen menu */
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;

        z-index: 1000;

        background:
            radial-gradient(
                1400px 700px at 50% -15%,
                rgba(34, 211, 238, 0.18),
                transparent 60%
            ),
            linear-gradient(
                180deg,
                rgba(6, 14, 26, 0.99),
                rgba(4, 8, 16, 1)
            );

        display: flex;
        justify-content: center;
        align-items: flex-start;   /* 🔥 EI keskelle */

        padding-top: 60px;        /* 🔥 tästä säädät korkeuden */

        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }


    .nav.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 36px;
    }

    .nav-links a {
        font-size: 1.8rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        color: #f8fafc;
    }

    .nav-cta {
        margin-top: 36px;
        padding: 18px 48px;
        font-size: 1.3rem;
        border-radius: 999px;
        box-shadow: 0 24px 64px rgba(34, 211, 238, 0.5);
    }

    /* 🔒 kun menu auki, tee hamburgerista oikea close-nappi */
    body.nav-open .hamburger {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(20, 35, 55, 0.85);
        border-radius: 12px;
    }
}


/* ==================================================
   LOCK BACKGROUND WHEN NAV OPEN
================================================== */

body.nav-open {
    overflow: hidden;
    touch-action: none;
}

/* estä kaikki muu interaktio */
body.nav-open > * {
    pointer-events: none;
}

/* mutta menu + hamburger toimii */
body.nav-open .nav,
body.nav-open .hamburger {
    pointer-events: auto;
}


/* ==================================================
   SMALL SCREENS
================================================== */

@media (max-width: 480px) {

    .header-inner {
        padding: 18px 24px;
    }

    .logo img {
        height: 42px;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
}
