:root {
    --title: #fffffe;
    --paragraph: #94a1b2;
    --primary-color: #7f5af0;
    --light-mode: #f5f5f5;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--light-mode);
    color: #111;
    transition: background-color 0.3s, color 0.3s;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body.dark-mode {
    background-color: #111;
    color: #f5f5f5;
}

header.menu.dark-mode {
    background-color: #222;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    animation: fadein 3s;
}

section {
    min-height: 100dvh;
    box-shadow: inset 0 -0.7rem 1rem var(--primary-color);
    padding-bottom: 1.5rem;
}

.padding-menu {
    margin-top: 10rem;
}

.center-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* ---------- MENU ----------- */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.menu img {
    height: 5rem;
    width: auto;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

ul {
    justify-content: flex-end;
    display: flex;
    align-items: center;
}

li {
    margin: 0 2rem;
    list-style: none;
    font-size: 1.6rem;
}

a {
    text-decoration: none;
    font-weight: bold;
    color: inherit;
}

a:hover {
    transition: ease-in-out 300ms;
    color: var(--primary-color);
}

button#toggle-theme {
    padding: 5px;
    height: 5rem;
    width: 5rem;
    cursor: pointer;
    font-size: 18px;
    border: none;
    background-color: var(--primary-color);
    border-radius: 100%;
    align-content: center;
    color: var(--title);
}

.btn {
    display: flex;
    align-items: center;
}

/* ---------- MAIN SECTION ---------- */
main {
    display: flex;
    align-items: center;
    min-height: 100dvh;
    justify-content: center;
    box-shadow: inset 0 -0.7rem 1rem var(--primary-color);
    padding: 2rem;
}

.main-content {
    width: 100%;
    display: flex;
    justify-content: center;
}

.main-info {
    max-width: 75rem;
    text-align: center;
}

.main-info h1 {
    font-weight: bold;
    font-size: 5rem;
    margin-bottom: 2rem;
}

.main-info span {
    background: linear-gradient(135deg, #6a11cb, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.main-info p {
    color: var(--paragraph);
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.social-button {
    display: flex;
    gap: 1.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-button img {
    border-radius: 1rem;
    padding: 1rem;
    background-color: var(--title);
    border: solid #ccc 0.1rem;
    width: 5rem;
    height: auto;
    transition: ease-in-out 300ms;
}

.social-button img:hover {
    background-color: var(--primary-color);
}

/* ------- ABOUT SECTION ------- */
.about-content {
    display: flex;
    justify-content: center;
    padding: 6rem 2rem;
    background-color: var(--light-mode);
}

.grid-about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    justify-items: center;
}

.first-info {
    text-align: left;
}

.first-info h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    border-bottom: 0.2rem solid var(--primary-color);
    display: inline-block;
}

.grid-about p {
    font-size: 2rem;
    line-height: 2.8rem;
}

.icon-position {
    width: 100%;
}

.icon,
.setup-img {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    border: 0.5rem solid var(--primary-color);
    object-fit: cover;
}

/* ------- WORKS SECTION ------- */
.works-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--light-mode);
    padding: 6rem 2rem;
}

.works-content h2 {
    font-size: 4.5rem;
    padding-bottom: 2rem;
    border-bottom: 0.2rem solid var(--primary-color);
    text-align: center;
    margin: 7rem 0 10rem 0;
}

.grid-works {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5rem;
}

.cards {
    border: #16161a solid 0.1rem;
    background-color: #16161a;
    max-height: 60rem;
    max-width: 60rem;
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease-in-out;
    z-index: 99;
}

.cards h3 {
    height: 6rem;
    width: 100%;
    text-align: center;
    font-size: 2.3rem;
    font-weight: 500;
    margin: 1.5rem 0;
    color: var(--title);
}

.cards p {
    color: var(--paragraph);
    font-size: 1.6rem;
    margin-bottom: 2rem;
    height: 6.3rem;
}

