/* Demo videos (YouTube), shared by the feature pages. Each card shows our own
   poster with a play button; only a click loads the privacy-enhanced YouTube
   player (demo-video.js). Cards are 16:9 by default; .tall is a vertical Short.
   See docs/SITE_NOTES.md, "Demo videos". */
.demo-row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 4vw, 32px); margin-top: 18px; }
.demo {
  --ar: 16 / 9; --w: 460px;
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(100%, var(--w));
}
.demo.tall { --ar: 332 / 720; --w: 260px; width: min(calc(50% - 8px), var(--w)); }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; font-size: 14px; }
.demo-cloud { font-weight: 700; padding: 3px 10px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.demo-google-drive { background: rgba(102,187,106,0.15); color: var(--green, #66BB6A); }
.demo-onedrive { background: rgba(74,158,255,0.15); color: var(--accent, #4A9EFF); }
.demo-len { color: var(--text-muted, #8b949e); font-variant-numeric: tabular-nums; font-size: 13px; }
.yt-facade, .yt-frame {
  display: block; width: 100%; aspect-ratio: var(--ar); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border, #30363d); background: #000; box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}
.yt-facade { position: relative; padding: 0; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 64px; transform: translate(-50%, -50%);
  transition: transform 0.15s; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.demo.tall .yt-play { top: 72%; }        /* below the title card's text */
.yt-play svg { width: 100%; height: auto; display: block; }
.yt-facade:hover .yt-play, .yt-facade:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.1); }
.yt-facade:focus-visible { outline: 2px solid var(--accent, #4A9EFF); outline-offset: 3px; }
.demo-cap { color: var(--text-muted, #8b949e); font-size: 13.5px; text-align: center; margin: 0; line-height: 1.5; }
.demo-yt { font-size: 13px; color: var(--accent, #4A9EFF); text-decoration: none; }
.demo-yt:hover { text-decoration: underline; }
.demo-note { color: var(--text-muted, #8b949e); font-size: 12.5px; text-align: center; margin-top: 16px; }
.demo-note a { color: var(--accent, #4A9EFF); }
@media (max-width: 340px) { .demo.tall { width: min(100%, var(--w)); } }

/* Provider switch: one player, a pill per storage provider above it (like the
   screenshots' day/night switch: hidden radios + labels, no script needed).
   Rules below cover up to 4 providers; add a line per rule for a 5th. */
.demo-radio { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; }
.demo-tabs { display: flex; justify-content: center; flex-wrap: wrap; margin: 18px 0 2px; }
.demo-tabs label {
  padding: 6px 18px; font-size: 14px; line-height: 1.35; font-weight: 700; cursor: pointer; white-space: nowrap;
  background: var(--surface, #161b22); border: 1px solid var(--border, #30363d); color: var(--text-muted, #8b949e);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.demo-tabs label + label { border-left: none; }
.demo-tabs label:first-child { border-radius: 999px 0 0 999px; }
.demo-tabs label:last-child { border-radius: 0 999px 999px 0; }
.demo-tabs label:hover { color: var(--text, #e6edf3); }
.demo-switch .demo-row .demo { display: none; }
.demo-switch .demo { --w: 640px; }
.demo-switch .demo.tall { --w: 300px; width: min(100%, var(--w)); }
.demo-radio:nth-of-type(1):checked ~ .demo-row .demo:nth-child(1),
.demo-radio:nth-of-type(2):checked ~ .demo-row .demo:nth-child(2),
.demo-radio:nth-of-type(3):checked ~ .demo-row .demo:nth-child(3),
.demo-radio:nth-of-type(4):checked ~ .demo-row .demo:nth-child(4) { display: flex; }
.demo-radio:nth-of-type(1):checked ~ .demo-tabs label:nth-child(1),
.demo-radio:nth-of-type(2):checked ~ .demo-tabs label:nth-child(2),
.demo-radio:nth-of-type(3):checked ~ .demo-tabs label:nth-child(3),
.demo-radio:nth-of-type(4):checked ~ .demo-tabs label:nth-child(4) { color: #0d1117; }
.demo-tabs label.demo-google-drive { --tab: 102, 187, 106; }
.demo-tabs label.demo-onedrive { --tab: 74, 158, 255; }
.demo-radio:nth-of-type(1):checked ~ .demo-tabs label:nth-child(1),
.demo-radio:nth-of-type(2):checked ~ .demo-tabs label:nth-child(2),
.demo-radio:nth-of-type(3):checked ~ .demo-tabs label:nth-child(3),
.demo-radio:nth-of-type(4):checked ~ .demo-tabs label:nth-child(4) {
  background: rgb(var(--tab, 74, 158, 255)); border-color: rgb(var(--tab, 74, 158, 255));
}
.demo-radio:nth-of-type(1):focus-visible ~ .demo-tabs label:nth-child(1),
.demo-radio:nth-of-type(2):focus-visible ~ .demo-tabs label:nth-child(2),
.demo-radio:nth-of-type(3):focus-visible ~ .demo-tabs label:nth-child(3),
.demo-radio:nth-of-type(4):focus-visible ~ .demo-tabs label:nth-child(4) { outline: 2px solid var(--accent, #4A9EFF); outline-offset: 2px; }
.demo-switch .demo-cap .demo-len { color: var(--text, #e6edf3); font-weight: 700; }
