/* ============================================================
   GLOVO PORTUGAL — FUNIL DE VENDAS
   Design: Mobile-First Conversion Funnel
   Paleta: Amarelo Glovo #FFC244, Laranja #FF6B35, Branco #FFFFFF
   Tipografia: Poppins (Bold para títulos, Medium para opções)
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

html, body {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(160deg, #FFF8EC 0%, #FFF3E0 100%);
}

/* Evita cortar o topo no desktop: não fixar altura nem centrar verticalmente o bloco inteiro */
body {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem 1rem 2rem;
}

/* ─── Container Principal ──────────────────────────────────────────────────── */

.funnel-container {
    width: 100%;
    max-width: 400px;
    position: relative;
}

/* ─── Screens ──────────────────────────────────────────────────────────────── */

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    position: relative;
    animation-duration: 0.3s;
}

.screen.active {
    display: flex;
}

.questions-screen {
    min-height: 0;
    padding: 0;
}

.coupon-screen {
    min-height: 0;
    padding: 0;
}

/* ─── Card ─────────────────────────────────────────────────────────────────── */

.card {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    width: 100%;
    overflow: hidden;
    position: relative;
}

.coupon-card {
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.15), 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ─── Card Header (Logo) ───────────────────────────────────────────────────── */

.card-header {
    padding: 20px 20px 0;
    text-align: center;
}

.glovo-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.logo-pin {
    width: 32px;
    height: 32px;
    background: #FFC244;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 194, 68, 0.4);
    position: relative;
}

.logo-pin::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #FFFFFF;
    border-radius: 50%;
    transform: rotate(45deg);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #1A1A1A;
    letter-spacing: -0.5px;
}

/* ─── Card Image ───────────────────────────────────────────────────────────── */

.card-image {
    padding: 16px 20px 0;
}

.question-image,
.coupon-image {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    height: 180px;
    display: block;
}

/* ─── Card Question ────────────────────────────────────────────────────────── */

.card-question {
    padding: 16px 20px 8px;
}

.card-question p {
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
}

/* ─── Progress Section ─────────────────────────────────────────────────────── */

.progress-section {
    padding: 0 20px 16px;
}

.progress-bar {
    height: 4px;
    background: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B35, #FFC244);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-text {
    font-size: 11px;
    color: #AAA;
    margin: 4px 0 0;
    text-align: right;
}

/* ─── Answers Container ────────────────────────────────────────────────────── */

.answers-container {
    padding: 0 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.answer-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.25);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.answer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.answer-btn:active:not(:disabled) {
    transform: translateY(0px) scale(0.98);
}

.answer-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.answer-text {
    flex: 1;
}

.answer-emoji {
    margin-left: 12px;
    font-size: 18px;
}

/* ─── Coupon Content ───────────────────────────────────────────────────────── */

.coupon-content {
    padding: 20px 24px 28px;
}

.coupon-subtitle {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.coupon-discount {
    font-size: 26px;
    font-weight: 800;
    color: #1A1A1A;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1.2;
}

.coupon-description {
    font-size: 14px;
    color: #555;
    text-align: center;
    margin-bottom: 20px;
}

.coupon-code-box {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0C0 100%);
    border: 2px dashed #FF6B35;
    border-radius: 12px;
    padding: 14px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.coupon-code-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}

.coupon-code {
    font-size: 22px;
    font-weight: 800;
    color: #FF6B35;
    letter-spacing: 0.15em;
    font-family: monospace;
    margin: 0;
}

.coupon-instructions {
    background: #F9F9F9;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.coupon-instructions p {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ─── CTAs ─────────────────────────────────────────────────────────────────── */

.cta-primary {
    display: block;
    background: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%);
    color: #FFFFFF;
    border-radius: 50px;
    padding: 16px 24px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
}

.cta-secondary {
    display: block;
    width: 100%;
    background: transparent;
    color: #888;
    border: none;
    padding: 8px;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: color 0.2s ease;
}

.cta-secondary:hover {
    color: #FF6B35;
}

.cta-tertiary {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    text-decoration: none;
    font-weight: 500;
}

.cta-tertiary:hover {
    color: #FF6B35;
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */

.footer-text {
    margin-top: 20px;
    font-size: 12px;
    color: #AAA;
    text-align: center;
}

.coupon-screen .footer-text {
    position: relative;
    z-index: 1;
}

/* ─── Animações ────────────────────────────────────────────────────────────── */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-40px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    60% {
        transform: scale(1.05);
    }
    80% {
        transform: scale(0.97);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 107, 53, 0.6);
    }
}

.funnel-enter {
    animation: slideInRight 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.funnel-exit {
    animation: slideOutLeft 0.25s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

.coupon-reveal {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

/* ─── Confetti ─────────────────────────────────────────────────────────────── */

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.confetti {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .funnel-container {
        max-width: 100%;
    }

    .card {
        border-radius: 16px;
    }

    .card-question p {
        font-size: 14px;
    }

    .coupon-discount {
        font-size: 24px;
    }

    .answer-btn {
        font-size: 13px;
        padding: 12px 18px;
    }
}

/* ─── Acessibilidade ───────────────────────────────────────────────────────── */

button:focus,
a:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
