/* One visit, two scenes: Casie records and flags a risk live, then writes and files the note. The UI carries the motion. */
.session-demo { --ink: #101424; --muted: #697586; --purple: #5143dd; --line: #e4e5e9; position: relative; z-index: 2; width: calc(100vw - 40px); max-width: 1056px; margin: 58px auto 0; font-family: Inter, sans-serif; color: var(--ink); letter-spacing: -.01em; }
.session-film { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 22px; background: #8d7f6e; box-shadow: 0 50px 90px -50px rgba(70,45,30,.55), 0 18px 36px -24px rgba(70,45,30,.35), inset 0 0 0 1px rgba(255,255,255,.18); }
.session-film::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 120px rgba(30,20,12,.18); }
/* The incoming scene fades in on top while the outgoing one stays opaque beneath it, so the backdrop never shows through mid-fade. */
.session-scene { position: absolute; inset: 0; z-index: 0; opacity: 0; visibility: hidden; transition: opacity 0s linear 1.1s, visibility 0s linear 1.1s; }
.session-scene.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity 1.1s ease-in-out, visibility 0s; }
.session-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--focal-point, 50% 50%); transform: scale(1.02); transform-origin: var(--focal-point, 50% 50%); will-change: transform; }
/* The push is restarted on entry but never removed on exit, so the outgoing image keeps moving instead of snapping back. */
.session-scene.is-pushing .session-image { animation: heroPush var(--push, 11.5s) linear both; }
@keyframes heroPush { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.075) translate(-.5%, -.35%); } }
.session-scene[data-scene="visit"] { --focal-point: 50% 46%; }
.session-scene[data-scene="after"] { --focal-point: 42% 50%; }
.session-scrim { position: absolute; inset: auto 0 0 0; height: 48%; background: linear-gradient(180deg, rgba(20,16,12,0) 0%, rgba(20,16,12,.38) 100%); pointer-events: none; }

