@font-face {
    font-family: jost-regular;
    src: url(/data/font/Jost/static/Jost-Regular.ttf);
}

@keyframes fadeUp {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0px);}
}

@keyframes appearing_from_above {
    from {opacity: 0; transform: translateY(-10vh)}
    to {opacity: 1; transform: translateY(0vh)}
}

@keyframes disappearing_from_above {
    from {opacity: 1; transform: translateY(0vh)}
    to {opacity: 0; transform: translateY(-10vh)}
}

@keyframes wobble {
    0% { transform: translateX(0%) rotate(0deg); }
    15% { transform: translateX(-25%) rotate(-5deg); }
    30% { transform: translateX(20%) rotate(3deg); }
    45% { transform: translateX(-15%) rotate(-3deg); }
    60% { transform: translateX(10%) rotate(2deg); }
    75% { transform: translateX(-5%) rotate(-1deg); }
    100% { transform: translateX(0%) rotate(0deg); }
}

@keyframes full_rotation {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

:root {
    --distance-sections: 50px;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    container-type: scroll-state;
    scroll-behavior: smooth;
    scroll-padding-top: 25vh;
}

a {
    font-family: "Bodoni Moda", serif;
    font-size: clamp(1.4rem, 3.5vw, 2.5rem);
    text-decoration: none;
    width: fit-content;

    &:visited, &:link {
        color: black;
    }
}

body.non_latin_font a:not(.no-font) {
    font-family: "Noto Sans", "Noto Sans CJK JP", "Noto Sans CJK SC", sans-serif;
    font-size: clamp(0.9rem, 2.4vw, 1.8rem);
}

h1 {
    font-family: "Bodoni Moda", serif;
    font-weight: normal;
    font-size: clamp(2.2rem, 5vw, 3rem);
    color: whitesmoke;
}

h2 {
    font-family: "Bodoni Moda", serif;
    font-weight: normal;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    color: whitesmoke;
}

h3 {
    font-family: "Bodoni Moda", serif;
    font-weight: bold;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: whitesmoke;
}

body.non_latin_font h1:not(.hero_title > h1) {
    font-family: "Noto Sans", "Noto Sans CJK JP", "Noto Sans CJK SC", sans-serif;
    font-size: clamp(1.8rem, 4.2vw, 2.6rem);
}

body.non_latin_font h2:not(.hero_title > h2) {
    font-family: "Noto Sans", "Noto Sans CJK JP", "Noto Sans CJK SC", sans-serif;
}

p {
    font-size: clamp(1rem, 0.6vw + 0.85rem, 1.35rem);
    font-family: "Bodoni Moda", serif;
    line-height: 1.5;
    color: gainsboro;
}

hr.solid {
    border-top: 3px solid white;
    width: 100%;
}

article {
    display: flex;
    flex-direction: column;
}

/* Bar Section */
.header {
    height: 15vh;
    min-height: 70px;
    padding: 10px clamp(16px, 4vw, 40px);

    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;

    background-color: #1d1a17;

    position: sticky;
    top: 0;
    z-index: 50;
}

.header > a {
    height: 100%;
    width: auto;
    display: flex;

    > img {
        height: 100%;
        width: auto;
        filter: brightness(0) invert(1);
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navigation_menu {
    display: flex;
    flex-direction: row;
    align-items: center;

    column-gap: clamp(20px, 10vw, 180px);
    height: 100%;
}

.navigation_menu > button {
    width: 40px;
    height: 40px;
    border-radius: 50%;

    border: none;
    background-color: transparent;
    color: white;

    font-weight: bold;
    text-transform: uppercase;

    cursor: pointer;
    font-size: 1.5rem;

    margin-left: 5px;

    &:hover{
        scale:1.2;
    }
}

/* Languages Grid */
.languages_grid {
    display: flex;
    flex-direction: column;
    row-gap: 10px;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);
    z-index: 9999;

    text-align: center;
    align-content: center;
    position: fixed;

    padding: 10px;
    width: auto;
    max-width: 92vw;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    height: fit-content;

    border-radius: 25px;
    background-color: black;
}

.languages_grid h1 {
    cursor: default;
    color: whitesmoke;
}

.language_title {
    display: flex;
    flex-direction: row;
    padding: 10px;

    justify-content: space-between;
    align-items: center;
    height: fit-content;
    width: auto;
}

#cross_language {
    height: fit-content;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
}

#cross_language > span {
    width: 25px;
    height: 3px;
    background-color: whitesmoke;
    border-radius: 2px;
}

#cross_language > span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 1px)
}

#cross_language > span:nth-child(2) {
    transform: rotate(-45deg) translate(5px, -1px)
}

.list_languages {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 16px;
    width: auto;
}

