/* ----- GLOBAL ----- */

* {
    box-sizing: border-box;
    font-family: 'Montserrat', Arial, sans-serif;
    font-variant-numeric: lining-nums;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

:root {
    /* Personal brand */
    --accent: rgb(16,16,32);
    --gold: rgb(180,140,80);
    --gold-light: rgb(225,217,204);
    --pale: rgb(245,240,235);
    --light: 200;
    --bold: 700;
}

::-webkit-scrollbar {display: none;}

html {
    background-color: var(--accent);
    color: var(--accent);
    cursor: none;
}

body {
    animation: fadeIn 0.5s cubic-bezier(0.75, 0, 0.25, 1) 0s forwards;
    background-color: var(--gold-light);
    color: var(--accent);
    overflow-x: hidden;
    opacity: 0;
}

@keyframes fadeIn {
    0% {opacity: 0;}
    100% {opacity: 1;}
}

#wrapper {
    min-height: 100dvh;
    width: 100dvw;
    max-width: 100dvw;
}

img {
    pointer-events: none;
    -webkit-touch-callout: none;
}

/* ----- CUSTOM CURSOR KUN PÅ MOUSE DEVICES ----- */
@media (hover: hover) and (pointer: fine) {

    a,
    button,
    [role="button"],
    input,
    textarea {cursor: none;}

    #cursor-outer {
        position: fixed;
        top: 0;
        left: 0;
        width: 32px;
        height: 32px;
        border: 1px solid rgba(180,140,80,0.8);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition:
            width 0.4s cubic-bezier(0.25,0,0,1),
            height 0.4s cubic-bezier(0.25,0,0,1),
            border-color 0.4s ease;
        will-change: transform;
    }

    #cursor-inner {
        position: fixed;
        top: 0;
        left: 0;
        width: 4px;
        height: 4px;
        background: rgb(180,140,80);
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
        transition: width 0.2s ease, height 0.2s ease;
        will-change: transform;
    }

    body.cursor-hover #cursor-outer {
        width: 64px;
        height: 64px;
        border-color: rgba(180,140,80,0.25);
    }

    body.cursor-hover #cursor-inner {
        width: 6px;
        height: 6px;
    }
}

/* ----- TYPOGRAPHY ----- */

@font-face {
    font-family: 'Histeagin';
    src: url("../resources/font/histeagin_licensed.woff") format("woff");
}

h1 {
    font-family: 'Histeagin', serif;
    font-weight: lighter;
    font-size: clamp(4rem, 7vw, 7rem);
    line-height: 0.9;
}

h2 {
    font-family: 'Playfair', serif;
    font-weight: lighter;
    font-size: clamp(3rem, 4vw, 5rem);
    line-height: 1;
}

h3 {
    font-family: 'Playfair', serif;
    font-weight: lighter;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
}

p {
    font-weight: 200;
    font-size: 1rem;
    line-height: 1.5rem;
}

strong {
    color: inherit;
    font-weight: 500;
}

em {
    color: var(--gold);
    font-family: inherit;
    font-weight: inherit;
}

.light {font-weight: 200;}

.link {
    border-bottom: 1px solid var(--gold);
    color: var(--gold);
    font-weight: 300;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.75, 0, 0.25, 1);
    z-index: 1;
}

@media screen and (min-width: 720px) {.link:hover {border-color: var(--gold-light); color: var(--gold-light);}}

/* ----- GLOBAL BUTTONS ----- */

.button {
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 1rem 0;
    color: var(--accent);
    font-size: 1rem;
    line-height: 1rem;
    overflow: hidden;
    position: relative;
    padding: 1rem 2rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.5s cubic-bezier(0.75, 0, 0.25, 1);
}

.button::before {
    background: linear-gradient(90deg, var(--accent), rgb(218,198,168));
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    height: 100%;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.75, 0, 0.25, 1);
    z-index: -1;
}

@media screen and (min-width: 769px) {
    .button:hover {border-color: transparent;}
    .button:hover::before {top: 0;}
}

/* ----- GLOBAL NAVIGATION ----- */

nav {
    background-color: rgba(16,16,24,0);
    height: 100dvh;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    transition: all 1s cubic-bezier(0.75, 0, 0.25, 1);
    z-index: 100;
}

