@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700;900&display=swap');

:root {
    --max-width: 125rem;
    --active_col: #ffff5c;

    font-size: 10px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: #fff;
}

html, body {
    --col1: #4FAAFF;
    --col2: #A2E3FF;

    width: 100%;
    height: 100%;

    display: grid;

    background: linear-gradient(156.28deg, var(--col1) 5.36%, var(--col2) 94.44%);

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */

    position: relative;
    z-index: 0;
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
    /* Hide scrollbar for Chrome, Safari and Opera */
    display: none;
}

body {
    padding-block: 5rem;
    isolation: isolate;
}
body::before {
    content: "CLP";

    font-weight: 900;
    font-size: 35vw;    /* 500px */
    text-transform: uppercase;
    text-align: center;
    transform: translate(-50%, -50%);

    color: #fff;
    opacity: 0.07;

    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;

    position: absolute;
    left: 50%; top: 1%;
    z-index: -1;
}

header, main {
    margin-inline: auto;
    padding-block: 2rem;

    width: 95%;
    max-width: var(--max-width);
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    text-wrap: balance;
    text-align: center;
    color: var(--active_col);

    margin-bottom: 2rem;
}
h2 {
    font-size: 1.35rem;
    text-align: center;
}


/* Topic Cards */

.clp_topics {
    display: flex;
    justify-content: center;
    gap: 0.5rem;

    transform-style: preserve-3d;
   
    pointer-events: none;
}


.topic_label {
    padding: 1.8rem;

    width: 100%;
    max-width: 22rem;
    aspect-ratio: 1/1.2;

    display: grid;
    align-items: center;
    justify-items: center;

    gap: 1rem;
    
    font-size: 1.8rem;
    text-align: center;

    background-color: #0F1C2F;
    border-radius: 1.7rem;

    overflow: hidden;

    transition: 0.4s;
    position: relative;
    opacity: 0.8;

    -webkit-box-reflect: below 3px
     linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.03)
    );

    pointer-events: auto;
    cursor: pointer;
}

.clp_topics:hover .topic_label {
    margin-inline: -2rem;
}

.clp_topics:hover .topic_label:not(:hover) {
    transform:
     perspective(400px)
     rotateY(30deg)
     scale(0.8);

    opacity: 0.9;
}


.topic_label:hover {
    scale: 1.1;
    z-index: 1;
}

.topic_label:hover ~ .topic_label {
    transform:
     perspective(400px)
     rotateY(-30deg)
     scale(0.8) !important;
}


.topic_label img {
    width: 80%;
    
    aspect-ratio: 1/1;
    object-fit: contain;
    object-position: center;
    
    border-radius: 1rem;
}

.topic_label:not(:has(input:checked)):hover {
    box-shadow: 0 0.6rem 1rem 0px var(--active_col);
    outline: 2px solid var(--active_col);
    opacity: 1;
}

.topic_label:has(input:checked) {
    box-shadow: 0 0.6rem 1rem 0px var(--active_col);
    outline: 2px solid var(--active_col);
    opacity: 1;
    cursor: default;

    z-index: 1;
}

.clp_topics input {
    accent-color: var(--active_col);

    position: absolute;
    top: 1rem; left: 1rem;
}


/* Languages Cards */

.clp_languages {
    margin-block: 4rem;

    display: flex;
    justify-content: center;
    gap: 2rem;
}
.lang_label {
    margin-inline: -3rem;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    cursor: pointer;
}

.flag-box {
    width: 14rem;
    height: 14rem;

    border-radius: 100%;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    -webkit-box-reflect: below -10%
     linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.1)
    );

    transition: 0.3s;

    position: relative;
    z-index: 1;
}

.lang_label:hover .flag-box {
    scale: 1.1;
    z-index: 2;
}
.clp_languages:hover .lang_label:not(:hover) .flag-box {
    scale: 0.8;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.email_input {
    padding: 0 2.4rem;
    width: 28.07rem;
    height: 4.67rem;
    
    font-size: 1.25rem;
    text-align: center;
    color: #0F1C2F;
    background-color: #fff;
    
    border: none;
    outline: none;
    border-radius: 2.4rem;

    transition: background-color 0.2s;
}
.email_input:hover,
.email_input:focus-visible {
    background-color: #f7f7f7;
}

.email_input.-tel {
    width: 16.07rem;
    transition: 0.35s;
}
.email_input.-tel[data-is-required="false"] {
    width: 0;
    padding-inline: 0;
    outline-color: transparent;
    opacity: 0;
}

.controls:has(.email_input.-tel[data-is-required="false"]) {
    gap: 1rem;
}

.email_input[data-is-required="true"] {
    outline: 2px solid crimson;
}

.email_input[data-is-valid="false"] {
    outline: 2px solid crimson;
}
.email_input[data-is-valid="true"] {
    outline: 2px solid limegreen;
}

.clp_submit {
    width: 8rem;
    /* height: 8rem; */
    aspect-ratio: 1;

    font-size: 2rem;
    color: #fff;
    background-color: #0F1C2F;

    border: none;
    outline: none;
    border-radius: 100%;

    transition:
        background-color 0.2s,
        box-shadow 0.2s;

    cursor: pointer;
}
.clp_submit:hover,
.clp_submit:focus-visible {
    background-color: #000;
    box-shadow: 0 0 15px 1px #aeff30;
}


footer {
    width: 100%;
    height: fit-content;
    text-align: center;
    z-index: 10;
}

footer .social-media-share {
    margin: 0.5rem;
    display: inline-block;
    width: 4rem;
}


@media (max-width: 600px) {
    :root {
        font-size: 9px;
    }

    .clp_topics .topic_label {
        margin-inline: -2rem;
    }
    .clp_topics:hover .topic_label {
        margin-inline: -3rem;
    }
    .controls {
        display: grid;
        justify-items: center;
    }
    .clp_submit {
        margin-block: 2rem;
    }
}

@media (max-width: 535px) {
    .topic_label {
        padding: 0.5rem;
        max-width: 19rem;
        
        background: linear-gradient(to top, #173c71, #0F1C2F);

        font-size: 1.3rem;
        border-radius: 1rem;
    }
}

@media (max-width: 465px) {
    body {
        padding-block: 2rem;
    }
    h1 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    h2 {
        display: none;
    }
    .clp_topics {
        margin-inline: auto;
        width: 90%;
    }
    .clp_topics .topic_label {
        margin-inline: -2.5rem;
        max-width: 17rem;
    }
    .flag-box {
        width: 11rem;
        height: unset;
        aspect-ratio: 1;
    }
    .flag-box img {
        width: 15rem;
    }
}

@media (max-width: 390px) {
    .clp_topics .topic_label {
        margin-inline: unset;
        margin-block: -2rem;

        max-width: 14rem;
        writing-mode: vertical-rl;
    }
    .clp_topics:hover .topic_label {
        margin-inline: unset;
        margin-block: -3rem;
    }
    .topic_label img {
        display: none;
    }
}