:root {
    --hero-logo-size: clamp(34px, 6vw, 90px);
    --hero-logo-left: clamp(10px, 3vw, 10px);
    --hero-logo-gap: clamp(25px, 2vw, 45px);
}

.hero-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}



.hero-kicker {
    margin: 0 0 12px;
    font-size: var(--kicker_text_size);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.95;
}


.hero h1 {
    margin: 0;
    font-size:  var(--hero_text_size);
    color: var(--color-tekst-header);
    line-height: 1;
    font-weight: 700;
}


.hero h2 {
    color: var(--color-tekst-header);
    margin: 18px 0 12px;
    font-size: var(--herosub_text_size);
    font-weight: 600;
}

.hero-text {
    margin: 0 0 28px;
    font-size: var(--text_sub);
    line-height: 1.55;
    max-width: 430px;
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}






.site-header {
    position: relative;
    background: var(--color-bg);
    margin-top: var(--header-margin-top);
    padding: 0 var(--header-margin-side) var(--header-padding-bottom);
}


.header-login {
    position: absolute;
    top: 46px;
    right: 94px;
    z-index: 50;
}




.user-pill{
display:flex;
align-items:center;
gap:12px;
background: var(--color-white);
padding:3px 5px;
border-radius:30px;
box-shadow:0 4px 14px rgba(0,0,0,.08);
}


.user-name{
font-weight:600;
color: var(--color-login-tekst);
font-size:.95rem;
}



.logout-btn{
padding:.55rem 1rem;
font-size:.9rem;
}

.hero {
    position: relative;
    max-width: 100%;
   
    height: clamp(520px, 70vh, 650px);

    margin: 0 auto;
    border-radius: var(--hero-radius);    
    overflow: hidden;

    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;

    box-shadow: 0 22px 60px color-mix(in srgb, var(--color-primary) 18%, transparent);

 }



/* clamp forklaring */
/* minimum 10px */
/* helst 3vw */
/* maksimum 50px */
.hero-logo {
    position: absolute;
    top: clamp(10px, 3vw, 30px);
    left: clamp(10px, 3vw, 30px);
    width: auto;
    height: auto;

    margin-right: 5px;
    margin-bottom: 5px;
    z-index: 5;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    text-decoration: none;
}


.hero-logo img {
    width: var(--hero-logo-size);
    height: var(--hero-logo-size);
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s ease;
}


.hero-logo:hover img {
    transform: scale(1.05);
}




.hero-left{
    text-align:left;
    align-items:flex-start;
}

.hero-center{
    text-align:center;
    align-items:center;
}

.hero-right{
    text-align:right;
    align-items:flex-end;
}




.hero-content.hero-left {
    right: auto;
    text-align: left;
    align-items: flex-start;
    left: calc(
    var(--hero-logo-left) +
    var(--hero-logo-size) +
    var(--hero-logo-gap) +
    var(--hero-text-left-offset)
    );
}



.hero-content.hero-center {
    left: 50%;
    right: auto;
    top: 1%;
    transform: translateX(-50%);
    text-align: center;
    align-items: center;
}



.hero-content.hero-right {
    left: auto;
    right: 60px;
    text-align: right;
    align-items: flex-end;
}


.hero-content {
    max-width: 520px;
    padding:
        var(--hero-text-padding-top)
        var(--hero-text-padding-side)
        30px
        var(--hero-text-padding-side);
    color: var(--color-tekst-header);
    position: absolute;
    transform: translateY(-60%);
    display: flex;
    flex-direction: column;
    pointer-events: none;
    z-index:25;
    top: var(--hero-text-top);

}

.hero-content a,
.hero-buttons,
.hero-buttons a {
    pointer-events: auto;
}


.hero-content h1,
.hero-content h2,
.hero-kicker,
.hero-text {
    text-shadow:
        0 3px 6px color-mix(
            in srgb,
            var(--color-header-shadow) 40%,
            transparent
        );
}


.header-postit {
    position: absolute;
    width: 205px;
    min-height: 145px;
    padding: 8px 8px 8px 8px;
    background: #ffe986;
    color: #3b3325;
    z-index: 200;
    box-shadow:
        0 26px 38px rgba(0,0,0,.55),
        0 12px 16px rgba(0,0,0,.38),
        inset 0 14px 18px rgba(255,255,255,.22),
        inset 0 -18px 24px rgba(0,0,0,.08);
    font-family: inherit;
    transform-style: preserve-3d;
    border-radius: 2px 2px 18px 6px;
}


.header-postit::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 42px;
    height: 42px;
    background:
        linear-gradient(
            135deg,
            rgba(0,0,0,.22),
            #fff3a8 45%,
            #ffe36a
        );
        border-radius: 10px 0 0 0;
    box-shadow: -5px -5px 12px rgba(0,0,0,.12);
}




