/**
 * Rektor Untad Cup II - Documentation Stylesheet
 * Premium Dark Mode & Parallax Layout
 */

.ruc2-wrapper {
  background-color: var(--navy-deep, #060E1D);
  color: var(--white, #FFFFFF);
  font-family: var(--font-body), sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* =========================================================================
   PARALLAX HERO
   ========================================================================= */
.ruc2-hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--navy-deep, #060E1D);
}

.ruc2-hero__bg,
.ruc2-hero__video {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  /* Extra height for Y parallax — centered at -10% so there is
     equal travel room (10% of hero height) in both directions */
  object-fit: cover;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) contrast(1.1) blur(1px);
  /* Raised brightness, reduced blur */
  will-change: transform;
  transform: translateY(0);
}

.ruc2-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(6, 14, 29, 0.4) 0%,
      /* Reduced opacity from 0.4 */
      rgba(6, 14, 29, 0.8) 70%,
      /* Reduced opacity from 0.8 */
      var(--navy-deep, #060E1D) 100%);
  z-index: 1;
}

.ruc2-hero__container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 80px;
  /* Clear fixed nav */
}

.ruc2-hero__breadcrumbs {
  font-size: var(--fs-small, 0.875rem);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
}

.ruc2-hero__breadcrumbs a {
  color: var(--gold-light, #FFCA6A);
  transition: color 0.3s var(--ease);
}

.ruc2-hero__breadcrumbs a:hover {
  color: var(--gold, #E8A020);
}

.ruc2-hero__breadcrumbs .sep {
  margin: 0 0.5rem;
}

.ruc2-hero__eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow, 0.78rem);
  color: var(--gold, #E8A020);
  letter-spacing: 0.25em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.ruc2-hero__title-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
  user-select: none;
}

.ruc2-hero__title-stroke {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: 0.9;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.08);
  will-change: transform;
}

.ruc2-hero__title-solid {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 9vw, 6.8rem);
  line-height: 0.9;
  font-weight: 800;
  color: var(--white, #FFFFFF);
  position: absolute;
  top: 15%;
  left: 2%;
  z-index: 1;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  will-change: transform;
}

.ruc2-hero__subtitle {
  font-size: var(--fs-lead, 1.2rem);
  max-width: 600px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 3.5rem;
  line-height: 1.6;
}

.ruc2-hero__scroll-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mouse-scroll {
  width: 26px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  position: relative;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--gold, #E8A020);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseScrollAnim 1.6s infinite;
}

.scroll-txt {
  font-size: var(--fs-small, 0.875rem);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

@keyframes mouseScrollAnim {
  0% {
    top: 8px;
    opacity: 1;
  }

  50% {
    top: 22px;
    opacity: 0;
  }

  100% {
    top: 8px;
    opacity: 1;
  }
}

/* =========================================================================
   INTRO & STATS SECTION
   ========================================================================= */
.ruc2-intro {
  position: relative;
  padding: var(--section-y) 0;
  background: var(--navy-deep, #060E1D);
  z-index: 2;
  overflow: hidden;
}

.ruc2-intro__glow {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(232, 160, 32, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.ruc2-intro__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.ruc2-section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2, 2.5rem);
  color: var(--white, #FFFFFF);
  margin-bottom: 1.5rem;
  position: relative;
}

.ruc2-section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--gold, #E8A020);
  margin-top: 1rem;
  border-radius: 2px;
}

.lead-text {
  font-size: var(--fs-lead, 1.2rem);
  color: var(--gold-light, #FFCA6A);
  margin-bottom: 1.5rem;
}

.ruc2-intro__text p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.25rem;
}

/* Stats grid with parallax — 3 columns side-by-side on desktop */
.ruc2-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
}

.ruc2-stat-card {
  background: rgba(22, 46, 85, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem 1rem;
  border-radius: var(--radius, 14px);
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}

.ruc2-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 160, 32, 0.3);
  box-shadow: 0 8px 24px rgba(6, 14, 29, 0.4), 0 0 16px rgba(232, 160, 32, 0.06);
}

.ruc2-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--gold, #E8A020);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.ruc2-stat-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* =========================================================================
   GALLERY SECTION
   ========================================================================= */
.ruc2-gallery-section {
  padding: var(--section-y) 0;
  background: rgba(11, 29, 58, 0.3);
  /* Transparent dark navy overlay */
  position: relative;
  z-index: 2;
}

