/* ===== CSS Variables ===== */
:root {
    --primary-orange: #E85A1C;
    --primary-orange-dark: #C04516;
    --primary-orange-light: #FF6B2C;
    --accent-green: #7CB342;
    --accent-green-dark: #689F38;
    --accent-gold: #D4A419;
    --whatsapp-green: #25D366;
    --whatsapp-dark: #128C7E;
    --bg-dark: #1A1A1A;
    --bg-darker: #0D0D0D;
    --bg-card: #252525;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #808080;
    --border-color: #404040;
    --border-focus: var(--primary-orange);
    --error-color: #EF5350;
    --success-color: #4CAF50;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow: hidden;
}

/* ===== Background ===== */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at top, rgba(232, 90, 28, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(124, 179, 66, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg-darker) 0%, #1A1510 100%);
    z-index: -1;
}

/* ===== Progress Bar ===== */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-orange-light));
    transition: width var(--transition-normal);
}

/* ===== Container ===== */
.container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ===== Steps ===== */
.step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
    transition: all var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.step.exit-up {
    opacity: 0;
    transform: translateY(-40px);
}

.step-content {
    max-width: 600px;
    width: 100%;
    text-align: left;
}

/* ===== Welcome Screen ===== */
.welcome-content {
    text-align: center;
}

.logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 20px rgba(232, 90, 28, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.welcome-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--primary-orange-light) 50%, var(--primary-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.welcome-date {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 24px;
}

.welcome-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 30px rgba(232, 90, 28, 0.4);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(232, 90, 28, 0.5);
}

.start-btn svg {
    transition: transform var(--transition-fast);
}

.start-btn:hover svg {
    transform: translateX(4px);
}

.step-hint {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Step Number ===== */
.step-number {
    font-size: 0.9rem;
    color: var(--primary-orange);
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Step Label ===== */
.step-label {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: block;
    line-height: 1.3;
}

.step-sublabel {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ===== Typeform Input ===== */
.typeform-input {
    width: 100%;
    padding: 16px 0;
    font-family: inherit;
    font-size: 1.5rem;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 3px solid var(--border-color);
    outline: none;
    transition: all var(--transition-fast);
    caret-color: var(--primary-orange);
}

.typeform-input::placeholder {
    color: var(--text-muted);
}

.typeform-input:focus {
    border-color: var(--primary-orange);
}

/* ===== Error Message ===== */
.error-message {
    height: 24px;
    font-size: 0.9rem;
    color: var(--error-color);
    margin-top: 8px;
}

/* ===== Step Actions ===== */
.step-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.next-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-orange);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.next-btn:hover {
    background: var(--primary-orange-light);
    transform: translateY(-2px);
}

.enter-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Options Grid ===== */
.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.size-options {
    gap: 10px;
}

.option-btn {
    padding: 16px 28px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.option-btn.selected {
    border-color: var(--primary-orange);
    background: rgba(232, 90, 28, 0.15);
    color: var(--primary-orange-light);
}

/* ===== Gender Options ===== */
.gender-options {
    gap: 16px;
}

.gender-btn-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 40px;
    min-width: 140px;
}

.gender-btn-option svg {
    opacity: 0.8;
}

.gender-btn-option.selected svg {
    opacity: 1;
}

/* ===== Thanks Screen ===== */
.thanks-content {
    text-align: center;
}

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

.checkmark {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--accent-green);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--accent-green);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--accent-green);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 60px rgba(124, 179, 66, 0.1);
    }
}

.thanks-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.thanks-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.thanks-subtext {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* ===== WhatsApp Section ===== */
.whatsapp-section {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-text {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark) 100%);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.45);
}

.whatsapp-btn svg {
    flex-shrink: 0;
}

/* ===== Navigation ===== */
.navigation {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    gap: 8px;
    z-index: 50;
}

.nav-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .step {
        padding: 24px 20px;
    }

    .logo {
        max-width: 180px;
    }

    .welcome-title {
        font-size: 2.2rem;
    }

    .step-label {
        font-size: 1.4rem;
    }

    .typeform-input {
        font-size: 1.2rem;
    }

    .options-grid {
        gap: 8px;
    }

    .option-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .gender-btn-option {
        padding: 20px 24px;
        min-width: 120px;
    }

    .thanks-title {
        font-size: 1.8rem;
    }

    .navigation {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 400px) {
    .gender-options {
        flex-direction: column;
    }

    .gender-btn-option {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }
}

