/* Homepage replays carousel (replay-carousel.js). */
/* The carousel runs the full length of the screen (outside the page's normal
   1180px column), with a 16px margin at each side and no width cap, so it fills
   the whole screen on big monitors too (founder 2026-10-08: "full container"). */
.rc-wrap { position: relative; width: calc(100vw - 32px); left: 50%; transform: translateX(-50%); }
.replay-grid.replay-carousel {
  display: flex; gap: 22px; overflow-x: auto; overscroll-behavior-x: contain; padding: 10px 2px 18px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}
.replay-grid.replay-carousel::-webkit-scrollbar { display: none; }
.replay-carousel .replay-card {
  flex: 0 0 clamp(260px, 30%, 360px); display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
@media (max-width: 640px) { .replay-carousel .replay-card { flex-basis: 80%; } }
/* Two rows of videos (founder 2026-10-08: "Do 2 rows"). The cards fill top-to-bottom,
   then the next column, so the carousel still scrolls sideways; replay-carousel.js
   reads grid-auto-flow to size the loop for two rows. */
.replay-grid.replay-carousel { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-template-columns: none; grid-auto-columns: clamp(260px, 30%, 360px); row-gap: 22px; }
.replay-carousel .replay-card { flex: none; min-width: 0; }
@media (max-width: 640px) { .replay-grid.replay-carousel { grid-auto-columns: 80%; row-gap: 16px; } }
.replay-carousel .replay-card:hover, .replay-carousel .replay-card:focus-within {
  transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--accent) 70%, transparent);
}
.replay-carousel .replay-thumb { transition: transform 0.5s ease; }
.replay-carousel .replay-card:hover .replay-thumb { transform: scale(1.04); }
.replay-carousel .replay-embed { overflow: hidden; }
.rc-btn {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent); color: var(--text);
  border: 1px solid var(--border); box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.rc-btn:hover, .rc-btn:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.06); }
.rc-btn svg { width: 18px; height: 18px; }
.rc-btn[hidden] { display: none; }
.rc-prev { left: 6px; } .rc-next { right: 6px; }
@media (max-width: 640px) { .rc-btn { top: auto; bottom: -46px; } .rc-prev { left: calc(50% - 52px); } .rc-next { right: calc(50% - 52px); } .rc-wrap.is-ready { margin-bottom: 52px; } }
@media (prefers-reduced-motion: reduce) {
  .replay-carousel .replay-card, .replay-carousel .replay-thumb { transition: none; }
  .replay-carousel .replay-card:hover, .replay-carousel .replay-card:focus-within { transform: none; }
}

/* ===== "Past Class Replays" redesign: a small cinema =====
   Soft drifting light behind the section, a red "recording" light on the
   eyebrow, film-strip edges above and below the carousel, glowing cards with
   a date badge, a "Latest" ribbon on the newest class, a pulsing play button
   and a staggered entrance. All motion stops with reduced motion or Data saver. */
.rp-section { position: relative; overflow: hidden; isolation: isolate; }
.rp-aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rp-aurora span { position: absolute; width: 46vw; max-width: 720px; aspect-ratio: 1; border-radius: 50%; filter: blur(80px); opacity: 0.28; }
.rp-aurora span:nth-child(1) { top: -18%; left: -10%; background: radial-gradient(circle, var(--accent), transparent 65%); animation: rp-drift-a 22s ease-in-out infinite alternate; }
.rp-aurora span:nth-child(2) { bottom: -30%; right: -12%; background: radial-gradient(circle, var(--accent-2), transparent 65%); animation: rp-drift-b 26s ease-in-out infinite alternate; }
.rp-aurora span:nth-child(3) { top: 30%; left: 40%; width: 26vw; background: radial-gradient(circle, var(--gold), transparent 65%); opacity: 0.12; animation: rp-drift-a 30s ease-in-out infinite alternate-reverse; }
:root[data-theme="light"] .rp-aurora span { opacity: 0.16; }
@keyframes rp-drift-a { to { transform: translate(14vw, 8vh) scale(1.15); } }
@keyframes rp-drift-b { to { transform: translate(-12vw, -10vh) scale(1.1); } }

/* Heading */
.rp-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.rp-rec { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.6); animation: rp-rec 1.6s ease-out infinite; }
@keyframes rp-rec { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(255, 77, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); } }
.rp-grad { background: linear-gradient(100deg, var(--accent), var(--accent-2) 40%, var(--gold) 60%, var(--accent-2) 80%, var(--accent)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rp-shine 7s linear infinite; }
@keyframes rp-shine { to { background-position: -250% 0; } }
.rp-chips { list-style: none; margin: 22px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rp-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 0.88rem; color: var(--text-muted); background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); backdrop-filter: blur(6px); }
.rp-chips strong { color: var(--text); }
.rp-chips svg { width: 17px; height: 17px; color: var(--accent-2); flex-shrink: 0; }
.rp-head.is-visible .rp-chips li { animation: rp-pop 0.6s cubic-bezier(.2, .8, .2, 1.2) both; }
.rp-head.is-visible .rp-chips li:nth-child(2) { animation-delay: 0.12s; }
.rp-head.is-visible .rp-chips li:nth-child(3) { animation-delay: 0.24s; }
@keyframes rp-pop { from { opacity: 0; transform: translateY(10px) scale(0.92); } }

