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

.header-stage {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 181px;
    pointer-events: none;
}

.site-header {

    position: relative;
    top: 16px;
    pointer-events: auto;

    display: flex;

    align-items: center;
    justify-content: space-between;

    width: calc(100% - 32px);

    min-height: 165px;

    padding: 24px 70px;

    margin: 0 auto;

    border-radius: 28px;

    background:
        radial-gradient(
            circle at 90% 20%,
            rgba(123,92,255,.12),
            transparent 30rem
        ),
        linear-gradient(
            145deg,
            #07101a,
            #0b111a
        );

    box-shadow: 0 12px 35px rgba(7,16,26,.08);
    transition: min-height .35s ease, padding .35s ease, top .35s ease, width .35s ease, border-radius .35s ease, background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;

}

.site-header.is-scrolled {
    top: 9px;
    width: min(1180px, calc(100% - 32px));
    min-height: 82px;
    padding-top: 10px;
    padding-bottom: 10px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 20px;
    background: rgba(7,16,26,.9);
    box-shadow: 0 18px 45px rgba(7,16,26,.2), 0 0 35px rgba(114,230,208,.035);
    backdrop-filter: blur(18px);
}

.site-header.is-scrolled .logo-svg {
    width: 82px;
    height: 60px;
}

.site-header.is-scrolled .logo-title { font-size: 1.55rem; }
.site-header.is-scrolled .logo-subtitle { font-size: .48rem; gap: 7px; }
.site-header.is-scrolled .cta-button { min-width: 190px; min-height: 50px; font-size: .92rem; }

.site-header.is-scrolled .header-right {
    gap: 11px;
}

.site-header.is-scrolled .language-switch {
    gap: 5px;
}

.site-header.is-scrolled .language-button {
    width: 39px;
    height: 37px;
    border-radius: 8px;
    font-size: .78rem;
}

.site-header.is-scrolled .header-divider {
    height: 38px;
}


/* ========================================
   LOGOTYP
======================================== */

.logo {
    position: relative;
    display: flex;

    align-items: center;
    gap: 0;

    color: #ffffff;
    text-decoration: none;
}

/* Preserve the existing logo footprint at every breakpoint and scroll state. */
.logo > .logo-svg,
.logo > .logo-text {
    visibility: hidden;
}

.logo-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(-30px);
}

@media (min-width: 761px) and (max-width: 1250px) {
    .logo-image {
        transform: translateX(-18px);
    }
}

@media (max-width: 760px) {
    .logo-image {
        transform: translateX(-6px);
    }
}

.logo-svg {
    width: 170px;
    height: 110px;

    flex-shrink: 0;
    overflow: visible;
    transition: width .35s ease, height .35s ease;
}

.logo-l {
    fill: none;

    stroke: #72e6d0;
    stroke-width: 6;

    stroke-linecap: square;
    stroke-linejoin: miter;
}

.logo-g,
.logo-g-tail {
    fill: none;

    stroke: #7b5cff;
    stroke-width: 6;

    stroke-linecap: square;
    stroke-linejoin: miter;

    transform: translate(-18px, -8px);
}

.logo-text {
    display: flex;
    flex-direction: column;

    gap: 10px;
    margin-left: -38px;
}

.site-header.is-scrolled .logo-text {
    margin-left: -20px;
}

.logo-title {
    color: #ffffff;

    font-family: "Inter", sans-serif;
    font-size: 2.35rem;
    font-weight: 500;

    line-height: 1;
    letter-spacing: -0.045em;
    white-space: nowrap;
    transition: font-size .35s ease;
}

.logo-subtitle {
    display: flex;

    align-items: center;
    gap: 10px;

    color: #d6d9df;

    font-size: 0.72rem;
    font-weight: 600;

    letter-spacing: 0.25em;
    white-space: nowrap;
    transition: font-size .35s ease, gap .35s ease;
}

.dot {
    display: inline-block;

    width: 6px;
    height: 6px;

    border-radius: 50%;
}

