@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&display=swap');

/* ===== Tema / base ===== */
:root {
    --base-color: #fff6ed;
    --base-var: #ffffff;
    --text-color: #1F1F1F;
    --text-var: #71717a;
    --accent: #FFC212;
    --afeto: #F9B0C3;
    --extra: #0b0b0b;
}

.darkmode {
    --base-color: #1f2332;
    --base-var: #2a3045;
    --text-color: #F8F8F2;
    --text-var: #d6d6d6;
    --accent: #fedb7f;
    --afeto: #f2b6c8;
}

/* ===== Reset/Layout ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lexend Deca', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--base-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.6;
    min-height: 100vh;
    transition: background .3s ease, color .3s ease;
}

.container {
    border-radius: 15px;
    max-width: 1200px;
    width: 95%;
    display: flex;
    padding: 60px 20px;
    margin: 0 auto;
}

/* header container não usa flex row */
header .container {
    display: block;
    padding: 0 16px;
    border-radius: 0;
}

/* ===== Header / Top nav ===== */
header {
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    backdrop-filter: saturate(120%) blur(6px);
}

.nav-top {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    /* + botão mobile */
    align-items: center;
    gap: 16px;
    min-height: 72px;
}

.nav-top nav {
    justify-self: center;
}

.header-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border .2s ease;
}

.btn-start {
    background: var(--text-color);
    color: var(--base-color);
    border: 3px solid var(--text-color);
    border-radius: 50px;
    padding: 10px;
}

.btn-start:hover {
    background: transparent;
    color: var(--text-color);
}

.btn-register {
    background: var(--accent);
    color: var(--extra);
    border: 3px solid var(--accent);
    padding: 16px 26px;
    border-radius: 50px;
}

.btn-register:hover {
    background: transparent;
    color: var(--accent);
}

.logo {
    font-weight: 800;
    font-size: 22px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    text-decoration: none;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    position: relative;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: color .2s ease;
    padding: 6px 2px;
}

nav a:hover,
nav a.active {
    color: var(--accent);
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 3px;
    width: 0;
    background-color: var(--accent);
    transition: width .2s ease;
    margin: 0 auto;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Botão hambúrguer (desktop: escondido) */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    background: var(--base-var);
    color: var(--text-color);
    cursor: pointer;
}

.nav-toggle i:last-child {
    display: none;
}

/* x escondido */
body.nav-open .nav-toggle i:first-child {
    display: none;
}

/* troca para x */
body.nav-open .nav-toggle i:last-child {
    display: inline-block;
}

/* ===== Hero / Seções ===== */
.hero {
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 3rem;
    min-height: 70vh;
    border-radius: 15px;
}

.hero-text {
    flex: 1;
    z-index: 1;
    position: absolute;
}

.hero-text h1 {
    font-size: 48px;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    line-height: 1.2;
    font-weight: 900;
}

.hero-text p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: var(--text-var);
    max-width: 560px;
}

.hero-image {
    flex: 1;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: auto;
    display: inline-block;
}

.hero-img {
    display: block;
    width: 100%;
    height: 20%;
    top: 20%;
    left: 34%;
    position: relative;
    rotate: 10deg;
}

.funcionalidades .container {
    display: block;
}

.funcionalidades {
    background: var(--base-var);
    border-radius: 7% 0% 0% 0%;
}

.sobre-nos .container {
    display: block;
}

.sobre-nos {
    background: var(--base-var);
    border-radius: 0% 0% 7% 0%;
}

.texto {
    margin: 20px 20px auto;
    width: 100%;
    justify-content: center;
    text-align: center;
    color: var(--text-var);
    font-size: 1.1rem;
    line-height: 1.6;
}

section {
    padding: 3rem 0;
}

.titulo {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 900;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.card {
    background: var(--base-color);
    border-radius: 20px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.bene-icon {
    font-size: 2.6rem;
    margin-bottom: 10px;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.card p {
    color: var(--text-var);
}

/* ===== Footer ===== */
footer {
    justify-content: center;
    color: var(--text-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    font-size: .95rem;
    font-weight: 600;
}

/* ===== Theme toggle (flutuante: bottom-right) ===== */
#theme-switch {
    height: 50px;
    width: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    right: 20px;
    cursor: pointer;
    bottom: 20px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, .12);
}

#theme-switch svg {
    fill: var(--base-var);
    width: 28px;
    height: 28px;
}

#theme-switch svg:last-child {
    display: none;
}

.darkmode #theme-switch svg:first-child {
    display: none;
}

.darkmode #theme-switch svg:last-child {
    display: block;
}

/* ===== Mobile nav (<= 640px) ===== */
.mobile-only {
    display: none;
}

/* CTA só no mobile */
@media (max-width:640px) {
    .header-right {
        display: none;
    }

    /* por quê: evitar poluir a barra no mobile */
    .nav-toggle {
        display: inline-flex;
    }

    /* mostra hambúrguer */

    /* painel nav sobreposto */
    #primary-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--base-var);
        border-bottom: 1px solid rgba(0, 0, 0, .08);
        transform: translateY(-100%);
        transition: transform .25s ease;
        padding: 12px 16px 16px;
        z-index: 40;
    }

    body.nav-open #primary-nav {
        transform: translateY(0);
    }

    #primary-nav ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 8px;
    }

    #primary-nav a {
        display: block;
        padding: 10px 4px;
        font-size: 1rem;
    }

    .mobile-only {
        display: block;
        margin-top: 6px;
    }

    /* backdrop */
    .nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        z-index: 30;
    }

    body.nav-open .nav-backdrop[hidden] {
        display: block;
    }

    /* reexibe sem atributo hidden */
    body.nav-open {
        overflow: hidden;
    }

    /* por quê: evitar scroll por baixo */
}

/* ===== Responsivo ===== */
@media (max-width:1024px) {
    .container {
        padding: 40px 16px;
    }

    header .container {
        padding: 0 16px;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .card-container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width:768px) {
    .nav-top {
        grid-template-columns: auto 1fr auto auto;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

    header {
        padding: 0;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .hero-text h1 {
        font-size: 2rem;
    }
}

@media (max-width:480px) {
    .hero-text h1 {
        font-size: 1.7rem;
    }

    .btn-start {
        padding: 10px 18px;
        font-size: 14px;
    }

    .card {
        padding: 1.4rem 1rem;
    }

    nav ul {
        gap: .75rem;
    }
}