@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Paleta Curada e Harmoniosa */
    --background: #05070a;
    --surface: rgba(13, 20, 29, 0.6);
    --surface-bright: #1c232d;
    --primary: #007aff;
    --primary-glow: rgba(0, 122, 255, 0.5);
    --secondary: #5856d6;
    --accent: #00d2ff;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --outline: rgba(255, 255, 255, 0.1);

    /* Tipografia Premium */
    --font-headline: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Sistema de Espaçamento Apple-style */
    --unit: 8px;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --container-max: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Mesh Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 122, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(88, 86, 214, 0.05) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-headline);
    letter-spacing: -0.02em;
}

/* Glassmorphism Intenso */
.glass {
    background: rgba(13, 20, 29, 0.7);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

header {
    height: 72px;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
}

header.scrolled {
    height: 64px;
    background: rgba(13, 20, 29, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Typography Enhancements */
.hero-title {
    font-size: clamp(48px, 10vw, 84px);
    font-weight: 800;
    line-height: 1.05;
    background: linear-gradient(180deg, #fff 0%, #86868b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-family: var(--font-headline);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(0, 122, 255, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.45);
    background: #0071e3;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 16px 32px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s ease;
    border: 1px solid var(--outline);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Card Visuals (Apple Bento Style) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card-grid > .card[style*="grid-row: span 2"] {
        grid-row: auto !important;
    }
}

.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 40px;
    border: 1px solid var(--outline);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(0, 122, 255, 0.3);
    transform: scale(1.02);
    background: rgba(13, 20, 29, 0.8);
}

.card i {
    font-size: 40px;
    margin-bottom: 24px;
    display: block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card i.fa-star,
.card i.fa-check,
.card i.fa-google {
    font-size: inherit;
    margin-bottom: 0;
    display: inline-block;
    background: none;
    -webkit-text-fill-color: inherit;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 32px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 20px;
    text-align: center;
}

/* Animations - Reveal & Parallax */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile Specifics */
.mobile-nav {
    display: none;
}

/* Hide by default on desktop */

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .container {
        padding: 0 20px;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 400px;
        height: 64px;
        background: rgba(25, 25, 25, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 32px;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 10px;
        gap: 4px;
        transition: color 0.3s ease;
    }

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

    .mobile-nav-item i {
        font-size: 20px;
    }

    .mobile-full {
        grid-column: span 2 !important;
    }

    /* Ajuste de escala do Header no mobile */
    header {
        height: 60px !important;
    }

    header.scrolled {
        height: 54px !important;
    }

    /* Ajuste do Hero/Quiz no mobile */
    section#home {
        padding: 100px 0 40px !important;
    }

    #quiz-container {
        padding: 24px !important;
        border-radius: var(--radius-md) !important;
    }

    .quiz-option {
        padding: 16px !important;
    }

    .quiz-option i {
        font-size: 24px !important;
    }

    .quiz-option span {
        font-size: 14px !important;
    }

    /* Forçar grid de uma coluna em telas muito pequenas */
    @media (max-width: 480px) {
        .quiz-grid {
            grid-template-columns: 1fr !important;
        }

        .section-title {
            font-size: 28px !important;
        }
    }
}

.quiz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Label Premium */
.label-premium {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 122, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
    }
}

/* Quiz Styles */
.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.quiz-step.active {
    display: block;
}

.quiz-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 24px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.quiz-option i {
    font-size: 28px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.quiz-option:hover {
    background: rgba(0, 122, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.quiz-option:hover i {
    transform: scale(1.1);
}

.quiz-option.selected {
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Styles */
input,
select,
textarea {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 18px !important;
    color: #ffffff !important;
    font-family: var(--font-body);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

input:hover,
select:hover,
textarea:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px !important;
    cursor: pointer;
}

/* Fix para legibilidade das opções em modo escuro */
option {
    background-color: #0d141d !important;
    /* Cor sólida do card para evitar transparência bugada */
    color: #ffffff !important;
    padding: 16px;
    font-size: 16px;
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Estilo para quando o select ainda não tem valor selecionado */
select:invalid,
select option[value=""] {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Scrollbar personalizada para o select/textarea */
textarea::-webkit-scrollbar {
    width: 6px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

/* Garantir que o texto seja legível mesmo se o browser tentar forçar estilos */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #1c232d inset !important;
    transition: background-color 5000s ease-in-out 0s;
}