/* =======================================================================
   JRB Holiday - Cinematic Hero (Batch B, v3 recomposition)
   Premium international DMC presentation layer.
   Composition:
     FULL-SCREEN IMAGE  +  EDITORIAL DESTINATION TITLE
     +  LAYERED 3D DESTINATION RAIL (coverflow navigation system)
   - BEM namespace: .jrb-hero__* (never bare .btn / .card)
   - Data: server-rendered from hero_banners (index.php); jrb-hero.js
     only toggles state (progressive enhancement, works without JS)
   - Depth: pure CSS 3D transforms (perspective/rotateY/translateZ),
     GPU-friendly opacity+transform only, no WebGL dependency
   - Motion: autoplay disabled under prefers-reduced-motion
   - Palette: deep charcoal #0d0d14, restrained gold #CFA50F,
     editorial serif display (Fraunces, loaded in index.php)
   ======================================================================= */

/* ---- Shell: full-viewport cinematic stage ---- */
.jrb-hero {
  --jrb-hero-gold: #CFA50F;
  --jrb-hero-ink: #0d0d14;
  --jrb-hero-panel-w: clamp(170px, 15vw, 240px);
  position: relative;
  width: 100%;
  min-height: calc(100vh - 70px);
  min-height: calc(100svh - 70px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: var(--jrb-hero-ink);
  color: #e0e0e5;
  isolation: isolate;
}

/* ---- Slide stack: crossfade + slow cinematic zoom ---- */
.jrb-hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jrb-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1100ms ease, transform 9500ms linear;
  pointer-events: none;
}

.jrb-hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 1;
}

.jrb-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

/* ---- Cinematic overlay: vignette + directional gradients.
   Centre of the image stays clear so the destination remains
   recognisable; darkness is reserved for nav, copy and rail. ---- */
.jrb-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(125% 95% at 50% 42%,
      rgba(6, 6, 14, 0) 52%,
      rgba(6, 6, 14, 0.46) 100%),
    linear-gradient(180deg,
      rgba(6, 6, 14, 0.52) 0%,
      rgba(6, 6, 14, 0.14) 16%,
      rgba(6, 6, 14, 0) 34%,
      rgba(6, 6, 14, 0.10) 52%,
      rgba(6, 6, 14, 0.62) 74%,
      rgba(6, 6, 14, 0.90) 92%,
      rgba(6, 6, 14, 0.95) 100%),
    linear-gradient(90deg,
      rgba(6, 6, 14, 0.58) 0%,
      rgba(6, 6, 14, 0.16) 38%,
      rgba(6, 6, 14, 0) 70%);
}

/* ---- Editorial content column ----
   Container geometry matches .jrb-inner / .jrb-trend__inner exactly
   (max-width 1320px + clamp(1.25rem,4vw,2rem) side padding) so the hero
   text's left edge is flush with the Trending destinations heading at
   every viewport width. (Approved change 2026-10-10) ---- */
.jrb-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 2.5vh, 2.25rem);
}

/* Eyebrow: brand + hairline + DMC positioning */
.jrb-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 clamp(1rem, 2.2vh, 1.4rem);
}

.jrb-hero__eyebrow-brand {
  letter-spacing: 0.4em;
  color: var(--jrb-hero-gold);
}

.jrb-hero__eyebrow-rule {
  width: 36px;
  height: 1px;
  background: rgba(207, 165, 15, 0.7);
  flex: 0 0 auto;
}

.jrb-hero__eyebrow-tag {
  letter-spacing: 0.3em;
  color: rgba(224, 224, 229, 0.55);
  font-weight: 500;
}

/* Destination title: controlled editorial scale, light weight */
.jrb-hero__title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  font-size: clamp(2.55rem, 0.9rem + 3.7vw, 4.1rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.03;
  color: #ffffff;
  margin: 0;
  max-width: 15ch;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

/* Gold editorial rule under the title */
.jrb-hero__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  margin-top: 1.15rem;
  background: rgba(207, 165, 15, 0.75);
}

