/* ===============================================================
   SURGISOFT — Narrative Scenes
   Each animation tells one story. No motion without purpose.
   =============================================================== */

:root {
  --ease-emerge: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-depart: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-sig:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════════════════════
   HERO DASHBOARD (original) — floating 3D dashboard + 2 side panels
   ═══════════════════════════════════════════════════════════════ */

.hero-scene {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16 / 11;
  margin: 0 auto;
  perspective: 1800px;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1024px) {
  .hero-scene { max-width: 560px; aspect-ratio: 16 / 10; }
}
@media (max-width: 768px) {
  .hero-scene { aspect-ratio: 4 / 3; max-width: 100%; }
}

.hero-scene-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-18deg) rotateZ(-1deg);
  /* heroSceneFloat disabled — static */
}
@keyframes heroSceneFloat {
  0%   { transform: rotateX(12deg) rotateY(-18deg) rotateZ(-1deg) translateY(0); }
  100% { transform: rotateX(10deg) rotateY(-14deg) rotateZ(0) translateY(-12px); }
}

.hero-panel {
  position: absolute;
  background: linear-gradient(180deg, rgba(20,20,20,0.92), rgba(10,10,10,0.95));
  border: 1px solid rgba(180,37,60,0.2);
  border-radius: 14px;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.6),
    0 12px 30px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.03),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.hero-panel::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(180,37,60,0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(circle at 0% 0%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 0% 0%, black 0%, transparent 70%);
  pointer-events: none;
}

.hero-panel.main {
  width: 76%; height: 88%;
  top: 6%; left: 4%;
  transform: translateZ(0);
  z-index: 2;
}
.hero-panel.side-1 {
  width: 36%; height: 46%;
  top: 4%; right: 0;
  transform: translateZ(60px) rotateY(-8deg);
  z-index: 3;
  /* heroPanelBob disabled */
}
.hero-panel.side-2 {
  width: 32%; height: 32%;
  bottom: 4%; right: 6%;
  transform: translateZ(40px) rotateY(-4deg);
  z-index: 3;
  /* heroPanelBob disabled */
}
@keyframes heroPanelBob {
  0%   { transform: translateZ(60px) rotateY(-8deg) translateY(0); }
  100% { transform: translateZ(70px) rotateY(-6deg) translateY(-6px); }
}

/* main panel interior */
.hp-chrome {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hp-chrome .d { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.hp-chrome .title {
  margin-left: 12px;
  font-size: 0.58rem; letter-spacing: 0.18em;
  color: var(--amber); font-weight: 700; text-transform: uppercase;
}

.hp-body {
  padding: 18px 20px; display: grid;
  grid-template-columns: 1fr 1fr; gap: 14px;
  height: calc(100% - 34px);
}

.hp-module {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.hp-module h5 {
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45); text-transform: uppercase;
}

/* inventory mini-grid */
.hp-inv {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px; flex: 1;
}
.hp-inv i {
  display: block; background: rgba(180,37,60,0.25);
  border-radius: 2px;
  /* hpTileBlink disabled */
}
.hp-inv i:nth-child(3n)   { animation-delay: 0.3s; }
.hp-inv i:nth-child(4n+1) { animation-delay: 0.6s; }
.hp-inv i:nth-child(5n+2) { animation-delay: 1.2s; background: rgba(180,37,60,0.55); }
@keyframes hpTileBlink {
  0%, 100% { background: rgba(180,37,60,0.25); }
  50%      { background: rgba(180,37,60,0.55); }
}

/* case timeline */
.hp-timeline { flex: 1; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.hp-lane { display: flex; align-items: center; gap: 8px; }
.hp-lane-label {
  width: 40px; font-size: 0.46rem; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5); text-transform: uppercase; font-weight: 700;
}
.hp-lane-track {
  flex: 1; height: 10px; background: rgba(255,255,255,0.04);
  border-radius: 3px; position: relative; overflow: hidden;
}
.hp-lane-block {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--amber), var(--deep-amber));
  border-radius: 3px; box-shadow: 0 0 6px rgba(180,37,60,0.4);
  /* hpBlockSlide disabled */
}
@keyframes hpBlockSlide {
  0%        { left: -30%; width: 30%; }
  50%, 70%  { left: 20%; width: 45%; }
  100%      { left: 100%; width: 30%; }
}
.hp-lane:nth-child(2) .hp-lane-block { animation-delay: 0.6s; }
.hp-lane:nth-child(3) .hp-lane-block { animation-delay: 1.2s; }
.hp-lane:nth-child(4) .hp-lane-block { animation-delay: 1.8s; }