nav.open {
    background-color: rgba(16,16,24,0.75);
    pointer-events: initial;
}

    nav #content {
        align-items: flex-end;
        background-color: rgba(16,16,24,0.75);
        --webkit-backdrop-filter: blur(1rem);
        backdrop-filter: blur(1rem);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 4vw;
        pointer-events: initial;
        transform: translateX(-100%);
        transition: all 1s cubic-bezier(0.75, 0, 0.25, 1);
        height: 100%;
        width: calc((100% - 2rem) - 8vw);
    }

    nav.open #content {transform: translateX(0);}

        nav #content #closeBtn {
            background: transparent;
            border: 0;
            display: block;
            padding: 1rem 0 1rem 1rem;
        }

            nav #content #closeBtn svg {
                display: block;
                height: 2rem;
            }

                nav #content #closeBtn svg line {
                    fill: none;
                    stroke: var(--pale);
                    stroke-linecap: round;
                    stroke-miterlimit: 10;
                    stroke-width: 2px;
                    transition: all 0.25s cubic-bezier(0.5, 0, 0.5, 1);
                }

                @media (hover: hover) {
                    nav #content #closeBtn:hover svg line {stroke: var(--gold);}
                }

        nav #content #nav {
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

            nav #content #nav a {
                color: var(--pale);
                font-weight: 500;
                letter-spacing: 4px;
                line-height: 1;
                opacity: 0;
                text-decoration: none;
                text-align: right;
                text-transform: uppercase;
                transform: translateX(-100%);
                transition: all 0.25s cubic-bezier(0.5, 0, 0.5, 1);
            }

            nav.open #content #nav a {animation: navAni 1s cubic-bezier(0.5, 0, 0.5, 1) 0.75s forwards;}

            nav.open #content #nav a:nth-of-type(2) {animation-delay: 1s;}
            nav.open #content #nav a:nth-of-type(3) {animation-delay: 1.25s;}
            nav.open #content #nav a:nth-of-type(4) {animation-delay: 1.5s;}

            @keyframes navAni {
                0% {opacity: 0; transform: translateX(-100%);}
                100% {opacity: 1; transform: translateX(0);}
            }

            @media (hover: hover) {
                nav #content #nav a:hover {
                    color: var(--gold);
                }
            }

        .lang {
            display: flex;
            gap: 1rem;
            justify-content: center;
            transition: all 0.25s cubic-bezier(0.75, 0, 0.25, 1);
            width: 100%;
        }

            .lang a {
                opacity: 0.25;
                transition: all 0.25s cubic-bezier(0.75, 0, 0.25, 1);
            }

            @media (hover: hover) {
                .lang a:hover {opacity: 1;}
            }

            .lang a.active {opacity: 1;}

                .lang a .fi {
                    display: block;
                    font-size: 1.5rem;
                    line-height: 1;
                    overflow: hidden;
                }

/* ----- GLOBAL HEADER ----- */

header {
    align-items: center;
    background-color: rgba(16,16,24,0);
    display: flex;
    justify-content: space-between;
    position: fixed;
    padding: 4vw;
    width: 100dvw;
    z-index: 99;
    transition: all 0.5s cubic-bezier(0.75, 0, 0.25, 1);
}

header.scrolled {
    background-color: rgba(16,16,24,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem 4vw;
}

    header #homeBtn {
        display: block;
        text-decoration: none;
        transition: all 1s cubic-bezier(0.75, 0, 0.25, 1);
    }

        header #homeBtn img {
            display: block;
            height: 4rem;
            transition: all 0.5s cubic-bezier(0.75, 0, 0.25, 1);
        }

    header #menuBtn {
        background: transparent;
        border: 0;
        padding: 0;
        transition: all 1s cubic-bezier(0.75, 0, 0.25, 1);
    }

    header #menuBtn.open {transform: rotate(90deg);}

        header #menuBtn svg {
            display: block;
            height: 3rem;
            transform: scaleX(-100%);
        }

            header #menuBtn svg rect {
                fill: var(--gold);
                transition: all 0.5s cubic-bezier(0.75, 0, 0.25, 1);
            }            

    @media (hover: hover) {
        header #homeBtn:hover img {opacity: 0.5;}

        header #menuBtn:hover svg rect {fill: var(--gold-light);}
    }

/* ----- GLOBAL FOOTER ----- */

footer {
    background-color: var(--accent);
    color: var(--gold-light);
    padding: 1rem;
    text-align: center;
    width: 100%;
}

    footer .copy {
        color: inherit;
        font-size: 12px;
        line-height: 1rem;
    }

/* ----- MEDIA QUERIES ----- */

@media screen and (max-width: 840px) {
    ::-webkit-scrollbar {display: none;}
}

@media screen and (max-width: 480px) {
    nav #content {
        padding: 2rem;
        width: calc((100% - 4rem) - 3rem);
    }

    header {padding: 2rem;}

    header.scrolled {padding: 1rem 2rem;}
}