/* FAQ accordion */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; cursor: pointer; }
details summary .faq-chevron { transition: transform 0.2s ease; }
details[open] summary .faq-chevron { transform: rotate(180deg); }

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

a, button, input, select, textarea {
    transition-property: color, background-color, border-color, box-shadow;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::selection {
    background-color: rgba(99, 102, 241, 0.12);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Floating gradient orbs */
@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(0.95); }
    66% { transform: translate(25px, -35px) scale(1.05); }
}
@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, 40px) scale(1.03); }
    66% { transform: translate(-30px, -25px) scale(0.97); }
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    will-change: transform;
}
.orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    top: -100px; left: 10%;
    animation: float-1 20s ease-in-out infinite;
}
.orb-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
    top: 50px; right: 5%;
    animation: float-2 25s ease-in-out infinite;
}
.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
    bottom: -50px; left: 40%;
    animation: float-3 22s ease-in-out infinite;
}

/* Mouse glow */
.mouse-glow {
    position: fixed;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    will-change: left, top;
}

/* Custom toasts */
.wa-toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(92vw, 400px);
    z-index: 120;
    pointer-events: none;
}

.wa-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: start;
    gap: 10px;
    border-radius: 14px;
    border: 1px solid rgba(120, 113, 108, 0.25);
    box-shadow: 0 12px 28px rgba(28, 25, 23, 0.14);
    padding: 11px 12px;
    backdrop-filter: blur(8px);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
    animation: wa-toast-in 200ms ease forwards;
}

.wa-toast-success {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.98), rgba(5, 150, 105, 0.98));
    color: #f0fdf4;
}

.wa-toast-error {
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.98), rgba(185, 28, 28, 0.98));
    color: #fef2f2;
}

.wa-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.18);
}

.wa-toast-message {
    padding-top: 2px;
}

.wa-toast-close {
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    border-radius: 999px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.wa-toast.is-leaving {
    animation: wa-toast-out 200ms ease forwards;
}

@keyframes wa-toast-in {
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes wa-toast-out {
    to {
        transform: translateY(-4px) scale(0.98);
        opacity: 0;
    }
}

.wa-field-error {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
}

.wa-form-error {
    margin-bottom: 10px;
    border: 1px solid rgba(220, 38, 38, 0.25);
    background: rgba(254, 242, 242, 0.95);
    color: #991b1b;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
}

/* In-app delight layer */
:root {
    --wa-accent: #6366f1;
    --wa-amber: #f59e0b;
    --wa-mint: #10b981;
    --wa-border-soft: rgba(120, 113, 108, 0.22);
    --wa-border-strong: rgba(120, 113, 108, 0.32);
}

/* Keep borders visible across all utility-based components */
.border,
.border-warm-gray-100,
.border-warm-gray-200,
.border-warm-gray-300 {
    border-color: rgba(120, 113, 108, 0.34) !important;
}

.app-canvas {
    position: relative;
    isolation: isolate;
}

.app-canvas::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 50%;
    width: 100vw;
    height: clamp(320px, 44vh, 520px);
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 8%, rgba(99, 102, 241, 0.14), transparent 44%),
        radial-gradient(circle at 88% 18%, rgba(245, 158, 11, 0.1), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.76) 58%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.76) 58%, rgba(0, 0, 0, 0) 100%);
    filter: blur(0.2px);
}

.app-title {
    font-family: "Instrument Serif", Georgia, serif;
    letter-spacing: -0.02em;
    font-variant-ligatures: common-ligatures;
    text-wrap: balance;
}

.app-hero-greeting {
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.018em;
}

.app-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--wa-border-soft);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #57534e;
}

.app-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--wa-mint), #059669);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.app-card {
    border: 1px solid var(--wa-border-strong);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92)),
        radial-gradient(circle at 10% 0%, rgba(99, 102, 241, 0.06), transparent 32%);
    box-shadow:
        0 10px 28px rgba(28, 25, 23, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 0 0 1px rgba(120, 113, 108, 0.06);
    transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, border-color 180ms ease;
}

.app-card:hover {
    transform: translateY(-2px);
    border-color: rgba(120, 113, 108, 0.44);
    box-shadow:
        0 16px 34px rgba(28, 25, 23, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.app-card-soft {
    border: 1px solid var(--wa-border-soft);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(250, 250, 248, 0.9));
}

.app-chip {
    border-radius: 999px;
    border: 1px solid rgba(120, 113, 108, 0.28);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.app-section-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.app-section-title::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.95), rgba(99, 102, 241, 0));
}

.app-cta {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    isolation: isolate;
}

.app-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.2) 45%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 0;
}

.app-cta:hover::after {
    transform: translateX(120%);
}

.app-cta > * {
    position: relative;
    z-index: 1;
}

.app-button-loading {
    opacity: 0.8;
    cursor: wait;
}

.app-muted-note {
    font-size: 12px;
    line-height: 1.45;
    color: #78716c;
}

.app-reveal {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
}

.app-reveal.is-visible {
    animation: app-rise-in 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Desktop polish: keep edges crisp like mobile while preserving depth. */
@media (hover: hover) and (pointer: fine) {
    :root {
        --wa-border-soft: rgba(120, 113, 108, 0.3);
        --wa-border-strong: rgba(120, 113, 108, 0.42);
    }

    .app-canvas::before {
        background:
            radial-gradient(circle at 8% 8%, rgba(99, 102, 241, 0.11), transparent 42%),
            radial-gradient(circle at 88% 18%, rgba(245, 158, 11, 0.08), transparent 40%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
        mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.72) 62%, rgba(0, 0, 0, 0) 100%);
        -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.72) 62%, rgba(0, 0, 0, 0) 100%);
    }

    .app-card {
        border-color: var(--wa-border-strong);
        box-shadow:
            0 12px 30px rgba(28, 25, 23, 0.06),
            0 1px 0 rgba(255, 255, 255, 0.95) inset,
            0 0 0 1px rgba(120, 113, 108, 0.12);
    }

    .app-card:hover {
        border-color: rgba(120, 113, 108, 0.5);
        box-shadow:
            0 18px 36px rgba(28, 25, 23, 0.08),
            0 1px 0 rgba(255, 255, 255, 0.98) inset,
            0 0 0 1px rgba(120, 113, 108, 0.16);
    }

    .app-chip,
    .app-card-soft,
    .app-eyebrow {
        border-color: var(--wa-border-soft);
    }

    .app-title,
    .app-hero-greeting {
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
    }
}

@keyframes app-rise-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-card,
    .app-reveal,
    .app-reveal.is-visible {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