/* stats 2x2 */
.hp-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  flex: 1;
}
.hp-stat {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.hp-stat-num {
  font-size: 1.05rem; font-weight: 800; color: var(--amber);
  letter-spacing: -0.02em;
}
.hp-stat-label {
  font-size: 0.46rem; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4); text-transform: uppercase;
}

/* mini-map */
.hp-map {
  position: relative; flex: 1;
  background:
    radial-gradient(circle at 28% 44%, rgba(180,37,60,0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 60% 60%, rgba(180,37,60,0.6) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 30%, rgba(180,37,60,0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 40% 70%, rgba(180,37,60,0.5) 0 2px, transparent 3px),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}
.hp-map::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 14px 14px;
  border-radius: 6px;
}

/* side panels */
.hero-side-content {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  height: 100%;
}
.hero-side-title {
  font-size: 0.5rem; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.5); text-transform: uppercase; font-weight: 700;
}
.hero-side-big {
  font-size: 1.6rem; font-weight: 800; color: var(--amber);
  letter-spacing: -0.03em; line-height: 1;
}
.hero-side-sub {
  font-size: 0.52rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5); text-transform: uppercase; font-weight: 600;
}
.hero-side-spark {
  margin-top: auto; height: 24px; position: relative;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(180,37,60,0.1) 15%,
      rgba(180,37,60,0.2) 30%,
      rgba(180,37,60,0.15) 50%,
      rgba(180,37,60,0.35) 70%,
      rgba(180,37,60,0.25) 85%,
      transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, black 40%, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 40%, black 60%, transparent 100%);
}
.hero-side-spark::after {
  content: ''; position: absolute; bottom: 40%; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--amber) 20%,
    var(--amber) 85%,
    transparent 100%);
  filter: blur(0.3px);
}

/* ambient glow */
.hero-scene::before {
  content: ''; position: absolute;
  width: 110%; height: 110%;
  top: -5%; left: -5%;
  background: radial-gradient(ellipse at 40% 50%, rgba(180,37,60,0.18), transparent 70%);
  filter: blur(40px);
  z-index: 0;
  /* heroSceneGlow disabled */
}
@keyframes heroSceneGlow {
  0%   { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0.9; transform: scale(1.08); }
}

/* responsive overrides for hero dashboard */
@media (max-width: 768px) {
  .hero-scene-inner { transform: rotateX(8deg) rotateY(-10deg); }
  .hero-panel.side-1 { width: 44%; height: 42%; transform: translateZ(40px) rotateY(-4deg); }
  .hero-panel.side-2 { display: none; }
  .hp-body { grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; }
  .hp-stat-num { font-size: 0.85rem; }
}

/* ═══════════════════════════════════════════════════════════════
   SCENE SHARED — container + chrome for narrative scenes
   ═══════════════════════════════════════════════════════════════ */

.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 560px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(180,37,60,0.10), transparent 60%),
    linear-gradient(180deg, #141414 0%, #0B0B0B 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.6),
    0 12px 30px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.04);
  font-variant-numeric: tabular-nums;
  isolation: isolate;
}
.scene::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(180,37,60,0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 75%);
  pointer-events: none;
}

