/* Font declarations */
@font-face {
    font-family: 'CyGrotesk';
    src: url('../fonts/CyGrotesk-KeyRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CyGrotesk';
    src: url('../fonts/CyGrotesk-KeyThin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CyGrotesk';
    src: url('../fonts/CyGrotesk-KeyMedium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CyGrotesk';
    src: url('../fonts/CyGrotesk-KeyBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset default styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --black: rgba(0, 0, 0, 0.8);
    --red: #E96223;
    --grey: #B9C7CA;
    --font-sm: 1.15rem;
    --font-md: 1.55rem;
}

/* Apply CyGrotesk font to body */
body {
    font-family: CyGrotesk, sans-serif;
    font-weight: 500;
    color: var(--black);
    line-height: 1.3;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
}

ul,
ol {
    list-style: none;
}

nav button {
    color: var(--black) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-text-fill-color: var(--black) !important;
    text-decoration: none !important;
}

nav button:visited,
nav button:link,
nav button:active {
    color: var(--black) !important;
    -webkit-text-fill-color: var(--black) !important;
}

button {
    background: none;
        border: none;
        font: inherit;
        cursor: pointer;
}

a, button {
    color: var(--black) !important;
    text-decoration: none;
}

p {
    margin-bottom: 1rem;
}

/* Language switching */
.content[lang="ua"] {
    display: none;
}

body[data-lang="ua"] .content[lang="en"] {
    display: none;
}

body[data-lang="ua"] .content[lang="ua"] {
    display: flex;
}


body[data-lang="en"] h3[lang="ua"],
body[data-lang="ua"] h3[lang="en"], body[data-lang="en"] img[lang="ua"],
body[data-lang="ua"] img[lang="en"] {
    display: none;
}

/* Style */

.header__img {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 1rem;
}


.background {
    position: fixed;
    z-index: -10;
    height: 100%;
    width: 100%;
    display: flex;
}

.background div {
    width: 50%;
    background-attachment: fixed;
    background-repeat: no-repeat; 
    background-size: 50% auto;
}


.background div:nth-child(1) {
    background-image: url('/assets/img/bg-grey.svg');
    background-color: var(--grey);

}

.background div:nth-child(2) {
    background-image: url('/assets/img/bg-red.svg');
    background-color: var(--red);
    background-position: right top;
}


img {
    height: min(50vw, 70vh);
    width: auto;    margin-left: -0.1rem;
}


h1 {
    display: none;
}

nav {
    display: flex;
    justify-content: flex-end;
    font-size: var(--font-md);
    transform: none;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 10;
    padding: 1rem 2rem;
    gap: 1rem;
}



/* Content at normal speed */
.content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
}

section {
    width: 50%;
    padding: 1rem;
    font-size: var(--font-sm);
}

.content__dates {
    order: 2;
    position: sticky;
    top: 0;
    font-size: var(--font-md);
}

time {
    font-weight: 600;
    display: block;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    margin-left: 2rem;
}

body[data-lang="en"] button[data-lang="en"],
body[data-lang="ua"] button[data-lang="ua"] {
    font-weight: 600;
}

.logo-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    padding: 2rem;
    list-style: none;
    margin: 0;
    align-items: center;
    padding-bottom: 0;
    padding-top: 0;
}

.logos {
    padding: 2rem;
    font-size: var(--font-sm);
}


.logo-container li {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}

.logo-container img {
    max-width: 100%;
    max-height: 3rem;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;   
}

@media (max-width: 700px) {

    body, html {
        font-size: 0.85rem;
        background: var(--grey);
    }

    .background {
        display: none;
    }

    :root {
        --font-md: max(3.9vw, 1.15rem)
    }

    /* Disable parallax on mobile */
    html {
        perspective: none;
    }

    body {
        transform-style: flat;
        background-image: none;
    }

    header {
        transform: none;
        padding: 3rem 0;
    }

 
    .content {
        flex-direction: column;
    }

    

    section {
        width: 100%;
    }

    .content__dates {
        order: 1;
        position: relative;
    }

    .content__text{
        order: 2;
    }

    header {
        background-image: url('/assets/img/bg.svg');
        background-position: center top;
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-size: 100% auto;
    }

    img {
        height: min(60vw, 70vh);       
         width: auto;
        display: block;
    }

    .logo-container {
        grid-template-columns: repeat(4, 1fr);
    }
}