/* Every piece of UI enters and leaves the same way. */
.hero-ui { position: absolute; opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.hero-ui.is-on { opacity: 1; transform: none; transition: opacity .7s ease-out, transform .9s cubic-bezier(.22,1,.36,1); }

/* Recording pill: the phone is in the room, the session is being captured. */
.hero-rec { top: 20px; left: 20px; display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px 9px 11px; border-radius: 100px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 10px 24px -14px #3020344d; font-size: 13px; font-weight: 600; }
.hero-rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229,72,77,.45); animation: heroPulse 2.2s ease-out infinite; }
@keyframes heroPulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.45); } 70% { box-shadow: 0 0 0 7px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
.hero-rec-time { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; margin-left: 2px; }
.hero-wave i { display: block; width: 3px; height: 40%; border-radius: 2px; background: var(--purple); animation: heroWave 1.5s ease-in-out infinite; }
.hero-wave i:nth-child(2) { animation-delay: -.2s; } .hero-wave i:nth-child(3) { animation-delay: -.5s; } .hero-wave i:nth-child(4) { animation-delay: -.15s; } .hero-wave i:nth-child(5) { animation-delay: -.65s; }
@keyframes heroWave { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* Cards use the same panel as the bento tiles. */
.hero-card { width: max-content; max-width: 320px; padding: 13px 15px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 18px 34px -24px #5d496c45, 0 3px 7px -4px #3020341a; }
.hero-card-label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hero-card-label svg { width: 14px; height: 14px; flex-shrink: 0; }
.hero-card-title { margin: 6px 0 0; font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; }
.hero-card-sub { margin: 5px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.hero-card--prompt, .hero-card--risk { top: 20px; right: 20px; }
.hero-card--prompt .hero-card-label { color: var(--purple); }
/* Risk copies the app's register row: solid rating badge, then the category. */
.hero-card--risk .hero-card-label svg { color: #f59e0b; }
.hero-card--risk .hero-card-title { display: flex; align-items: center; gap: 8px; }
.hero-rating { flex-shrink: 0; padding: 2px 7px; border-radius: 6px; background: #f59e0b; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; }
.hero-card--plan { top: 20px; right: 20px; }
.hero-card--plan .hero-card-label { color: #26753a; }

/* Live transcript, word by word. */
.hero-caption { left: 20px; bottom: 20px; max-width: min(520px, 62%); padding: 11px 15px 12px; border-radius: 14px; background: rgba(16,20,36,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.hero-caption-label { display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.hero-caption-text { display: block; font-size: 15px; line-height: 1.45; font-weight: 500; letter-spacing: -.01em; min-height: 1.45em; }
.hero-caption-text .w { opacity: 0; transition: opacity .4s ease; }
.hero-caption-text .w.is-on { opacity: 1; }

/* The note writing itself, then checked, then filed. */
.hero-note { right: 20px; bottom: 20px; width: min(380px, calc(100% - 40px)); padding: 14px 16px 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 18px 34px -24px #5d496c45, 0 3px 7px -4px #3020341a; }
.hero-note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.hero-note-title { font-size: 13px; font-weight: 650; letter-spacing: -.015em; }
.hero-status { display: none; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 100px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.hero-status svg { width: 12px; height: 12px; }
.hero-status.is-on { display: inline-flex; }
.hero-status--writing { background: #f0eefc; color: var(--purple); }
.hero-status--writing::after { content: ''; width: 5px; height: 5px; margin-left: 1px; border-radius: 50%; background: currentColor; animation: heroBlink 1.1s steps(2, start) infinite; }
@keyframes heroBlink { to { visibility: hidden; } }
.hero-status--passed { background: #e3f8e8; border: 1px solid #c9efd2; color: #26753a; }
.hero-status--saved { background: var(--purple); color: #fff; }
.hero-note-body { margin: 9px 0 0; font-size: 13.5px; line-height: 1.55; color: #2a3140; min-height: 4.65em; text-wrap: pretty; }
.hero-note-body .caret { display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -.15em; background: var(--purple); animation: heroBlink 1.1s steps(2, start) infinite; }
.hero-note-body .caret.is-off { display: none; }

@media (max-width: 767px) {
    .session-demo { margin-top: 36px; }
    .session-film { border-radius: 18px; aspect-ratio: 4 / 3; box-shadow: 0 30px 50px -32px rgba(70,45,30,.5), inset 0 0 0 1px rgba(255,255,255,.18); }
    .session-film::after { box-shadow: inset 0 0 60px rgba(30,20,12,.16); }
    .hero-rec { top: 12px; left: 12px; padding: 7px 10px 7px 9px; font-size: 12px; gap: 7px; }
    .hero-card { max-width: calc(66% - 12px); padding: 10px 12px 11px; border-radius: 12px; }
    /* Phones get one lane: prompt, transcript and risk take turns at the foot of the frame, clear of the pill and the faces. */
    .hero-card--prompt, .hero-card--risk { top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
    .hero-card--plan { top: 12px; right: 12px; max-width: calc(100% - 24px); }
    .hero-card--plan .hero-card-sub { display: none; }
    .hero-card-label { font-size: 10px; }
    .hero-card-title { font-size: 13px; margin-top: 4px; }
    .hero-card-sub { font-size: 11.5px; }
    .hero-caption { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 9px 12px 10px; border-radius: 12px; }
    .hero-caption-label { font-size: 9.5px; }
    .hero-caption-text { font-size: 13px; line-height: 1.4; }
    .hero-note { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 10px 12px 11px; border-radius: 12px; }
    .hero-note-head { flex-wrap: wrap; }
    .hero-note-title { font-size: 12px; }
    .hero-status { font-size: 10.5px; }
    .hero-note-body { font-size: 12px; line-height: 1.45; min-height: 0; margin-top: 6px; }
    .session-scrim { height: 56%; }
}
@media (prefers-reduced-motion: reduce) {
    .session-scene, .hero-ui { transition: none; }
    .session-scene.is-pushing .session-image, .hero-rec-dot, .hero-wave i, .hero-status--writing::after, .hero-note-body .caret { animation: none; }
}
