/* =====================================================================
   Travel Reels — vertical, snap-scrolling video feed
   ===================================================================== */

.reels-page {
  position: fixed; inset: var(--nav-h) 0 0 0;
  background: #000;
  overflow: hidden;
}
@media (max-width: 900px) {
  .reels-page { inset: 0 0 calc(var(--mobile-nav) + env(safe-area-inset-bottom)) 0; }
}

.reels-feed {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.reels-feed::-webkit-scrollbar { display: none; }

.reel {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Blurred copy of the poster fills the letterbox on desktop. */
.reel__backdrop {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(48px) saturate(150%) brightness(.35);
  transform: scale(1.25);
}
.reel__stage {
  position: relative; z-index: 1;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  background: #05080D;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}
@media (min-width: 901px) {
  .reel__stage { border-radius: var(--r-lg); height: min(100%, 92vh); margin-block: auto; box-shadow: var(--sh-3); }
}

.reel__video, .reel__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.reel__poster { z-index: 1; transition: opacity var(--t-mid); }
.reel.is-playing .reel__poster { opacity: 0; }
.reel__video { z-index: 2; }

.reel__veil {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.28) 34%, transparent 58%, rgba(0,0,0,.42) 100%);
  pointer-events: none;
}

.reel__tap {
  position: absolute; inset: 0; z-index: 4;
  border: 0; background: none; cursor: pointer;
}

.reel__play {
  position: absolute; z-index: 6; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.85);
  width: 74px; height: 74px; border-radius: 99px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-mid) var(--ease-back);
}
.reel:not(.is-playing) .reel__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.reel__info {
  position: absolute; z-index: 5;
  left: 0; right: 76px; bottom: 0;
  padding: var(--s-5) var(--s-5) var(--s-6);
  color: #fff;
  pointer-events: none;
}
.reel__info > * { pointer-events: auto; }

.reel__who { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.reel__who img {
  width: 42px; height: 42px; border-radius: 99px; object-fit: cover;
  border: 2px solid rgba(255,255,255,.65); background: var(--navy-800);
}
.reel__who b { font-family: var(--font-display); font-size: .96rem; font-weight: 600; display: block; color: #fff; }
.reel__who small { font-size: var(--fs-xs); color: rgba(255,255,255,.66); }

.reel__caption {
  font-size: .95rem; line-height: 1.5; color: rgba(255,255,255,.94);
  max-width: 34ch; margin-bottom: 13px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.reel__place {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 17px; border-radius: 99px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.24);
  color: #fff; font-size: var(--fs-sm); font-weight: 600;
  transition: background var(--t-fast), transform var(--t-fast);
}
.reel__place:hover { background: rgba(255,255,255,.26); color: #fff; transform: translateY(-2px); }

.reel__rail {
  position: absolute; z-index: 5;
  right: 12px; bottom: 26px;
  display: grid; gap: 18px; justify-items: center;
}
.reel__act {
  display: grid; justify-items: center; gap: 5px;
  color: #fff; font-size: var(--fs-micro); font-weight: 600;
}
.reel__act-btn {
  width: 48px; height: 48px; border-radius: 99px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast), color var(--t-fast);
}
.reel__act-btn:hover { background: rgba(255,255,255,.26); transform: scale(1.08); }
.reel__act-btn svg { width: 22px; height: 22px; }
.reel__act.is-liked .reel__act-btn { background: var(--coral); border-color: transparent; color: #fff; }
.reel__act.is-liked .reel__act-btn svg { fill: currentColor; animation: likePop .42s var(--ease-back); }
@keyframes likePop { 0% { transform: scale(1); } 45% { transform: scale(1.42); } 100% { transform: scale(1); } }

/* Progress bar for the active reel */
.reel__progress {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.14);
}
.reel__progress i { display: block; height: 100%; width: 0; background: var(--grad-brand); transition: width .12s linear; }

/* Feed chrome */
.reels-top {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  width: min(100%, 760px); margin-inline: auto;
  padding: var(--s-4) var(--s-5);
  pointer-events: none;
}
.reels-top::before {
  content: ''; position: absolute; inset: -20px -50vw auto -50vw; height: 130px; z-index: -1;
  background: linear-gradient(to bottom, rgba(0,0,0,.62), transparent);
  pointer-events: none;
}
.reels-top > * { pointer-events: auto; }
.reels-top__title {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-family: var(--font-display); font-weight: 650; color: #fff; letter-spacing: -.02em;
}
.reels-top__title img {
  width: 28px; height: 28px; border-radius: var(--r-full);
  box-shadow: 0 0 0 1px rgba(255,255,255,.22);
}

.reels-top .select {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2);
  color: #fff; min-height: 40px; padding-block: 8px; width: auto; margin-left: auto;
}
.reels-top .select option { color: var(--text-bright); }

/* Watermark. Top-right: clear of the back button and filter above it, the
   caption block bottom-left and the action rail down the right, so it never
   covers anything readable — and it rides along in screenshots. */
.reel__brand {
  position: absolute; top: 68px; right: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 5px; border-radius: var(--r-full);
  background: rgba(4,22,42,.42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-display); font-size: .78rem; font-weight: 600;
  color: rgba(255,255,255,.92); letter-spacing: -.01em;
  pointer-events: none;
}
.reel__brand img { width: 22px; height: 22px; border-radius: var(--r-full); }
@media (max-width: 520px) { .reel__brand { top: 62px; right: 10px; font-size: .72rem; } }

.reels-hint {
  position: absolute; z-index: 15; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); color: rgba(255,255,255,.6);
  animation: bob 2.6s var(--ease-io) infinite;
  pointer-events: none;
}
@media (max-width: 900px) { .reels-hint { display: none; } }

