/* Public marketing demo. Static SSR — interactions are CSS :checked tabs and native <details>. */

.demo-site {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    color: #1f2937;
}

.demo-site h1,
.demo-site h2 {
    margin-top: 0;
    color: #0f172a;
}

/* ---------- Hero ---------- */
.demo-hero {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}

.demo-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.15;
    margin: 0.75rem auto 0.5rem;
    max-width: 22ch;
}

.demo-hero-lead {
    font-size: 1.1rem;
    color: #475569;
    max-width: 60ch;
    margin: 0 auto 1.5rem;
}

.demo-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* One consistent button type. The two journey buttons double as the journey switch; the
   active journey is filled (driven by the radio :checked state at the top of the page). */
.demo-journey-btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 0.7rem;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.demo-journey-btn:hover {
    border-color: #2563eb;
}

#demo-journey-manager:checked ~ .demo-hero .demo-hero-actions label[for="demo-journey-manager"],
#demo-journey-customer:checked ~ .demo-hero .demo-hero-actions label[for="demo-journey-customer"] {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.demo-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.demo-safety-note {
    margin: 1.25rem auto 0;
    max-width: 60ch;
    font-size: 0.9rem;
    color: #64748b;
}

.demo-safety-inline {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.5rem 0 0;
}

/* ---------- How it works ---------- */
.demo-how {
    margin: 1.5rem 0 2.5rem;
    text-align: center;
}

.demo-how h2 {
    margin-bottom: 1.25rem;
}

.demo-how-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
}

