/* Stack the opening scenes where there's room to page with a wheel or a swipe. */
.cinema-scroll#home {
  height: auto;
  background: var(--studio-dark);
}

.cinema-scroll .stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: clip;
  background: var(--studio-dark);
}

.cinema-scroll .forest-world {
  display: none;
}

.cinema-scroll#home :is(.cinema-intro, .cinema-panel, .cinema-slider) {
  position: relative;
  inset: auto;
  width: auto;
  margin: 0;
  opacity: 1;
  transform: none;
  transition: none;
  will-change: auto;
}

.cinema-scenes {
  grid-area: 1 / 1;
}

#home .cinema-scenes[data-cinema-paging] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-block-size: 100svh;
  isolation: isolate;
}

#home .cinema-scenes[data-cinema-paging] > :is(.cinema-intro, .cinema-panel, .cinema-slider) {
  grid-area: 1 / 1;
  min-block-size: 100svh;
  isolation: isolate;
  visibility: hidden;
}

/* Keep native pinch zoom. Only the first three screens reserve vertical swipes. */
#home .cinema-scenes[data-cinema-touch] > :is(.cinema-intro, .cinema-panel) {
  touch-action: pan-x pinch-zoom;
}

#home .cinema-scenes[data-cinema-paging] > .cinema-panel {
  padding-block: calc(var(--studio-header-height) + 20px) clamp(28px, 8svh, 80px);
}

#home .cinema-scenes[data-cinema-paging] > .cinema-slider {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  padding-block: calc(var(--studio-header-height) + 18px) clamp(20px, 5svh, 60px);
}

#home .cinema-scenes[data-cinema-paging] .cinema-card {
  height: clamp(240px, min(53svh, calc(100svh - var(--studio-header-height) - 172px)), 520px);
}

@media (min-height: 760px) {
  #home .cinema-scenes[data-cinema-paging] > .cinema-slider {
    align-content: end;
    padding-block-end: clamp(26px, 3.8svh, 44px);
  }

  #home .cinema-scenes[data-cinema-paging] .cinema-card {
    height: min(58svh, 600px);
  }
}

#home .cinema-scenes[data-cinema-paging] > [data-cinema-outgoing] {
  z-index: 0;
  visibility: visible;
}

#home .cinema-scenes[data-cinema-paging] > [data-cinema-active] {
  z-index: 1;
  visibility: visible;
}

#home .cinema-scenes[data-cinema-backward] > [data-cinema-outgoing] {
  z-index: 2;
}

#home .cinema-scenes:focus-visible {
  outline-offset: -3px;
}

.cinema-scroll#home .cinema-intro {
  --hero-footer-room: clamp(68px, 12vh, 120px);
  z-index: 0;
  display: grid;
  grid-area: 1 / 1;
  align-content: center;
  justify-items: center;
  min-block-size: 100svh;
  padding: max(calc(var(--studio-header-height) + 24px), var(--hero-footer-room))
    var(--studio-edge) var(--hero-footer-room);
  isolation: isolate;
  color: var(--studio-on-dark);
  --atrium-position: 50% center;
  overflow: clip;
  background: #211914;
}

.cinema-scroll#home .cinema-intro h1 {
  max-inline-size: 100%;
  margin-block-start: clamp(18px, 2.8vw, 38px);
  font-size: clamp(2.4rem, 6.15vw, 7rem);
  line-height: 1.02;
  letter-spacing: -.06em;
  text-shadow: 0 3px 24px #12100da0;
}

.cinema-scroll#home .cinema-intro h1 span + span {
  margin-block-start: .22em;
  font-size: .85em;
  letter-spacing: -.055em;
}

html[lang="zh-CN"] .cinema-scroll#home .cinema-intro h1 {
  font-size: clamp(2.15rem, 6.3vw, 6.55rem);
  line-height: 1.16;
  letter-spacing: -.015em;
}

html[lang="zh-CN"] .cinema-scroll#home .cinema-intro h1 span + span {
  letter-spacing: .01em;
}

.cinema-scroll#home .cinema-intro > .eyebrow {
  color: var(--studio-accent);
  letter-spacing: .22em;
  text-shadow: 0 2px 9px #12100de0;
}

.cinema-scroll#home .hero-subtitle {
  max-inline-size: min(100%, 75ch);
  color: var(--studio-on-dark);
  line-height: 1.65;
  text-shadow: 0 2px 9px #12100de0;
}

body > header[data-nav-cover]:not([data-menu-open], [data-nav-scrolled]) {
  --nav-fill: color-mix(in srgb, var(--studio-nav-dark) 9%, transparent);
  --nav-border: transparent;
}

body > header[data-nav-cover] > .lang {
  min-inline-size: 54px;
  border-color: #faf0e069;
  border-radius: 999px;
}