.reel__loader { display: grid; place-items: center; height: 100%; color: rgba(255,255,255,.5); }

/* ---- Reel tiles on other pages --------------------------------------- */

.reel-tile {
  position: relative; display: block;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--navy-850);
  border: 1px solid var(--border);
  isolation: isolate;
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid), border-color var(--t-mid);
}
.reel-tile img, .reel-tile video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.reel-tile video { opacity: 0; transition: opacity var(--t-mid); z-index: 1; }
.reel-tile:hover { transform: translateY(-5px); border-color: var(--azure); box-shadow: var(--sh-glow); }
.reel-tile:hover img { transform: scale(1.06); }
.reel-tile.is-previewing video { opacity: 1; }
.reel-tile::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(2,16,31,.9), rgba(2,16,31,.15) 55%, transparent);
}
.reel-tile__body {
  position: absolute; z-index: 3; inset: auto 0 0 0;
  padding: var(--s-4); color: #fff;
}
.reel-tile__who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.reel-tile__who img {
  position: static; width: 28px; height: 28px; border-radius: 99px;
  border: 1.5px solid rgba(255,255,255,.6); flex-shrink: 0;
}
.reel-tile__who b { font-size: var(--fs-xs); font-weight: 600; color: #fff; }
.reel-tile__place { font-size: var(--fs-micro); color: rgba(255,255,255,.72); letter-spacing: .06em; text-transform: uppercase; }
.reel-tile__play {
  position: absolute; z-index: 3; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 99px;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.22);
  display: grid; place-items: center; color: #fff;
}
.reel-tile__likes {
  position: absolute; z-index: 3; top: 12px; left: 12px;
  display: flex; align-items: center; gap: 4px;
  font-size: var(--fs-micro); color: #fff; font-weight: 600;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
  padding: 4px 9px; border-radius: 99px;
}

/* The reels feed owns the viewport — the site footer and floating CTA
   would otherwise sit behind it and bleed through at the edges. */
body.is-reels .site-footer,
body.is-reels .wa-float { display: none; }
/* Under 900px the feed goes full-bleed to the top of the viewport, so the
   site nav would sit on top of the reels bar. The reels bar has its own
   brand mark and its own way home. */
@media (max-width: 900px) { body.is-reels .site-nav { display: none; } }
body.is-reels { overflow: hidden; padding-bottom: 0; }