/* ===== Keyboard Focus Styles ===== */
.option-btn:focus-visible,
.next-btn:focus-visible,
.start-btn:focus-visible,
.nav-btn:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* ===== Jungle Leaves Overlay ===== */
.jungle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    pointer-events: none;
    overflow: hidden;
}

.jungle-overlay.hidden {
    display: none;
}

/* Leaves Base Style */
.leaf {
    position: absolute;
    width: 300px;
    height: 400px;
    background: linear-gradient(135deg, #2D5A27 0%, #1E4620 50%, #3D7A35 100%);
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset -20px 0 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(0, 0, 0, 0.5);
}

.leaf::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 48%, rgba(76, 175, 80, 0.4) 50%, transparent 52%),
        repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(46, 125, 50, 0.3) 10px,
            rgba(46, 125, 50, 0.3) 12px);
}

.leaf::after {
    content: '';
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #1B5E20, #2E7D32);
    left: 50%;
    transform: translateX(-50%);
}

/* Left Leaves */
.leaf-left-1 {
    left: -50px;
    top: -50px;
    transform: rotate(-30deg);
    border-radius: 0 100% 0 100%;
}

.leaf-left-2 {
    left: -100px;
    top: 30%;
    transform: rotate(-45deg);
    border-radius: 0 100% 0 100%;
    width: 350px;
    height: 450px;
}

.leaf-left-3 {
    left: -80px;
    bottom: -50px;
    transform: rotate(-60deg);
    border-radius: 0 100% 0 100%;
}

/* Right Leaves */
.leaf-right-1 {
    right: -50px;
    top: -50px;
    transform: rotate(30deg) scaleX(-1);
    border-radius: 0 100% 0 100%;
}

.leaf-right-2 {
    right: -100px;
    top: 30%;
    transform: rotate(45deg) scaleX(-1);
    border-radius: 0 100% 0 100%;
    width: 350px;
    height: 450px;
}

.leaf-right-3 {
    right: -80px;
    bottom: -50px;
    transform: rotate(60deg) scaleX(-1);
    border-radius: 0 100% 0 100%;
}

/* Vines */
.vine {
    position: absolute;
    width: 20px;
    height: 120%;
    top: -10%;
    background: repeating-linear-gradient(180deg,
            #2E7D32 0px,
            #388E3C 20px,
            #2E7D32 40px);
    border-radius: 10px;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.vine::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #4CAF50 30%, #388E3C 100%);
    border-radius: 50%;
    top: 20%;
}

.vine::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background: radial-gradient(circle, #4CAF50 30%, #388E3C 100%);
    border-radius: 50%;
    top: 60%;
    left: -10px;
}

.vine-left {
    left: 80px;
}

.vine-right {
    right: 80px;
}

/* Open Animation */
.jungle-overlay.open .leaf-left-1 {
    transform: rotate(-30deg) translateX(-200%) translateY(-100%);
}

.jungle-overlay.open .leaf-left-2 {
    transform: rotate(-45deg) translateX(-250%);
}

.jungle-overlay.open .leaf-left-3 {
    transform: rotate(-60deg) translateX(-200%) translateY(100%);
}

.jungle-overlay.open .leaf-right-1 {
    transform: rotate(30deg) scaleX(-1) translateX(-200%) translateY(-100%);
}

.jungle-overlay.open .leaf-right-2 {
    transform: rotate(45deg) scaleX(-1) translateX(-250%);
}

.jungle-overlay.open .leaf-right-3 {
    transform: rotate(60deg) scaleX(-1) translateX(-200%) translateY(100%);
}

.jungle-overlay.open .vine-left {
    transform: translateX(-300px) rotate(-20deg);
}

.jungle-overlay.open .vine-right {
    transform: translateX(300px) rotate(20deg);
}

/* Responsive for mobile */
@media (max-width: 600px) {
    .leaf {
        width: 200px;
        height: 300px;
    }

    .leaf-left-2,
    .leaf-right-2 {
        width: 250px;
        height: 350px;
    }

    .vine {
        width: 15px;
    }

    .vine-left {
        left: 40px;
    }

    .vine-right {
        right: 40px;
    }
}