/* =========================================================
   REELS (home page)
   A tilted strip of hotel reels drifting across the screen.
   The clips and their poster frames stream from
   digitalforhotels.com. Behaviour lives in js/reels-strip.js.
   ========================================================= */

.reels {
  --rl-ink: #170a13;
  --rl-pink: #c73689;
  --rl-pink-soft: #f28cc3;
  --rl-pink-grad: linear-gradient(110deg, #c73689 0%, #e85aa8 50%, #c73689 100%);
  --rl-pearl: #f7f0f4;
  --rl-pearl-14: rgba(247, 240, 244, .14);
  --rl-pearl-60: rgba(247, 240, 244, .62);
  --rl-ease: cubic-bezier(.2, .7, .2, 1);
  --rw: clamp(170px, 19vw, 280px);
  --rh: calc(var(--rw) * 16 / 9);
  --rg: clamp(14px, 1.8vw, 26px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(48px, 6vw, 96px) 0 clamp(40px, 6vw, 90px);
  background: var(--rl-ink);
  color: var(--rl-pearl);
}

.reels__grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* big outlined word drifting behind the heading */
.reels__ghost {
  position: absolute;
  left: -2vw;
  top: clamp(20px, 5vw, 70px);
  font-family: var(--hm-heading-font);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(120px, 24vw, 380px);
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 140, 195, .16);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

/* ---------- heading ---------- */
.reels__head {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 60px;
  flex-wrap: wrap;
}

.reels__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--hm-body-font);
  font-size: clamp(11px, 1vw, 12.5px);
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rl-pink-soft);
}

.reels__eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: .8;
  flex: 0 0 auto;
}

.reels .reels__title {
  margin: 16px 0 0;
  max-width: 17ch;
  font-family: var(--hm-heading-font);
  font-weight: 500;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.05;
  color: var(--rl-pearl);
}

.reels .reels__title span {
  font-style: italic;
  background: var(--rl-pink-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.reels__intro {
  max-width: 44ch;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.reels .reels__intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--rl-pearl-60);
}

.reels .reels__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--rl-pink-soft);
}

/* style.css forces a dark pink on every a:hover, which disappears on this background */
.reels .reels__link:hover,
.reels .reels__link:focus {
  color: var(--rl-pearl) !important;
}

.reels__link svg { transition: transform .45s var(--rl-ease); }
.reels__link:hover svg { transform: translateX(6px); }

/* ---------- the strip ---------- */
.reels__stage {
  position: relative;
  z-index: 2;
  height: calc(var(--rh) + 21vw);
  margin-top: clamp(10px, 2vw, 30px);
}

.reels__stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70vw;
  height: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(199, 54, 137, .35), transparent);
  filter: blur(40px);
  pointer-events: none;
}

.reels__track {
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: calc(var(--rh) / -2);
  width: 100%;
  transform: rotate(var(--tilt, -10deg)) skewX(-9deg);
  transform-origin: 50% 50%;
}

/* trailing padding = one gap, so -50% is exactly one set of cards */
.reels__row {
  display: flex;
  gap: var(--rg);
  padding-right: var(--rg);
  width: max-content;
  will-change: transform;
  animation: reels-drift 70s linear infinite;
}

.reels.is-live .reels__row { animation: none; }

@keyframes reels-drift {
  100% { transform: translateX(-50%); }
}

/* ---------- a reel card ---------- */
.reels .reel {
  position: relative;
  flex: 0 0 auto;
  width: var(--rw);
  height: var(--rh);
  padding: 0;
  border: 0;
  border-radius: clamp(18px, 2vw, 28px);
  overflow: hidden;
  background: var(--rl-ink);
  color: var(--rl-pearl);
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9);
  outline: 1px solid var(--rl-pearl-14);
  outline-offset: -1px;
  transition: transform .7s var(--rl-ease), opacity .5s, outline-color .5s, box-shadow .6s var(--rl-ease);
}

.reels .reel:focus { outline: 1px solid var(--rl-pearl-14); outline-offset: -1px; }

.reels .reel:focus-visible {
  outline: 2px solid var(--rl-pink);
  outline-offset: 3px;
}

.reels .reel:nth-child(2n) { margin-top: clamp(14px, 2vw, 30px); }

.reel__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.reel__media img,
.reel__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* slow zoom on the poster frame until the clip starts */
.reel__media img { animation: reel-kb 14s ease-in-out infinite alternate; }

.reels .reel:nth-child(3n) .reel__media img {
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}

.reels .reel:nth-child(3n+1) .reel__media img {
  animation-name: reel-kb2;
  animation-duration: 16s;
}

@keyframes reel-kb {
  0% { transform: scale(1.08) translate(-2%, -1%); }
  100% { transform: scale(1.26) translate(3%, 2%); }
}

@keyframes reel-kb2 {
  0% { transform: scale(1.24) translate(3%, -2%); }
  100% { transform: scale(1.08) translate(-2%, 2%); }
}

.reel__media video {
  opacity: 0;
  transition: opacity .8s;
}

.reel__media video.is-playing { opacity: 1; }

.reel__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(23, 10, 19, .55) 0%, rgba(23, 10, 19, 0) 26%, rgba(23, 10, 19, 0) 52%, rgba(23, 10, 19, .92) 100%);
}

.reel__top {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reel__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hm-body-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rl-pink-grad);
  border-radius: 999px;
  padding: 5px 10px 5px 8px;
}

.reel__n {
  font-family: var(--hm-heading-font);
  font-size: 15px;
  color: var(--rl-pink-soft);
  letter-spacing: .08em;
}

/* progress line along the bottom */
.reel__bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 13px;
  height: 2px;
  border-radius: 2px;
  background: rgba(247, 240, 244, .22);
  overflow: hidden;
}

.reel__bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--rl-pink-grad);
  transform: scaleX(0);
  transform-origin: left center;
  animation: reel-progress 9s linear infinite;
}

.reels .reel:nth-child(2n) .reel__bar i { animation-duration: 12s; animation-delay: -4s; }
.reels .reel:nth-child(3n) .reel__bar i { animation-duration: 7s; animation-delay: -2s; }

@keyframes reel-progress {
  100% { transform: scaleX(1); }
}

@media (hover: hover) {
  .reels__row:hover .reel:not(:hover) { opacity: .5; }

  .reels .reel:hover {
    transform: translateY(-16px) scale(1.05);
    outline-color: var(--rl-pink);
    box-shadow: 0 50px 90px -40px rgba(199, 54, 137, .55);
    z-index: 2;
  }
}

/* ---------- full-screen player ---------- */
.reel-player {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 10, 19, .94);
  opacity: 0;
  transition: opacity .4s;
}

.reel-player.is-open { opacity: 1; }

.reel-player__video {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  border-radius: 20px;
  background: #000;
}

.reel-player__close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(247, 240, 244, .4);
  background: none;
  color: #f7f0f4;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .3s, border-color .3s;
}

.reel-player__close:hover {
  background: #c73689;
  border-color: #c73689;
}

@media (max-width: 900px) {
  .reels { --rw: clamp(150px, 30vw, 230px); }
  .reels__stage { height: calc(var(--rh) + 26vw); }
}

@media (max-width: 640px) {
  .reels { --rw: 42vw; }
  .reels__stage { height: calc(var(--rh) + 30vw); }
  .reel__top { left: 10px; right: 10px; top: 10px; }
  .reel__bar { left: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .reels__row,
  .reel__media img,
  .reel__bar i { animation: none; }
  .reels__stage { overflow-x: auto; }
}
