/* ================================================
   GREEN RODEO PWA — STYLES
   Brand: Olive #767e42 | Cream #fbddae | Sage #9ca65c
   ================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    background-color: #060505;
    color: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: #fbddae;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #9ca65c;
}

img {
    max-width: 100%;
    height: auto;
}

input, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* ---- APP CONTAINER ---- */
.app {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
}

/* ---- SCREENS ---- */
.screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.active {
    display: block;
    position: relative;
    opacity: 1;
    transform: translateX(0);
}

.screen.slide-out-left {
    display: block;
    opacity: 0;
    transform: translateX(-60px);
}

.screen.slide-in-right {
    display: block;
    opacity: 0;
    transform: translateX(60px);
}

.screen.slide-out-right {
    display: block;
    opacity: 0;
    transform: translateX(60px);
}

.screen.slide-in-left {
    display: block;
    opacity: 0;
    transform: translateX(-60px);
}

.screen-inner {
    padding: 30px 24px 40px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ---- PROGRESS BAR ---- */
.progress-bar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #767e42, #9ca65c);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 0 3px 3px 0;
}

/* ---- WELCOME SCREEN ---- */
.welcome-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.logo-welcome {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 15px rgba(118, 126, 66, 0.3));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-screen h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.3;
}

.welcome-screen .subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 320px;
}

.welcome-screen .subtitle strong {
    color: #fbddae;
}

.time-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.time-note i {
    margin-right: 6px;
    color: #767e42;
}

/* ---- CTA BUTTON (Welcome) ---- */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 40px;
    background: #fbddae;
    color: #060505;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(251, 221, 174, 0.3);
}

.btn-cta:hover {
    background: #9ca65c;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(156, 166, 92, 0.4);
}

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

/* ---- QUESTION SCREENS ---- */
.q-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: #767e42;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 20px;
    margin-bottom: 12px;
}

.screen-inner h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.q-hint {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.screen-inner h2 + .options {
    margin-top: 24px;
}

/* ---- OPTIONS (radio & checkbox) ---- */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    margin-bottom: 20px;
}

.opt {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.opt input[type="radio"],
.opt input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.opt span {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.25s ease;
    min-height: 54px;
    line-height: 1.4;
}

.opt span i {
    font-size: 1.1rem;
    color: #767e42;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.opt span small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    display: block;
    margin-top: 2px;
}

.opt:hover span {
    border-color: rgba(118, 126, 66, 0.5);
    background: rgba(118, 126, 66, 0.1);
}

.opt input:checked + span {
    border-color: #767e42;
    background: rgba(118, 126, 66, 0.2);
    color: #ffffff;
    box-shadow: 0 0 0 1px #767e42, 0 4px 15px rgba(118, 126, 66, 0.2);
}

.opt input:checked + span i {
    color: #fbddae;
}

/* ---- NAVIGATION BUTTONS ---- */
.nav-btns {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
}

.btn-back:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.btn-next {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #767e42;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
}

.btn-next:hover:not(:disabled) {
    background: #9ca65c;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(118, 126, 66, 0.4);
}

.btn-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- TEXTAREA (Q10) ---- */
textarea {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

textarea:focus {
    outline: none;
    border-color: #767e42;
    box-shadow: 0 0 0 3px rgba(118, 126, 66, 0.2);
}

/* ---- CONTACT FORM (Screen 11) ---- */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    margin-top: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.form-group label small {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 50px;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus {
    outline: none;
    border-color: #767e42;
    box-shadow: 0 0 0 3px rgba(118, 126, 66, 0.2);
}

.form-group input.valid {
    border-color: #767e42;
}

.form-group input.invalid {
    border-color: #e74c3c;
}

.error-msg {
    font-size: 0.8rem;
    color: #e74c3c;
    min-height: 18px;
    transition: opacity 0.3s ease;
}

/* ---- SUBMIT BUTTON ---- */
.btn-submit {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: #fbddae;
    color: #060505;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 54px;
    box-shadow: 0 6px 25px rgba(251, 221, 174, 0.3);
}

.btn-submit:hover {
    background: #9ca65c;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(156, 166, 92, 0.4);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(6, 5, 5, 0.3);
    border-top-color: #060505;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* ---- COUPON SCREEN ---- */
.coupon-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 50px;
    padding-bottom: 50px;
}

.coupon-screen h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #9ca65c;
}

.coupon-screen h2 i {
    color: #9ca65c;
    margin-right: 8px;
}

.coupon-screen > .subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

/* ---- COUPON CARD ---- */
.coupon-card {
    background: linear-gradient(135deg, #fbddae, #f5d09e);
    color: #060505;
    border-radius: 16px;
    padding: 30px 24px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 340px;
    position: relative;
    box-shadow: 0 10px 40px rgba(251, 221, 174, 0.3);
    border: 3px dashed #767e42;
    animation: couponAppear 0.6s ease-out;
}

@keyframes couponAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateZ(-3deg);
    }
    60% {
        transform: scale(1.03) rotateZ(1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateZ(0);
    }
}

.coupon-card::before,
.coupon-card::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: #060505;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.coupon-card::before {
    left: -14px;
}

.coupon-card::after {
    right: -14px;
}

.coupon-header {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #767e42;
    margin-bottom: 14px;
}

.coupon-amount {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.8rem;
    color: #060505;
    line-height: 1;
    margin-bottom: 4px;
}

.coupon-desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #060505;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.coupon-code {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(118, 126, 66, 0.15);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.coupon-code strong {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #767e42;
    font-size: 1.15rem;
}