.demo-how-step {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 1rem;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.demo-how-num {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.demo-how-step strong {
    font-size: 1.02rem;
}

.demo-how-step span:last-child {
    color: #64748b;
    font-size: 0.92rem;
}

/* ---------- Journey selector (CSS radios; hero buttons are the switch) ---------- */
.demo-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Journeys are hidden by default; the checked radio reveals the matching one. */
.demo-journey {
    display: none;
}

#demo-journey-manager:checked ~ .demo-journey-manager,
#demo-journey-customer:checked ~ .demo-journey-customer {
    display: block;
}

.demo-journey-head {
    text-align: center;
    margin-bottom: 1.5rem;
}

.demo-journey-head p {
    color: #64748b;
    margin: 0.25rem 0;
}

.demo-journey-intro {
    max-width: 60ch;
    margin: 0.5rem auto 0 !important;
    color: #475569 !important;
}

/* ---------- Summary + cards ---------- */
.demo-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.demo-stat {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.demo-stat-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.demo-stat strong {
    font-size: 1.15rem;
    color: #0f172a;
}

.demo-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.demo-mini-card {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 0.85rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.demo-mini-card strong {
    font-size: 1.05rem;
}

.demo-meta {
    color: #64748b;
    font-size: 0.88rem;
}

/* Health accents (left border keeps it soft, not alarm-like) */
.demo-stat-green { border-left: 4px solid #16a34a; }
.demo-stat-amber { border-left: 4px solid #d97706; }
.demo-stat-red { border-left: 4px solid #dc2626; }

/* ---------- Module sub-tabs ---------- */
.demo-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-bottom: 1px solid #e8edf3;
    margin-bottom: 1.5rem;
}

.demo-tab {
    padding: 0.55rem 0.9rem;
    border-radius: 0.6rem 0.6rem 0 0;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.demo-tab:hover {
    color: #1d4ed8;
}

#sm-overview:checked ~ .demo-tabbar label[for="sm-overview"],
#sm-food:checked ~ .demo-tabbar label[for="sm-food"],
#sm-docs:checked ~ .demo-tabbar label[for="sm-docs"],
#sm-loyalty:checked ~ .demo-tabbar label[for="sm-loyalty"],
#sm-bookings:checked ~ .demo-tabbar label[for="sm-bookings"],
#sm-whatsapp:checked ~ .demo-tabbar label[for="sm-whatsapp"],
#sm-reports:checked ~ .demo-tabbar label[for="sm-reports"] {
    color: #1d4ed8;
    border-bottom-color: #2563eb;
}

.demo-panel {
    display: none;
}

#sm-overview:checked ~ .demo-panel-overview,
#sm-food:checked ~ .demo-panel-food,
#sm-docs:checked ~ .demo-panel-docs,
#sm-loyalty:checked ~ .demo-panel-loyalty,
#sm-bookings:checked ~ .demo-panel-bookings,
#sm-whatsapp:checked ~ .demo-panel-whatsapp,
#sm-reports:checked ~ .demo-panel-reports {
    display: block;
}

.demo-panel-intro {
    color: #475569;
    max-width: 70ch;
    margin: 0 0 1.25rem;
}

.demo-subhead {
    margin: 1.5rem 0 0.6rem;
    font-size: 1rem;
    color: #334155;
}

.demo-tag {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
}

.demo-priority-list,
.demo-reward-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.4rem;
    color: #334155;
}

/* ---------- Tables (light) ---------- */
.demo-table-wrap {
    overflow-x: auto;
    border: 1px solid #eef2f7;
    border-radius: 0.85rem;
}

.demo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.demo-table th {
    text-align: left;
    font-weight: 600;
    color: #64748b;
    padding: 0.6rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}

.demo-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}

.demo-table tr:last-child td {
    border-bottom: none;
}

.demo-pill {
    display: inline-block;
    padding: 0.12rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.demo-pill-green { background: #dcfce7; color: #166534; }
.demo-pill-amber { background: #fef3c7; color: #92400e; }
.demo-pill-red { background: #fee2e2; color: #991b1b; }

/* ---------- Preview panels / details ---------- */
.demo-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.demo-preview-panel {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 1rem;
    padding: 1.25rem;
}

.demo-preview-panel h4 {
    margin-top: 0;
}

.demo-card-preview {
    text-align: center;
}

.demo-qr {
    width: 6rem;
    height: 6rem;
    margin: 0.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #94a3b8;
    border-radius: 0.75rem;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.demo-wallet-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.demo-wallet-chip {
    padding: 0.35rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
}

.demo-preview {
    margin-top: 1rem;
    border: 1px solid #e8edf3;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.25rem 0.85rem;
}

.demo-preview > summary {
    cursor: pointer;
    font-weight: 600;
    color: #1d4ed8;
    padding: 0.6rem 0;
    list-style: none;
}

.demo-preview > summary::marker,
.demo-preview > summary::-webkit-details-marker {
    display: none;
}

.demo-preview > summary::before {
    content: "＋ ";
    color: #2563eb;
}

.demo-preview[open] > summary::before {
    content: "－ ";
}

.demo-preview-body {
    padding: 0 0 0.85rem;
    color: #334155;
}

.demo-preview-body ul {
    margin: 0.25rem 0 0.75rem;
    padding-left: 1.2rem;
}

/* ---------- Chat bubbles ---------- */
.demo-chat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.demo-chat-lg {
    max-width: 36rem;
}

.demo-chat-in,
.demo-chat-out {
    margin: 0;
    padding: 0.6rem 0.85rem;
    border-radius: 1rem;
    max-width: 85%;
    font-size: 0.92rem;
    line-height: 1.35;
}

.demo-chat-in {
    background: #f1f5f9;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 0.3rem;
}

.demo-chat-out {
    background: #dcf8c6;
    color: #14532d;
    align-self: flex-end;
    border-bottom-right-radius: 0.3rem;
}

.demo-chat-from {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.7;
    margin-bottom: 0.15rem;
}

.demo-report-card {
    align-items: flex-start;
}

.demo-report-icon {
    font-size: 1.6rem;
}

.demo-privacy-note {
    font-size: 0.9rem;
    color: #475569;
    border-left: 3px solid #2563eb;
    padding-left: 0.85rem;
    max-width: 70ch;
    margin: 1.5rem auto 0;
}

/* ---------- Final CTA ---------- */
.demo-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #e0e7ff;
    border-radius: 1.25rem;
}

.demo-cta h2 {
    margin-bottom: 0.5rem;
}

.demo-cta p {
    color: #475569;
    max-width: 60ch;
    margin: 0 auto 1.5rem;
}

@media (max-width: 640px) {
    .demo-hero {
        padding-top: 1.5rem;
    }

    .demo-journey-btn {
        width: 100%;
        text-align: center;
    }
}
