@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,600&family=DM+Serif+Display&display=swap');

/* ======== Variabler ======== */

:root {
    --color-primary: #F0C314;
    --color-bg: #F2EDF4;
    --color-bg-transparent: #f2edf4a0;
    --color-txt: #1C1A1A;
    --drop-shadow: 0 4px 16px rgba(0,0,0,.15);
}

/* ======== Browser reset ======== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ======== Typografi ======== */

html {
    font-family: 'DM Sans', sans-serif;
    color: var(--color-txt);
    scroll-behavior: smooth;
    scroll-padding-top: 8rem;
}

h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 3.75rem;
    line-height: 1em;
}

h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 2.25rem;
    line-height: 1em;
}

h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    line-height: 1em;
}

h4 {
    font-family: 'DM Sans', sans-serif;
}

/* ======== Components ======== */

img {
    display: block;
    max-width: 100%;
}

.logo img {
    height: 3rem;
}

.btn {
    display: inline-block;
    background: var(--color-primary);
    font-weight: 700;
    padding: .25rem 1.5rem;
    border-radius: 999px;
    color: var(--color-txt);
    text-decoration: none;
    transition: 250ms ease-out;
    transform: scale(1);
}

.btn span {
    display: inline-block;
    font-size: 1.25em;
    translate: .5rem .075rem;
}

.btn:hover {
    transform: scale(1.05);
}

.flex {
    display: flex;
}

.bg-blur {
    background: var(--color-bg-transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.link-arrow::after {
    display: inline-block;
    content: '';
    margin-left: .5rem;
    margin-bottom: -.1rem;
    background: url(./imgs/arrow-up-right.svg);
    background-size: contain;
    width: .75em;
    height: .75em;
}

/* ======== Layout ======= */

body {
    position: relative;
    overflow-x: hidden;
    background: var(--color-bg);
}

header {
    display: flex;
    position: sticky;
    justify-content: space-between;
    align-items: center;
    top: 0;
    padding: 1rem;
    box-shadow: var(--drop-shadow);
    z-index: 100;
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
}

nav a {
    display: inline-block;
    color: var(--color-txt);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border-radius: .25rem;
    transition: 250ms ease-out;
}

nav a:hover {
    background: var(--color-primary);
}

main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    margin-bottom: 4rem;
}

footer {
    min-height: 300px;
    background: var(--color-txt);
    color: #fff;
}

/* ======== Hero ======== */

.hero-top {
    min-height: 540px;
    padding: 1rem;
    background: url(./imgs/web-hero.jpg);
    background-position: center;
    display: flex;
    align-items: center;
    border-radius: 0 0 1rem 1rem;
}

.hero-top-content {
    margin-left: calc(50% + 1rem);
    max-width: 38ch;
}

.hero-card {
    display: grid;
    align-items: center;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
    max-width: 970px;
    min-height: 320px;
    margin-inline: auto;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 2rem;
    box-shadow: var(--drop-shadow);
    border: 1px solid #fff;
    
}

.hero-card-img {
    height: 100%;
    background: gray;
    border-radius: 1rem;
    overflow: hidden;
}

/* ======== Film ======== */

.video-container {
    max-width: 970px;
    aspect-ratio: 16 / 9;
    background: gray;
    margin-inline: auto;
    border-radius: 1rem;
    overflow: hidden;

}

/* ======== FAQ ======== */

#faq {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 1rem;
}

.accordion {
    border-radius: 1rem;
    box-shadow: var(--drop-shadow);
    overflow: hidden;
    padding: 1rem;
    border: 1px solid #fff;
}

button.acc {
    color: var(--color-txt);
    width: 100%;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1em;
    border: none;
    border-bottom: 1px solid var(--color-txt);
    text-align: left;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 250ms ease-out;
    background: transparent;
}

.acc-icon {
    height: .75rem;
}

button.acc:hover {
    background: var(--color-primary);
}

button.acc.active .acc-icon {
    rotate: 180deg;
}

.panel {
    margin-inline: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: 250ms ease-out;
}

/* ======== Links ======== */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card {
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: var(--drop-shadow);
    border: 1px solid #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

/* ======== BG Elements ======== */

.bg-elem {
    position: absolute;
}

.bg-elem:nth-of-type(1) {
    rotate: 270deg;
    width: 50%;
    top: 5%;
    left: -30%;
    z-index: -1;
}

.bg-elem:nth-of-type(2) {
    width: 70%;
    top: 15%;
    right: 0;
    z-index: -1;
}

.bg-elem:nth-of-type(3) {
    width: 60%;
    top: 45%;
    left: -20%;
    z-index: -1;
}

.bg-elem:nth-of-type(4) {
    rotate: 180deg;
    width: 55%;
    bottom: 5%;
    left: 30%;
    z-index: -1;
}

/* ======== Footer ======== */

.footer-content {
    height: 300px;
    max-width: 1440px;
    padding: 1rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    place-content: center;
}

.logo-footer {
    width: 4rem;
    margin: 0 auto;
}

.some-links {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.some-links a {
    color: #fff;
}

/* ======== Media Queries ======== */

@media (max-width: 700px) {

    h1 {
        font-size: 2.5rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        align-items: center;
        gap: 1rem;
    }

    nav a {
        text-align: center;
        padding: .25rem .5rem;
    }
    .hero-top {
        align-items: flex-end;
        background-position: 28% ;
        background-size: cover;
        min-height: 400px;
        padding: 0;
    }

    .hero-top-content {
        max-width: 100%;
        padding: 1rem;
        margin: 0 auto;
        color: #fff;
        background: rgba(0,0,0,.25);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-radius: 1rem;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }

    .hero-card-text {
        order: 2;
    }
    .hero-card-img {
        order: 1;
        min-height: 200px;
    }

    #faq {
        grid-template-columns: 1fr;
    }

    .cards {
        grid-template-columns: 1fr;
    }

}

/* ======== Scroll animation ======== */

@supports (animation-timeline: view()) {
    @keyframes bgScroll {
        from {
            translate: 0 -300px;
        }
        to {
            translate: 0 300px;
        }
    }
    
    .bg-scroll {
        animation: bgScroll linear both;
        animation-timeline: view();
    }
    
    @keyframes fgScroll {
        from {
            translate: 0 75px;
        }
        to {
            translate: 0 -75px;
        }
    }
    
    .fg-scroll {
        animation: fgScroll linear both;
        animation-timeline: view();
    }
}