.header-postit-left {
        top: calc(100% - 85px);

        border-radius: 5px;
    left: 8.66%;
    transform: translateX(-50%) rotate(-7deg);
 
}

.header-postit-right {
        top: calc(100% - 75px);

        border-radius: 5px;
    right: 10.66%;
    transform: translateX(50%) rotate(3deg);
}

.header-postit h3 {
    font-size: 1.25rem;
    font-weight: 800;
}






.header-postit p {
    margin: 3px 0;
    font-size: .95rem;
    line-height: 1.25;
}

.header-postit img {
    width: 100%;
    height: 122px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.header-postit span {
    display: block;
    margin-top: 6px;
    font-size: .85rem;
    text-align: center;
    font-weight: 700;
       
}

.hero-logo-home {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0 auto;
    padding: 2px 8px;

    background: color-mix(in srgb, var(--color-button-back) 85%, transparent);
    color: var(--color-tekst-lys);

    border-radius: 999px;

    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;

    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0,0,0,.14);
}

body.frontpage .hero-logo-home {
    display: none;
}

body.frontpage .hero {
    height: var(--hero-height-front);
}

body.subpage .hero {
    height: var(--hero-height-subpage);
}

body.subpage .hero-logo {
}

body.subpage .header-postit-left {
        top: calc(100% - 45px);
 
}

@media (max-width: 1700px) {
    .header-login {
        top: 26px;
        right: 22px;
    }

    .site-header {
        padding: 0 var(--header-margin-side) var(--header-padding-bottom);
    }

    .hero-content {
        padding:
            var(--hero-text-padding-top)
            var(--hero-text-padding-side)
            30px
            var(--hero-text-padding-side);
    }
}

@media (max-width: 1400px) {
    .header-login {
        top: 26px;
        right: 24px;
    }

    .hero-logo {

        gap: 3px;
    }

    .hero-logo img {
        width: clamp(28px, 8vw, 54px);
        height: clamp(28px, 8vw, 54px);
    }

    .hero-logo-home {
        font-size: 0.62rem;
        padding: 1px 6px;
    }
}

@media (max-width: 768px) {

    .hero {
        min-height: 240px;
        background-position: center top;
        background-size: cover;
    }


}

