/* =====================================================================
   Video Gallery — page styles (after css/base.css).
   Sections: banner entrance · the brand film (ScrollMagic opens the
   poster from a framed window) · walkthroughs (ScrollMagic: a pinned
   horizontal track) · amenities (tabs + grid) · voices.
   Motion is driven by js/video-gallery.js; every rule here is a resting
   state that reads fine without JS / with reduced motion.
   ===================================================================== */

/* ---------- banner: the title rises from a mask, the photo settles ---------- */
.hero__ln {
  display: block;
  overflow: hidden;
  /* room for descenders and the italic overhang */
  padding: 0 0.12em 0.1em 0;
  margin-bottom: -0.1em;
}

.hero__ln > span {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__img {
    animation: vgSettle 2.6s var(--ease) both;
  }

  .hero .crumbs {
    animation: vgRise 0.9s var(--ease) 0.15s both;
  }

  .hero__ln > span {
    animation: vgLine 1.2s var(--ease) 0.3s both;
  }

  .hero__sub {
    animation: vgRise 1s var(--ease) 0.7s both;
  }
}

@keyframes vgSettle {
  from {
    scale: 1.12;
  }
  to {
    scale: 1;
  }
}

@keyframes vgRise {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes vgLine {
  from {
    transform: translate3d(0, 110%, 0);
  }
  to {
    transform: none;
  }
}

/* ---------- shared: a video card ---------- */
.vcard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.vcard.is-hidden {
  display: none;
}

.vcard__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #2A1E16;
  box-shadow: 0 22px 40px -30px rgba(90, 45, 20, 0.55);
}

/* 4:3 YouTube stills carry letterbox bars; cover-cropping to 16:9 hides them */
.vcard__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease), filter 0.5s ease;
}

.vcard__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 14, 9, 0) 45%, rgba(20, 14, 9, 0.45) 100%);
}

.vcard:hover .vcard__thumb img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* the play button: a frosted ring around an orange disc */
.vplay {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.22), 0 14px 30px -10px rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  transition: transform 0.45s var(--ease), box-shadow 0.45s ease;
}

.vplay svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
  fill: currentColor;
}

.vcard:hover .vplay,
.vcard:focus-visible .vplay {
  transform: scale(1.12);
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.18), 0 14px 30px -10px rgba(0, 0, 0, 0.5);
}

.vcard__chip {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.vcard__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
}

.vcard__meta b {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.vcard__title {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.3;
  color: var(--ink);
  transition: color 0.3s ease;
}

.vcard:hover .vcard__title {
  color: var(--accent);
}

.vcard:focus-visible {
  outline: none;
}

.vcard:focus-visible .vcard__thumb {
  box-shadow: 0 0 0 2px var(--accent);
}

/* ---------- the brand film ---------- */
.vfilm {
  background: #FFFFFF;
}

.vfilm__head {
  margin-bottom: clamp(28px, 4vw, 44px);
  text-align: center;
}

.vfilm__head .eyebrow {
  justify-content: center;
}

/* the poster opens from a framed window (--inset) and settles (--zoom) */
.vfilm__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #2A1E16;
  clip-path: inset(var(--inset, 0%) round 28px);
  cursor: pointer;
}

.vfilm__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  scale: var(--zoom, 1);
}

.vfilm__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(20, 14, 9, 0) 30%, rgba(20, 14, 9, 0.35) 100%),
    linear-gradient(180deg, rgba(20, 14, 9, 0) 55%, rgba(20, 14, 9, 0.7) 100%);
}

.vfilm__play {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: clamp(72px, 8vw, 104px);
  height: clamp(72px, 8vw, 104px);
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.2), 0 20px 40px -12px rgba(0, 0, 0, 0.55);
  transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
}

/* a slow pulse ring, so the film invites a click */
.vfilm__play::before {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: vgPulse 2.6s ease-out infinite;
}