.jrb-hero__subtitle {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-optical-sizing: auto;
  font-weight: 340;
  font-size: clamp(1.05rem, 0.8rem + 0.9vw, 1.4rem);
  line-height: 1.35;
  color: rgba(224, 224, 229, 0.88);
  margin: clamp(0.85rem, 1.8vh, 1.25rem) 0 0;
  max-width: 40ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.jrb-hero__desc {
  font-size: 0.93rem;
  line-height: 1.7;
  color: rgba(224, 224, 229, 0.7);
  margin: clamp(0.8rem, 1.6vh, 1.1rem) 0 0;
  max-width: 37ch;
}

.jrb-hero__desc[hidden],
.jrb-hero__subtitle[hidden] {
  display: none;
}

/* ---- Restrained luxury actions ---- */
.jrb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin: clamp(1.5rem, 3.2vh, 2.1rem) 0 0;
}

.jrb-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jrb-hero-gold);
  background: transparent;
  border: 1px solid rgba(207, 165, 15, 0.5);
  border-radius: 2px;
  padding: 0.8rem 1.55rem;
  text-decoration: none;
  transition: background-color 240ms ease, border-color 240ms ease, color 240ms ease;
}

.jrb-hero__cta:hover {
  background: rgba(207, 165, 15, 0.1);
  border-color: var(--jrb-hero-gold);
  color: #DCB01A;
}

.jrb-hero__cta:focus-visible {
  outline: 2px solid var(--jrb-hero-gold);
  outline-offset: 3px;
}

.jrb-hero__cta .jrb-hero__arrow-icon {
  width: 14px;
  height: 14px;
  transition: transform 320ms ease;
}

.jrb-hero__cta:hover .jrb-hero__arrow-icon {
  transform: translateX(4px);
}

.jrb-hero__secondary {
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(224, 224, 229, 0.82);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(224, 224, 229, 0.3);
  transition: color 240ms ease, border-color 240ms ease;
}

.jrb-hero__secondary::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--jrb-hero-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 380ms ease;
}

.jrb-hero__secondary:hover {
  color: var(--jrb-hero-gold);
  border-color: transparent;
}

.jrb-hero__secondary:hover::after {
  transform: scaleX(1);
}

.jrb-hero__secondary:focus-visible {
  outline: 2px solid var(--jrb-hero-gold);
  outline-offset: 3px;
}

/* =========================================================
   DESTINATION RAIL - the layered navigation system
   Row: label — gold progress track — counter — arrows
   then a perspective coverflow of destination panels.
   ========================================================= */
.jrb-hero__deckwrap {
  position: relative;
  margin-top: clamp(1.9rem, 4.2vh, 3.1rem);
}

.jrb-hero__deckhead {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-bottom: clamp(0.85rem, 1.7vh, 1.2rem);
}

.jrb-hero__decklabel {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(224, 224, 229, 0.5);
  white-space: nowrap;
}

.jrb-hero__deckline {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}

.jrb-hero__deckprogress {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--jrb-hero-progress, 1) * 100%);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(207, 165, 15, 0.4), var(--jrb-hero-gold));
  transition: width 560ms cubic-bezier(0.22, 0.85, 0.28, 1);
}

.jrb-hero__counter {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(224, 224, 229, 0.55);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.jrb-hero__controls {
  display: flex;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.jrb-hero__arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: rgba(224, 224, 229, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 220ms ease, color 220ms ease, background-color 220ms ease;
}

.jrb-hero__arrow:hover {
  border-color: var(--jrb-hero-gold);
  color: var(--jrb-hero-gold);
  background: rgba(207, 165, 15, 0.08);
}

.jrb-hero__arrow:focus-visible {
  outline: 2px solid var(--jrb-hero-gold);
  outline-offset: 2px;
}

.jrb-hero__arrow-icon {
  width: 14px;
  height: 14px;
  display: block;
}

/* ---- Coverflow deck: panels recede into 3D depth ---- */
.jrb-hero__deck {
  position: relative;
  height: calc(var(--jrb-hero-panel-w) * 4 / 3);
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  perspective: 1300px;
  perspective-origin: 50% 45%;
}

.jrb-hero__deck > li {
  display: contents;
}

.jrb-hero__card {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: var(--jrb-hero-panel-w);
  margin-left: calc(var(--jrb-hero-panel-w) / -2);
  aspect-ratio: 3 / 4;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  background: rgba(13, 13, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  backface-visibility: hidden;
  opacity: 1;
  transform: translateX(0) translateZ(0) rotateY(0deg) scale(1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 620ms cubic-bezier(0.22, 0.85, 0.28, 1),
    opacity 500ms ease,
    border-color 300ms ease,
    box-shadow 420ms ease;
}

.jrb-hero__card-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.jrb-hero__card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 950ms ease, filter 500ms ease;
}

.jrb-hero__card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(13, 13, 20, 0.22) 0%,
    rgba(13, 13, 20, 0) 34%,
    rgba(13, 13, 20, 0.55) 74%,
    rgba(13, 13, 20, 0.9) 100%);
}

.jrb-hero__card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 0.9rem 0.9rem;
}

