/*
 * Homepage sections. Source: design/…/Nightclub 2.0.dc.html.
 * Values come from the theme's tokens.css; no literals for colour/type.
 * All motion is stopped by the theme's prefers-reduced-motion rule.
 */

/* ---- Hero --------------------------------------------------------- */

.rv-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100svh - var(--header-h, 70px));
  overflow: hidden;
  background: var(--bg-hero);
}

.rv-hero__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* The owner's photo (Rêves → Hero photo), under the light and the sparks,
   darkened by the navy veil so the gold logo leads. */
.rv-hero__photo {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rv-hero__photo picture {
  display: block;
  height: 100%;
}

.rv-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: rv-drift 40s ease-in-out infinite alternate;
}

.rv-hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-photo-veil);
}

/* The blue light would tint the photo; the gold one and the sparks stay. */
.rv-hero--photo .rv-hero__orb--blue {
  display: none;
}

.rv-hero__orb {
  position: absolute;
  border-radius: 50%;
}

.rv-hero__orb--gold {
  top: -20vw;
  left: -15vw;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--orb-gold), transparent 65%);
  animation: rv-orb-a 22s ease-in-out infinite;
}

.rv-hero__orb--blue {
  right: -12vw;
  bottom: -10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--orb-blue), transparent 65%);
  animation: rv-orb-b 26s ease-in-out infinite;
}

.rv-hero__sweep {
  position: absolute;
  inset: -20% 0;
  background: linear-gradient(105deg, transparent 40%, var(--sweep), transparent 60%);
  animation: rv-sweep 14s ease-in-out infinite;
}

.rv-hero__spark {
  position: absolute;
  bottom: -20px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--gold-spark);
  box-shadow: 0 0 calc(var(--size) * 4) var(--size) var(--spark-glow);
  opacity: 0;
  animation: rv-float-up var(--dur) linear var(--delay) infinite;
}

.rv-hero__content {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(64px, 10vw, 120px) var(--gutter) 40px;
  text-align: center;
}

.rv-hero__eyebrow {
  margin: 0 0 clamp(24px, 3vw, 36px);
  padding-left: var(--track-eyebrow);
  color: var(--gold);
  font-size: var(--fs-label);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  animation: rv-rise 1.4s 0.2s ease both;
}

.rv-hero__title {
  width: min(84vw, 360px);
  margin: 0;
  animation: rv-rise var(--dur-rise) 0.4s ease both;
}

/* Phones: buttons stack at equal width. */
.rv-hero__ctas {
  display: grid;
  gap: 12px;
  width: min(100%, 300px);
  margin-top: 40px;
  animation: rv-rise var(--dur-rise) 1.2s ease both;
}

@media (min-width: 600px) {

  .rv-hero__title {
    width: clamp(360px, 42vw, 600px);
  }

  .rv-hero__ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: auto;
    margin-top: clamp(40px, 5vw, 56px);
  }
}

.rv-hero__next {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--hairline-strong);
  background: var(--bg-veil);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: rv-rise 1.4s 1.6s ease both;
}

.rv-hero__next p {
  margin: 0;
}

.rv-hero__next-name a {
  color: var(--text);
}

.rv-hero__next-name a:hover {
  color: var(--gold-light);
}

