/* ══════════════════════════════════════════════════════════════════════════
   Home page — interactive product tour + audience cards
   ══════════════════════════════════════════════════════════════════════════ */

.tour-shell {
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 26px;
    padding: 1.75rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
}

/* ── Step rail ─────────────────────────────────────────────────────────── */
.tour-steps {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.tour-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    width: 100%;
    text-align: start;
    padding: 1rem 1.1rem 1.15rem;
    border: 1.5px solid #e8ecf4;
    border-radius: 16px;
    background: #fbfcfe;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.tour-step:hover { border-color: #c7d2fe; background: #fff; }

.tour-step.is-active {
    background: #fff;
    border-color: #4f46e5;
    box-shadow: 0 10px 28px rgba(79, 70, 229, .13);
}

.tour-step-idx {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    background: #eef2f7;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.tour-step.is-active .tour-step-idx {
    background: linear-gradient(135deg, #0d9488, #4f46e5);
    color: #fff;
    transform: scale(1.06);
}

.tour-step-body { min-width: 0; }

.tour-step-chip {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #4f46e5;
    background: #eef2ff;
    border-radius: 50px;
    padding: .12rem .55rem;
    margin-bottom: .3rem;
}

.tour-step-title {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.5;
}

/* Body copy and bullets expand only for the step being shown, so the rail stays
   scannable instead of becoming four walls of text. */
.tour-step-desc,
.tour-step-points {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .45s ease, opacity .3s ease, margin .35s ease;
}

.tour-step.is-active .tour-step-desc {
    max-height: 12rem;
    opacity: 1;
    margin-top: .45rem;
}

.tour-step.is-active .tour-step-points {
    max-height: 8rem;
    opacity: 1;
    margin-top: .6rem;
}

.tour-step-desc {
    font-size: .875rem;
    line-height: 1.85;
    color: #64748b;
}

.tour-step-points span {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
    font-weight: 600;
    color: #0f766e;
    margin-top: .3rem;
}

.tour-step-points i { font-size: .7rem; color: #14b8a6; }

/* Auto-advance progress indicator */
.tour-step-track {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    background: #eef2f7;
    opacity: 0;
    transition: opacity .2s ease;
}

.tour-step.is-active .tour-step-track { opacity: 1; }

.tour-step-bar {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0d9488, #4f46e5);
}

.tour-step.is-active .tour-step-bar.is-running {
    animation: tourFill var(--tour-duration, 7s) linear forwards;
}

@keyframes tourFill { from { width: 0; } to { width: 100%; } }

/* ── Mock window ───────────────────────────────────────────────────────── */
.tour-window {
    background: #0f172a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}

.tour-window-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem 1rem;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.tour-dot { width: 10px; height: 10px; border-radius: 50%; }
.tour-dot-r { background: #ef4444; }
.tour-dot-y { background: #f59e0b; }
.tour-dot-g { background: #22c55e; }

.tour-window-title {
    margin-inline-start: auto;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-window-body {
    position: relative;
    min-height: 310px;
    padding: 1.4rem;
    background:
        radial-gradient(circle at 15% 12%, rgba(79, 70, 229, .22) 0%, transparent 55%),
        radial-gradient(circle at 88% 85%, rgba(13, 148, 136, .18) 0%, transparent 55%),
        #0f172a;
}

.tour-panel { animation: tourPanelIn .5s ease both; }
.tour-panel[hidden] { display: none; }

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

/* ── Shared mock primitives ────────────────────────────────────────────── */
.tm-bar {
    display: block;
    height: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .22);
}

.tm-bar-lg { width: 62%; height: 13px; }
.tm-bar-md { width: 42%; }
.tm-bar-sm { width: 30%; height: 8px; background: rgba(255, 255, 255, .13); }

.tm-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    flex-shrink: 0;
}

/* Step 1 — institute form */
.tm-form { display: flex; flex-direction: column; gap: .85rem; }

.tm-logo-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
}

.tm-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, #0d9488, #4f46e5);
    flex-shrink: 0;
}

.tm-logo-meta { display: flex; flex-direction: column; gap: .4rem; flex: 1; }

.tm-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #fff;
}

.tm-badge-ok { background: #22c55e; }

.tm-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem .9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
}

.tm-field-lbl { font-size: .78rem; color: rgba(255, 255, 255, .55); }
.tm-field-val { font-size: .84rem; font-weight: 700; color: #fff; }

/* Step 2 — class card */
.tm-class {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
}

.tm-class-cover {
    position: relative;
    height: 132px;
    background:
        radial-gradient(circle at 78% 22%, rgba(255, 255, 255, .16) 0%, transparent 50%),
        linear-gradient(135deg, #7c3aed, #06b6d4);
}

.tm-live {
    position: absolute;
    bottom: .6rem;
    inset-inline-start: .7rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .22rem .6rem;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 700;
    color: #052e2b;
    background: #5eead4;
}

.tm-live i { font-size: .4rem; animation: tmPulse 1.6s ease-in-out infinite; }

@keyframes tmPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.tm-class-body { padding: 1rem; display: flex; flex-direction: column; gap: .55rem; }

.tm-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }

.tm-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .6rem;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .09);
}

.tm-chip i { font-size: .68rem; color: #5eead4; }

/* Step 3 — invite link rows */
.tm-rows { display: flex; flex-direction: column; gap: .6rem; }

.tm-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
}

.tm-row .tm-bar { flex: 1; }

.tm-link,
.tm-act {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    flex-shrink: 0;
}

.tm-link { background: rgba(94, 234, 212, .16); color: #5eead4; }
.tm-act-copy { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .75); }
.tm-act-sms { background: rgba(129, 140, 248, .2); color: #a5b4fc; }

/* Step 4 — attendance report */
.tm-report { display: flex; flex-direction: column; gap: .75rem; }

.tm-report-row { display: flex; align-items: center; gap: .75rem; }

.tm-meter {
    flex: 1;
    height: 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}

.tm-meter-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 50px;
    background: linear-gradient(90deg, #14b8a6, #6366f1);
    transition: width 1s cubic-bezier(.22, .61, .36, 1);
}

.tm-pct {
    font-size: .76rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .85);
    min-width: 42px;
    text-align: end;
}

@media (max-width: 991.98px) {
    .tour-shell { padding: 1.1rem; }
    .tour-window-body { min-height: 260px; }

    /* Stacked layout: keep inactive steps compact so the preview stays reachable. */
    .tour-step-desc,
    .tour-step-points { display: none; }

    .tour-step.is-active .tour-step-desc,
    .tour-step.is-active .tour-step-points { display: block; }
}

/* ══════════════════════════════════════════════════════════════════════════
   AUDIENCE CARDS
   ══════════════════════════════════════════════════════════════════════════ */

.audience-card {
    height: 100%;
    padding: 1.9rem 1.5rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e8ecf4;
    text-align: center;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.audience-card:hover {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow: 0 22px 48px rgba(15, 23, 42, .12);
}

.audience-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 1.1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: transform .35s ease;
}

.audience-card:hover .audience-icon { transform: rotate(-6deg) scale(1.08); }

.au-teal { background: linear-gradient(135deg, #0d9488, #14b8a6); box-shadow: 0 10px 24px rgba(13, 148, 136, .3); }
.au-indigo { background: linear-gradient(135deg, #4f46e5, #6366f1); box-shadow: 0 10px 24px rgba(79, 70, 229, .3); }
.au-violet { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 10px 24px rgba(124, 58, 237, .3); }
.au-amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 10px 24px rgba(245, 158, 11, .3); }

.audience-card h4 {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .55rem;
}

.audience-card p {
    font-size: .875rem;
    line-height: 1.9;
    color: #64748b;
    margin: 0;
}

/* Honour the OS-level motion preference across everything added here. */
@media (prefers-reduced-motion: reduce) {
    .tour-step-bar.is-running { animation: none; width: 100%; }
    .tour-panel { animation: none; }
    .tm-meter-fill { transition: none; }
    .tm-live i { animation: none; }
    .audience-card,
    .audience-icon { transition: none; }
}