.scene-chrome {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; gap: 6px;
  padding: 12px 18px;
  background: rgba(0,0,0,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: inherit; font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.scene-chrome .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.scene-chrome .title { margin-left: 16px; }

.scene-stage {
  position: absolute; inset: 40px 0 0 0;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 28px;
  z-index: 2;
}

/* scene caption — "what am I looking at" subtitle */
.scene-caption {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  text-align: center;
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  z-index: 4;
}
.scene-caption span {
  display: inline-block; padding: 0 14px;
  background: rgba(10,10,10,0.8); border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.06);
  line-height: 2;
}

/* ═══════════════════════════════════════════════════════════════
   SCENE 1 — INVENTORY: "The tray with a memory."
   One tray card + animated state timeline building up.
   Loop: 10s.
   ═══════════════════════════════════════════════════════════════ */

.scene-inventory .inv-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  width: 100%; max-width: 640px;
  align-items: center;
}

/* left: tray card */
.inv-tray-card {
  background: linear-gradient(160deg, rgba(180,37,60,0.1), rgba(180,37,60,0.02));
  border: 1px solid rgba(180,37,60,0.25);
  border-radius: 14px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative; overflow: hidden;
}
.inv-tray-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(180,37,60,0.15), transparent 60%);
  pointer-events: none;
}
.inv-tray-card > * { position: relative; z-index: 1; }
.inv-tray-card .card-kind {
  font-size: 0.56rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--amber);
}
.inv-tray-card .card-lot {
  font-size: 1.1rem; font-weight: 800; color: var(--white);
  letter-spacing: -0.02em; line-height: 1;
}
.inv-tray-card .card-meta {
  font-size: 0.68rem; color: rgba(255,255,255,0.55);
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 4px;
}
.inv-tray-card .card-meta span strong {
  color: rgba(255,255,255,0.85); font-weight: 700;
}
.inv-tray-card .card-status {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber);
  padding: 6px 10px;
  border: 1px solid rgba(180,37,60,0.3);
  border-radius: 100px;
  background: rgba(180,37,60,0.1);
  width: fit-content;
  /* statusCycle disabled — static */
}
.inv-tray-card .card-status .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
  animation: rowPulse 1.6s ease-in-out infinite;
}
.inv-tray-card .card-status::before {
  content: 'AT WAREHOUSE';
  animation: statusText 10s steps(1) infinite;
}
@keyframes statusText {
  0%, 20%  { content: 'PICKED UP'; }
  20%, 40% { content: 'DELIVERED'; }
  40%, 60% { content: 'IN USE · OR 4'; }
  60%, 80% { content: 'RETURNED'; }
  80%, 100%{ content: 'AT WAREHOUSE'; }
}
@keyframes statusCycle {
  0%, 100% {}
}

/* right: state timeline */
.inv-timeline {
  display: flex; flex-direction: column; gap: 0;
  position: relative;
}
.inv-timeline::before {
  content: ''; position: absolute;
  left: 11px; top: 8px; bottom: 8px;
  width: 1px; background: rgba(180,37,60,0.15);
}
.inv-event {
  position: relative; padding: 6px 0 6px 32px;
  opacity: 0;
  transform: translateX(-6px);
  /* eventIn disabled — all events visible */
}
.inv-event::before {
  content: ''; position: absolute;
  left: 8px; top: 13px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(180,37,60,0.7);
}
.inv-event:nth-child(1) { animation-delay: 0s; }
.inv-event:nth-child(2) { animation-delay: 2s; }
.inv-event:nth-child(3) { animation-delay: 4s; }
.inv-event:nth-child(4) { animation-delay: 6s; }
.inv-event:nth-child(5) { animation-delay: 8s; }
@keyframes eventIn {
  0%, 14%  { opacity: 0; transform: translateX(-6px); }
  18%, 96% { opacity: 1; transform: translateX(0); }
  100%     { opacity: 1; transform: translateX(0); }
}