.list_languages > a {
    width: 100%;
    min-width: 0;
    min-height: 60px;
    
    text-align: center;

    padding: 14px 24px;
    background-color: #1d1a17;
    color: whitesmoke;
    border: 3px solid whitesmoke;
    border-radius: 20px;

    font-family: "Bodoni Moda", serif;
    font-size: clamp(1.2rem, 4vw, 2rem);

    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.list_languages > a:hover {
    transform: scale(1.05);
    background-color: #423f3d;
    border-color: #423f3d;
}

body.non_latin_font .list_languages > a{
    font-family: "Bodoni Moda", serif;
    font-size: clamp(1.2rem, 4vw, 2rem);
}

/* Overlay */
#overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.4),
        rgba(0,0,0,0.7)
    );

    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

#overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Up Button */
#up_button {
    display: none;
    position: fixed;
    bottom: clamp(1rem, calc(0.143rem + 4.286vw), 7rem);
    right: 2%;
    z-index: 100;

    background: url(/data/img/icons/core_arrow_2.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    width: clamp(4rem, calc(3.571rem + 2.143vw), 7rem);
    height: clamp(4rem, calc(3.571rem + 2.143vw), 7rem);
    border: none;
    cursor: pointer;

    &:hover {
        transform: scale(1.1);
    }
}

#up_button.displayed {
    display: block;
}

/* Hero Section */
.hero {
    height: 90vh;
    min-height: 420px;
    padding: 0 16px;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;

    background: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 0%), url(/data/img/core/core_hero_image.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero_title {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: clamp(12px, 2vw, 20px);
    max-width: 100%;
}

.hero_title > h1 {
    padding: 0 clamp(16px, 3vw, 40px);
    font-size: clamp(2.4rem, 12vw, 10rem);
    line-height: 1.15;
    text-wrap: balance;

    animation-name: fadeUp;
    animation-duration: 1000ms;
    color: whitesmoke;

    border-radius: clamp(40px, 8vw, 120px);
    border: clamp(3px, 0.6vw, 8px) solid white;
    background-color: #C47A7B;
}

.hero_title > h2 {
    padding: 0 20px;
    font-size: clamp(1rem, 2.4vw, 2rem);
    letter-spacing: 0.12em;

    animation-name: fadeUp;
    animation-duration: 1000ms;
    color: whitesmoke;
    background-color: #1d1a17;
}

/* Menu Section */
.menu_section {
    padding: clamp(24px, 5vw, 60px) clamp(16px, 5vw, 60px);

    height: fit-content;

    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4vh;

    background-color: #1d1a17;

    position: relative;
}

.heading_menu {
    height: fit-content;

    display: flex;
    flex-direction: column;
    row-gap: 10px;
    align-items: center;
    text-align: center;

    > hr {
        margin-top: 20px;
    }
}

.heading_menu > h1 {
    font-weight: bold;
    font-size: clamp(2rem, 6vw, 3.5rem);

    > span {
        display: inline-block;
        animation: wobble 1s ease infinite;
        color: whitesmoke;
    }
}

.heading_menu > h2 {
    max-width: 60ch;
    line-height: 1.5;
}

/* Custom combo */
.custom_combo {
    padding: clamp(32px, 6vw, 80px) clamp(20px, 5vw, 80px);

    background-color: #a83232;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(32px, 8vw, 120px);
}

.custom_text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 520px;

    > h2 {
        font-weight: bold;
        text-align: left;
        font-size: clamp(2rem, 4.5vw, 3rem);
        color: whitesmoke;
    }

    > p {
        font-weight: bold;
        text-align: left;
        font-size: clamp(1.1rem, 2vw, 1.5rem);
        color: whitesmoke;
    }
}

.custom_combo img {
    width: 100%;
    max-width: clamp(200px, 28vw, 340px);
    height: auto;

    animation: full_rotation 8s ease infinite;
}

/* Footer Section */
.footer {
    padding: 5px 20px 5px 20px;
    height: fit-content;

    display: flex;
    flex-direction: column;
    align-items: center;

    background-color: #1d1a17;
    position: relative;
}

.footer > img {
    height: 15vh;
    width: auto;
    filter: brightness(0) invert(1);
}

.informations {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    row-gap: 20px;
    align-items: center;
    width: 100%;
}

.general_info {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    height: fit-content;

    a {
        font-family: jost-regular;
        font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
        overflow-wrap: anywhere;

        &:visited, &:link {
            color: white;
        }
    }

    img {
        width: clamp(20px, 2.4vw, 32px);
        height: auto;
        flex-shrink: 0;
    }
}

.where,
.cell,
.mail {
    display: flex;
    align-items: center;
    flex-direction: row;
    column-gap: 12px;

    > img {
        filter: brightness(0) invert(1);
    }
}

.social_info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    column-gap: 20px;
    height: 100%;

    img {
        width: clamp(28px, 8vw, 40px);
        height: auto;
        filter: brightness(0) invert(1);

        &:hover {
            transform: scale(1.1);
        }
    }

    a {
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
    }
}