.coupon-note {
    font-size: 0.82rem;
    color: rgba(6, 5, 5, 0.65);
    margin-bottom: 8px;
    line-height: 1.4;
}

.coupon-expiry {
    font-size: 0.78rem;
    color: rgba(6, 5, 5, 0.45);
    font-style: italic;
}

/* ---- SAVE COUPON BUTTON ---- */
.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: #fbddae;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #fbddae;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.btn-save:hover {
    background: #fbddae;
    color: #060505;
}

/* ---- CONFIRMATION INFO ---- */
.confirmation-info {
    text-align: center;
    margin-bottom: 36px;
}

.confirmation-info p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 14px;
}

.confirmation-info strong {
    color: #fbddae;
}

.contact-line {
    font-size: 0.9rem !important;
}

.contact-line i {
    color: #767e42;
    width: 20px;
    margin-right: 6px;
}

.contact-line a {
    color: #fbddae;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-line a:hover {
    color: #9ca65c;
}

/* ---- FOOTER LOGO LINK ---- */
.website-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    margin-top: 10px;
    transition: opacity 0.3s ease;
}

.website-link:hover {
    opacity: 0.8;
}

.logo-footer {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(118, 126, 66, 0.3));
}

.website-link span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ---- CONFETTI CANVAS ---- */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* ---- LOADING OVERLAY ---- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 5, 5, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(118, 126, 66, 0.2);
    border-top-color: #767e42;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.loading-overlay p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

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

/* Small phones */
@media (max-width: 360px) {
    .screen-inner {
        padding: 24px 18px 30px;
    }

    .welcome-screen h1 {
        font-size: 1.5rem;
    }

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

    .screen-inner h2 {
        font-size: 1.2rem;
    }

    .opt span {
        padding: 14px 14px;
        font-size: 0.88rem;
        min-height: 48px;
    }

    .coupon-amount {
        font-size: 2.3rem;
    }

    .coupon-card {
        padding: 24px 18px;
    }

    .btn-submit {
        font-size: 0.85rem;
        padding: 14px 18px;
    }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .screen-inner {
        padding: 36px 32px 44px;
    }

    .opt span {
        padding: 18px 20px;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .app {
        max-width: 480px;
        margin: 0 auto;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }

    .screen-inner {
        padding: 40px 36px 50px;
    }

    .welcome-screen h1 {
        font-size: 2rem;
    }

    .opt span {
        padding: 18px 22px;
    }

    .opt:hover span {
        transform: translateX(4px);
    }
}

/* Tall phones — extra breathing room */
@media (min-height: 800px) {
    .welcome-screen {
        padding-top: 80px;
    }

    .q-number {
        margin-top: 30px;
    }
}

/* Short phones — tighten up */
@media (max-height: 650px) {
    .welcome-screen {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .logo-welcome {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .welcome-screen h1 {
        font-size: 1.4rem;
    }

    .welcome-screen .subtitle {
        margin-bottom: 24px;
    }

    .opt span {
        padding: 12px 14px;
        min-height: 46px;
    }

    .options {
        gap: 8px;
    }
}

/* ================================================
   UTILITY & ANIMATIONS
   ================================================ */

/* Fade in for coupon screen elements */
.coupon-screen .confirmation-info {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.coupon-screen .website-link {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.btn-save {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection pop */
@keyframes selectPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.opt input:checked + span {
    animation: selectPop 0.25s ease;
}

/* Focus visible for accessibility */
.btn-cta:focus-visible,
.btn-next:focus-visible,
.btn-back:focus-visible,
.btn-submit:focus-visible,
.btn-save:focus-visible {
    outline: 3px solid #fbddae;
    outline-offset: 3px;
}

.opt:focus-within span {
    outline: 2px solid rgba(251, 221, 174, 0.5);
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(118, 126, 66, 0.4);
    border-radius: 4px;
}

/* Prevent blue highlight on mobile tap */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}