@media (max-width: 760px) {

    .hero-logo {

        gap: 2px;
        align-items: flex-start;
    }

    .hero-logo img {
        width: clamp(28px, 11vw, 44px);
        height: clamp(28px, 11vw, 44px);
    }

    .hero-logo-home {
        font-size: 0.54rem;
        padding: 1px 5px;
        line-height: 1;
        transform: translateX(-1px);
    }

    .header-login {
        top: 26px;
        right: 22px;
    }

.site-header {
    padding: 0 var(--header-margin-side) var(--header-padding-bottom);
}

    .hero-content {
    padding:
        var(--hero-text-padding-top)
        var(--hero-text-padding-side)
        30px
        var(--hero-text-padding-side);    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}



@media (max-height: 600px) and (orientation: landscape) {

    .header-postit {
        min-height: 105px;
        padding: 10px 8px;
    }

    .header-postit img {
        height: 75px;
    }

    .header-postit h3 {
        font-size: .9rem;
    }

    .header-postit p,
    .header-postit span {
        font-size: .75rem;
    }

    .header-postit-left {
        top: calc(100% - 70px);
    }

    .header-postit-right {
        top: calc(100% - 55px);
    }

    .hero {
        height: 72vh;
        min-height: 360px;
        max-height: 520px;
        padding-top: 0;
        background-size: cover;
        background-position: center center;
    }

    .hero-overlay {
        position: absolute;
        inset: 0;
        min-height: 100%;
        background: linear-gradient(
               90deg,
              color-mix(in srgb, var(--hero-overlay-color) 62%, transparent) 0%,
               color-mix(in srgb, var(--hero-overlay-color) 30%, transparent) 35%,
                color-mix(in srgb, var(--hero-overlay-color) 5%, transparent) 100%
            );
    }

.hero-content {
    position: absolute;
    top: var(--hero-text-top);
    transform: translateY(-60%);
    width: min(520px, 46%);
    padding:
        var(--hero-text-padding-top)
        var(--hero-text-padding-side)
        30px
        var(--hero-text-padding-side);

    background: transparent;
    color: var(--color-tekst-header);
    z-index: 25;
}

    .hero-kicker {
        font-size: .9rem;
        letter-spacing: .14em;
        margin: 0 0 8px;
        color: var(--color-tekst-header);
 
    }

    .hero-content h1 {
        font-size: clamp(2.4rem, 5vw, 4rem);
        color: var(--color-tekst-header);
    }

    .hero-content h2 {
        font-size: clamp(1.15rem, 2.4vw, 1.6rem);
        color: var(--color-tekst-header);
        margin-bottom: 22px;
    }

    .hero-buttons {
        justify-content: flex-start;
        flex-direction: row;
        gap: 14px;
    }

    .hero-buttons .btn {
        min-width: 130px;
        min-height: 48px;
        font-size: 1rem;
    }
        .header-postit {
    width: 135px;
    min-height: 95px;
    padding: 7px 7px;
}

    .header-postit::after {
        width: 22px;
        height: 22px;
    }

    .header-postit img {
        height: 70px;
    }

    .header-postit h3 {
        font-size: .62rem;
        margin: 0 0 3px;
    }

    .header-postit p,
    .header-postit span {
        font-size: .52rem;
        line-height: 1.1;
    }

    .header-postit-left {
        top: calc(100% - 48px);
        left: 12%;
    }

    .header-postit-right {
        top: calc(100% - 42px);
        right: 12%;
    }
}

@media (max-width: 760px) and (orientation: portrait) {
    .header-postit {
        display: none;
    }
}


@media (max-width: 640px) and (orientation: portrait) {
    


    .header-login {
        top: 10px;
        right: 10px;
    }

    .user-pill {
        gap: 6px;
        padding: 3px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .92);
    }

    .user-name {
        display: none;
    }

    .logout-btn {
        width: auto;
        min-width: 0;
        min-height: 0;
        padding: 7px 10px;
        border-radius: 999px;
        font-size: 0;
        line-height: 1;
    }

    .logout-btn::before {
        content: "Log ud";
        font-size: .72rem;
        font-weight: 800;
    }

    .header-login > .btn-login:not(.logout-btn) {
        width: auto;
        min-width: 0;
        padding: 7px 11px;
        border-radius: 999px;
        font-size: .72rem;
    }


    .hero-logo {

        gap: 1px;
        align-items: flex-start;
    }

    .hero-logo img {
        width: clamp(24px, 12vw, 36px);
        height: clamp(24px, 12vw, 36px);
    }

    .hero-logo-home {
        font-size: 0.5rem;
        padding: 1px 4px;
        transform: translateX(-2px);
    }

    .hero {
        height: 300px;
        padding: 0;
        background-size: cover;
        background-position: right center;
        background-repeat: no-repeat;
        overflow: hidden;
    }

    .hero-overlay {
        position: absolute;
        inset: 0;
        display: block;
        height: 100%;
           background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.40) 0%,
            rgba(0,0,0,.18) 45%,
            rgba(0,0,0,0) 100%
        );
    }

    .hero-content,
    .hero-content.hero-left,
    .hero-content.hero-center,
    .hero-content.hero-right {
        position: absolute;
        left: 47px;
        right: 22px;
        top: 24%;
        transform: translateY(-50%);
        width: auto;
        max-width: 60%;
        text-align: left;
        align-items: flex-start;
        box-shadow:
          0 10px 24px rgba(0,0,0,.28);
           
        background: color-mix(
           in srgb,
           var(--color-mobil-tekst-bg) 72%,
            transparent
        );
        color: var(--color-soft);

        padding: 6px 10px 12px 8px;
        border-radius: 18px;

    }
    
    .hero-kicker{
    font-size: .68rem;
    margin-bottom: 4px;
    letter-spacing: .08em;
}

.hero-content h1{
    font-size: 1.5rem;
    line-height: 1;
}

.hero-content h2{
    font-size: 1rem;
    line-height: 1.25;
    margin: 8px 0 10px;
}

.hero-buttons .btn{
    font-size: .88rem;
    padding: 9px 16px;
}

    .hero-content h1,
    .hero-content h2,
    .hero-kicker {
            color: var(--color-tekst-header);
                   
    }

    .hero-text {
        display: none;
    }

    .hero-buttons {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .hero-buttons .btn {
        width: auto;
        flex: 0 0 auto;
        max-width: none;
    }
}

@media (orientation: landscape) and (max-height: 700px) {

    .header-postit {
        width: 135px;
        min-height: 95px;
        padding: 7px;
    }

    .header-postit img {
        height: 70px;
    }

    .header-postit h3 {
        font-size: .62rem;
        margin: 0 0 3px;
    }

    .header-postit p,
    .header-postit span {
        font-size: .52rem;
        line-height: 1.1;
    }

    .header-postit-left {
        top: calc(100% - 48px);
        left: 12%;
    }

    .header-postit-right {
        top: calc(100% - 42px);
        right: 12%;
    }
    
    .hero-content {
    z-index: 20;
}
}