.jrb-hero__card-num {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--jrb-hero-gold);
  margin-bottom: 0.3rem;
}

.jrb-hero__card-name {
  display: block;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.15;
  color: #ffffff;
}

.jrb-hero__card-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(224, 224, 229, 0.55);
  margin-top: 0.3rem;
}

/* -- Fan positions: active dominant, neighbours rotate into depth -- */
.jrb-hero__card[data-pos="0"] {
  transform: translateX(0) translateZ(0) rotateY(0deg) scale(1.05);
  opacity: 1;
  z-index: 5;
  border-color: rgba(207, 165, 15, 0.55);
  box-shadow: 0 26px 66px rgba(0, 0, 0, 0.55);
}

.jrb-hero__card[data-pos="0"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 3;
  background: linear-gradient(90deg,
    rgba(207, 165, 15, 0) 0%,
    var(--jrb-hero-gold) 26%,
    var(--jrb-hero-gold) 74%,
    rgba(207, 165, 15, 0) 100%);
}

.jrb-hero__card[data-pos="0"]:hover .jrb-hero__card-media img {
  transform: scale(1.05);
}

/* Left neighbour: inner (right) edge tucks behind the active panel */
.jrb-hero__card[data-pos="-1"] {
  transform: translateX(-62%) translateZ(-95px) rotateY(26deg) scale(0.94);
  opacity: 0.72;
  z-index: 4;
}

.jrb-hero__card[data-pos="-2"] {
  transform: translateX(-104%) translateZ(-250px) rotateY(42deg) scale(0.86);
  opacity: 0.38;
  z-index: 3;
}

/* Right neighbour: mirrored */
.jrb-hero__card[data-pos="1"] {
  transform: translateX(62%) translateZ(-95px) rotateY(-26deg) scale(0.94);
  opacity: 0.72;
  z-index: 4;
}

.jrb-hero__card[data-pos="2"] {
  transform: translateX(104%) translateZ(-250px) rotateY(-42deg) scale(0.86);
  opacity: 0.38;
  z-index: 3;
}

