/* ==========================================================================
   Event Demo — inline "tell us about your opportunity" homepage experience.
   Type a plain-language event → LLM builds it → it lands on a live map.
   Themed via the site's design tokens (light + dark). Vanilla, self-contained.
   ========================================================================== */

.event-demo {
    max-width: 640px;
    margin: 28px auto 0;
    text-align: left;
}

/* ── Input panel (idle) ── */
.event-demo__panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
    padding: 22px;
}
.event-demo__label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 650;
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.event-demo__hint {
    font-size: 15.5px;
    color: var(--text-secondary);
    margin: 0 0 14px;
    line-height: 1.5;
}
.event-demo__textarea {
    width: 100%;
    min-height: 104px;
    resize: vertical;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.event-demo__textarea::placeholder { color: var(--text-muted); }
.event-demo__textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Example chips — one-tap fill, the "sneaky fun" nudge */
.event-demo__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.event-demo__chip {
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 13px;
    cursor: pointer;
    transition: all .15s var(--ease-out);
}
.event-demo__chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.event-demo__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.event-demo__submit {
    font-family: var(--font-heading);
    font-weight: 650;
    font-size: 18px;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 26px;
    cursor: pointer;
    transition: background .15s var(--ease-out), transform .1s var(--ease-out);
}
.event-demo__submit:hover { background: var(--accent-hover); }
.event-demo__submit:active { transform: translateY(1px); }
.event-demo__submit:disabled { opacity: .6; cursor: default; }
.event-demo__note {
    font-size: 14.5px;
    color: var(--text-muted);
}

/* ── Loading ── */
.event-demo__loading {
    text-align: center;
    padding: 40px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}
.event-demo__spinner {
    width: 44px; height: 44px;
    margin: 0 auto 18px;
    border: 4px solid var(--accent-dim);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ed-spin .8s linear infinite;
}
@keyframes ed-spin { to { transform: rotate(360deg); } }
.event-demo__loading-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 19px;
    color: var(--text-primary);
}

/* ── Reveal stage (full-width section under hero) ── */
#demo-stage { display: none; }
#demo-stage.is-active { display: block; }

.demo-reveal__head {
    text-align: center;
    margin-bottom: 26px;
}
.demo-reveal__eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: .5px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.demo-reveal__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(26px, 4vw, 38px);
    color: var(--text-primary);
    line-height: 1.15;
}

.demo-reveal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 24px;
    max-width: 1040px;
    margin: 0 auto;
    align-items: stretch;
}

/* Entrance animation */
.demo-anim { opacity: 0; transform: translateY(16px); }
.demo-anim.is-in { opacity: 1; transform: none; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }

/* Event card — styled like a real product event card */
.ev-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ev-card__accent { height: 6px; background: var(--accent); }
.ev-card__body { padding: 22px 22px 20px; }
.ev-card__badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: .3px;
    color: var(--accent);
    background: var(--accent-dim);
    border-radius: 999px;
    padding: 4px 11px;
    margin-bottom: 12px;
}
.ev-card__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.ev-card__meta { list-style: none; padding: 0; margin: 0 0 14px; }
.ev-card__meta li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    color: var(--text-secondary);
    padding: 5px 0;
}
.ev-card__meta .ev-ic { flex: 0 0 22px; font-size: 18px; line-height: 1.4; }
.ev-card__desc {
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin: 0;
}
.ev-card__signup {
    margin-top: 16px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 650;
    font-size: 16px;
    color: #fff;
    background: var(--accent);
    border-radius: var(--radius-md);
    padding: 12px;
}
.ev-card__signup-note {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Marquee image (like the real event page) */
.ev-card__marquee { position: relative; line-height: 0; }
.ev-card__marquee img { display: block; width: 100%; height: 180px; object-fit: cover; }
.ev-card__credit {
    position: absolute; bottom: 8px; right: 10px;
    font-size: 11px; color: #fff;
    background: rgba(0,0,0,.45);
    padding: 2px 9px; border-radius: 999px; line-height: 1.7;
}

/* Arrival & parking mini-map */
.ev-card__arrival { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.ev-card__arrival-label { font-family: var(--font-heading); font-weight: 650; font-size: 15px; color: var(--text-primary); margin-bottom: 9px; }
.ev-arrival-map {
    height: 150px; border-radius: var(--radius-md);
    overflow: hidden; border: 1px solid var(--border);
    background: var(--bg-secondary);
}
.ev-card__arrival-note { font-size: 13px; color: var(--text-muted); margin-top: 9px; line-height: 1.5; }
.ev-pin--park {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: #64748b; color: #fff;
    font-size: 12px; font-weight: 700; border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
    animation: none;
}

/* Map */
.demo-map-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lift);
    min-height: 380px;
    position: relative;
}
#demo-map { width: 100%; height: 100%; min-height: 380px; background: var(--bg-secondary); }

/* Custom Leaflet markers (no default icon assets) */
.ev-pin {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
    background: var(--text-muted);
}
.ev-pin--you {
    width: 30px; height: 30px;
    background: var(--accent);
    box-shadow: 0 0 0 6px var(--accent-dim), 0 2px 6px rgba(0,0,0,.35);
    animation: ev-pulse 1.8s ease-out infinite;
}
@keyframes ev-pulse {
    0%   { box-shadow: 0 0 0 4px var(--accent-dim), 0 2px 6px rgba(0,0,0,.35); }
    70%  { box-shadow: 0 0 0 16px rgba(52,211,153,0), 0 2px 6px rgba(0,0,0,.35); }
    100% { box-shadow: 0 0 0 4px var(--accent-dim), 0 2px 6px rgba(0,0,0,.35); }
}
.leaflet-container { font: inherit; background: var(--bg-secondary); }

/* ── Convert ── */
.demo-convert {
    max-width: 560px;
    margin: 30px auto 0;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 26px 24px;
}
.demo-convert__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 23px;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.demo-convert__sub {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.5;
}
.demo-convert__row {
    display: flex;
    gap: 10px;
    max-width: 440px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.demo-convert__input {
    flex: 1 1 220px;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 13px 15px;
}
.demo-convert__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.demo-convert__btn {
    font-family: var(--font-heading);
    font-weight: 650;
    font-size: 16px;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 22px;
    cursor: pointer;
    white-space: nowrap;
}
.demo-convert__btn:hover { background: var(--accent-hover); }
.demo-convert__btn:disabled { opacity: .6; cursor: default; }
.demo-convert__fine {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 12px;
}
.demo-convert__restart {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 14px; text-decoration: underline;
    margin-top: 14px;
}
.demo-convert.is-done .demo-convert__row,
.demo-convert.is-done .demo-convert__sub { display: none; }
.demo-convert__donemsg {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 8px auto 16px;
    max-width: 460px;
}
.demo-convert__donecta { display: inline-block; text-decoration: none; }

.demo-disclaimer {
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 20px;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 820px) {
    .demo-reveal { grid-template-columns: 1fr; }
    .demo-map-wrap, #demo-map { min-height: 300px; }
}
@media (max-width: 460px) {
    .event-demo__panel { padding: 18px; }
    .demo-convert__row { flex-direction: column; }
    .demo-convert__btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .event-demo__spinner { animation-duration: 1.6s; }
    .ev-pin--you { animation: none; }
    .demo-anim, .demo-anim.is-in { transition: none; transform: none; opacity: 1; }
}
