/* ─── Real product imagery: sequence player, device frames, feature media ────
   Everything here is driven by the real screenshots in public/images/showcase
   (stills per state, one animated WebP per journey). Colours come only from
   the :root tokens in landing.css — no hardcoded hex. */

/* ── Device frames (shared by the hero, the feature blocks, the player) ── */
.device {
  position: relative; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.device-bar { display: flex; min-width: 0; gap: 6px; align-items: center; padding: 11px 14px; background: var(--mist); border-bottom: 1px solid var(--line); }
.device-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.device-bar .device-url {
  margin-left: 10px; flex: 1 1 0; width: 0; min-width: 0; height: 18px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line);
  font-size: 11px; line-height: 16px; padding: 0 8px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.device img { display: block; width: 100%; height: auto; }
.device.dark { background: var(--navy); border-color: rgba(255, 255, 255, .1); }
.device.dark .device-bar { background: var(--ink-2); border-bottom-color: rgba(255, 255, 255, .07); }
.device.dark .device-bar i { background: rgba(255, 255, 255, .14); }
.device.dark .device-bar .device-url { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: var(--cta-muted); }

.phone {
  width: min(230px, 66%); margin: 0 auto; border-radius: 30px; background: var(--ink); padding: 10px; box-shadow: var(--shadow-lg);
}
.phone-notch { width: 60px; height: 6px; border-radius: 4px; background: var(--muted-2); margin: 0 auto 8px; opacity: .5; }
.phone-screen { border-radius: 20px; overflow: hidden; background: var(--mist); }
.phone-screen img { display: block; width: 100%; height: auto; }

/* ── Hero: the live search journey in a browser frame ── */
.hero-inner > * { min-width: 0; }
.hero-live { position: relative; min-width: 0; transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.hero-live .device { border-color: rgba(255, 255, 255, .12); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .6); }
.hero-live-tag {
  position: absolute; left: 18px; bottom: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--navy) 85%, transparent); color: var(--cta-fg); border: 1px solid var(--cta-ghost-border);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
}
.hero-live-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-2); box-shadow: 0 0 0 0 var(--amber-2); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber-2) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* ── Feature cards: a real crop under each heading ── */
.feat-shot { margin: 0 0 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--mist); aspect-ratio: 16 / 10; }
.feat-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* Portrait captures (the chat panel, the part-exchange checklist) get a taller
   window so the component is legible instead of a sliver of its top edge. */
.feat-shot.tall { aspect-ratio: 1 / 1; }
.feat-shot.tall img { object-position: center top; }

/* ── How-it-works media: device frames instead of mock pads ── */
.split-media { overflow: visible; min-width: 0; }
.split-media .device { margin: 0; }
/* A portrait journey (the part-exchange widget) shouldn't fill a whole column. */
.split-media .device.portrait { max-width: 420px; margin: 0 auto; }
.split-media .device-note {
  position: absolute; left: 14px; bottom: 14px; z-index: 2; font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--navy) 85%, transparent); color: var(--cta-fg); border-radius: 999px; padding: 6px 11px;
}
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.before-after figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--mist); }
.before-after img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.before-after figcaption {
  position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: color-mix(in srgb, var(--navy) 85%, transparent); color: var(--cta-fg); border-radius: 999px; padding: 5px 10px;
}
.before-after figure.after figcaption { background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: var(--ink); }

.feat-pill { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; color: var(--blue); background: rgba(47, 111, 176, .1); border-radius: 20px; padding: 5px 11px; }

/* ── Components section (dark band): real screenshot on every SKU card ── */
.mkt-card .mkt-shot {
  margin: 0 0 14px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); background: var(--ink-2);
  aspect-ratio: 16 / 10;
}
.mkt-card .mkt-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.mkt-card .mkt-shot.tall { aspect-ratio: 1 / 1; }
.mkt-card .mkt-shot.tall img { object-position: center top; }

/* ── Player ── */
.showcase-player { margin-top: 44px; }
.showcase-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.showcase-tab {
  font: inherit; font-weight: 650; font-size: 14.5px; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.showcase-tab:hover { color: var(--ink); border-color: var(--blue-2); }
.showcase-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.showcase-tab.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 20px -8px var(--blue-glow); }

.showcase-stage { max-width: 960px; margin: 0 auto; outline: none; }
.showcase-stage:focus-visible .showcase-visual, .showcase-stage:focus-visible .phone { outline: 2px solid var(--blue); outline-offset: 4px; }
.showcase-frames-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.showcase-visual { position: relative; width: 100%; }
.showcase-visual[data-kind="panel"] .device-bar { display: none; }

