/* The real app on a desktop and a phone, side by side (assets/showcase.js).
   Screens come from video/duo (capture-duo.mjs -> export_web.py). */

/* ---------- The pair of devices ---------- */
.duo { position: relative; padding: 0 0 8% 0; max-width: 1040px; margin: 0 auto; }
.duo-desk {
  margin: 0; width: 84%; border-radius: 16px; overflow: hidden; position: relative;
  background: #0b1222; border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--brand-500) 14%, transparent), 0 50px 120px -50px color-mix(in srgb, var(--brand-500) 45%, transparent);
}
.duo-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; background: #111a2e; border-bottom: 1px solid #1e293b; }
.duo-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #334155; flex: none; }
.duo-bar > i:nth-child(1) { background: #f87171; } .duo-bar > i:nth-child(2) { background: #fbbf24; } .duo-bar > i:nth-child(3) { background: #34d399; }
.duo-url { flex: 1; min-width: 0; margin: 0 6px 0 10px; height: 24px; border-radius: 8px; background: #0b1222; color: #94a3b8; font-size: 12px; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.duo-url svg { width: 12px; height: 12px; margin-right: 6px; color: #34d399; flex: none; }
.duo-screen { position: relative; overflow: hidden; background: #020617; }
.duo-desk .duo-screen { aspect-ratio: 1440 / 900; }
.duo-screen img, .duo-screen video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .45s ease; }
.duo-screen img + img { position: absolute; inset: 0; }
.duo-phone {
  position: absolute; right: 0; bottom: 0; width: 25%; margin: 0; padding: 8px; border-radius: 34px;
  background: linear-gradient(160deg, #334155, #0f172a 40%, #1e293b); border: 1px solid #475569;
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 0 60px -14px color-mix(in srgb, var(--indigo) 50%, transparent);
}
.duo-phone .duo-screen { border-radius: 27px; aspect-ratio: 390 / 844; }
.duo-phone .duo-screen::before { content: ""; position: absolute; z-index: 2; top: 7px; left: 50%; width: 30%; height: 15px; margin-left: -15%; border-radius: 999px; background: #000; }
:root[data-theme="light"] .duo-desk { border-color: #cbd5e1; }

/* "Install on this device" tags on both devices */
.duo-tag {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 8px 13px 8px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #ecfeff;
  background: rgba(2, 6, 23, .82); border: 1px solid color-mix(in srgb, var(--brand-500) 55%, transparent);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7), 0 0 26px -6px color-mix(in srgb, var(--brand-500) 70%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.duo-tag b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-500); color: #021b18; flex: none; position: relative; }
.duo-tag b svg { width: 13px; height: 13px; }
.duo-tag b::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand-500); opacity: 0; }
.duo-desk .duo-tag { top: 46px; right: 12px; }
.duo-phone .duo-tag { left: 50%; top: -16px; transform: translateX(-50%); font-size: 11.5px; }
.duo-bar .duo-mini { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #5eead4; border: 1px solid color-mix(in srgb, var(--brand-500) 45%, transparent); background: color-mix(in srgb, var(--brand-500) 12%, transparent); flex: none; }
.duo-bar .duo-mini svg { width: 12px; height: 12px; }

/* Tabs that switch both screens together */
.duo-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 26px; padding: 0; list-style: none; }
.duo-tabs button {
  height: 38px; padding: 0 15px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border-strong);
  transition: color .2s, border-color .2s, background .2s;
}
.duo-tabs button:hover { color: var(--text-strong); }
.duo-tabs button[aria-selected="true"] { color: #021b18; background: var(--brand-500); border-color: var(--brand-500); }
.duo-caption { text-align: center; margin: 22px auto 0; max-width: 640px; color: var(--text-muted); min-height: 3.2em; }
.duo-caption b { color: var(--text-strong); }
.install-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; margin-top: 26px; }
.install-cta .fine { margin: 0; }

/* ---------- Feature rows (How it works) ---------- */
.feat { display: grid; gap: 34px; align-items: center; padding: 34px 0; }
@media (min-width: 980px) { .feat { grid-template-columns: .82fr 1.18fr; gap: 56px; padding: 48px 0; } .feat.flip > :first-child { order: 2; } }
.feat > * { min-width: 0; }
.feat h3 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin-bottom: 14px; }
.feat .lead { font-size: 17px; }
.feat ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.feat li { display: flex; gap: 10px; color: var(--text-muted); font-size: 15px; }
.feat li svg { width: 18px; height: 18px; flex: none; color: var(--brand-500); margin-top: 2px; }
.feat .duo { max-width: none; }
.feat-star { position: relative; border-radius: var(--radius-lg); padding: 10px 26px; margin: 10px 0; background: linear-gradient(140deg, color-mix(in srgb, var(--brand-500) 9%, transparent), transparent 55%); border: 1px solid color-mix(in srgb, var(--brand-500) 26%, transparent); }
@media (min-width: 980px) { .feat-star { padding: 10px 44px; } }
.feat-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #021b18; background: var(--brand-500); padding: 5px 10px; border-radius: 999px; margin-bottom: 14px; }

/* The studio, for real: images and the video it made */
.studio-wall { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .studio-wall { grid-template-columns: 1fr 1fr 1.9fr; grid-template-rows: 1fr 1fr; } .studio-wall .sw-video { grid-column: 3; grid-row: 1 / span 2; } }
.studio-wall figure { margin: 0; position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--border-strong); background: #020617; }
.studio-wall img, .studio-wall video { display: block; width: 100%; height: 100%; object-fit: cover; }
.studio-wall .sw-video { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 900px) { .studio-wall .sw-video { aspect-ratio: auto; } }
.studio-wall figcaption { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(2, 6, 23, .72); border: 1px solid rgba(148, 163, 184, .3); }
.studio-wall figcaption svg { width: 13px; height: 13px; color: #5eead4; }
.studio-wall .sw-orig figcaption svg { color: #fbbf24; }

/* Video gallery: desktop on the left, phone on the right, doing the same thing */
.reel-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .reel-grid { grid-template-columns: repeat(2, 1fr); } }
.reel { margin: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface); }
.reel video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #020617; }
.reel figcaption { padding: 14px 16px 16px; }
.reel figcaption b { display: block; color: var(--text-strong); font-size: 16px; }
.reel figcaption span { color: var(--text-muted); font-size: 14px; }

@media (max-width: 640px) {
  .duo { padding-bottom: 16%; }
  .duo-desk { width: 92%; border-radius: 12px; }
  .duo-bar { height: 28px; gap: 5px; padding: 0 9px; }
  .duo-bar > i { width: 8px; height: 8px; }
  .duo-url { height: 19px; font-size: 10px; }
  .duo-bar .duo-mini { display: none; }
  .duo-phone { width: 30%; padding: 5px; border-radius: 22px; }
  .duo-phone .duo-screen { border-radius: 17px; }
  .duo-phone .duo-screen::before { top: 5px; height: 10px; }
  .duo-desk .duo-tag { top: 36px; right: 8px; font-size: 10.5px; padding: 5px 9px 5px 6px; gap: 6px; }
  .duo-tag b { width: 19px; height: 19px; }
  .duo-phone .duo-tag { font-size: 10px; padding: 4px 8px 4px 5px; top: -13px; }
  .duo-tabs button { height: 34px; padding: 0 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: no-preference) {
  .duo-tag b::after { animation: duo-ping 2.4s cubic-bezier(.2, .8, .2, 1) infinite; }
  .duo-phone { animation: duo-float 7s ease-in-out infinite; }
}
@keyframes duo-ping { 0% { opacity: .8; transform: scale(.8); } 70%, 100% { opacity: 0; transform: scale(1.7); } }
@keyframes duo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Home: the pair fits one screen with its tabs, caption and button. */
.app-show .duo { max-width: min(820px, calc((100svh - 330px) * 1.9)); }
.app-show .section-head h2 { font-size: clamp(30px, 4vw, 46px); }
.feat-badge svg { width: 14px; height: 14px; flex: none; }
.studio-wall > figure:not(.sw-video) { aspect-ratio: 1; }
@media (min-width: 900px) {
  .studio-wall .sw-video { grid-column: 3; grid-row: 1 / span 2; aspect-ratio: auto; }
}
@media (min-width: 980px) { .feat.flip { grid-template-columns: 1.18fr .82fr; } }
@media (max-width: 640px) {
  .duo-desk .duo-tag { left: 8px; right: auto; top: 34px; }
  .duo-phone .duo-tag { top: auto; bottom: -14px; left: auto; right: -2px; transform: none; }
}

.reel.wide { grid-column: 1 / -1; }