.inv-event .event-time {
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45); text-transform: uppercase;
}
.inv-event .event-body {
  font-size: 0.78rem; color: var(--white); font-weight: 600;
  letter-spacing: -0.005em; margin-top: 2px;
}
.inv-event .event-body .loc { color: var(--amber); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   SCENE 2 — CASES: "The conflict that never happens."
   Two case cards, conflict warning appears, 2nd card swaps trays.
   Loop: 8s.
   ═══════════════════════════════════════════════════════════════ */

.scene-calendar .case-layout {
  display: flex; gap: 18px; align-items: center; justify-content: center;
  width: 100%; max-width: 620px;
  position: relative;
}
.case-card {
  flex: 1; max-width: 240px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 0.78rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.case-card .case-time {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber);
}
.case-card .case-surgeon {
  font-size: 0.95rem; font-weight: 800; color: var(--white);
  letter-spacing: -0.02em;
}
.case-card .case-procedure {
  font-size: 0.7rem; color: rgba(255,255,255,0.55);
}
.case-card .case-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 0.68rem;
}
.case-card .case-row .k {
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); font-size: 0.52rem;
}
.case-card .case-row .v {
  font-weight: 700; color: var(--white); font-size: 0.7rem;
}

.case-card .case-status {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
  /* statusColor disabled */
}
.case-card.c1 .case-status {
  background: rgba(63,186,110,0.15); color: #5fd08a;
  border: 1px solid rgba(63,186,110,0.3);
}
.case-card.c1 .case-status::before { content: '✓ Confirmed'; }

