/* Home page: hero, experience cards, highlights, gallery scroll, full-screen gallery */

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--color-light);
}

/* The mask shrinks into an inset frame while scrolling (clip-path set from JS) */
.hero__mask {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  clip-path: inset(0% 0% 0% 0%);
}

.hero__slider,
.hero__overlay,
.hero__center,
.hero__topbar,
.hero__bottom {
  grid-area: 1 / 1;
}

.hero__slider {
  width: 100%;
  height: 100%;
}

.hero__slide {
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 6s ease;
}

.hero__slide.swiper-slide-active .hero__img {
  transform: scale(1);
}

.hero__overlay {
  z-index: 2;
  background: linear-gradient(rgba(11, 45, 75, 0.2) 0%, rgba(11, 45, 75, 0.4) 50%, rgba(11, 45, 75, 0.6) 100%);
  pointer-events: none;
}

.hero__topbar {
  z-index: 5;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 20px;
  padding: 16px 16px 0;
}

.hero__menu,
.hero__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__actions {
  justify-content: center;
  width: 100%;
  gap: 16px;
}

.hero__menu-link,
.hero__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 44px;
  color: var(--color-white);
  text-decoration: none;
  transition: opacity var(--duration-fast) ease;
}

.hero__menu-link {
  font-size: var(--fs-xsmall);
  letter-spacing: 0.1em;
  opacity: 0.92;
}

@media (hover: hover) {
  .hero__menu-link:hover {
    opacity: 1;
  }

  .hero__action:hover {
    opacity: var(--opacity-hover);
  }
}

.hero__action {
  font-weight: 500;
  letter-spacing: 0.035em;
}

.hero__action-icon {
  width: 17px;
  height: 17px;
}

.hero__divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.45);
}

.hero__center {
  position: relative;
  z-index: 3;
  align-self: center;
  justify-self: center;
  margin-top: -5vh;
  padding: 0 20px;
  text-align: center;
  color: var(--color-white);
}

.hero__logo {
  margin-bottom: 2rem;
  color: var(--color-white);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.hero__logo .logo__mark {
  width: 64px;
  height: 64px;
}

.hero__logo .logo__text {
  font-size: clamp(3rem, 6vw, 4.6rem);
}

.hero__subtitle {
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero__badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xsmall);
  color: var(--color-gold);
}

.hero__bottom {
  z-index: 4;
  align-self: end;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.hero__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-white);
}

/* Slide title: masked wipe out/in on slide change (template 1.05s expo-out) */
.hero__slide-title {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 0.16em 0.12em 0.22em;
  overflow: hidden;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-style: italic;
  color: var(--color-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  clip-path: polygon(0 -100%, 100% -100%, 100% 200%, 0 200%);
  transition: clip-path 1.05s var(--ease-reveal);
}

.hero__slide-title-text {
  display: inline-block;
  line-height: 1.15;
  transition: transform 1.05s var(--ease-reveal), opacity 1.05s var(--ease-reveal);
}

.hero__slide-title.is-exiting,
.hero__slide-title.is-entering {
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

.hero__slide-title.is-exiting .hero__slide-title-text,
.hero__slide-title.is-entering .hero__slide-title-text {
  opacity: 0;
  transform: translateY(28px);
}

.hero__controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hero__btn {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--color-white);
  font-size: var(--fs-xsmall);
  font-weight: 500;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity var(--duration-fast) ease;
}

@media (hover: hover) {
  .hero__btn:hover {
    opacity: 1;
  }
}

.hero__indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__line {
  position: relative;
  width: 80px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.hero__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--color-white);
}

@media (min-width: 1024px) {
  .hero__topbar {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 33px 45px 0;
  }

  .hero__menu {
    gap: 14px;
  }

  .hero__menu-link {
    font-size: var(--fs-base);
    letter-spacing: 0.12em;
  }

  .hero__divider {
    height: 14px;
  }

  .hero__actions {
    width: auto;
    gap: 20px;
  }

  .hero__badge:not(:last-child)::after {
    content: "";
    width: 28px;
    height: 1px;
    margin-left: 0.95rem;
    background: rgba(255, 255, 255, 0.42);
  }

  .hero__bottom {
    padding: 30px 40px;
  }

  .hero__slide-title {
    font-size: 2.4rem;
  }
}

/* Experience cards */
.experience__head {
  margin-bottom: 3rem;
}

.experience__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
}

.experience__item {
  text-align: center;
}

.experience__media {
  height: 480px;
  margin-bottom: 2rem;
}

.experience__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.experience__title {
  font-size: var(--fs-card-title);
}

.experience__text {
  max-width: 300px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .experience__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .experience__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Highlights (USP grid) */
.highlights {
  background: var(--color-sand);
}

.highlights__head {
  width: min(100%, 720px);
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
}

.highlights__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  width: min(100%, 920px);
  margin: 0 auto;
}

.highlights__item {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1rem;
  text-align: center;
}

.highlights__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  color: var(--color-icon);
}

.highlights__icon-svg {
  width: 32px;
  height: 32px;
}

.highlights__text {
  max-width: 200px;
  margin: 0;
  font-weight: 500;
  line-height: 1.65;
}

@media (min-width: 768px) {
  .highlights__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 760px);
  }
}

@media (min-width: 1024px) {
  .highlights__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 3.4rem) clamp(1.25rem, 4vw, 4rem);
    width: min(100%, 920px);
  }
}

/* Rooms (home: 2 cards) */
.rooms__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .rooms__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Gallery scroll: sticky intro + stacked cards */
.gallery-scroll {
  background: linear-gradient(180deg, rgba(11, 45, 75, 0.03), rgba(11, 45, 75, 0)), var(--color-light);
}