.bottom-bar {
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 12px;
    font-size: 12.5px;
    color: white;
}

.bottom-bar > span{
    font-family: jost-regular;
}

/* Tablet */
@media screen and (max-width: 1100px) {
    .navigation_menu {
        column-gap: clamp(20px, 6vw, 80px);
    }
}

/* Mobile */
@media screen and (max-width: 768px) {

    .header {
        height: auto;
        min-height: 60px;
        padding: 10px 16px;

        > a {
            width: auto;
            display: flex;
            align-items: center;
            justify-content: center;

            img {
                width: auto;
                height: auto;
                max-height: clamp(50px, 14vw, 90px);
            }
        }
    }

    .languages_grid {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        width: 90vw;
    }

    .hero {
        height: 80vh;
    }

    .custom_combo {
        flex-direction: column;
    }

    .custom_text > h2,
    .custom_text > p {
        text-align: center;
    }

    .footer > img {
        height: auto;
        width: 40%;
        max-width: 160px;
    }

    .bottom-bar {
        text-align: center;
    }
}

@media screen and (max-width: 480px) {

    p {
        font-size: 1rem;
    }

    .hero_title > h1 {
        font-size: clamp(2.2rem, 4.5vw, 4rem);
    }

    .menu_section {
        padding: 24px 16px;
        row-gap: 3vh;
    }

    .custom_combo {
        padding: 28px 16px;
    }

    .list_languages > button {
        padding: 12px 16px;
    }

    .general_info img {
        width: clamp(16px, 5vw, 22px);
    }

    .social_info img {
        width: clamp(24px, 9vw, 32px);
    }
}

/* Mobile language grid */
@media screen and (max-width: 425px) {
    .list_languages {
        grid-template-columns: auto;
    }

    .list_languages > a {
        font-size: clamp(1.4rem, 8vw, 2rem);
    }
}

/* Landscape mode */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .header {
        height: fit-content;
        min-height: 0;
    }

    .header > a > img {
        max-height: 60px;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    #up_button {
        width: clamp(2.5rem, calc(2.357rem + 0.714vw), 3.5rem);
        height: clamp(2.5rem, calc(2.357rem + 0.714vw), 3.5rem);
    }
}


/* 4k and beyond support */
@media screen and (min-width: 2560px) {

    :root {
        --distance-sections: 100px;
    }

    html {
        scroll-padding-top: 20vh;
    }

    a { 
        font-size: 4rem;
    }

    body.non_latin_font a:not(.no-font) {
        font-size: 3rem;
    }

    h1 {
        font-size: 8rem;
    }

    h2 {
        font-size: 3.5rem;
    }

    h3 {
        font-size: 4.5rem;
    }

    body.non_latin_font h1:not(.hero_title > h1) {
        font-size: 5.5rem;
    }

    p {
        font-size: 3rem; 
    }

    .header {
        padding: 30px 60px;
    }

    .navigation_menu > button {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    .hero_title > h1 {
        font-size: 20rem;
        border-width: 14px;
        border-radius: 220px;
        padding: 0 80px;
    }

    .hero_title > h2 {
        font-size: 5rem;
    }

    .menu_section {
        padding: 100px 80px;
    }

    .heading_menu > h1 {
        font-size: 7rem;
    }

    .custom_combo {
        padding: 120px 100px;
        gap: 160px;
    }

    .custom_text {
        max-width: 1000px;
        gap: 32px;

        > h2 {
            font-size: 6rem;
        }

        > p {
            font-size: 3rem;
        }
    }

    .custom_combo img {
        max-width: 700px;
    }

    .languages_grid {
        padding: 40px;
        row-gap: 20px;
        border-radius: 50px;
    }

    .language_title {
        padding: 20px;
    }

    .list_languages {
        grid-template-columns: repeat(3, auto);
        gap: 40px;
    }

    #cross_language {
        gap: 10px;
        padding: 20px;
    }

    #cross_language > span {
        width: 50px;
        height: 6px;
    }

    #cross_language > span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 2px);
    }

    #cross_language > span:nth-child(2) {
        transform: rotate(-45deg) translate(10px, -2px);
    }

    .footer {
        padding: 10px 60px;
    }

    .informations {
        row-gap: 40px;
    }

    .general_info {
        row-gap: 20px;

        a {
            font-size: 3rem;
        }

        img {
            width: 64px; 
        }
    }

    .social_info {
        margin-top: 3vh;
        column-gap: 40px;

        img { width: 90px; }
        a {
            min-width: 110px;
            min-height: 110px;
        }
    }

    hr.solid {
        border-top-width: 6px;
    }

    .bottom-bar {
        font-size: 2rem;
        gap: 24px;
        padding-top: 48px;
    }
}