.rv-hero__next-label {
  color: var(--text-faint);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.rv-hero__next-name {
  margin-top: 6px !important;
  font-size: 26px;
  font-weight: var(--fw-light);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  text-transform: uppercase;
}

/* ---- Countdown ---------------------------------------------------- */

.rv-countdown {
  display: flex;
  gap: 26px;
  font-size: 28px;
  font-weight: var(--fw-light);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.rv-countdown small {
  display: block;
  color: var(--text-faint);
  font-size: var(--fs-micro);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ---- Motion ------------------------------------------------------- */

@keyframes rv-rise {

  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rv-orb-a {

  50% {
    transform: translate(12vw, 8vw) scale(1.15);
  }
}

@keyframes rv-orb-b {

  50% {
    transform: translate(-10vw, -6vw) scale(1.2);
  }
}

@keyframes rv-drift {

  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

@keyframes rv-sweep {

  from {
    transform: translateX(-60%);
  }

  to {
    transform: translateX(60%);
  }
}

@keyframes rv-float-up {

  0% {
    opacity: 0;
    transform: translateY(0);
  }

  10% {
    opacity: 0.9;
  }

  90% {
    opacity: 0.5;
  }

  100% {
    opacity: 0;
    transform: translateY(-105vh);
  }
}

/* ---- Calendar: flyer rail ------------------------------------------ */

/* Phones: one card ~80% wide with the next peeking, swipe sideways.
   The rail bleeds to the screen edge; cards still align to the gutter. */
.rv-event-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(80%, 320px);
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 8px;
  overflow-x: auto;
  list-style: none;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.rv-event-rail::-webkit-scrollbar {
  display: none;
}

.rv-event-rail > li {
  scroll-snap-align: start;
}

@media (min-width: 700px) {

  .rv-event-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}

@media (min-width: 1100px) {

  .rv-event-rail {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rv-calendar__empty {
  display: grid;
  gap: 20px;
  justify-items: start;
  padding: 40px 0 8px;
  border-top: 1px solid var(--rule);
}

.rv-calendar__empty p {
  max-width: 520px;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-lead);
  font-weight: var(--fw-light);
  line-height: var(--lh-body);
}

.rv-calendar__foot {
  margin-top: clamp(28px, 4vw, 40px);
}

/* ---- Residents ---------------------------------------------------- */

.rv-residents {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 12px;
}

.rv-resident__portrait {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: radial-gradient(ellipse at 50% 35%, var(--bg-glow), var(--bg-deep) 75%);
}

.rv-resident__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv-resident__name {
  margin-top: 16px;
  font-size: 20px;
}

.rv-resident__genre {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: var(--fs-label);
  letter-spacing: var(--track-nav);
  text-transform: uppercase;
}

/*
 * Guest tile: closes a short last row (fewer residents than columns) with
 * the shimmering logo on the navy frame, a drifting gold glow and a link
 * to the lineup. It stretches to the row's height, so it always lines up
 * with the portraits beside it. --span-N / --mobile-N are the free columns
 * at each width; 0 hides it there.
 */
.rv-resident--guest {
  display: flex;
}

.rv-resident--mobile-0 {
  display: none;
}

.rv-resident__guest {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.rv-resident__portrait--guest {
  position: relative;
  display: grid;
  flex: 1;
  place-content: center;
  justify-items: center;
  gap: 22px;
  aspect-ratio: auto;
  min-height: 0;
  padding: 24px 12px;
  transition: border-color 0.4s ease;
}

.rv-resident__glow {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 38% 40%, var(--orb-gold), transparent 22%),
    radial-gradient(circle at 62% 58%, var(--orb-blue), transparent 40%);
  animation: rv-guest-glow 16s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rv-guest-glow {

  50% {
    transform: translate(22%, 14%) scale(1.15);
  }
}

.rv-resident__portrait--guest .rv-logo-shimmer {
  position: relative;
  width: min(100%, 190px);
}

.rv-resident__cta {
  position: relative;
  color: var(--gold);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-nav);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.rv-resident__guest:hover .rv-resident__portrait--guest,
.rv-resident__guest:focus-visible .rv-resident__portrait--guest {
  border-color: var(--hairline-outline);
}

.rv-resident__guest:hover .rv-resident__cta,
.rv-resident__guest:focus-visible .rv-resident__cta {
  color: var(--gold-light);
}

/*
 * Four across on desktop, like the calendar. Fewer than four residents
 * share the whole width instead (--cols-2/3, set by the view-model).
 */
@media (min-width: 900px) {

  .rv-residents {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .rv-residents--cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .rv-residents--cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .rv-resident--mobile-0 {
    display: flex;
  }

  .rv-resident--span-0 {
    display: none;
  }

  .rv-resident__cta {
    font-size: var(--fs-label);
    letter-spacing: var(--track-button);
  }

  .rv-resident--span-2 {
    grid-column: span 2;
  }

  .rv-resident--span-3 {
    grid-column: span 3;
  }
}

/* ---- Private hire (homepage: offers + gold CTA tile) ------------- */

.rv-hire__tile--cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 160px;
  background: var(--gold);
  color: var(--on-gold);
  transition: background 0.3s ease;
}

.rv-hire__tile--cta:hover {
  background: var(--gold-hover);
  color: var(--on-gold);
}

.rv-hire__cta-title {
  font-size: var(--fs-card-title);
  line-height: 1.2;
  letter-spacing: var(--track-display);
  text-transform: uppercase;
}

.rv-hire__cta-label {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-button);
  text-transform: uppercase;
}

@media (min-width: 600px) {

  .rv-hire {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {

  .rv-hire {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- Instagram ---------------------------------------------------- */

.rv-instagram {
  padding-block: clamp(60px, 9vw, 110px);
  text-align: center;
}

.rv-instagram__icon {
  display: block;
  margin: 0 auto;
  color: var(--gold);
}

.rv-instagram__title {
  margin: 20px 0 8px;
  font-size: clamp(22px, 2.8vw, 39px);
}

.rv-instagram__handle {
  font-size: var(--fs-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.rv-instagram__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

/* Phones show two rows of two; the full eight return at four across. */
.rv-instagram__grid > li:nth-child(n + 5) {
  display: none;
}

.rv-instagram__tile {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: radial-gradient(ellipse at 50% 40%, var(--bg-glow), var(--bg-deep) 75%);
}

.rv-instagram__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.rv-instagram__tile:hover img {
  transform: scale(1.04);
}

@media (min-width: 900px) {

  .rv-instagram__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .rv-instagram__grid > li:nth-child(n + 5) {
    display: block;
  }
}