.ruc2-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 4rem;
}

.ruc2-gallery-header .eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow, 0.78rem);
  color: var(--gold, #E8A020);
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ruc2-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ruc2-filter-btn {
  background: rgba(22, 46, 85, 0.3);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: var(--fs-small, 0.875rem);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s var(--ease);
}

.ruc2-filter-btn:hover {
  background: rgba(22, 46, 85, 0.6);
  color: var(--white, #FFFFFF);
  border-color: rgba(255, 255, 255, 0.15);
}

.ruc2-filter-btn.is-active {
  background: var(--gold, #E8A020);
  color: var(--navy-deep, #060E1D);
  border-color: var(--gold, #E8A020);
  box-shadow: 0 4px 15px rgba(232, 160, 32, 0.25);
}

/* =========================================================================
   ASYMMETRIC INTERACTIVE GRID
   ========================================================================= */
.ruc2-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 20px;
  perspective: 1200px;
  /* 3D depth for card rotations */
  perspective-origin: center;
}

.ruc2-card {
  position: relative;
  border-radius: var(--radius, 14px);
  overflow: hidden;
  background-color: var(--navy-light, #162E55);
  cursor: pointer;
  /* opacity + transform are driven per-pixel by JS — no CSS transition here
     so the scroll-driven animation stays butter-smooth without fighting
     a CSS transition duration. */
  opacity: 0;
  will-change: transform, opacity;
  transform-style: preserve-3d;
  /* Subtle golden shimmer border that fades in at full reveal */
  border: 1px solid transparent;
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

/* When JS brings a card to full opacity the golden border appears */
.ruc2-card.is-revealed {
  border-color: rgba(232, 160, 32, 0.12);
  box-shadow:
    0 8px 32px rgba(6, 14, 29, 0.35),
    0 0 0 1px rgba(232, 160, 32, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Staggered sizing rules */
.ruc2-card--standard {
  grid-column: span 1;
  grid-row: span 1;
}

.ruc2-card--wide {
  grid-column: span 2;
  grid-row: span 1;
}

.ruc2-card--tall {
  grid-column: span 1;
  grid-row: span 2;
}

.ruc2-card--giant {
  grid-column: span 2;
  grid-row: span 2;
}

.ruc2-card__inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ruc2-card__media-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020813;
}

.ruc2-card__img,
.ruc2-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

/* Play icon indicator for videos */
.ruc2-card__play-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background: rgba(6, 14, 29, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold, #E8A020);
  border: 1px solid rgba(232, 160, 32, 0.3);
  z-index: 2;
  pointer-events: none;
  transition: background 0.3s, transform 0.3s;
}

.ruc2-card__play-indicator svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  margin-left: 2px;
}

.ruc2-card:hover .ruc2-card__play-indicator {
  background: var(--gold, #E8A020);
  color: var(--navy-deep, #060E1D);
  transform: scale(1.1);
}

.ruc2-card__tag {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(6, 14, 29, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-light, #FFCA6A);
  z-index: 2;
  pointer-events: none;
}

/* Information Overlay */
.ruc2-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px 20px 20px;
  background: linear-gradient(to top, rgba(6, 14, 29, 0.95) 0%, rgba(6, 14, 29, 0.6) 60%, transparent 100%);
  z-index: 3;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  pointer-events: none;
}

.ruc2-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white, #FFFFFF);
  margin-bottom: 0.25rem;
}

.ruc2-card__desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Hover States */
.ruc2-card:hover .ruc2-card__img,
.ruc2-card:hover .ruc2-card__video {
  transform: scale(1.08);
}

.ruc2-card:hover .ruc2-card__info {
  transform: translateY(0);
  opacity: 1;
}

/* Card Filtering Animation
   Uses visibility + max-height collapse so it doesn't fight the JS
   transform pipeline while still removing cards from flow. */
.ruc2-card.is-filtered-out {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

/* =========================================================================
   CINEMATIC LIGHTBOX
   ========================================================================= */
.ruc2-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(3, 7, 15, 0.96);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}

.ruc2-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ruc2-lightbox__close {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white, #FFFFFF);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
  z-index: 20;
}

.ruc2-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.ruc2-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--white, #FFFFFF);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
  z-index: 10;
}

.ruc2-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.ruc2-lightbox__nav--prev {
  left: 30px;
}

.ruc2-lightbox__nav--next {
  right: 30px;
}

/* Stage: the centered vertical container holding slides */
.ruc2-lightbox__stage {
  position: relative;
  width: 80%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Track: holds two slides side-by-side for crossfade/slide transitions */
.ruc2-lightbox__track {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Each slide: vertical flex with media on top, caption below */
.ruc2-lightbox__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.ruc2-lightbox__slide--active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* Content: image/video container */
.ruc2-lightbox__content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ruc2-lightbox__content img,
.ruc2-lightbox__content video {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Caption: directly below the image, clean and separated */
.ruc2-lightbox__caption {
  width: 100%;
  max-width: 700px;
  text-align: center;
  padding: 1.25rem 1rem 0.5rem;
}

.ruc2-lightbox__tag {
  display: inline-block;
  background: rgba(232, 160, 32, 0.12);
  border: 1px solid rgba(232, 160, 32, 0.25);
  color: var(--gold, #E8A020);
  padding: 0.25rem 0.9rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.ruc2-lightbox__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--white, #FFFFFF);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.ruc2-lightbox__desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
  max-width: 580px;
  margin: 0 auto;
}

/* ------ Slide Transition Animations ------ */

/* Opening zoom-in for first image */
@keyframes lightboxZoomIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide in from the right (next) */
@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(80px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide out to the left (next) */
@keyframes slideOutToLeft {
  0% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-80px);
  }
}

/* Slide in from the left (prev) */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-80px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide out to the right (prev) */
@keyframes slideOutToRight {
  0% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(80px);
  }
}

/* Animation classes applied by JS — z-index managed by JS inline styles.
   The `!important` on opacity is needed to override --active's opacity:1
   during exit, and the base slide's opacity:0 during enter. */
.ruc2-lightbox__slide--enter-next {
  animation: slideInFromRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ruc2-lightbox__slide--exit-next {
  animation: slideOutToLeft 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ruc2-lightbox__slide--enter-prev {
  animation: slideInFromLeft 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ruc2-lightbox__slide--exit-prev {
  animation: slideOutToRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ruc2-lightbox__slide--enter-initial {
  animation: lightboxZoomIn 0.5s var(--ease) both;
}

/* =========================================================================
   RESPONSIVENESS
   ========================================================================= */
@media (max-width: 1024px) {
  .ruc2-intro__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* stats already 3-col by default; stack to 1-col below the intro on tablet */
  .ruc2-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .ruc2-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
  }

  .ruc2-card--giant {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 768px) {
  .ruc2-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 15px;
  }

  .ruc2-card--wide,
  .ruc2-card--giant {
    grid-column: span 2;
  }

  .ruc2-card--tall {
    grid-row: span 2;
  }

  .ruc2-lightbox__nav {
    width: 44px;
    height: 44px;
  }

  .ruc2-lightbox__nav--prev {
    left: 10px;
  }

  .ruc2-lightbox__nav--next {
    right: 10px;
  }

  .ruc2-lightbox__stage {
    width: 92%;
  }
}

@media (max-width: 480px) {
  .ruc2-stats {
    grid-template-columns: 1fr;
  }

  .ruc2-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .ruc2-card--standard,
  .ruc2-card--wide,
  .ruc2-card--tall,
  .ruc2-card--giant {
    grid-column: span 1;
    grid-row: span 1;
  }

  .ruc2-gallery-header {
    margin-bottom: 2rem;
  }
}

/* =========================================================================
   CINEMATIC SCROLL INTRO — "The Opening Serve"
   -------------------------------------------------------------------------
   A pinned (sticky) scrollytelling scene before the hero.
   The tall section provides scroll runway; the stage stays pinned while
   JS maps scroll progress to the serve sequence.
   ========================================================================= */
.ruc2-cine {
  position: relative;
  height: 380vh;
  /* scroll runway — expanded to slow down the parallax sequence and allow the video serve to finish completely before cover fade and hero handoff. */
  background: var(--navy-deep, #060E1D);
  z-index: 3;
}

.ruc2-cine__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  /* clipping on the sticky element itself is safe */
  background:
    radial-gradient(ellipse 120% 80% at 75% 110%, rgba(22, 46, 85, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 15% -10%, rgba(22, 46, 85, 0.35) 0%, transparent 60%),
    var(--navy-deep, #060E1D);
}

/* ---------- Scroll-scrubbed serve video ---------- */
.ruc2-cine__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.ruc2-cine__stage.has-video .ruc2-cine__video-wrap {
  opacity: 1;
}

/* Video loading indicator — shown while the video buffers for smooth scrubbing */
.ruc2-cine__loading {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(6, 14, 29, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ruc2-cine__stage.is-video-loading .ruc2-cine__loading {
  opacity: 1;
}

.ruc2-cine__loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(232, 160, 32, 0.25);
  border-top-color: var(--gold, #E8A020);
  border-radius: 50%;
  animation: cineSpinnerAnim 0.8s linear infinite;
}

@keyframes cineSpinnerAnim {
  to { transform: rotate(360deg); }
}

.ruc2-cine__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Captured JPEG frame-sequence: replaces the <video> for buttery scrubbing */
.ruc2-cine__frames {
  position: absolute;
  inset: 0;
}

.ruc2-cine__frames img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: none;
}

.ruc2-cine__video-wrap.is-frames .ruc2-cine__video {
  visibility: hidden;
}

/* Left scrim keeps the welcome text readable over the footage,
   bottom scrim blends the frame edge into the navy stage */
.ruc2-cine__video-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(6, 14, 29, 0.88) 0%, rgba(6, 14, 29, 0.45) 34%, transparent 60%),
    linear-gradient(to top, rgba(6, 14, 29, 0.55), transparent 28%),
    linear-gradient(to bottom, rgba(6, 14, 29, 0.5), transparent 20%);
}

/* When the video takes over, retire the SVG scene & heavy bg layers.
   Particles float above the footage for atmosphere continuity. */
.has-video .ruc2-cine__athlete,
.has-video .ruc2-cine__ball,
.has-video .ruc2-cine__flash,
.has-video .ruc2-cine__speedlines,
.has-video .ruc2-cine__floor,
.has-video .ruc2-cine__watermark {
  display: none;
}

.has-video .ruc2-cine__particles {
  z-index: 6;
}

/* ---------- Abstract corner vignette (dissolves the footage watermark) ----------
   A large, textless, heavily-feathered dark falloff anchored to the bottom-right.
   It reads as the video's own lens/shadow vignetting, so the baked-in watermark
   simply sinks into shadow instead of being patched over. Two blended radials —
   a wide soft base plus a denser core over the watermark zone — keep the mark
   invisible across aspect ratios while the feathered edge merges with the video.
   Only revealed when the video scene is active. */
.ruc2-cine__corner {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 15;
  width: min(60vw, 720px);
  height: min(58vh, 600px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  background:
    radial-gradient(ellipse 62% 46% at 90% 82%,
      rgba(6, 14, 29, 0.94) 0%,
      rgba(6, 14, 29, 0.7) 34%,
      rgba(6, 14, 29, 0.28) 58%,
      transparent 78%),
    radial-gradient(ellipse 100% 100% at 100% 100%,
      rgba(6, 14, 29, 0.78) 0%,
      rgba(6, 14, 29, 0.34) 40%,
      transparent 70%);
}

.has-video .ruc2-cine__corner {
  opacity: 1;
}

@media (max-width: 768px) {

  .ruc2-cine__video,
  .ruc2-cine__frames img {
    /* keep the athlete (right third of the footage) in frame on portrait crops */
    object-position: 72% center;
  }
}

/* ---------- Depth / atmosphere layers ---------- */
.ruc2-cine__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ruc2-cine__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.ruc2-cine__glow--gold {
  width: 560px;
  height: 560px;
  right: -8%;
  top: -12%;
  background: radial-gradient(circle, rgba(232, 160, 32, 0.10) 0%, transparent 65%);
}

.ruc2-cine__glow--blue {
  width: 700px;
  height: 700px;
  left: -14%;
  bottom: -22%;
  background: radial-gradient(circle, rgba(43, 92, 173, 0.14) 0%, transparent 65%);
}

/* Perspective court floor */
.ruc2-cine__floor {
  position: absolute;
  left: 50%;
  bottom: -6vh;
  width: 160vw;
  height: 46vh;
  transform: translateX(-50%) perspective(700px) rotateX(62deg);
  transform-origin: center bottom;
  background:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.055) 0 2px, transparent 2px 11vw),
    repeating-linear-gradient(to top, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 9vh),
    linear-gradient(to top, rgba(22, 46, 85, 0.30), transparent 80%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 92%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 92%);
  will-change: opacity;
}

/* Giant outlined "II" watermark behind the athlete */
.ruc2-cine__watermark {
  position: absolute;
  right: 4vw;
  top: 6vh;
  font-family: var(--font-display);
  font-size: clamp(14rem, 34vw, 34rem);
  font-weight: 800;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.045);
  user-select: none;
  will-change: transform, opacity;
}

/* Floating dust particles (spans injected by JS) */
.ruc2-cine__particles {
  position: absolute;
  inset: 0;
  will-change: opacity;
}

.ruc2-cine__particles span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 202, 106, 0.85) 0%, rgba(255, 202, 106, 0) 70%);
  animation: cineFloat linear infinite;
  opacity: 0.5;
}

@keyframes cineFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(3vw, -6vh, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* ---------- Kinetic welcome text (left) ---------- */
.ruc2-cine__text {
  position: absolute;
  z-index: 20;
  left: clamp(1.5rem, 6vw, 7rem);
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 640px);
}

/* every animated line: entrance on load, parallax-out driven by JS */
.cine-line {
  will-change: transform, opacity;
  animation: cineLineIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--d, 0s);
}

@keyframes cineLineIn {
  from {
    opacity: 0;
    transform: translate3d(0, 46px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}


/* Editorial cascade: each line steps right for a diagonal rhythm */
.ruc2-cine__headline {
  display: flex;
  flex-direction: column;
  margin: 0 0 1.8rem;
  user-select: none;
}

.ruc2-cine__headline .cine-line {
  display: block;
}

.cine-line--greet {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.02em;
  margin-bottom: 0.9rem;
}

.cine-line--stroke {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7.5vw, 6.4rem);
  font-weight: 800;
  line-height: 0.94;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.22);
  letter-spacing: 0.01em;
}

.cine-line--solid {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.02;
  color: var(--white, #FFFFFF);
  margin-left: 0.06em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.cine-line--gold {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-top: 0.55rem;
  margin-left: 0.1em;
  background: linear-gradient(100deg, #FFCA6A 0%, #E8A020 55%, #C98614 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cine-line--gold em {
  font-style: normal;
  padding: 0 0.35em;
  margin-left: 0.15em;
  border: 2px solid rgba(232, 160, 32, 0.55);
  border-radius: 10px;
  -webkit-text-stroke: 0;
}

.ruc2-cine__lead {
  font-size: clamp(0.95rem, 1.25vw, 1.12rem);
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.75;
  max-width: 470px;
  margin-bottom: 1.6rem;
}

.ruc2-cine__chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.cine-chip {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-light, #FFCA6A);
  background: rgba(22, 46, 85, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.45rem 1rem;
  border-radius: 30px;
  backdrop-filter: blur(6px);
}

/* Scroll hint: vertical progress track */
.ruc2-cine__hint {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.cine-hint__track {
  width: 2px;
  height: 52px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.cine-hint__thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold, #E8A020));
  animation: cineHintDrop 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes cineHintDrop {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    transform: translateY(56px);
    opacity: 0;
  }
}

.cine-hint__txt {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Athlete (right) ---------- */
.ruc2-cine__athlete {
  position: absolute;
  z-index: 10;
  right: clamp(0.5rem, 5vw, 6rem);
  bottom: 0;
  width: min(44vw, 620px);
  height: min(86vh, 760px);
  will-change: transform, opacity;
}






/* ---------- Ball flight layers ---------- */
.ruc2-cine__speedlines {
  position: absolute;
  z-index: 40;
  inset: -20%;
  pointer-events: none;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 52%,
      rgba(255, 255, 255, 0.06) 0deg 1.2deg,
      transparent 1.2deg 14deg);
  -webkit-mask-image: radial-gradient(circle at 50% 52%, transparent 18%, rgba(0, 0, 0, 1) 60%);
  mask-image: radial-gradient(circle at 50% 52%, transparent 18%, rgba(0, 0, 0, 1) 60%);
  will-change: transform, opacity;
}

.ruc2-cine__ball {
  position: absolute;
  z-index: 50;
  left: 0;
  top: 0;
  width: 120px;
  height: 120px;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.ruc2-cine__ball svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ruc2-cine__flash {
  position: absolute;
  z-index: 55;
  width: 240px;
  height: 240px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.3);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 202, 106, 0.55) 22%, rgba(232, 160, 32, 0.18) 45%, transparent 68%);
  border-radius: 50%;
  will-change: transform, opacity;
}

.ruc2-cine__cover {
  position: absolute;
  z-index: 60;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 52%, #0A1626 0%, var(--navy-deep, #060E1D) 62%);
  will-change: opacity;
}

/* ---------- Responsiveness ---------- */
@media (max-width: 1024px) {
  .ruc2-cine__text {
    width: min(52vw, 560px);
  }

  .ruc2-cine__athlete {
    width: 50vw;
    height: 70vh;
    right: 0;
  }
}

@media (max-width: 768px) {
  .ruc2-cine {
    height: 220vh;
  }

  .ruc2-cine__corner {
    width: min(85vw, 460px);
    height: min(50vh, 380px);
  }

  .ruc2-cine__text {
    left: 6vw;
    right: 6vw;
    width: auto;
    top: 12vh;
    transform: none;
  }

  .ruc2-cine__lead {
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .ruc2-cine__athlete {
    width: 78vw;
    height: 48vh;
    right: -6vw;
  }

  .ruc2-cine__watermark {
    font-size: 44vw;
    top: auto;
    bottom: 34vh;
  }

  .cine-line--stroke {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }

  .cine-line--solid {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }
}

/* ---------- Reduced motion: static, accessible fallback ---------- */
@media (prefers-reduced-motion: reduce) {
  .ruc2-cine {
    height: auto;
    min-height: 100vh;
  }

  .ruc2-cine__stage {
    position: relative;
    height: auto;
    min-height: 100vh;
  }

  .cine-line,
  .cine-hint__thumb,
  .ruc2-cine__particles span {
    animation: none;
  }

  .ruc2-cine__ball,
  .ruc2-cine__flash,
  .ruc2-cine__cover,
  .ruc2-cine__speedlines,
  .ruc2-cine__video-wrap,
  .ruc2-cine__hint {
    display: none;
  }
}

/* JS applies this class when it detects reduced motion too */
.ruc2-cine.is-static {
  height: auto;
  min-height: 100vh;
}

.ruc2-cine.is-static .ruc2-cine__stage {
  position: relative;
  height: auto;
  min-height: 100vh;
}

.ruc2-cine.is-static .ruc2-cine__ball,
.ruc2-cine.is-static .ruc2-cine__flash,
.ruc2-cine.is-static .ruc2-cine__cover,
.ruc2-cine.is-static .ruc2-cine__speedlines,
.ruc2-cine.is-static .ruc2-cine__video-wrap,
.ruc2-cine.is-static .ruc2-cine__hint {
  display: none;
}

/* =========================================================================
   PRELOADER (Simple Fake Loader)
   ========================================================================= */
body.ruc2-loading-active {
  overflow: hidden !important;
  height: 100vh !important;
}

.ruc2-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--navy-deep, #060E1D);
  background-image: radial-gradient(circle at 50% 45%, rgba(22, 46, 85, 0.4) 0%, rgba(6, 14, 29, 0.98) 70%);
  font-family: var(--font-body), sans-serif;
  color: var(--white, #FFFFFF);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              filter 0.6s ease;
  will-change: transform, opacity, filter;
}

.ruc2-loader.is-dismissed {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  filter: blur(10px);
}

.ruc2-loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  max-width: 360px;
  padding: 1.5rem;
}

.ruc2-loader__spinner {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ruc2-loader__spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(232, 160, 32, 0.15);
  border-top-color: var(--gold, #E8A020);
  border-right-color: var(--gold-light, #FFCA6A);
  animation: ruc2Spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  filter: drop-shadow(0 0 8px rgba(232, 160, 32, 0.4));
}

@keyframes ruc2Spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ruc2-loader__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ruc2-loader__svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(232, 160, 32, 0.4));
}

.ruc2-loader__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ruc2-loader__tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold, #E8A020);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ruc2-loader__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white, #FFFFFF);
  margin: 0;
  letter-spacing: 0.02em;
}

.ruc2-loader__progress-bar {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.ruc2-loader__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-light, #FFCA6A), var(--gold, #E8A020));
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(232, 160, 32, 0.6);
  transition: width 0.15s ease-out;
}