/* Website Made by Bence (All rights reserved © 2025 Bence Barens) */

@font-face {
    font-family: 'Inter';
    src: url(../fonts/Inter.ttf) format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Castoro';
    src: url(../fonts/Castoro.ttf) format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root{
    --color-primary: #1c1c1c;
    --color-secondary: white;
    --color-accent: #e4cb16;
}

*{
    scroll-behavior: smooth;
    transition: all 200ms ease;
    -webkit-tap-highlight-color: transparent;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-style: normal;
}

html, body{
    margin: 0;
}

body{
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

h1, h2, h3, h4, h5, h6{
    font-family: "Castoro", serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
}

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

h2{
    margin: 0;
}

a{
    color: inherit;
}

.hidden{
    display: none;
}

::selection {
    background: var(--color-accent);
    color: var(--color-primary);
}

.skip-link {
  position: absolute;
  top: -20rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: bold;
  transition: left 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    main {
        animation: fadeIn 1s ease forwards;
    }
}

main{
    min-height: 90vh;
}

ul{
    list-style: none;
    padding: 0;
    margin: 0;
}

button{
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: inherit;
    color: inherit;
}

.button{
    background-color: var(--color-accent);
    color: var(--color-primary);
    width: fit-content;
    padding:  0.7rem 1.25rem;
    border-radius: 10rem;
    text-decoration: none;
    display: inline-block;
}

.button2{
    background: none;
    color: inherit;
    border: 0.1em solid var(--color-accent);
    width: fit-content;
    padding:  0.7rem 1.25rem;
    border-radius: 10rem;
    text-decoration: none;
    display: inline-block;
}

.button:hover, .button2:hover{
    transform: scale(1.05);
}

hr{
    border-top: 0.1em solid var(--color-secondary);
    margin: 4em auto;
}

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

header img{
    width: 3rem;
}

header nav div a img{
    width: 2.5em;
    margin-left: 0.25em;
}

header nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

#menu-toggle {
    display: none;
}

nav ul{
    display: flex;
    flex-wrap: wrap;
    margin: 0 1rem;
}

nav ul a{
    padding: 1rem 1rem;
    display: block;
    box-shadow:0 0 0 0rem var(--color-accent) inset;
    text-decoration: none;
}

nav ul a:hover, header a[aria-current="page"]{
    box-shadow: 0 -0.5rem 0rem -0.25rem var(--color-accent) inset;
}

nav ul header a[aria-current="page"]{
    font-weight: 700;
}

.language-switcher .selected{
    border: var(--color-accent) 0.2rem solid;
    transition: none;
}

.language-switcher button{
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .4rem;
    overflow: hidden;
}

.language-switcher{
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0 1rem;
}

header {
    background-color: rgba(28, 28, 28, 0.8);
    backdrop-filter: blur(0.5rem);
    color: var(--color-secondary);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    transition: all 500ms ease;
}

@media (prefers-reduced-motion: no-preference) {
    header{
        background-color: rgba(28,28,28,0);
        backdrop-filter: none;
    }

    .scrolled {
        background-color: rgba(28, 28, 28, 0.8) !important;
        color: white !important;
        backdrop-filter: blur(0.5rem);
    }

    .hide-header{
        transform: translateY(-100%);
    }

    /* for pages with lighter hero's ------------ */

    @media only screen and (min-width: 768px) {

        #gallery header, #poetry header{
            color: var(--color-primary);
        }
    }

    #gallery, #poetry{
        header img{
            filter: brightness(0);
        }

        .scrolled img, .nav-expanded img{
            filter: none;
        }
    }

    /* ----------------------------------------- */
}

@media only screen and (max-width: 768px) {

    header nav{
        align-items: flex-start;
        flex-direction: column;
        padding: .5rem;
        margin-bottom: -1rem;
    }

    header nav>div{
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    header nav ul{
        opacity: 0;
        pointer-events: none;
        align-self: flex-end;
        max-height: 0;
        margin: 0;
        display: inline;
    }

    #menu-toggle {
        display: flex;
        background: none;
        margin: auto 0;
        border: none;
        flex-direction: column;
        gap: .3rem;
    }

    #menu-toggle img{
        width: 2rem;
        position: static;
    }

    /* header icon */
    header.nav-expanded #menu-toggle img:nth-child(2){ opacity: 0; }
    header.nav-expanded #menu-toggle img:nth-child(1){ transform: rotate(45deg); }
    header.nav-expanded #menu-toggle img:nth-child(3){ transform: rotate(-45deg); margin-top: -1.2rem; }

    header.nav-expanded{
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        background-color: var(--color-primary) !important;
        border-bottom: 0.2rem solid var(--color-accent);
        transform: translateY(0);
    }

    header.nav-expanded nav{
        height: auto;
        margin-bottom: 1rem;
    }

    header.nav-expanded nav ul{
        opacity: 1;
        pointer-events: all;
        max-height: 20rem;
        margin-right: 0.5rem;
    }

    header nav ul{
        flex-direction: column;
        text-align: right;
        margin-top: 1rem;
    }

    header nav ul a{
        box-shadow: none;
        padding: .5rem;
        border-right: rgba(28, 28, 28, 0) 0.5rem solid;
    }

    header nav ul a[aria-current="page"]{
        border-right: var(--color-accent) 0.5rem solid;
        box-shadow: none;
    }

    header nav ul a:hover{
        box-shadow: none;
    }

    .language-switcher{
        margin-top: 1rem;
        align-items: flex-end;
        margin-right: -1rem;
    }
}

.language-switcher img{
    filter: none !important;
    width: 2rem;
}

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

footer{
    background-color: var(--color-primary);
    margin-top: 5rem;
    text-transform: uppercase;
    color: var(--color-secondary);
    padding: 2rem 4rem;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
    position: relative;
}

footer::before {
    content: "";
    display: block;
    position: absolute;
    top: -0.5rem;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background-image: url('../img/icons/border.svg');
    background-size: 10rem 0.5rem;
    background-repeat: repeat-x;
}

@media only screen and (max-width: 768px) {
    footer{
        font-size: smaller;
        text-align: center;
        gap: 2rem;
        justify-content: center;
    }
}