/* case 2 conflicts then resolves */
.case-card.c2 {
  position: relative;
  /* c2Attention disabled */
}
@keyframes c2Attention {
  0%, 30%  { border-color: rgba(255,255,255,0.08); }
  35%, 55% { border-color: rgba(217,80,80,0.45); box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(217,80,80,0.3); }
  60%, 100%{ border-color: rgba(63,186,110,0.35); box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(63,186,110,0.25); }
}
.case-card.c2 .case-row.kit {
  /* kitSwap disabled */
}
@keyframes kitSwap {
  0%, 58%  { border-color: rgba(255,255,255,0.06); background: rgba(255,255,255,0.03); }
  60%, 100%{ border-color: rgba(63,186,110,0.3); background: rgba(63,186,110,0.06); }
}
.case-card.c2 .case-row.kit .v::before {
  content: 'KIT 204';
  /* kitText disabled */
}
@keyframes kitText {
  0%, 58%   { content: 'KIT 204'; color: #e87676; }
  60%, 100% { content: 'KIT 118'; color: #5fd08a; }
}
.case-card.c2 .case-status {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
}
.case-card.c2 .case-status::before {
  content: 'Pending';
  /* c2StatusText disabled */
}
@keyframes c2StatusText {
  0%, 28%   { content: 'Pending'; color: rgba(255,255,255,0.5); }
  32%, 58%  { content: '⚠ Conflict'; color: #e87676; }
  60%, 100% { content: '✓ Resolved'; color: #5fd08a; }
}

/* conflict banner floats between cards */
.case-conflict-banner {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  background: linear-gradient(145deg, rgba(217,80,80,0.2), rgba(217,80,80,0.08));
  border: 1px solid rgba(217,80,80,0.4);
  border-radius: 100px;
  font-size: 0.56rem; font-weight: 800; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffb6b6;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(217,80,80,0.3);
  opacity: 0;
  /* banner disabled — hidden, see override */
  z-index: 4;
}
.case-conflict-banner .icon { margin-right: 6px; }
@keyframes banner {
  0%, 30% { opacity: 0; transform: translate(-50%, -60%); }
  36%, 56%{ opacity: 1; transform: translate(-50%, -50%); }
  60%     { opacity: 0; transform: translate(-50%, -40%); }
  100%    { opacity: 0; }
}

/* resolution banner */
.case-resolve-banner {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  background: linear-gradient(145deg, rgba(63,186,110,0.18), rgba(63,186,110,0.06));
  border: 1px solid rgba(63,186,110,0.4);
  border-radius: 100px;
  font-size: 0.56rem; font-weight: 800; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9df0b9;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(63,186,110,0.25);
  opacity: 0;
  /* resolveBanner disabled — shown statically */
  z-index: 4;
}
@keyframes resolveBanner {
  0%, 62% { opacity: 0; transform: translate(-50%, -60%); }
  68%, 88%{ opacity: 1; transform: translate(-50%, -50%); }
  96%, 100%{ opacity: 0; transform: translate(-50%, -40%); }
}

/* ═══════════════════════════════════════════════════════════════
   SCENE 3 — REP: "Five tools. One app."
   4 legacy icons fly into a phone. Phone lights up with cases.
   Loop: 8s.
   ═══════════════════════════════════════════════════════════════ */

.scene-rep .rep-layout {
  display: flex; align-items: center; justify-content: center;
  gap: 40px;
  width: 100%; max-width: 600px;
  position: relative;
}

/* left side: 4 scattered legacy icons */
.rep-tools {
  position: relative;
  width: 200px; height: 220px;
}
.rep-tool {
  position: absolute;
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  /* repToolCycle disabled */
}
.rep-tool svg { width: 22px; height: 22px; stroke-width: 1.6; }
.rep-tool.rt-1 { top: 0;    left: 0;   --dx: 200px; --dy: 55px;  animation-delay: 0s;  }
.rep-tool.rt-2 { top: 0;    right: 0;  --dx: 80px;  --dy: 55px;  animation-delay: 0.1s; }
.rep-tool.rt-3 { bottom: 0; left: 0;   --dx: 200px; --dy: -55px; animation-delay: 0.2s; }
.rep-tool.rt-4 { bottom: 0; right: 0;  --dx: 80px;  --dy: -55px; animation-delay: 0.3s; }

@keyframes repToolCycle {
  0%      { opacity: 0; transform: translate(0,0) scale(0.8); }
  8%      { opacity: 1; transform: translate(0,0) scale(1); }
  32%     { opacity: 1; transform: translate(0,0) scale(1); }
  44%     { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(0.4); }
  48%     { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.1); filter: blur(6px); }
  100%    { opacity: 0; }
}

/* connector arrow */
.rep-arrow {
  width: 44px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber));
  position: relative;
  opacity: 0;
  /* repArrow disabled */
}
.rep-arrow::after {
  content: ''; position: absolute;
  right: -2px; top: 50%; transform: translateY(-50%);
  border-left: 6px solid var(--amber);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
@keyframes repArrow {
  0%, 32%  { opacity: 0; }
  38%, 60% { opacity: 1; }
  66%, 100%{ opacity: 0; }
}

/* right side: phone */
.rep-phone {
  width: 180px; height: 340px;
  background: linear-gradient(145deg, #1a1a1a, #000);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 26px;
  padding: 10px;
  box-shadow:
    0 60px 100px -20px rgba(0,0,0,0.7),
    0 20px 30px -10px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  filter: grayscale(1) saturate(0) brightness(0.6);
  /* phoneWake disabled */
}
.rep-phone::before {
  content: ''; position: absolute;
  top: 5px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 4px; background: #000; border-radius: 0 0 6px 6px;
  z-index: 2;
}
@keyframes phoneWake {
  0%, 50%   { filter: grayscale(1) saturate(0) brightness(0.6); }
  72%, 100% { filter: grayscale(0) saturate(1) brightness(1); }
}

.rep-screen {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #0a0a0a, #141414);
  border-radius: 20px;
  padding: 26px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
}
.rep-screen-header {
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber);
  padding: 2px 6px 4px;
  opacity: 0;
  /* screenAppear disabled */
}
.rep-case {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px;
  opacity: 0;
  /* screenAppear disabled */
}
.rep-case.rc1 { animation-delay: 0.1s; }
.rep-case.rc2 { animation-delay: 0.2s; }
.rep-case.rc3 { animation-delay: 0.3s; }
.rep-case .rc-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.56rem; font-weight: 700; color: var(--white);
}
.rep-case .rc-top .rc-time { color: var(--amber); font-size: 0.5rem; letter-spacing: 0.1em; }
.rep-case .rc-sub {
  font-size: 0.5rem; color: rgba(255,255,255,0.5);
}
.rep-case .rc-pill {
  align-self: flex-start; margin-top: 2px;
  font-size: 0.44rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(180,37,60,0.18); color: var(--amber);
  border-radius: 100px; padding: 2px 7px;
}
@keyframes screenAppear {
  0%, 58% { opacity: 0; transform: translateY(4px); }
  72%, 96% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; }
}