/* Film strip above and below the carousel */
.rp-section .rc-wrap { padding: 22px 0; }
.rp-section .rc-wrap::before, .rp-section .rc-wrap::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px; opacity: 0.35; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 10px, var(--text-muted) 10px 22px, transparent 22px 34px) 0 50% / 34px 6px repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  border-block: 1px solid color-mix(in srgb, var(--text-muted) 35%, transparent); border-radius: 3px;
  animation: rp-strip 6s linear infinite;
}
.rp-section .rc-wrap::before { top: 0; } .rp-section .rc-wrap::after { bottom: 0; animation-direction: reverse; }
@keyframes rp-strip { to { background-position: -340px 50%; } }
.rp-section .rc-btn { top: calc(50% - 40px); }
@media (max-width: 640px) { .rp-section .rc-btn { top: auto; bottom: -46px; } }

/* Cards: glowing gradient frame, date badge, darker foot on the picture */
@property --rp-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.rp-section .replay-card {
  border: 1px solid transparent; border-radius: 20px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(160deg, color-mix(in srgb, var(--accent) 45%, var(--border)), var(--border) 40%, color-mix(in srgb, var(--accent-2) 30%, var(--border))) border-box;
}
.rp-section .replay-card:hover, .rp-section .replay-card:focus-within {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              conic-gradient(from var(--rp-angle), var(--accent), var(--accent-2), var(--gold), var(--accent-2), var(--accent)) border-box;
  animation: rp-spin 3s linear infinite;
  box-shadow: 0 24px 50px -20px color-mix(in srgb, var(--accent) 80%, transparent);
}
@keyframes rp-spin { to { --rp-angle: 360deg; } }
.rp-section .replay-embed { border-radius: 19px 19px 0 0; }
.rp-section .replay-embed::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(2, 8, 25, 0.75)); pointer-events: none; transition: opacity 0.3s ease; }
.rp-section .replay-card:hover .replay-embed::after { opacity: 0.5; }
.rp-section .play-btn { width: 62px; height: 62px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 90%, transparent); z-index: 1; }
.rp-section .play-btn::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent-2) 70%, transparent); animation: rp-ring 2.2s ease-out infinite; }
@keyframes rp-ring { from { transform: scale(0.9); opacity: 0.9; } to { transform: scale(1.45); opacity: 0; } }
.rp-section .replay-embed:hover .play-btn { transform: scale(1.12); }
.rp-date, .rp-new { position: absolute; z-index: 1; font: 700 0.74rem/1 var(--font-body); letter-spacing: 0.04em; border-radius: 999px; pointer-events: none; }
.rp-date { left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; color: #fff; background: rgba(2, 8, 25, 0.62); border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: blur(6px); }
.rp-date svg { width: 13px; height: 13px; }
.rp-new { right: 12px; top: 12px; padding: 7px 12px; text-transform: uppercase; color: #1a1200; background: linear-gradient(135deg, #ffd46b, var(--gold)); box-shadow: 0 6px 18px -6px rgba(245, 184, 46, 0.9); animation: rp-bob 2.6s ease-in-out infinite; }
@keyframes rp-bob { 50% { transform: translateY(-3px); } }
.rp-section .replay-info { padding: 16px 18px 18px; }
.rp-section .replay-info h3 { font-size: 1.02rem; line-height: 1.35; }
.rp-section .replay-download { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-section .replay-info > p { display: none; } /* the date now sits on the picture */
.rp-section .replay-notes { border-top-style: solid; }

/* Staggered entrance: the first cards rise in one after another */
.rp-section .rc-wrap.rp-enter .replay-card:not(.rc-clone) { opacity: 0; transform: translateY(26px) scale(0.97); }
.rp-section .rc-wrap.rp-enter.rp-in .replay-card:not(.rc-clone) { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .8, .2, 1), box-shadow 0.3s ease; transition-delay: calc(var(--rp-i, 0) * 90ms); }

/* Buttons */
.rp-more { margin-top: 34px; }
.rp-cta, .rp-cta2 { display: inline-flex; align-items: center; gap: 10px; }
.rp-cta svg, .rp-cta2 svg { width: 18px; height: 18px; }
.rp-cta svg { transition: transform 0.25s ease; }
.rp-cta:hover svg, .rp-cta:focus-visible svg { transform: translateX(5px); }
.rp-cta { position: relative; overflow: hidden; }
.rp-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); transform: translateX(-120%); animation: rp-sheen 4s ease-in-out 1.5s infinite; }
@keyframes rp-sheen { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
  .rp-aurora span, .rp-rec, .rp-grad, .rp-section .rc-wrap::before, .rp-section .rc-wrap::after, .rp-section .play-btn::before,
  .rp-new, .rp-cta::after, .rp-section .replay-card:hover, .rp-head.is-visible .rp-chips li { animation: none !important; }
  .rp-section .rc-wrap.rp-enter .replay-card:not(.rc-clone) { opacity: 1; transform: none; }
}
html.lite .rp-aurora, html.lite .rp-section .play-btn::before, html.lite .rp-cta::after { display: none; }
html.lite .rp-rec, html.lite .rp-grad, html.lite .rp-section .rc-wrap::before, html.lite .rp-section .rc-wrap::after, html.lite .rp-new, html.lite .rp-section .replay-card:hover { animation: none !important; }
@media (max-width: 640px) {
  .rp-chips { gap: 8px; margin-top: 18px; }
  .rp-chips li { padding: 6px 10px; font-size: 0.76rem; gap: 5px; }
  .rp-chips svg { width: 14px; height: 14px; }
}