.jrb-hero__card[data-pos="far"] {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Neighbours dimmed so the destination photography of the active
   panel and the hero image itself stay the visual focus */
.jrb-hero__card[data-pos="-1"] .jrb-hero__card-media img,
.jrb-hero__card[data-pos="1"] .jrb-hero__card-media img {
  filter: brightness(0.66) saturate(0.88);
}

.jrb-hero__card[data-pos="-2"] .jrb-hero__card-media img,
.jrb-hero__card[data-pos="2"] .jrb-hero__card-media img {
  filter: brightness(0.5) saturate(0.8);
}

.jrb-hero__card[data-pos="-1"]:hover,
.jrb-hero__card[data-pos="1"]:hover,
.jrb-hero__card[data-pos="-2"]:hover,
.jrb-hero__card[data-pos="2"]:hover {
  border-color: rgba(207, 165, 15, 0.6);
}

.jrb-hero__card[data-pos="-1"]:hover .jrb-hero__card-media img,
.jrb-hero__card[data-pos="1"]:hover .jrb-hero__card-media img {
  filter: brightness(0.85) saturate(0.95);
}

.jrb-hero__card:focus-visible {
  outline: 2px solid var(--jrb-hero-gold);
  outline-offset: 2px;
}

/* ---- Visually hidden live region ---- */
.jrb-hero__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Tablet ---- */
@media (max-width: 1023px) {
  .jrb-hero {
    --jrb-hero-panel-w: clamp(140px, 16vw, 168px);
  }
  .jrb-hero__deck {
    max-width: 640px;
  }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
  .jrb-hero {
    --jrb-hero-panel-w: clamp(104px, 29vw, 138px);
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
  }
  .jrb-hero__content {
    /* horizontal padding matches .jrb-inner so the left edge stays
       aligned with section headings on mobile (approved 2026-10-10) */
    padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(1rem, 2vh, 1.25rem);
  }
  .jrb-hero__eyebrow {
    gap: 0.7rem;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.9rem;
  }
  .jrb-hero__eyebrow-rule {
    width: 22px;
  }
  .jrb-hero__eyebrow-brand {
    letter-spacing: 0.3em;
  }
  .jrb-hero__eyebrow-tag {
    letter-spacing: 0.22em;
  }
  .jrb-hero__title {
    font-size: clamp(2.3rem, 6.5vw + 1rem, 3.2rem);
    max-width: 12ch;
  }
  .jrb-hero__title::after {
    width: 44px;
    margin-top: 0.9rem;
  }
  .jrb-hero__desc {
    max-width: 32ch;
    font-size: 0.88rem;
    line-height: 1.6;
  }
  .jrb-hero__actions {
    gap: 1.2rem;
  }
  .jrb-hero__cta {
    padding: 0.72rem 1.3rem;
    font-size: 0.72rem;
  }
  .jrb-hero__deckwrap {
    margin-top: clamp(1.4rem, 3vh, 2rem);
  }
  .jrb-hero__deckhead {
    gap: 0.7rem;
    margin-bottom: 0.85rem;
  }
  .jrb-hero__decklabel {
    letter-spacing: 0.26em;
    font-size: 0.6rem;
  }
  .jrb-hero__counter {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
  }
  .jrb-hero__arrow {
    width: 30px;
    height: 30px;
  }
  .jrb-hero__deck {
    max-width: 100%;
    perspective: 900px;
  }
  .jrb-hero__card[data-pos="-1"] {
    transform: translateX(-58%) translateZ(-60px) rotateY(22deg) scale(0.95);
    opacity: 0.68;
  }
  .jrb-hero__card[data-pos="1"] {
    transform: translateX(58%) translateZ(-60px) rotateY(-22deg) scale(0.95);
    opacity: 0.68;
  }
  .jrb-hero__card[data-pos="-2"] {
    transform: translateX(-96%) translateZ(-170px) rotateY(38deg) scale(0.86);
    opacity: 0.32;
  }
  .jrb-hero__card[data-pos="2"] {
    transform: translateX(96%) translateZ(-170px) rotateY(-38deg) scale(0.86);
    opacity: 0.32;
  }
  .jrb-hero__card-name {
    font-size: 0.92rem;
  }
  .jrb-hero__card-sub {
    font-size: 0.55rem;
  }
  .jrb-hero__card-body {
    padding: 0.6rem 0.7rem 0.7rem;
  }
}

/* ---- Short desktop viewports: keep the full composition in frame ---- */
@media (max-height: 740px) and (min-width: 768px) {
  .jrb-hero {
    --jrb-hero-panel-w: clamp(130px, 11vw, 168px);
  }
  .jrb-hero__title {
    font-size: clamp(2.4rem, 1rem + 3vw, 3.4rem);
  }
  .jrb-hero__title::after {
    margin-top: 0.85rem;
  }
  .jrb-hero__desc {
    line-height: 1.6;
  }
  .jrb-hero__actions {
    margin-top: 1.4rem;
  }
  .jrb-hero__deckwrap {
    margin-top: 1.5rem;
  }
}

/* ---- Reduced motion: no autoplay (JS), no transitions, no zoom ---- */
@media (prefers-reduced-motion: reduce) {
  .jrb-hero__slide,
  .jrb-hero__card,
  .jrb-hero__card-media img,
  .jrb-hero__deckprogress,
  .jrb-hero__cta,
  .jrb-hero__cta .jrb-hero__arrow-icon,
  .jrb-hero__secondary,
  .jrb-hero__secondary::after,
  .jrb-hero__arrow {
    transition: none;
  }
  .jrb-hero__slide {
    transform: none;
  }
}

/* =======================================================================
   2026-10-10 approved change: hero text/deck composition
   - >=992px: copy column (left) + destination rail column (right)
   - text block sits mid-hero via a larger bottom offset; rail group
     hangs slightly lower than the copy's baseline
   - rail panel width fitted so the coverflow fan never reaches the copy
   ======================================================================= */
@media (min-width: 992px) {
  .jrb-hero__content {
    display: flex;
    align-items: flex-end;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-bottom: clamp(4rem, 13vh, 7rem);
    --jrb-hero-panel-w: clamp(132px, 13vw, 186px);
  }

  .jrb-hero__content .jrb-hero__copy {
    flex: 1 1 auto;
    min-width: 0;
  }

  .jrb-hero__content .jrb-hero__deckwrap {
    flex: 0 0 clamp(340px, 44%, 620px);
    margin-top: 0;
    margin-bottom: -2.5rem;
  }
}
