/* =============================================
   ERIKA CHRISTINA — Quiz Persuasivo
   Color System: Dark + Gold (from portfolio)
   ============================================= */

/* ---------- CSS Variables ---------- */
:root {
    /* Brand Colors */
    --gold-primary: #D4A731;
    --gold-light: #E8C94A;
    --gold-dark: #B8901F;
    --gold-glow: rgba(212, 167, 49, 0.3);
    --gold-subtle: rgba(212, 167, 49, 0.08);
    
    /* Background System */
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1E1E1E;
    --bg-glass: rgba(22, 22, 22, 0.85);
    
    /* Text Colors */
    --text-primary: #F5F5F5;
    --text-secondary: #A0A0A0;
    --text-muted: #6B6B6B;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-gold: rgba(212, 167, 49, 0.3);
    
    /* Misc */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 4px 30px rgba(212, 167, 49, 0.15);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* WhatsApp */
    --whatsapp-green: #25D366;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ---------- Particles Canvas ---------- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ---------- Progress Bar ---------- */
.progress-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    z-index: 100;
    transition: opacity var(--transition-fast);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light));
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 12px var(--gold-glow);
}

.progress-text {
    position: fixed;
    top: 10px;
    right: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-primary);
    z-index: 101;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* ---------- Brand Header ---------- */
.brand-header {
    position: fixed;
    top: 16px;
    left: 24px;
    z-index: 50;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* ---------- Quiz Container ---------- */
.quiz-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Quiz Steps ---------- */
.quiz-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.97);
    transition: 
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s 0.5s;
    padding: 80px 20px 40px;
}

.quiz-step.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: 
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
        visibility 0s 0s;
}

.quiz-step.exit-up {
    opacity: 0;
    transform: translateY(-30px) scale(0.97);
}

.step-content {
    max-width: 680px;
    width: 100%;
    text-align: center;
}

/* ---------- Step Elements ---------- */
.step-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

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

.step-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.step-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
    font-weight: 300;
}

.gold-text {
    color: var(--gold-primary);
    font-style: italic;
}

/* ---------- Welcome Step ---------- */
.welcome-step .welcome-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--gold-subtle);
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
    50% { box-shadow: 0 0 0 8px transparent; }
}

.welcome-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.welcome-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
    font-weight: 300;
}

.welcome-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.btn-start {
    font-size: 1.1rem;
    padding: 16px 42px;
}

.welcome-note {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

/* ---------- Step Navigation ---------- */
.step-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
}

/* ---------- Input Styles ---------- */
.input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.quiz-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all var(--transition-fast);
    outline: none;
}

.quiz-input::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

.quiz-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px var(--gold-glow);
    background: var(--bg-card-hover);
}

.quiz-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.optional-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 8px;
}

/* Input validation states */
.quiz-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

/* ---------- Option Cards ---------- */
.options-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 8px;
}

.options-2col {
    grid-template-columns: repeat(2, 1fr);
}

.options-1col {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-subtle), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.option-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.option-card:hover::before {
    opacity: 1;
}

.option-card.selected {
    border-color: var(--gold-primary);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-gold);
}

.option-card.selected::before {
    opacity: 1;
}

.option-card.selected .option-check {
    opacity: 1;
    transform: scale(1);
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.option-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.option-card p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.option-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--gold-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-bounce);
}

/* Horizontal option cards (budget) */
.option-card.horizontal {
    flex-direction: row;
    text-align: left;
    padding: 16px 20px;
    gap: 14px;
}

.option-card.horizontal .option-icon {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.option-card.horizontal h3 {
    margin-bottom: 0;
    flex: 1;
}

/* ---------- Contact Form ---------- */
.contact-form {
    max-width: 440px;
    margin: 0 auto 8px;
}

/* ---------- Submit Button ---------- */
.btn-submit {
    min-width: 260px;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(10,10,10,0.2);
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Success Step ---------- */
.success-step {
    max-width: 540px;
}

.success-animation {
    margin-bottom: 28px;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.checkmark-svg {
    width: 80px;
    height: 80px;
}

.checkmark-circle-bg {
    stroke: var(--gold-primary);
    stroke-width: 2;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: circle-draw 0.6s ease forwards 0.2s;
}

@keyframes circle-draw {
    to { stroke-dashoffset: 0; }
}

.checkmark-path {
    stroke: var(--gold-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: check-draw 0.4s ease forwards 0.7s;
}

@keyframes check-draw {
    to { stroke-dashoffset: 0; }
}

.success-title {
    color: var(--gold-primary) !important;
}

.success-description {
    font-size: 1.05rem;
    line-height: 1.7;
}

.success-cta {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.cta-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--whatsapp-green);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.trust-item {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
}

/* ---------- Footer ---------- */
.quiz-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    font-size: 0.72rem;
    color: var(--text-muted);
    z-index: 50;
    background: linear-gradient(transparent, var(--bg-primary));
    pointer-events: none;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .quiz-step {
        padding: 70px 16px 80px;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .step-description {
        font-size: 0.92rem;
        margin-bottom: 24px;
    }

    .options-2col {
        grid-template-columns: 1fr;
    }

    .welcome-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .step-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .step-nav .btn-secondary,
    .step-nav .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .brand-header {
        left: 16px;
        top: 12px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .progress-text {
        right: 14px;
        top: 8px;
        font-size: 0.7rem;
    }

    .option-card {
        padding: 18px 14px;
    }

    .option-icon {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .option-card h3 {
        font-size: 0.88rem;
    }

    .option-card p {
        font-size: 0.75rem;
    }

    .trust-badges {
        gap: 12px;
    }

    .success-cta {
        padding: 18px 16px;
    }
}

@media (max-width: 400px) {
    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        font-size: 0.92rem;
    }

    .step-icon {
        font-size: 2rem;
    }
}

/* ---------- Selection Ripple Effect ---------- */
.option-card .ripple {
    position: absolute;
    border-radius: 50%;
    background: var(--gold-glow);
    transform: scale(0);
    animation: ripple-effect 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---------- Confetti (Success) ---------- */
.confetti-piece {
    position: fixed;
    width: 8px;
    height: 8px;
    z-index: 200;
    pointer-events: none;
}
