/* 501 Cinema — the screening room, the film rail and the consultation block. */

.room {
  position: relative;
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  min-height: 100svh;
  padding: calc(var(--nav-h) + 20px) var(--gutter) 24px;
  isolation: isolate;
  overflow: hidden;
}

/* Light from the film spills into the room: a tiny live copy of the picture, blurred up. */
.room__glow {
  position: absolute;
  inset: -10%;
  z-index: -1;
  width: 120%;
  height: 120%;
  filter: blur(90px) saturate(1.5);
  opacity: 0.5;
  pointer-events: none;
}

.room__intro {
  display: grid;
  align-content: center;
  gap: 20px;
}

.room__title {
  font-size: clamp(30px, 4.3vw, 66px);
}

.room__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.room__stage {
  display: grid;
  align-content: center;
  gap: 16px;
  min-width: 0;
}

@media (min-width: 1100px) {
  .room {
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.7fr);
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: clamp(32px, 4vw, 72px);
  }
  .reel-rail {
    grid-column: 1 / -1;
  }
}

/* ---------- The screen ---------- */

.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - var(--nav-h) - 250px);
  min-height: 200px;
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  background: #000;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95);
}

@media (min-width: 1100px) {
  .screen {
    /* Keep 16:9 even when the height limit is what binds. */
    width: min(100%, calc((100svh - var(--nav-h) - 250px) * 16 / 9));
  }
}

.screen__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.screen__video[data-role='current'] {
  z-index: 1;
}

.screen__video[data-role='incoming'] {
  z-index: 2;
}

.screen__video[data-role='idle'] {
  visibility: hidden;
}

.screen__toggle {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.screen__toggle:focus-visible {
  outline-offset: -4px;
}

/* Letterbox bars pinch in for a beat while one film hands over to the next. */
.screen__bars::before,
.screen__bars::after {
  content: '';
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  height: 11%;
  background: #000;
  transform: scaleY(0);
  transition: transform 520ms var(--ease-out);
  pointer-events: none;
}

.screen__bars::before {
  top: 0;
  transform-origin: top;
}

.screen__bars::after {
  bottom: 0;
  transform-origin: bottom;
}

.screen.is-cutting .screen__bars::before,
.screen.is-cutting .screen__bars::after {
  transform: scaleY(1);
}

/* ---------- Now playing ---------- */

.deck {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.deck__now {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.deck__count {
  font-family: var(--serif);
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.deck__of {
  font-size: 0.42em;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.deck__titles {
  display: grid;
  gap: 2px;
  overflow: hidden;
}

.deck__title {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: clamp(18px, 1.9vw, 26px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.deck__kind {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.deck__titles.is-leaving > * {
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.deck__titles.is-arriving > * {
  animation: title-in 620ms var(--ease-out) both;
}

.deck__titles.is-arriving > *:nth-child(2) {
  animation-delay: 70ms;
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.deck__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck__sound {
  min-height: 48px;
  padding: 0 20px;
}

.deck__sound[aria-pressed='true'] {
  border-color: var(--gold);
  color: var(--gold-hi);
}

[data-play] .ico-play,
[data-play][aria-pressed='true'] .ico-pause {
  display: none;
}

[data-play][aria-pressed='true'] .ico-play {
  display: block;
}

/* ---------- Film rail ---------- */

.reel-rail {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 4px 0 8px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.reel-rail::-webkit-scrollbar {
  display: none;
}

.reel-rail li {
  flex: 0 0 42vw;
  min-width: 0;
  scroll-snap-align: start;
  transition: flex-grow 700ms var(--ease-out);
}

.rail__item {
  position: relative;
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.rail__thumb {
  position: relative;
  display: block;
  overflow: hidden;
  height: clamp(64px, 9vh, 104px);
  border: 1px solid var(--line-soft);
  background: #000;
  transition: border-color var(--t-fast) ease;
}

.rail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.6);
  transition: filter 500ms ease, transform 900ms var(--ease-out);
}

/* The line along the bottom of the playing film fills as it plays. */
.rail__thumb::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  opacity: 0;
}

.rail__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--display);
  font-stretch: 112%;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  transition: color var(--t-fast) ease;
}

.rail__label span:last-child {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-variant-numeric: lining-nums tabular-nums;
}

:root:not(.is-phone) .rail__item:hover .rail__thumb,
.rail__item[aria-current='true'] .rail__thumb {
  border-color: var(--gold);
}

:root:not(.is-phone) .rail__item:hover .rail__thumb img,
.rail__item[aria-current='true'] .rail__thumb img {
  filter: none;
  transform: scale(1.05);
}

:root:not(.is-phone) .rail__item:hover .rail__label,
.rail__item[aria-current='true'] .rail__label {
  color: var(--gold-hi);
}

.rail__item[aria-current='true'] .rail__thumb::after {
  opacity: 1;
}

@media (min-width: 760px) {
  .reel-rail {
    overflow: visible;
  }
  .reel-rail li {
    flex: 1 1 0;
  }
  .reel-rail li:has([aria-current='true']) {
    flex-grow: 2.1;
  }
}

/* ---------- Process and consultation ---------- */

@media (min-width: 1180px) {
  .process__grid--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.consult {
  padding-bottom: var(--section);
}

.consult__card {
  display: grid;
  justify-items: start;
  gap: 22px;
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.7);
}

.consult__flag {
  padding: 5px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: var(--display);
  font-stretch: 112%;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.consult__title {
  font-size: clamp(30px, 5vw, 70px);
}

.consult__facts {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 6px 0;
  border-top: 1px solid var(--line);
}

.consult__facts > div {
  display: grid;
  grid-template-columns: minmax(8ch, 0.3fr) 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.consult__facts dt {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.consult__facts dd {
  margin: 0;
}

.consult__facts .is-price {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.consult__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Home page teaser ---------- */

.cine-teaser__frame {
  position: relative;
  display: block;
  aspect-ratio: 2.39 / 1;
  min-height: 220px;
  overflow: hidden;
  background: #000;
}

.cine-teaser__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1400ms var(--ease-out);
}

:root:not(.is-phone) .cine-teaser__frame:hover video {
  transform: scale(1.04);
}

.cine-teaser__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0) 50%, rgba(5, 5, 5, 0.7) 100%);
}

.cine-teaser__tag {
  position: absolute;
  z-index: 1;
  left: clamp(16px, 2.4vw, 32px);
  bottom: clamp(14px, 2vw, 26px);
  font-family: var(--display);
  font-stretch: 125%;
  font-size: clamp(13px, 1.3vw, 18px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  transition: color var(--t-fast) ease;
}

:root:not(.is-phone) .cine-teaser__frame:hover .cine-teaser__tag {
  color: var(--gold-hi);
}

.cine-teaser__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 40px);
}
