/* =========================================================================
   WAITLIST + FOOTER — Magnetic CTA, focus glow, paw confetti.
   ========================================================================= */

/* ── Waitlist Section ────────────────────────────────────────────── */

#waitlist {
    background: var(--clr-bg-light);
    padding-block: clamp(4rem, 8vw, 6rem);
    position: relative;
    overflow: hidden;
}

.waitlist-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 138, 0, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(45, 212, 191, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.12) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: gradientShift 12s ease-in-out infinite;
}

.waitlist-card {
    max-width: 640px;
    margin-inline: auto;
    padding: clamp(2rem, 5vw, 4rem);
    text-align: center;
}

.waitlist-card h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.waitlist-card p {
    opacity: 0.7;
    margin-bottom: 2rem;
}

/* ── Input Wrap ──────────────────────────────────────────────────── */

.input-wrap {
    display: flex;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Animated focus glow — pulsing primary ring */
.input-wrap:focus-within {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px var(--clr-primary-glow);
    animation: magneticPulse 2s ease-in-out infinite;
}

.input-wrap input[type="email"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.85rem 1.25rem;
    font-family: var(--font-primary);
    outline: none;
}

/* ── Submit Button — Magnetic + Enhanced ─────────────────────────── */

.btn-submit {
    border: none;
    cursor: pointer;
    border-radius: var(--radius-pill);
    background: var(--clr-primary);
    color: #fff;
    padding: 0.85rem 1.75rem;
    font-weight: 600;
    font-family: var(--font-primary);
    transition:
        transform 0.3s var(--ease-smooth),
        box-shadow 0.3s var(--ease-smooth);
    will-change: transform;
    position: relative;
}

.btn-submit:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-orange-glow);
}

/* Magnetic effect — JS sets --mx, --my */
.btn-submit.is-magnetic {
    transform: translate(
        calc(var(--mx, 0) * 1px),
        calc(var(--my, 0) * 1px)
    ) scale(1.02);
}

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

/* ── Form Feedback ───────────────────────────────────────────────── */

.form-feedback {
    min-height: 1.4rem;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

.form-feedback.error { color: #ef4444; }
.form-feedback.success { color: #22c55e; }

.input-wrap.animate-shake {
    animation: shake 0.5s ease-in-out;
}

form.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    transition: opacity 0.4s ease;
}

/* ── Success Message with Paw Confetti ───────────────────────────── */

.success-message {
    opacity: 0;
    pointer-events: none;
    height: 0;
    transition: opacity 0.5s var(--ease-smooth);
    position: relative;
}

.success-message.visible {
    opacity: 1;
    pointer-events: auto;
    height: auto;
    padding-top: 1rem;
    font-weight: 500;
}

/* Confetti paw particles */
.success-message.visible::before,
.success-message.visible::after {
    font-size: 1.2rem;
    position: absolute;
    pointer-events: none;
}

.success-message.visible::before {
    content: '🐾';
    top: 50%;
    left: 50%;
    animation: confetti1 1s ease-out forwards;
}

.success-message.visible::after {
    content: '🐾';
    top: 50%;
    left: 50%;
    animation: confetti2 1s ease-out 0.1s forwards;
}

/* Additional confetti via JS-created spans */
.confetti-paw {
    position: absolute;
    font-size: 1rem;
    pointer-events: none;
    top: 50%;
    left: 50%;
}

.confetti-paw:nth-child(1) { animation: confetti3 1s ease-out 0.05s forwards; }
.confetti-paw:nth-child(2) { animation: confetti4 1s ease-out 0.15s forwards; }
.confetti-paw:nth-child(3) { animation: confetti5 1s ease-out 0.08s forwards; }
.confetti-paw:nth-child(4) { animation: confetti6 1s ease-out 0.12s forwards; }

/* ── Footer ──────────────────────────────────────────────────────── */

#footer {
    background: #111010;
    color: var(--clr-text-light, #f8f9fa);
    padding-block: clamp(4rem, 8vw, 6rem);
}

.footer-inner {
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 3rem;
}

.footer-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-brand .logo span {
    color: var(--clr-primary);
}

.footer-newsletter {
    max-width: 480px;
}

.footer-newsletter-prompt {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.footer-newsletter>p {
    margin-bottom: 1rem;
    font-weight: 500;
}

.footer-newsletter .input-wrap {
    background: rgba(255, 255, 255, 0.08);
}

.footer-newsletter input[type="email"] {
    color: var(--clr-text-light, #f8f9fa);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav a:hover {
    color: var(--clr-primary);
    transform: translateX(3px);
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.3s ease, transform 0.3s var(--ease-bounce);
    display: inline-flex;
}

.footer-socials a:hover {
    color: var(--clr-primary);
    transform: translateY(-4px) scale(1.1);
}

.footer-socials svg {
    width: 22px;
    height: 22px;
}

.footer-legal {
    font-size: 0.8rem;
    opacity: 0.45;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
}

/* ── Mobile ──────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .input-wrap {
        flex-direction: column;
        border-radius: var(--radius-card, 16px);
    }

    .input-wrap input[type="email"] {
        padding: 1rem 1.25rem;
    }

    .btn-submit {
        border-radius: var(--radius-card, 16px);
    }

    .footer-nav,
    .footer-socials {
        flex-wrap: wrap;
    }
}