@keyframes vgPulse {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

.vfilm__play svg {
  width: 36%;
  height: 36%;
  margin-left: 6%;
  fill: currentColor;
}

.vfilm__frame:hover .vfilm__play {
  transform: translate(-50%, -50%) scale(1.08);
}

.vfilm__cap {
  position: absolute;
  z-index: 1;
  left: clamp(20px, 3vw, 40px);
  bottom: clamp(18px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  color: #FFFFFF;
}

.vfilm__cap b {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #F7A24B;
}

.vfilm__cap span {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 32px);
}

.vfilm__frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

/* ---------- walkthroughs: the horizontal track ---------- */
.vwalk {
  background:
    radial-gradient(ellipse 60% 80% at 92% 0%, rgba(214, 181, 128, 0.26), transparent 70%),
    linear-gradient(180deg, #F4ECDF 0%, #FBF8F2 100%);
}

.vwalk__head {
  align-items: flex-end;
}

.vwalk__meter {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.vwalk__count {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-muted);
}

.vwalk__count b {
  font-weight: 400;
  font-size: 30px;
  color: var(--accent);
}

.vwalk__bar {
  display: block;
  width: 160px;
  height: 2px;
  background: var(--line);
}

.vwalk__bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--p, 0.17));
  transform-origin: left;
}

/* phones / no ScrollMagic: the track swipes, card by card */
.vwalk__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.vwalk__viewport::-webkit-scrollbar {
  display: none;
}

.vwalk__track {
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 4px var(--edge) 12px;
  will-change: transform;
}

.vcard--walk {
  flex: none;
  width: min(260px, 40vw);
  scroll-snap-align: center;
}

.vcard--walk .vcard__thumb {
  border-radius: 22px;
}

.vcard--walk .vcard__title {
  font-size: clamp(20px, 1.8vw, 24px);
}

/* scroll mode (wide screens, set by JS): the section is tall, its head and
   track stay put and the scroll slides the track */
.vwalk.is-scrub {
  padding: 0;
}

.vwalk.is-scrub .vwalk__sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  padding: calc(var(--nav-h) * 0.6) 0 32px;
  overflow: hidden;
}

.vwalk.is-scrub .vwalk__viewport {
  overflow: visible;
  scroll-snap-type: none;
}

.vwalk.is-scrub .vwalk__track {
  transform: translate3d(calc(var(--x, 0) * -1px), 0, 0);
}

/* ---------- amenities ---------- */
.vtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 30px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.vtabs::-webkit-scrollbar {
  display: none;
}

.vtab {
  position: relative;
  flex: none;
  padding: 16px 14px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.vtab:first-child {
  padding-left: 0;
}

.vtab sup {
  margin-left: 5px;
  font-size: 10px;
  letter-spacing: 0.04em;
  vertical-align: 0.5em;
  color: var(--accent);
  opacity: 0.75;
}

.vtab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.45s var(--ease);
}

.vtab:first-child::after {
  left: 0;
}

.vtab:hover,
.vtab.is-active {
  color: var(--ink);
}

.vtab.is-active::after {
  transform: scaleX(1);
}

.vgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 22px;
}

.vgrid .vcard.is-fresh {
  animation: vgCard 0.6s var(--ease) both;
  animation-delay: var(--td, 0ms);
}

@keyframes vgCard {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- voices ---------- */
.vvoice {
  background: #FFFFFF;
}

.vvoice__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 22px;
}

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .vgrid,
  .vvoice__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .vwalk__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .vwalk__meter {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .vgrid,
  .vvoice__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .vplay {
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
  }

  .vfilm__frame {
    border-radius: 18px;
    clip-path: inset(var(--inset, 0%) round 18px);
  }

  /* small frame: a smaller button, and the caption keeps clear of it */
  .vfilm__play {
    width: 60px;
    height: 60px;
  }

  .vfilm__cap {
    left: 16px;
    bottom: 12px;
  }

  .vfilm__cap b {
    display: none;
  }

  .vfilm__cap span {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vfilm__play::before {
    display: none;
  }

  .vgrid .vcard.is-fresh {
    animation: none;
  }

  .vcard__thumb img,
  .vplay {
    transition: none;
  }
}

/* walkthroughs, pinned (wide screens): the cards grow with the screen height so the
   pinned panel isn't half empty - about half the empty space above / below is taken up
   (16:9 thumb = screen height minus the heading, card text and the remaining gap) */
.vwalk.is-scrub .vcard--walk {
  width: clamp(260px, calc((100vh - 424px) * 8 / 9), min(480px, 40vw));
  width: clamp(260px, calc((100svh - 424px) * 8 / 9), min(480px, 40vw));
}

/* walkthroughs on phones: one wide card per screen (the next one peeks in, swipe for more),
   so the thumbnail is big enough for its play button and language chip */
@media (max-width: 760px) {
  .vcard--walk {
    width: 82vw;
  }

  .vwalk__track {
    gap: 16px;
  }

  .vcard--walk .vcard__title {
    font-size: 20px;
  }

  .vcard--walk .vcard__chip {
    top: 12px;
    left: 12px;
  }
}