.cards img {
    height: 18rem;
    width: 100%;
    object-fit: cover;
}

/* Estilo do botão unificado via CSS */
.cards .btn-visit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    color: var(--title);
    background-color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    z-index: 10;
}

.cards:hover {
    box-shadow: inset 0 0 100px var(--primary-color);
    transform: translateY(-5px);
}

.cards:hover .btn-visit {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.stacks {
    display: flex;
    justify-content: space-evenly;
    flex-flow: row wrap;
    text-align: center;
    padding: 1rem;
    color: var(--title);
    max-height: 100%;
    max-width: 100%;
}

.svg-stacks {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 2.5rem 0;
    gap: 2.5rem;
}

.svg-stacks img {
    height: 3rem;
    width: auto;
}

.express {
    background-color: rgb(0, 255, 4);
    border-radius: 5px;
}

/* ------- CONTACT SECTION ------- */
#contact {
    min-height: 100vh;
    padding: 6rem 2rem;
    background: var(--light-mode);
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 80rem;
    text-align: center;
}

.contact-content h2 {
    margin: 0 0 3rem 0;
    font-size: 4.5rem;
    padding-bottom: 2rem;
    border-bottom: 0.2rem solid var(--primary-color);
    width: fit-content;
}

.contact-content h3 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
}

form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

form label {
    font-size: 1.8rem;
    text-align: left;
}

form input,
form textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.6rem;
    border: 0.2rem solid #ccc;
    border-radius: 0.8rem;
    outline: none;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

form input:focus,
form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.2);
}

form textarea {
    min-height: 15rem;
    resize: vertical;
}

form button {
    background: var(--primary-color);
    color: var(--title);
    font-size: 1.8rem;
    font-weight: 600;
    padding: 1.2rem;
    border: none;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

form button:hover {
    transform: scale(1.03);
}

/* ------- FOOTER SECTION ------- */
.footer {
    background-color: #0f0f0f;
    color: #fff;
    padding-top: 3rem;
}

.footer-content {
    display: flex;
    padding-bottom: 2rem;
}

.footer-bottom {
    display: inline;
    text-align: center;
    padding: 1rem;
    font-size: 1.3rem;
    background-color: #0b0b0b;
}

/* ------- KEYFRAMES / ANIMATIONS ------- */
@keyframes fadein {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1.5s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------ MEDIA QUERIES ------------------ */
@media (max-width: 1024px) {
    .grid-works {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .icon,
    .setup-img {
        max-height: 110rem;
    }

    .cards {
        max-width: 100%;
        max-height: 100%;
        height: auto;
    }

    .cards .btn-visit {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        opacity: 1;
        display: inline-block;
        margin-top: 1rem;
    }

    .cards:hover .btn-visit {
        transform: none;
    }

    .grid-about {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .last-order {
        order: 4;
    }

    .first-info {
        text-align: center;
    }

    .main-info h1 {
        font-size: 4rem;
    }

    .first-info h2 {
        font-size: 3.5rem;
    }

    .works-content h2 {
        font-size: 4rem;
        margin: 5rem 0 7rem 0;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 55%;
    }

    .menu {
        height: 7rem;
        padding: 0 1rem;
    }

    .menu img {
        height: 4rem;
    }

    li {
        margin: 0 1rem;
    }

    .grid-works {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .icon,
    .setup-img {
        max-height: 90rem;
    }

    .contact-content h2 {
        font-size: 3.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    ul {
        display: none;
    }

    html {
        font-size: 50%;
    }

    .main-info h1 {
        font-size: 3rem;
    }

    .first-info h2 {
        font-size: 2.5rem;
    }

    .works-content h2 {
        font-size: 3rem;
        margin: 4rem 0 5rem 0;
    }

    .cards {
        width: 100%;
        max-width: 100%;
    }

    .social-button img {
        width: 4rem;
        height: 4rem;
        padding: 0.8rem;
    }

    .contact-content h2 {
        font-size: 3rem;
    }
}