/* =========================
   VARIÁVEIS GLOBAIS
========================= */
:root {
    --primary-color: #110F44;
    --secondary-color: crimson;

    --white-color: #ffffff;
    --black-color: black;
    --light-gray-color: #eeeeee;

    --gap: 3rem;
    --menu-height: 65px;
}

/* =========================
   RESET E CONFIGURAÇÕES BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: "Open Sans", sans-serif;
    font-size: 2rem;
    color: var(--primary-color);
    line-height: 1.5;
}

aside {
    display: block;
    unicode-bidi: isolate;
}

/* =========================
   TIPOGRAFIA
========================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Montserrat", sans-serif;
}

h1 {
    font-size: 6rem;
    text-transform: uppercase;
}

h2 {
    font-size: 7rem;
    margin-bottom: 5rem;
    text-transform: uppercase;
    line-height: 1.2;
}

h3 {
    font-size: 5rem;
}

h4 {
    font-size: 4.5rem;
}

h5 {
    font-size: 4rem;
}

h6 {
    font-size: 3.5rem;
}

a {
    text-decoration: none;
}

/* =========================
   MENU / NAVEGAÇÃO
========================= */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--menu-height);
    z-index: 1;

    border-bottom: 0.1rem solid var(--light-gray-color);
}

.menu-content {
    position: relative;
    z-index: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-height: 100%;
    padding: 0 var(--gap);
}

.menu .main-content {
    padding: 0 var(--gap);
    height: 100%;
    display: flex;
    align-items: center;
}

.menu h1 {
    font-size: 2.3rem;
    color: var(--primary-color);
    line-height: 1;
}

.menu h1 a {
    color: inherit;
}

.menu nav {
    position: relative;
    z-index: 2;
    max-height: 100%;
    display: flex;
    align-items: center;
}

.menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.menu ul li {
    display: flex;
    align-items: center;
}

.menu ul li a {
    display: flex;
    align-items: center;
    padding: 0.5rem 2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
    line-height: 1;
    box-sizing: border-box;
}

.menu ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0.25rem;
    background-color: var(--secondary-color);
    transition: all 300ms ease-in-out;
}

.menu ul li a:hover::after {
    width: 50%;
    left: 50%;
    transform: translateX(-50%);
}

/* =========================
   LAYOUT BASE DAS SEÇÕES
========================= */
.main-bg {
    background-image: url('../img/main-bg.svg');
    background-size: cover;
    background-position: center center;
    color: var(--white-color);

}

.main-content {
    max-width: 120rem;
    margin: 0 auto;
    padding: 10rem var(--gap);
}

.white-bg {
    background: var(--white-color);
    color: var(--primary-color);
}

.section {
    min-height: 100vh;
}

.menu-spacing {
    height: var(--menu-height);
}

.full-width {
    width: 100%;
    flex: 1 1 100%;
    display: block;
}

/* =========================
   SEÇÃO INTRO
========================= */
.intro-content {
    position: relative;
    /* top: -7rem; */
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    align-items: center;
    gap: var(--gap);
    min-height: 100vh;
}

.intro-text-content {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
}

.intro-img img {
    max-width: 100%;
    max-height: auto;
}

/* =========================
   SEÇÃO TOP 3
========================= */
.top3-content {
    max-width: 70rem;
    display: flex;
    /* flex-flow: column wrap; */
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    text-transform: uppercase;
}

.top3-content p,
.projects-content p {
    margin-bottom: 4rem;
}

/* =========================
   SEÇÃO PROJECTS
========================= */
.grid-main-heading {
    margin-bottom: 1rem;
}

.grid-description {
    padding-bottom: 5rem;
}

.projects-content {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    min-height: 100vh;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    counter-reset: grid-counter;
}

.grid h3 {
    font-size: 3rem;
    position: relative;
    padding-left: 5rem;
    padding-bottom: 2rem;
}

.grid h3::before {
    counter-increment: grid-counter;
    content: counter(grid-counter);
    position: absolute;
    font-size: 7rem;
    font-style: italic;

    top: -3rem;
    left: 0;
    transform: rotate(5deg);
}

/* =========================
   GALERIA
========================= */
.gallery-img {
    width: 100%;
    max-width: 36rem;
    max-height: 36rem;
    overflow: hidden;
}

.gallery-img img {
    transition: all 300ms ease-in-out;
}

.gallery-img:hover img {
    transform: translate(-3%, 3%) scale(1.2) rotate(5deg);
}

