/* Video Reviews — testimonial card slider + modal player. Theme tokens from style.css. */

/* ---- heading ----------------------------------------------------------- */
.vr-head { display: grid; justify-items: center; text-align: center; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.vr-pill {
  margin: 0; padding: .5rem 1.05rem; border-radius: var(--r-pill);
  background: var(--violet-050); color: var(--violet-700);
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.vr-title { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.vr-sub { margin: 0; font-size: .95rem; color: var(--ink-50); }
.vr-empty { text-align: center; color: var(--ink-50); }

/* ---- slider ------------------------------------------------------------ */
.vr {
  --vr-gap: clamp(.8rem, 1.6vw, 1.15rem);
  --vr-n: 1.35;
}
.vr--portrait  { --vr-n: 1.35; }
.vr--landscape { --vr-n: 1.12; }
@media (min-width: 480px) { .vr--portrait { --vr-n: 2.2; } .vr--landscape { --vr-n: 1.6; } }
@media (min-width: 720px) { .vr--portrait { --vr-n: 3; }   .vr--landscape { --vr-n: 2; } }
@media (min-width: 1000px) { .vr--portrait { --vr-n: 4; }  .vr--landscape { --vr-n: 3; } }

.vr-viewport { position: relative; }

.vr-track {
  list-style: none; margin: 0; padding: .7rem 0 1rem; margin-block: -.7rem -.2rem;
  display: flex; gap: var(--vr-gap);
  justify-content: safe center; /* few videos sit centred; a long row still starts at the left edge */
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.vr-track::-webkit-scrollbar { display: none; }
.vr-track:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: var(--r-md); }
.vr-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.vr-track.is-dragging .vr-card { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .vr-track { scroll-behavior: smooth; } .vr-track.is-dragging { scroll-behavior: auto; } }

.vr-item {
  flex: 0 0 calc((100% - (var(--vr-n) - 1) * var(--vr-gap)) / var(--vr-n));
  scroll-snap-align: start; margin: 0; padding: 0; min-width: 0;
}

/* ---- card -------------------------------------------------------------- */
.vr-card {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; height: 100%; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.vr-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--violet-100); }
.vr-card:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

.vr-thumb { position: relative; display: block; flex: none; background: var(--ink); overflow: hidden; }
.vr--portrait  .vr-thumb { aspect-ratio: 9 / 16; }
.vr--landscape .vr-thumb { aspect-ratio: 16 / 9; }
.vr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.vr-card:hover .vr-thumb img { transform: scale(1.05); }
.vr-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,18,18,.38), transparent 45%); pointer-events: none; }

.vr-play {
  position: absolute; z-index: 1; left: 50%; top: 50%;
  width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--violet);
  box-shadow: 0 8px 24px rgba(18,18,18,.25);
  transition: transform .4s var(--ease), background .3s, color .3s;
}
.vr-play svg { width: 22px; height: 22px; margin-left: 2px; }
.vr-card:hover .vr-play, .vr-card:focus-visible .vr-play { transform: scale(1.1); background: var(--violet); color: #fff; }

.vr-watch {
  position: absolute; z-index: 1; left: 12px; bottom: 12px;
  padding: .5rem .85rem; border-radius: var(--r-pill);
  background: rgba(18,18,18,.82); color: #fff; backdrop-filter: blur(4px);
  font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1;
}

.vr-body { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: .95rem 1rem 1.15rem; flex: 1; }
.vr-chip {
  padding: .32rem .62rem; border-radius: var(--r-pill);
  background: var(--violet-050); color: var(--violet-700);
  font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1;
}
.vr-name { font-size: .98rem; line-height: 1.3; color: var(--ink); }
.vr-desc { font-size: .8rem; line-height: 1.5; color: var(--ink-50); }

/* ---- arrows ------------------------------------------------------------ */
.vr-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--paper); color: var(--violet-700);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: background .25s var(--ease), color .25s var(--ease), opacity .25s, border-color .25s;
}
.vr-arrow svg { width: 16px; height: 16px; }
.vr-arrow:hover:not(:disabled) { background: var(--violet); border-color: var(--violet); color: #fff; }
.vr-arrow:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.vr-arrow:disabled { opacity: .45; cursor: default; color: var(--ink-30); }
.vr-arrow--prev { left: 6px; }
.vr-arrow--next { right: 6px; }
@media (min-width: 1100px) { .vr-arrow--prev { left: -21px; } .vr-arrow--next { right: -21px; } }
@media (max-width: 599px) { .vr-arrow { display: none; } }

/* ---- progress ---------------------------------------------------------- */
.vr-foot { display: flex; align-items: center; gap: 1.2rem; margin-top: 1.4rem; }
.vr-bar-track { flex: 1; height: 3px; border-radius: 3px; background: var(--soft-2); overflow: hidden; }
.vr-bar-fill { display: block; height: 100%; width: 20%; border-radius: 3px; background: var(--violet); transition: width .35s var(--ease); }
.vr-count { margin: 0; font-size: .72rem; letter-spacing: .08em; color: var(--ink-30); font-variant-numeric: tabular-nums; }
.vr-count b { color: var(--violet-700); font-weight: 700; }

/* ---- modal ------------------------------------------------------------- */
.vr-lock { overflow: hidden; }
.vr-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: none; align-items: center; justify-content: center;
  padding: clamp(.75rem, 3vw, 2rem);
  background: rgba(10, 8, 24, .82); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.vr-modal.is-open { display: flex; }
.vr-modal.is-shown { opacity: 1; }

.vr-dialog { position: relative; width: min(100%, 1040px); display: grid; gap: .8rem; transform: scale(.96); transition: transform .35s var(--ease); }
.vr-modal.is-shown .vr-dialog { transform: none; }
/* Tall (9:16) player: as wide as a 78vh-high portrait needs, never wider than the screen. */
.vr-dialog.is-tall { width: min(100%, calc(78vh * 9 / 16), 420px); }

.vr-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-lg); }
.vr-dialog.is-tall .vr-stage { aspect-ratio: 9 / 16; }
.vr-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vr-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #fff; font-size: .92rem; }
.vr-bar p { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-bar a { color: #cfc6ff; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.vr-bar a:hover { color: #fff; }

.vr-close {
  position: absolute; top: -3.1rem; right: 0;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3);
  transition: background .25s;
}
.vr-close:hover { background: var(--violet); border-color: var(--violet); }
.vr-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vr-close svg { width: 18px; height: 18px; }
@media (max-width: 600px) { .vr-close { top: -2.9rem; } }
@media (prefers-reduced-motion: reduce) { .vr-modal, .vr-dialog, .vr-card, .vr-thumb img, .vr-bar-fill { transition: none; } }