.gallery-scroll__shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.gallery-scroll__copy {
  margin-top: 2rem;
  color: var(--color-text-muted);
}

.gallery-scroll__track {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .gallery-scroll__shell {
    grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.12fr);
    gap: clamp(2.4rem, 5vw, 5.5rem);
  }

  .gallery-scroll__intro {
    position: sticky;
    top: 108px;
    padding-right: 1rem;
  }

  .gallery-scroll__copy {
    max-width: 420px;
  }

  .gallery-scroll__track {
    gap: 32px;
  }
}

.gallery-card {
  overflow: hidden;
  background: var(--color-white);
}

/* Cards enter with a slanted clip (template) */
.js-enabled .gallery-card.reveal {
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
  transform: translateY(54px);
}

.js-enabled .gallery-card.reveal.is-visible {
  clip-path: polygon(0 -100%, 100% -100%, 100% 200%, 0 200%);
  transform: none;
}

.gallery-card__media {
  position: relative;
  width: 100%;
  min-height: 300px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #d7dde2;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 15, 24, 0.26), rgba(8, 15, 24, 0.05));
    pointer-events: none;
  }
}

.gallery-card__img {
  --parallax-scale: 1.08;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card__content {
  display: grid;
  gap: 10px;
  padding: 1.4rem 1.25rem 1.5rem;
}

.gallery-card__kicker {
  color: #8a6d45;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.gallery-card__title {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.gallery-card__text {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.85;
}

@media (min-width: 1024px) {
  .gallery-card__media {
    min-height: clamp(340px, 42vw, 520px);
  }

  .gallery-card__content {
    padding: 1.7rem 1.8rem 1.85rem;
  }
}

/* Full-screen gallery driven by scroll progress */
.feature-gallery {
  position: relative;
  display: flex; /* stretches .inner to the section height so the sticky child can stick */
  min-height: 420vh;
  background: var(--color-navy-deep);
}

.feature-gallery__sticky {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100svh;
  overflow: hidden;
}

.feature-gallery__slide {
  position: relative;
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0s linear 0.8s;
  overflow: hidden;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(8, 17, 28, 0.18) 0%, rgba(8, 17, 28, 0.1) 30%, rgba(8, 17, 28, 0.46) 100%),
      linear-gradient(rgba(8, 17, 28, 0.14), rgba(8, 17, 28, 0.16));
  }
}

.feature-gallery__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0s;
}

.feature-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-gallery__overlay {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 16px 5rem;
}

.feature-gallery__count {
  margin: 0 0 30px;
  font-size: var(--fs-xsmall);
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.06em;
}

.feature-gallery__card {
  width: min(100%, 420px);
  padding: 1.6rem 1.3rem 1.8rem;
  background: var(--color-cream);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.16);
  text-align: center;
}

.feature-gallery__kicker {
  font-size: var(--fs-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-gallery__title {
  margin: 18px 0 20px;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 0.98;
}

.feature-gallery__media {
  aspect-ratio: 1.48 / 1;
  overflow: hidden;
  border-radius: 2px;
}

.feature-gallery__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-gallery__text {
  margin: 15px 0 0;
  line-height: 1.72;
  color: rgba(14, 38, 58, 0.8);
}

/* Card content replays a short rise each time the slide changes */
.feature-gallery__card.is-revealing .feature-gallery__kicker,
.feature-gallery__card.is-revealing .feature-gallery__title,
.feature-gallery__card.is-revealing .feature-gallery__text {
  animation: card-mask-reveal 0.72s var(--ease-soft) both;
}

.feature-gallery__card.is-revealing .feature-gallery__title {
  animation-delay: 60ms;
}

.feature-gallery__card.is-revealing .feature-gallery__text {
  animation-delay: 220ms;
}

.feature-gallery__card.is-revealing .feature-gallery__media {
  animation: card-media-reveal 0.82s var(--ease-soft) 120ms both;
}

.feature-gallery__card.is-revealing .feature-gallery__card-img {
  animation: card-image-reveal 1.2s cubic-bezier(0.2, 0.7, 0, 1) 160ms both;
}

@keyframes card-mask-reveal {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: none; }
}

@keyframes card-media-reveal {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: none; }
}

@keyframes card-image-reveal {
  0% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.feature-gallery__skip,
.feature-gallery__nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-xsmall);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.22s;
}

@media (hover: hover) {
  .feature-gallery__skip:hover,
  .feature-gallery__nav:hover {
    color: var(--color-white);
  }
}

.feature-gallery__skip {
  margin-top: 30px;
}

.feature-gallery__skip-icon {
  width: 12px;
  height: 12px;
}

.feature-gallery__progress {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(560px, calc(100vw - 32px));
  transform: translateX(-50%);
}

.feature-gallery__nav {
  letter-spacing: 0.16em;
}

.feature-gallery__track {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.26);
}

.feature-gallery__fill {
  position: absolute;
  inset: 0;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: left center;
}

@media (min-width: 1024px) {
  .feature-gallery {
    min-height: 500vh;
  }

  .feature-gallery__overlay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 392px) minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    width: min(1480px, calc(100vw - 72px));
    margin: 0 auto;
    padding: 0;
  }

  .feature-gallery__count {
    justify-self: start;
    margin: 0;
  }

  .feature-gallery__card {
    width: min(100%, 392px);
    padding: 30px 28px 36px;
  }

  .feature-gallery__title {
    font-size: clamp(2.3rem, 4vw, 3.5rem);
  }

  .feature-gallery__skip {
    justify-self: end;
    margin: 0;
  }

  .feature-gallery__progress {
    bottom: 20px;
  }
}
