/* Novalis hero: a slideshow of spaces where each new room is laid down tile by tile. */
.nv-hero {
  --nv-navy: #263450;
  --nv-gold: #ba8d40;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  background: #fff;
  color: #fff;
}

/* Current room, with a slow push-in while it is on screen. */
.nv-hero__base {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.nv-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(var(--nv-zoom, 1));
  will-change: transform;
}

.nv-hero.is-laid .nv-hero__img {
  opacity: 1;
}

/* Tiles carrying the next room; each flips down into place. */
.nv-hero__tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--nv-cols, 8), 1fr);
  grid-template-rows: repeat(var(--nv-rows, 5), 1fr);
  pointer-events: none;
}

.nv-hero__tile {
  background-repeat: no-repeat;
  transform: perspective(900px) rotateX(-90deg);
  transform-origin: 50% 0;
  opacity: 0;
  transition:
    transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.5s ease;
  transition-delay: calc(var(--nv-tile-delay, 0) * 1s);
}

.nv-hero__tiles.is-laying .nv-hero__tile {
  transform: none;
  opacity: 1;
}

.nv-hero__shade {
  position: absolute;
  inset: 0;
  /* Neutral shading behind the copy (lower left) so white text stays readable, even on bright slides.
     It is there from the first paint, so the first room tiles in and the copy animates over it. */
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0) 75%),
    linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}

/* Copy */
.nv-hero__content {
  position: absolute;
  left: var(--nv-pad);
  right: var(--nv-pad);
  bottom: clamp(2.5rem, 9vh, 6rem);
  max-width: 64rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.nv-hero__eyebrow {
  margin: 0 0 1.25rem;
  overflow: hidden;
  font-family: Sohne, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
}

.nv-hero__title {
  margin: 0 0 2.25rem;
  font-family: Luxia, Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.25rem, min(4.2vw, 7.5vh), 4.75rem);
  line-height: 1.04;
  text-transform: uppercase;
  color: #fff;
}

.nv-hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

/* Lines only break between phrases, never inside "To wall." */
.nv-hero__phrase {
  display: inline-block;
  white-space: nowrap;
}

.nv-hero__title em {
  font-style: normal;
  color: var(--nv-gold);
}

.nv-hero__eyebrow > span,
.nv-hero__line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nv-hero__text,
.nv-hero__cta {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nv-hero.is-laid .nv-hero__eyebrow > span,
.nv-hero.is-laid .nv-hero__line > span,
.nv-hero.is-laid .nv-hero__text,
.nv-hero.is-laid .nv-hero__cta {
  opacity: 1;
  transform: none;
}

.nv-hero.is-laid .nv-hero__line:nth-child(1) > span { transition-delay: 0.1s; }
.nv-hero.is-laid .nv-hero__line:nth-child(2) > span { transition-delay: 0.2s; }
.nv-hero.is-laid .nv-hero__text { transition-delay: 0.4s; }

.nv-hero__text {
  max-width: 32rem;
  margin: 1.5rem 0 2rem;
  font-family: Sohne, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.nv-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  color: #fff;
  font-family: Sohne, Arial, sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.nv-hero.is-laid .nv-hero__cta {
  transition: opacity 0.8s ease 0.5s, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s, color 0.3s ease;
}

.nv-hero__cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--nv-gold);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease;
}

.nv-hero__cta-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Letter roll on hover, matching the footer links: each letter slides up in turn. */
.nv-hero__cta-label {
  display: inline-flex;
}

.nv-roll {
  display: block;
  height: 1.2em;
  line-height: 1.2;
  overflow: hidden;
}

.nv-roll__in {
  display: block;
}

.nv-roll__in > span {
  display: block;
  height: 1.2em;
}

.nv-hero__cta:hover .nv-roll__in,
.nv-hero__cta:focus-visible .nv-roll__in {
  animation: nv-letter-roll 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.02s);
}

@keyframes nv-letter-roll {
  to { transform: translateY(-50%); }
}

.nv-hero__cta:hover .nv-hero__cta-icon,
.nv-hero__cta:focus-visible .nv-hero__cta-icon {
  transform: rotate(-45deg) scale(1.08);
}

.nv-hero__cta:focus-visible {
  outline: none;
}

.nv-hero__cta:focus-visible .nv-hero__cta-icon {
  box-shadow: 0 0 0 2px #fff;
}

/* Room controls (built by novalis-hero.js): a slim line per room on the right edge, the room's
   name beside it. The current line is gold and fills while that room is on screen; names show for
   the current room and on hover or keyboard focus. */
.nv-hero__nav {
  position: absolute;
  top: 50%;
  right: var(--nv-pad);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
}

.nv-hero.is-laid .nv-hero__nav {
  opacity: 1;
}

/* A soft shade behind the controls, like the one behind the headline, so the white lines and
   names stay readable over bright rooms. */
.nv-hero__nav::before {
  content: "";
  position: absolute;
  top: -7rem;
  bottom: -7rem;
  left: -7rem;
  right: calc(-1 * var(--nv-pad));
  z-index: -1;
  background: radial-gradient(ellipse 100% 50% at 100% 50%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.nv-hero__room {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
  min-height: 2rem;
  padding: 0 0 0 1rem;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.nv-hero__room-name {
  font-family: Sohne, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateX(0.5rem);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nv-hero__room-line {
  position: relative;
  display: block;
  width: 1rem;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease;
}

.nv-hero__room-fill {
  position: absolute;
  inset: 0;
  background: var(--nv-gold);
  transform: scaleX(0);
  transform-origin: left;
}

.nv-hero__room:hover .nv-hero__room-line,
.nv-hero__room:focus-visible .nv-hero__room-line {
  width: 1.75rem;
  background: rgba(255, 255, 255, 0.85);
}

.nv-hero__room.is-current .nv-hero__room-line {
  width: 3rem;
  background: rgba(255, 255, 255, 0.45);
}

.nv-hero__room.is-current .nv-hero__room-name,
.nv-hero__room:hover .nv-hero__room-name,
.nv-hero__room:focus-visible .nv-hero__room-name {
  opacity: 1;
  transform: none;
}

.nv-hero__room:focus-visible {
  outline: 2px solid var(--nv-gold);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .nv-hero__phrase {
    display: block;
  }
  /* Phones: the controls sit higher, clear of the headline; only the current room is named. */
  .nv-hero__nav {
    top: 38%;
  }
  .nv-hero__room:not(.is-current) .nv-hero__room-name {
    opacity: 0;
  }
  .nv-hero__shade {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0) 85%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nv-hero__tile,
  .nv-hero__eyebrow > span,
  .nv-hero__line > span,
  .nv-hero__text,
  .nv-hero__cta,
  .nv-hero__nav,
  .nv-hero__room-name,
  .nv-hero__room-line {
    transition: none !important;
  }
  /* No autoplay: the current line is simply solid gold. */
  .nv-hero__room.is-current .nv-hero__room-fill {
    transform: none !important;
  }
  .nv-hero__cta:hover .nv-roll__in,
  .nv-hero__cta:focus-visible .nv-roll__in {
    animation: none;
  }
}