/* =========================
   TABELA
========================= */
.responsive-table {
    /* overflow-y: visible; */
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table caption {
    font-size: 1.6rem;
    font-style: italic;
    text-align: left;
    margin-bottom: 1rem;
}

table td,
table th {
    white-space: nowrap;
    padding: 1rem;
    text-align: left;
    border: 0.1rem solid var(--light-gray-color);
}

tfoot td,
table th {
    background-color: var(--light-gray-color);
}

/* =========================
   SEÇÃO CONTATO
========================= */
.contact-text-content {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
}

.contact-text-content h2 {
    font-size: 6rem;
}

.contact-form {
    grid-column: span 2;
}

.contact-form .form-grid {
    border: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}

.form-grid legend {
    font-style: italic;
    font-size: 1.6rem;
    margin-bottom: 3rem;
    grid-column: 1 / -1;
}

/* =========================
   FORMULÁRIO
========================= */
.form-grid .form-group {
    min-width: 0;
}

.form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    font-size: 2rem;
    border: none;
    background: var(--white-color);
    padding: 1rem 1.5rem;
    width: 100%;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0.2rem 0.2rem 1.5rem var(--secondary-color);
}

.form-group textarea {
    min-height: 10rem;
    resize: vertical;
    font-family: inherit;
}

.form-group button {
    border: 0.5rem solid var(--white-color);
    background: none;
    color: var(--white-color);
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: all 300ms ease-in-out;
}

.form-group button:hover {
    border: 0.5rem solid var(--white-color);
    background: var(--white-color);
    color: var(--primary-color);
}

/* =========================
   FOOTER
========================= */
.footer {
    text-align: center;
    font-size: 1.6rem;
}

.footer a {
    color: var(--primary-color);
}

.footer p {
    margin: 0;
    padding: 3rem;
}

/* =========================
   MENU MOBILE
========================= */
.close-menu {
    display: none;
}

/* =========================
   RESPONSIVIDADE
========================= */
@media (max-width: 800px) {

    .menu-spacing {
        height: 0;
    }

    .intro-content,
    .grid {
        grid-template-columns: 1fr;
    }

    .contact-form .form-grid {
        grid-template-columns: 1fr;
    }

    .gallery-img {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
    }

    .gallery-img img {
        width: 100%;
    }

    .projects-content {
        display: block;
    }

    .menu {
        bottom: 0;
        height: auto;
        min-height: 100vh;
        text-align: center;
        display: none;
    }

    .menu-content,
    .menu-content ul {
        flex-direction: column;
        justify-content: center;
    }

    .menu-content {
        height: 100vh;
    }

    .menu ul li a {
        min-height: 0;
        height: auto;
        padding: 0.5rem 2rem;
    }

    .menu ul li a::after {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        max-width: 20rem;
    }

    .menu ul li a:hover::after {
        width: 50%;
        max-width: 20rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .close-menu {
        position: fixed;
        z-index: 2;
        top: 0;
        left: 0;
    }

    .close-menu-label::after {
        content: '☰';
        position: fixed;
        z-index: 2;
        top: 1rem;
        right: 1rem;
        background: var(--primary-color);
        color: var(--white-color);
        font-size: 3rem;
        line-height: 3rem;
        width: 3rem;
        height: 3rem;
        text-align: center;
        padding: 0.5rem;
        cursor: pointer;
    }

    /* × */
    .close-menu:checked~.menu {
        display: block;
    }

    .close-menu:checked~.close-menu-label::after {
        display: block;
        content: '×';
    }

    /* Footer compacta em telas médias */
    .footer {
        font-size: 1.5rem;
        padding: 0 2rem;
    }

    .footer p {
        padding: 2rem 1.5rem;
        line-height: 1.5;
    }
}

@media (max-width: 430px) {
    h1{
        font-size: 6rem;
    }

    h2{
        font-size: 3.5rem;
    }

    h3{
        font-size: 1.5rem;
    }

    p{
        font-size: 1.8rem;
    }

    #contact .contact-text-content h2{
        font-size: 3.5rem;
    }

    .grid-main-heading{
        margin-bottom: 5rem;
    }

    .contact-form{
        grid-column: 1 / -1;
    }

    /* Footer ainda mais compacta em telas pequenas (fonte proporcional ao <p>: 1.8rem) */
    .footer {
        font-size: 0.5rem;
        padding: 0 1rem;
    }

    .footer p {
        /* padding: 0 1.25rem; */
        font-size: 1.5rem;
        height: 100%;
        line-height: 1.45;
    }
}