.frame-viewport { position: relative; width: 100%; aspect-ratio: var(--fv-ar, 16 / 10); overflow: hidden; background: var(--mist); transition: aspect-ratio .45s ease; }
.frame-viewport img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center;
  opacity: 0; transition: opacity .7s ease; will-change: opacity, transform;
}
.frame-viewport img.is-active { opacity: 1; z-index: 1; }
/* gentle pan/zoom, direction alternates per state */
.frame-viewport img.is-active.kb-0 { animation: kb-a var(--kb-ms, 3200ms) ease-out forwards; }
.frame-viewport img.is-active.kb-1 { animation: kb-b var(--kb-ms, 3200ms) ease-out forwards; }
.frame-viewport img.is-active.kb-2 { animation: kb-c var(--kb-ms, 3200ms) ease-out forwards; }
.frame-viewport img.is-active.kb-3 { animation: kb-d var(--kb-ms, 3200ms) ease-out forwards; }
@keyframes kb-a { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.035) translate(-.6%, -.4%); } }
@keyframes kb-b { from { transform: scale(1.01) translate(0, 0); } to { transform: scale(1.04) translate(.6%, -.5%); } }
@keyframes kb-c { from { transform: scale(1.03) translate(.3%, .3%); } to { transform: scale(1) translate(0, 0); } }
@keyframes kb-d { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.035) translate(-.4%, .5%); } }

.showcase-progress-track { height: 4px; background: var(--line); }
.showcase-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-2)); }

.showcase-badge {
  position: absolute; top: 56px; left: 14px; z-index: 3; background: color-mix(in srgb, var(--navy) 82%, transparent); color: var(--cta-fg);
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em; padding: 6px 12px; border-radius: 999px;
}
.showcase-visual[data-kind="panel"] .showcase-badge { top: 14px; }
.showcase-type-overlay {
  position: absolute; left: 50%; top: 24%; transform: translateX(-50%); z-index: 3; width: min(620px, 82%);
  display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--blue-2); border-radius: 999px;
  padding: 13px 20px; box-shadow: var(--shadow-lg); font-size: 16px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden;
}
.showcase-type-overlay .sc-caret { display: inline-block; flex: none; width: 2px; height: 1.05em; background: var(--blue-2); animation: showcase-caret 1s steps(1) infinite; }
@keyframes showcase-caret { 50% { opacity: 0; } }
.showcase-ai-pill {
  position: absolute; left: 50%; top: 44%; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--navy) 88%, transparent); color: var(--cta-fg); border-radius: 999px; padding: 10px 16px;
  font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lg);
}
.showcase-ai-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-2); animation: ai-dots 1.1s infinite ease-in-out; }
.showcase-ai-pill i:nth-child(2) { animation-delay: .16s; }
.showcase-ai-pill i:nth-child(3) { animation-delay: .32s; }
.showcase-ai-pill span { margin-left: 4px; }
@keyframes ai-dots { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.showcase-caption { text-align: center; margin: 18px 0 0; color: var(--text); font-size: 16px; min-height: 1.6em; font-weight: 600; }
.showcase-source { text-align: center; margin: 4px 0 0; color: var(--muted-2); font-size: 13px; }
.showcase-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.showcase-nav {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .15s ease, color .15s ease;
}
.showcase-nav:hover { border-color: var(--blue-2); color: var(--blue); }
.showcase-nav:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.showcase-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.showcase-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); border: none; padding: 0; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.showcase-dot:hover { background: var(--muted-2); }
.showcase-dot.active { background: var(--blue); transform: scale(1.2); }
.showcase-dot:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.showcase-counter { font-size: 13px; color: var(--muted-2); min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

/* Reduced motion: the states as a static strip */
.showcase-strip { display: flex; gap: 16px; overflow-x: auto; padding: 6px 6px 14px; scroll-snap-type: x mandatory; }
.showcase-strip[hidden] { display: none; }
.showcase-strip-item { flex: 0 0 min(560px, 86%); margin: 0; scroll-snap-align: start; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.showcase-strip-item.is-phone { flex-basis: 220px; }
.showcase-strip-item img { display: block; width: 100%; height: auto; }
.showcase-strip-item figcaption { padding: 10px 12px; font-size: 14px; color: var(--text); }

/* ── Mobile ── */
@media (max-width: 960px) {
  .hero-live { transform: none; }
}
@media (max-width: 620px) {
  .showcase-player { margin-top: 30px; }
  .showcase-tabs { gap: 6px; margin-bottom: 20px; }
  .showcase-tab { font-size: 16px; padding: 9px 14px; }
  .showcase-caption { font-size: 16px; padding: 0 6px; }
  .showcase-source { font-size: 16px; }
  .showcase-type-overlay { font-size: 16px; padding: 10px 14px; top: 18%; }
  .showcase-ai-pill { font-size: 16px; }
  .showcase-badge { font-size: 16px; top: 48px; }
  .before-after { grid-template-columns: 1fr; }
  .before-after figcaption, .split-media .device-note, .hero-live-tag { font-size: 16px; }
  .device-bar .device-url { font-size: 16px; height: 22px; line-height: 20px; }
  .showcase-counter { font-size: 16px; }
  .showcase-strip-item figcaption { font-size: 16px; }
  .feat-pill { font-size: 14px; }
  .mkc-preview-note { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .frame-viewport img { transition: none; animation: none !important; }
  .sc-caret, .showcase-ai-pill i, .hero-live-tag i { animation: none; }
  .showcase-progress { transition: none !important; }
}