/* "+" badge on phone, counts tools merged */
.rep-merge-count {
  position: absolute; top: -8px; right: -8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--amber); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(180,37,60,0.5);
  border: 2px solid #0A0A0A;
  opacity: 0; transform: scale(0.85);
  /* mergeCount disabled */
}
@keyframes mergeCount {
  0%, 62%  { opacity: 0; transform: scale(0.85); }
  70%, 96% { opacity: 1; transform: scale(1); }
  100%     { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   SCENE 4 — REPORTING: "Every case, automatic revenue."
   Stream of cases scrolls by. Each case ticks up a rebate counter.
   Loop: continuous.
   ═══════════════════════════════════════════════════════════════ */

.scene-reporting .rep-layout-2 {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: stretch;
  width: 100%; max-width: 620px;
  height: 75%;
}

/* left: case stream */
.case-stream {
  position: relative; overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding-right: 22px;
}
.case-stream::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, #0B0B0B 0%, transparent 12%, transparent 88%, #0B0B0B 100%);
  pointer-events: none; z-index: 2;
}
.case-stream-title {
  font-size: 0.56rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  margin-bottom: 12px;
}
.case-stream-list {
  display: flex; flex-direction: column; gap: 8px;
  /* streamScroll disabled */
}
@keyframes streamScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.stream-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 0.66rem;
}
.stream-item .si-top {
  font-size: 0.7rem; font-weight: 700; color: var(--white);
  letter-spacing: -0.01em;
}
.stream-item .si-sub {
  font-size: 0.5rem; color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
}
.stream-item .si-amount {
  font-size: 0.72rem; font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.01em;
  padding: 4px 8px;
  background: rgba(180,37,60,0.12);
  border: 1px solid rgba(180,37,60,0.25);
  border-radius: 100px;
}

/* right: rebate counter */
.rebate-panel {
  display: flex; flex-direction: column; gap: 16px;
  justify-content: center;
  padding: 10px 4px;
}
.rebate-panel .rp-label {
  font-size: 0.56rem; font-weight: 700; letter-spacing: 0.24em;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
}
.rebate-panel .rp-total {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800; color: var(--amber);
  letter-spacing: -0.04em; line-height: 1;
}
.rebate-panel .rp-sub {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5); text-transform: uppercase;
}

.rebate-panel .rp-progress {
  height: 8px; border-radius: 100px;
  background: rgba(255,255,255,0.06);
  position: relative; overflow: hidden;
}
.rebate-panel .rp-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 68%;
  background: linear-gradient(90deg, var(--amber), var(--amber-soft));
  border-radius: 100px;
  box-shadow: 0 0 10px rgba(180,37,60,0.5);
  /* rpFill disabled */
}
@keyframes rpFill {
  0%   { width: 12%; }
  100% { width: 82%; }
}

.rebate-panel .rp-foot {
  display: flex; justify-content: space-between;
  font-size: 0.52rem; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4); text-transform: uppercase; font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .scene {
    aspect-ratio: auto;
    min-height: 380px;
    max-height: none;
  }
  /* breathing room: chrome (40px top) + caption (40px bottom) + side padding */
  .scene-stage { inset: 48px 16px 44px 16px; padding: 0; }
  .scene-inventory .inv-layout { grid-template-columns: 1fr; gap: 14px; max-width: 340px; }
  .scene-calendar .case-layout { flex-direction: column; gap: 12px; max-width: 300px; margin: 0 auto; }
  .case-conflict-banner,
  .case-resolve-banner {
    position: relative; left: auto; top: auto;
    transform: none;
    align-self: center;
  }
  .scene-rep .rep-layout { flex-direction: column; gap: 16px; max-width: 280px; }
  .rep-tools { width: 180px; height: 72px; }
  /* on mobile, stack rep tools horizontally below the phone for clarity */
  .rep-tools {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; position: relative;
    width: auto; height: auto;
  }
  .rep-tool.rt-1, .rep-tool.rt-2, .rep-tool.rt-3, .rep-tool.rt-4 {
    position: relative; top: auto; bottom: auto; left: auto; right: auto;
    width: 44px; height: 44px;
  }
  .rep-tool svg { width: 18px; height: 18px; }
  .rep-arrow { display: none; }
  .rep-phone { width: 160px; height: 300px; }
  .scene-reporting .rep-layout-2 { grid-template-columns: 1fr; gap: 16px; height: auto; }
  .case-stream {
    border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-right: 0; padding-bottom: 12px;
    max-height: 160px; overflow: hidden;
  }
}
@media (max-width: 768px) {
  .scene { min-height: 400px; }
  .scene-chrome { padding: 10px 14px; font-size: 0.54rem; letter-spacing: 0.16em; }
  .scene-caption { bottom: 10px; font-size: 0.54rem; }
  .scene-caption span { padding: 0 10px; line-height: 1.9; }
}

