/*
-- Nettside laget av RVGS 2IT 26/27
-- Alt om oss ligger i 'om-oss.html' 
*/



/* root variabler */

:root {
    --bg: #0f0f0f;
    --header: #1f1f1f;
    --el: #2f2f2f;

    --card: #2f2f2f6a;
    --card-hover: #3f3f3f6a;

    --btn: #3f3f3f6a;
    --btn-hover: #4f4f4f6a;

    --txt: #faeafe;
    --txt-soft: #9a8a9e;
    
    --border: #5f5f5f6a;
    --border-light: #8f8f8f6a;

    --stars: #fff;

    --purp: #cd8eff;
    --lpurp: #edb1dc;
}

/* reset */

* {
    gap: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.2s;
}

/* body/hoved element */

body {
    color: var(--txt);
    background-color: var(--bg);

    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    margin-top: 96px;
    padding: 0 16px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

button {
    color: inherit;
    background-color: var(--btn);
    border: 1px solid var(--border);

    padding: 8px 12px;
}
button:hover {
    cursor: pointer;
}

/* header */

header {
    background-color: var(--header);

    top: 0;
    width: 100%;
    display: flex;
    position: fixed;
    align-items: center;
    flex-wrap: wrap;
    z-index: 50;
}

header .icon {
    gap: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
}

header img {
    width: 48px;
}

header h2 {
    align-self: center;
}

/* navigasjon */

nav {
    gap: 24px;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    margin: 0 12px 0 auto;
}
.btn {
    background-color: var(--btn);
    border: 1px solid var(--border);

    min-width: 96px;
    text-align:center;
    padding: 8px 12px;
}
.btn:hover {
    background-color: var(--btn-hover);
}
.btn:active {
    transform: scale(0.95);
}

/* footer */

footer {
    background-color: var(--card);
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 48px;
    position: fixed;
    text-align: center;
    color: var(--txt-soft);
}

/* elements */

.txt-soft {
    color: var(--txt-soft);
}

/* stjerne bakgrunn */

.star {
    background-color: var(--stars);

    width: 2px;
    height: 2px;
    position: absolute;
    box-shadow: 0 0 6px 1px #ffffff59

    !important;
    opacity: 0;
    transition: opacity 1s;
    z-index: -1;

}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.1;
    }
}


/* hovedside */

.homepage {
    gap: 24px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.homepage .card {
    text-align: center;
}

/* containers til hovedsiden */

.card {
    background-color: var(--card);
    border: 1px solid var(--border);

    width: 360px;
    max-width: 100%;
    height: 240px;
    display: flex;
    flex-direction: column;

    padding: 12px;
}

.card .btn {
    margin-top: auto;
    align-self: center;
    width: fit-content;
}

.card h3 {
    margin: 8px auto 0 auto;
}

.cards {
    gap: 48px;
    display: grid;
    width: 100%;
    justify-items: center;
}

.topcard {
    width: 100%;
    height: 240px; 
    max-width: 776px;
    justify-self: center;
}
.topcard h3 {
    margin-bottom: 8px;
}

.bottomcards {
    gap: 56px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.postertext {
    margin-top: 10%;
    text-align: center;
}

.posters {
    gap: 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 776px;
    margin: 0 auto 48px auto;
}
.posters img {
    width: 3608px;
    height: 4096px;
}

.postercard {
    height: fit-content;
    width: 100%;
}

.postercard img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

/* modal overlay */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: #000000b0;
    z-index: 40;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.popupposter {
    background-color: var(--card);
    border: none;

    position: static;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 12px;
}

.popupposter img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.popupposter .btn {
    position: absolute;
    top: 24px;
    right: 24px;
}

/* om oss */

.om-oss {
    gap: 24px;
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.om-oss .card {
    height: fit-content;
}

.utviklere {
    gap: 24px;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

.therest {
    display: flex;
    justify-content: center;
    margin-bottom: 124px;
    width: 100%;
}
.therest .card {
    gap: 12px;
    width: 100%;
    max-width: 776px;
    text-align: center;
    height: fit-content;
}
.therest .card h3 {
    margin-bottom: 12px;
}
.therest .card p {
    background-color: var(--card-hover);
    padding: 8px 12px;
}

#oh {
    border: 2px solid #6700ff6a;
}
#sm {
    border: 2px solid #ff55006a;
    text-align: center;
}

#as {
    border: 2px solid #a31d1d6a;
}

/* infosider - 1im/2it/2medie */

.infocard {
    height: auto;
    min-height: 240px;
    gap: 8px;
    width: 100%;
    max-width: 776px;
}

.infocard p {
    line-height: 1.6;
}

.valg-btns {
    gap: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: auto;
    padding-top: 16px;
}

.valg-btns .btn {
    padding: 12px 20px;
}

.cards:has(.infocard) {
    margin-bottom: 124px;
}

/* wrapping - tablet og mindre */

@media (max-width: 800px) {
    main {
        margin-top: 112px;
    }

    .homepage .cards {
        display: flex;
        flex-direction: column;
    }

    .homepage .bottomcards {
        width: 100%;
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .card,
    .topcard,
    .therest .card,
    .infocard {
        width: 100%;
        max-width: 400px;
    }

    .utviklere {
        gap: 16px;
    }

    footer {
        padding: 24px 16px;
        position: static;
        margin-top: 48px;
    }
}

/* wrapping - mobil */

@media (max-width: 500px) {
    header {
        justify-content: center;
        text-align: center;
    }

    header .icon {
        width: 100%;
        justify-content: center;
    }

    nav {
        width: 100%;
        justify-content: center;
        margin: 0;
        padding: 8px 12px 12px;
    }

    .btn {
        min-width: 80px;
        font-size: 0.9rem;
    }

    main {
        margin-top: 140px;
        padding: 0 12px;
    }

    h1 {
        font-size: 1.4rem;
        text-align: center;
    }

    .card,
    .topcard,
    .therest .card,
    .infocard {
        width: 100%;
        height: auto;
        min-height: 200px;
    }

    .popupposter .btn {
        top: 12px;
        right: 12px;
        padding: 8px 10px;
    }

    .popupposter img {
        max-width: 95%;
        max-height: 70vh;
    }

    .valg-btns .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}