.cinema-scroll#home .cinema-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-block-size: clamp(360px, 55svh, 550px);
  padding: clamp(46px, 8vh, 100px) var(--studio-edge);
  background-repeat: no-repeat;
  background-size: cover;
}

.cinema-scroll#home .panel-one {
  background-image: linear-gradient(180deg, #24211cb0, #171b1b8e 47%, #151615a6),
    url('/images/design/hero-slate-gallery.jpg');
  background-position: 66% center;
}

.cinema-scroll#home .panel-two {
  background-image: linear-gradient(180deg, #211d18a0, #201a179c 53%, #232721cb),
    url('/images/design/hero-walnut-showroom.jpg');
  background-position: center 48%;
}

.cinema-scroll#home .cinema-slider {
  padding: clamp(56px, 9vh, 104px) 0;
  overflow: hidden;
  background: var(--studio-dark);
}

/* Leave native horizontal overflow available to touch, wheel and keyboard. */
.cinema-scroll .cinema-viewport {
  padding-inline: var(--studio-edge);
  padding-block: 6px 12px;
  touch-action: auto;
}

.cinema-card > img.card-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cinema-scroll .cinema-footer {
  inset: auto var(--studio-edge) clamp(14px, 4vh, 34px);
  align-items: end;
  pointer-events: none;
}

.cinema-scroll .cinema-intro .cinema-footer {
  position: absolute;
}

.cinema-scroll .stage > .cinema-footer {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  align-self: end;
  inset: auto;
  margin: 0 var(--studio-edge) clamp(14px, 4vh, 34px);
  padding: 0;
}

.cinema-scroll .cinema-footer > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-block: 6px;
  pointer-events: auto;
  color: var(--studio-on-dark);
  transition: color var(--duration-fast) var(--ease-standard);
}

.cinema-scroll .cinema-footer > a:hover {
  color: var(--studio-accent);
}

@media (max-width: 930px) {
  body > header[data-navigation-ready]:not([data-menu-used]) > nav {
    transition: none;
  }
}

@media (max-width: 760px) {
  .cinema-scroll#home .cinema-intro {
    --atrium-position: 52% center;
  }

  .cinema-scroll#home .cinema-intro h1 {
    font-size: clamp(2.15rem, 8.75vw, 4.2rem);
  }

  .cinema-scroll#home .cinema-intro h1 span + span {
    font-size: .76em;
  }

  .cinema-scroll#home .cinema-panel {
    min-block-size: clamp(320px, 48svh, 420px);
  }

  .cinema-scroll .cinema-card {
    max-width: calc(100vw - 2 * var(--studio-edge) - 12px);
  }
}

@media (max-height: 510px) and (any-pointer: coarse) {
  #home .cinema-scenes[data-cinema-touch] > :is(.cinema-panel, .cinema-slider) {
    padding-block: calc(var(--studio-header-height) + 10px) 16px;
  }

  #home .cinema-scenes[data-cinema-touch] > .cinema-intro h1,
  html[lang="zh-CN"] #home .cinema-scenes[data-cinema-touch] > .cinema-intro h1 {
    font-size: clamp(1.9rem, 11svh, 4rem);
  }

  #home .cinema-scenes[data-cinema-touch] > .cinema-panel h2 {
    margin-block-start: 14px;
    font-size: clamp(1.65rem, 9svh, 2.65rem);
  }

  #home .cinema-scenes[data-cinema-touch] > .cinema-panel p {
    margin-block-start: 12px;
    font-size: .9rem;
  }

  #home .cinema-scenes[data-cinema-touch] > .panel-one::before {
    position: absolute;
    inset: 17% var(--studio-edge) 6% auto;
    inline-size: 68%;
    margin: 0;
    aspect-ratio: auto;
    opacity: .56;
  }

  #home .cinema-scenes[data-cinema-touch] > .panel-two::before {
    inset-block: 0;
    block-size: auto;
    opacity: .68;
  }

  #home .cinema-scenes[data-cinema-touch] .slider-heading {
    padding-block-end: 12px;
  }

  #home .cinema-scenes[data-cinema-touch] .slider-heading h2 {
    font-size: clamp(1.65rem, 7svh, 2.65rem);
  }

  #home .cinema-scenes[data-cinema-touch] .cinema-card {
    height: clamp(158px, calc(100svh - var(--studio-header-height) - 108px), 330px);
    min-block-size: 0;
  }

  #home .cinema-scenes[data-cinema-touch] .card-body {
    padding: 12px 15px;
  }

  #home .cinema-scenes[data-cinema-touch] .card-body p {
    margin-block: 8px;
  }

  #home .cinema-scenes[data-cinema-touch] .card-action {
    padding-block-start: 8px;
  }
}