@media (max-width: 560px) {
  .inv-tray-card { padding: 14px; }
  .case-card { padding: 12px; gap: 6px; font-size: 0.7rem; }
  .case-card .case-surgeon { font-size: 0.82rem; }
  .rep-tools { width: 170px; height: 190px; }
  .rep-tool { width: 44px; height: 44px; }
  .rep-phone { width: 150px; height: 280px; }
  .rep-screen { padding: 22px 9px 9px; gap: 6px; }
  .scene-caption { font-size: 0.52rem; }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .hero-scene-inner, .hero-panel.side-1, .hero-panel.side-2,
  .hero-scene::before, .hp-inv i, .hp-lane-block,
  .inv-event, .case-card.c2, .case-conflict-banner, .case-resolve-banner,
  .rep-tool, .rep-phone, .rep-case, .rep-merge-count, .rep-arrow,
  .case-stream-list, .rebate-panel .rp-total, .rebate-panel .rp-progress-fill {
    animation: none !important;
  }
  .panel-row, .inv-event, .rep-tool, .rep-case, .rep-screen-header {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
  .rep-phone { filter: none !important; }
}

/* ═══ STATIC COMPOSITION OVERRIDES — render scenes in final state, no motion ═══ */

/* hero dashboard: panels visible at rest */
.hero-panel.side-1 { transform: translateZ(60px) rotateY(-8deg); }
.hero-panel.side-2 { transform: translateZ(40px) rotateY(-4deg); }
.hp-inv i { background: rgba(180,37,60,0.3); }
.hp-inv i:nth-child(5n+2) { background: rgba(180,37,60,0.55); }
.hp-lane-block { left: 20%; width: 45%; }

/* product scenes: all elements visible in their "end state" */
.inv-event { opacity: 1; transform: translateX(0); }
.phone-card { opacity: 1; transform: translateX(0); }
.cal-block { opacity: 1; transform: translateX(0); }
.panel-row { opacity: 1; transform: translateY(0); }
.rp-bar { transform: scaleY(1); }
.rp-ring .progress { stroke-dashoffset: 120; }
.rep-tool { opacity: 1; transform: translate(0, 0); }
.rep-phone { filter: grayscale(0) saturate(1) brightness(1); }
.rep-case { opacity: 1; transform: translateY(0); }
.rep-screen-header { opacity: 1; transform: translateY(0); }
.rep-arrow { opacity: 0.8; }
.rep-merge-count { opacity: 1; transform: scale(1); }
.case-conflict-banner { display: none; }          /* show resolved state only — cleaner */
.case-resolve-banner { opacity: 1; transform: translate(-50%, -50%); }
.case-card.c2 { border-color: rgba(63,186,110,0.35); box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(63,186,110,0.25); }
.case-card.c2 .case-row.kit { border-color: rgba(63,186,110,0.3); background: rgba(63,186,110,0.06); }
.case-card.c2 .case-row.kit .v::before { content: 'KIT 118'; color: #5fd08a; }
.case-card.c2 .case-status::before { content: '✓ Resolved'; color: #5fd08a; }
.case-card.c1 .case-status::before { content: '✓ Confirmed'; color: #5fd08a; }
.rebate-panel .rp-progress-fill { width: 68%; }
.inv-tray-card .card-status::before { content: 'AT WAREHOUSE'; }
.inv-tray-card .card-status .dot { animation: none; }
.phone-map-pulse { animation: none; }

