/* ==========================================================================
   EngajEdu — Landing page
   Identidade alinhada ao app: tema escuro, azul #4A9EFF, verde #4CAF50, Inter
   ========================================================================== */

/* Tokens de design
   ========================================================================== */
:root {
    --bg: #0d0e12;
    --bg-raised: #13151b;
    --surface: #1a1d25;
    --surface-2: #21252f;
    --border: #2a2f3a;
    --border-strong: #39404e;

    --text: #f2f4f8;
    --text-muted: #9aa3b2;

    --primary: #4a9eff;
    --primary-strong: #2e7bcc;
    --primary-soft: rgba(74, 158, 255, 0.12);
    --accent: #4caf50;
    --accent-soft: rgba(76, 175, 80, 0.14);
    --danger: #ff6b6b;

    --gradient-brand: linear-gradient(120deg, #4a9eff 10%, #4caf50 90%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 16px 50px rgba(0, 0, 0, 0.45);

    --container: 1140px;
    --header-height: 72px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

h1, h2, h3, h4 {
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
    text-wrap: balance;
}

p {
    color: var(--text-muted);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    scroll-margin-top: var(--header-height);
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 12px;
}

/* Botões
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    padding: 14px 28px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease,
        transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.28);
}

.btn-primary:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(74, 158, 255, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.btn-sm {
    padding: 9px 18px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

/* Header
   ========================================================================== */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(13, 14, 18, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.header.is-scrolled {
    background: rgba(13, 14, 18, 0.95);
    border-bottom-color: var(--border);
}

.navbar {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.nav-logo em {
    font-style: normal;
    color: var(--primary);
}

.logo-image {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 9px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-link.active {
    color: var(--primary);
}

.nav-cta-item {
    margin-left: 12px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle .bar {
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero
   ========================================================================== */
.hero {
    position: relative;
    padding: calc(var(--header-height) + 64px) 0 96px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(600px 400px at 15% 10%, rgba(74, 158, 255, 0.14), transparent 65%),
        radial-gradient(500px 380px at 90% 80%, rgba(76, 175, 80, 0.10), transparent 65%);
}

.hero-container {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
    font-size: clamp(2.4rem, 4.6vw + 0.5rem, 3.9rem);
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text);
}

.highlight {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    max-width: 54ch;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 36px;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    list-style: none;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.hero-points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-points svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Hero — mockup do app
   ========================================================================== */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.phone {
    position: relative;
    width: 290px;
    border-radius: 40px;
    background: #161922;
    border: 1px solid var(--border-strong);
    padding: 12px;
    box-shadow: var(--shadow-pop);
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 22px;
    background: #161922;
    border-radius: 0 0 14px 14px;
    z-index: 2;
}

.phone-screen {
    background: var(--bg);
    border-radius: 30px;
    padding: 40px 18px 20px;
    border: 1px solid var(--border);
}

.quiz-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.quiz-subject {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.quiz-progress-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.quiz-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
    margin-bottom: 18px;
}

.quiz-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--gradient-brand);
}

.quiz-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
}

.quiz-options {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.quiz-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    text-align: left;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.quiz-option.is-correct {
    color: var(--text);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.quiz-option.is-correct svg {
    color: var(--accent);
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.quiz-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 600;
}

/* Cartões flutuantes ao redor do mockup */
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(26, 29, 37, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    animation: float 6s ease-in-out infinite;
}

.floating-card svg {
    color: var(--primary);
    flex-shrink: 0;
}

.floating-card strong {
    color: var(--text);
}

.card-recording {
    top: 2%;
    left: -8%;
    animation-delay: 0s;
}

.card-ai {
    top: 42%;
    right: -14%;
    animation-delay: 2s;
}

.card-ranking {
    bottom: 2%;
    left: -12%;
    animation-delay: 4s;
}

.rec-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 1.6s ease-in-out infinite;
}

.waveform {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.waveform i {
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: var(--primary);
    transform-origin: center;
    animation: wave 1.1s ease-in-out infinite;
}

.waveform i:nth-child(2) { animation-delay: 0.15s; }
.waveform i:nth-child(3) { animation-delay: 0.3s; }
.waveform i:nth-child(4) { animation-delay: 0.45s; }
.waveform i:nth-child(5) { animation-delay: 0.6s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes wave {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}

/* Seções — estrutura comum
   ========================================================================== */
.section-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.section-title {
    font-size: clamp(1.7rem, 2.6vw + 0.6rem, 2.5rem);
    color: var(--text);
    margin-bottom: 14px;
}

.section-subtitle {
    font-size: 1.08rem;
}

/* Recursos
   ========================================================================== */
.features {
    padding: 96px 0;
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feature-card {
    background: var(--surface);
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 158, 255, 0.45);
    box-shadow: var(--shadow-card);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    color: var(--primary);
}

.feature-title {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 8px;
}

.feature-description {
    font-size: 0.95rem;
}

/* IA em destaque
   ========================================================================== */
.ai-section {
    padding: 96px 0;
}

.ai-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
}

.ai-content .section-title {
    margin-bottom: 18px;
}

.ai-content p {
    margin-bottom: 14px;
    max-width: 50ch;
}

.ai-pipeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 36px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.ai-step {
    text-align: center;
    flex: 1;
}

.ai-step p {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
}

.ai-step p span {
    color: var(--text-muted);
    font-weight: 400;
}

.ai-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

.ai-step-icon-accent {
    background: var(--accent-soft);
    color: var(--accent);
}

.ai-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Como funciona
   ========================================================================== */
.how-it-works {
    padding: 96px 0;
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    list-style: none;
    counter-reset: steps;
}

.step {
    position: relative;
    background: var(--surface);
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
}

.step-title {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 8px;
}

.step-description {
    font-size: 0.95rem;
}

/* CTA final
   ========================================================================== */
.cta-section {
    padding: 96px 0;
}

.cta-box {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(40px, 7vw, 72px) 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(420px 260px at 20% 0%, rgba(74, 158, 255, 0.14), transparent 70%),
        radial-gradient(420px 260px at 80% 100%, rgba(76, 175, 80, 0.10), transparent 70%);
}

.cta-box > * {
    position: relative;
}

.cta-box .section-subtitle {
    max-width: 520px;
    margin: 0 auto 32px;
}

.cta-email {
    margin-top: 18px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.cta-email a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 1px;
    overflow-wrap: anywhere;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cta-email a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Footer
   ========================================================================== */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 64px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .nav-logo {
    margin-bottom: 16px;
}

.footer-description {
    max-width: 36ch;
    font-size: 0.95rem;
}

.footer-title {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-bottom p {
    margin: 0;
}

/* Animações de entrada (ativadas via JS)
   ========================================================================== */
.has-js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.has-js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsivo
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 56px;
        text-align: center;
    }

    .hero-subtitle {
        margin-inline: auto;
    }

    .hero-buttons,
    .hero-points {
        justify-content: center;
    }

    .hero-visual {
        padding: 12px 0 0;
    }

    .card-recording { left: 4%; }
    .card-ai { right: 2%; }
    .card-ranking { left: 6%; }

    .features-grid,
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .ai-visual {
        order: 2;
    }

    .ai-content {
        order: 1;
        text-align: center;
    }

    .ai-content p {
        margin-inline: auto;
    }

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

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px 24px 24px;
        background: rgba(13, 14, 18, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    }

    .nav-menu.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 13px 14px;
        font-size: 1rem;
    }

    .nav-cta-item {
        margin: 10px 0 0;
    }

    .nav-cta {
        width: 100%;
    }

    .hero {
        padding-bottom: 72px;
    }

    .floating-card {
        font-size: 0.78rem;
        padding: 10px 13px;
    }

    .features,
    .ai-section,
    .how-it-works,
    .cta-section {
        padding: 72px 0;
    }

    .features-grid,
    .steps-container {
        grid-template-columns: 1fr;
    }

    .ai-pipeline {
        flex-direction: column;
        gap: 18px;
        padding: 32px 24px;
    }

    .ai-arrow {
        transform: rotate(90deg);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 480px) {
    .container,
    .navbar {
        padding-inline: 18px;
    }

    .phone {
        width: 260px;
    }

    .card-recording { left: 0; }
    .card-ai { right: 0; }
    .card-ranking { left: 0; }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* Acessibilidade — movimento reduzido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .floating-card,
    .waveform i,
    .rec-dot {
        animation: none;
    }

    .has-js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .btn,
    .feature-card {
        transition: none;
    }
}