.dot-mint {
    background: #72e6d0;
}

.dot-purple {
    background: #7b5cff;
}


/* ========================================
   NAVIGATION
======================================== */

.main-navigation {
    display: flex;

    align-items: center;
    justify-content: center;
    gap: 44px;

    flex: 1;
}

.nav-link {
    position: relative;

    padding: 10px 0 18px;

    color: #ffffff;
    text-decoration: none;

    font-size: 1.12rem;
    font-weight: 500;

    transition:
        color 0.25s ease;
}

.nav-link:hover {
    color: #72e6d0;
}

@media (min-width: 761px) {
    html[lang="en"] .main-navigation .nav-link[href="#contact"] {
        margin-right: 16px;
    }
}

.nav-link::after {
    position: absolute;

    bottom: 3px;
    left: 50%;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #72e6d0;

    content: "";

    opacity: 0;

    transform: translateX(-50%);
}

.nav-link.active::after,
.nav-link:hover::after {
    opacity: 1;
}


/* ========================================
   HÖGERDEL
======================================== */

.header-right {
    display: flex;

    align-items: center;
    gap: 18px;
}


/* ========================================
   SPRÅKVÄXLARE
======================================== */

.language-switch {
    display: flex;

    align-items: center;
    gap: 8px;
}

.language-button {
    display: grid;
    place-items: center;
    width: 54px;
    height: 48px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;

    background: transparent;
    color: #ffffff;

    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        width 0.35s ease,
        height 0.35s ease,
        border-radius 0.35s ease,
        font-size 0.35s ease;
}

.language-button:hover,
.language-button.active {
    border-color: #72e6d0;
    color: #ffffff;
}

.header-divider {
    width: 1px;
    height: 52px;

    background: rgba(255, 255, 255, 0.14);

    transition: height .35s ease;
}


/* ========================================
   CTA-KNAPP
======================================== */

.cta-button {
    display: inline-flex;

    min-width: 250px;
    min-height: 64px;

    align-items: center;
    justify-content: center;
    gap: 28px;

    padding: 0 30px;

    border-radius: 14px;

    background:
        linear-gradient(
            105deg,
            #72ead5 0%,
            #8edfe5 48%,
            #8d5fff 100%
        );

    color: #071019;
    text-decoration: none;

    font-size: 1.15rem;
    font-weight: 700;

    box-shadow:
        0 12px 30px rgba(123, 92, 255, 0.18);

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

.cta-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 17px 38px rgba(123, 92, 255, 0.28);
}

.cta-arrow {
    color: #5634d8;

    font-size: 1.25rem;

    transition:
        transform 0.25s ease;
}

.cta-button:hover .cta-arrow {
    transform: translate(2px, -2px);
}


/* ========================================
   RESPONSIVT
======================================== */

/* Reserve room for full navigation and controls on narrower desktop headers.
   The logo's hidden text must not impose an unshrinkable minimum width. */
@media (min-width: 1251px) and (max-width: 1600px) {
    .site-header:not(.is-scrolled) {
        column-gap: 16px;
        padding-inline: clamp(32px, calc(25vw - 288px), 70px);
    }

    .site-header:not(.is-scrolled) .logo {
        min-width: 0;
    }

    .site-header:not(.is-scrolled) .main-navigation {
        flex-shrink: 0;
        gap: clamp(12px, calc(20vw - 276px), 44px);
    }

    .site-header:not(.is-scrolled) .header-right {
        flex-shrink: 0;
    }
}

@media (max-width: 1250px) {

    .site-header {
        gap: 20px;
        padding-inline: 26px;
    }

    .logo-svg {
        width: 135px;
        height: 96px;
    }

    .logo-title {
        font-size: 1.85rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }

    .main-navigation {
        gap: 24px;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    .language-switch,
    .header-divider {
        display: none;
    }

    .cta-button {
        min-width: 200px;
        min-height: 56px;

        font-size: 1rem;
    }
}
