/* Post-Hero scenes share the studio grid and keep the original HTML copy. */
.cinema-scroll#home :is(.panel-one, .panel-two) {
  --scene-edge: max(var(--studio-edge), calc((100% - var(--studio-measure)) / 2));
  display: grid;
  grid-template-columns: var(--studio-grid);
  column-gap: var(--studio-grid-gap);
  align-content: center;
  align-items: start;
  justify-items: start;
  isolation: isolate;
  overflow: clip;
  padding: clamp(72px, 8.8vw, 138px) var(--scene-edge);
  text-align: start;
  text-shadow: none;
}

#home :is(.panel-one, .panel-two)::before,
#home :is(.panel-one, .panel-two)::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

#home :is(.panel-one, .panel-two) > .eyebrow {
  grid-row: 1;
  justify-content: flex-start;
  width: auto;
  color: inherit;
  text-align: start;
}

#home :is(.panel-one, .panel-two) > h2 {
  grid-row: 2;
  width: auto;
  max-inline-size: 100%;
  margin: clamp(16px, 2.8vw, 38px) 0 0;
  color: inherit;
  text-wrap: balance;
}

#home :is(.panel-one, .panel-two) > p {
  grid-row: 3;
  margin: clamp(16px, 2.1vw, 30px) 0 0;
  max-inline-size: 42ch;
  font-size: var(--type-body);
  text-align: start;
  text-shadow: none;
  text-wrap: pretty;
}

/* Pair a warm charcoal gallery wall with the warm highlights in the photograph. */
.cinema-scroll#home .panel-one {
  --gallery-ink: var(--studio-dark);
  --gallery-accent: var(--studio-accent);
  --gallery-edge: clamp(22px, 3.2vw, 54px);
  min-block-size: clamp(470px, 46vw, 680px);
  background: radial-gradient(ellipse at 24% 19%, var(--studio-walnut), transparent 66%), var(--gallery-ink);
  color: var(--studio-on-dark);
}

#home .panel-one::before {
  z-index: -2;
  inset-block: clamp(82px, 13%, 132px) 10%;
  inset-inline: auto var(--gallery-edge);
  inline-size: min(68%, 1360px);
  background:
    linear-gradient(90deg, #1b1816f5, #2c211a99 23%, #33251a38 49%, #33251a0a 76%),
    url('/images/design/hero-slate-gallery.jpg') 96% 51% / cover no-repeat;
  clip-path: polygon(17% 0, 100% 0, 100% 100%, 0 100%);
}

#home .panel-one::after {
  z-index: -1;
  inset-block: clamp(76px, 10%, 106px) 13%;
  inset-inline: 38% auto;
  inline-size: 22%;
  border-block-start: 1px solid color-mix(in srgb, var(--studio-accent) 49%, transparent);
  border-inline-start: 1px solid color-mix(in srgb, var(--studio-accent) 39%, transparent);
  background: linear-gradient(132deg, #bc925577, #986b4226 42%, transparent 74%);
  transform: skewX(-14deg);
  transform-origin: bottom left;
}

#home .panel-one > :is(.eyebrow, h2, p) {
  grid-column: 1 / -2;
}

#home .panel-one > .eyebrow {
  color: var(--gallery-accent);
  letter-spacing: .22em;
}

#home .panel-one > h2 {
  font-size: clamp(2.35rem, 4.65vw, 5.1rem);
  line-height: 1.04;
  letter-spacing: -.052em;
  text-shadow: 0 2px 20px #1b181680;
}

html[lang="zh-CN"] #home .panel-one > h2 {
  line-height: 1.12;
  letter-spacing: -.025em;
}

#home .panel-one > p {
  max-inline-size: 40ch;
  color: var(--studio-on-dark-muted);
}

/* Let the full-width photograph lead, with the text aligned along its lower edge. */
.cinema-scroll#home .panel-two {
  --theme-focus: var(--studio-focus-dark);
  min-block-size: clamp(540px, 86svh, 940px);
  align-content: end;
  padding-block: clamp(100px, 22svh, 200px) clamp(48px, 8svh, 84px);
  background: var(--studio-dark);
  color: var(--studio-on-dark);
}

#home .panel-two::before {
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, #1b140e26 0%, transparent 27%, #1b140e40 43%, #1b140ea8 65%, var(--studio-dark) 100%),
    url('/images/design/hero-walnut-showroom.jpg') 50% 48% / cover no-repeat;
}

#home .panel-two::after {
  content: none;
}

#home .panel-two > .eyebrow {
  grid-area: 1 / 1 / 2 / 8;
  color: var(--studio-accent);
  letter-spacing: .19em;
}

#home .panel-two > h2 {
  grid-area: 2 / 1 / 4 / 8;
  align-self: end;
  margin-block-start: clamp(18px, 2.6vw, 38px);
  font-size: clamp(2.65rem, 5.1vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  text-shadow: 0 2px 18px #1b140e7a;
}

html[lang="zh-CN"] #home .panel-two > h2 {
  line-height: 1.14;
  letter-spacing: -.025em;
}

#home .panel-two > p {
  grid-area: 2 / 9 / 3 / -1;
  align-self: end;
  max-inline-size: 39ch;
  margin-block-start: clamp(18px, 2.6vw, 38px);
  color: var(--studio-on-dark-muted);
}

#home .panel-two > .pill {
  grid-area: 3 / 9 / 4 / -1;
  justify-self: start;
  min-block-size: 44px;
  padding: 10px 20px;
  margin: clamp(14px, 2vw, 26px) 0 0;
  border: 1px solid #f1e2c8b0;
  background: transparent;
  color: var(--studio-on-dark);
}

#home .panel-two > .pill:hover {
  border-color: var(--studio-on-dark);
  background: var(--studio-on-dark);
  color: #1b140e;
}

@media (max-width: 1150px) {
  #home .panel-two > :is(.eyebrow, h2) {
    grid-column: 1 / 6;
  }

  #home .panel-two > h2 {
    font-size: clamp(2.25rem, 5.1vw, 4rem);
  }

  #home .panel-two > :is(p, .pill) {
    grid-column: 6 / -1;
  }
}

@media (max-width: 760px) {
  .cinema-scroll#home .panel-one {
    min-block-size: auto;
    padding-block: var(--studio-section-space);
  }

  #home .panel-one > :is(.eyebrow, h2, p) {
    grid-column: 1 / -1;
  }

  #home .panel-one > h2 {
    font-size: clamp(1.75rem, 6.9vw, 3rem);
  }

  #home .panel-one::before {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    grid-row: 4;
    inline-size: 100%;
    aspect-ratio: 1.42;
    margin-block-start: clamp(26px, 7vw, 44px);
    clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
    background-position: 0 0, 98% 52%;
  }

  #home .panel-one::after {
    inset-block: auto calc(var(--studio-section-space) + 15px);
    inset-inline: 12% auto;
    inline-size: 36%;
    block-size: 25%;
    opacity: .8;
  }

  .cinema-scroll#home .panel-two {
    --understand-image-height: clamp(230px, 40svh, 385px);
    min-block-size: 0;
    padding-block: calc(var(--understand-image-height) - 12px) clamp(36px, 8svh, 66px);
  }

  #home .panel-two::before {
    inset-block-end: auto;
    block-size: var(--understand-image-height);
    background:
      linear-gradient(180deg, transparent 47%, #1b140e40 63%, var(--studio-dark) 100%),
      url('/images/design/hero-walnut-showroom.jpg') 46% 52% / cover no-repeat;
  }

  #home .panel-two > :is(.eyebrow, h2, p, .pill) {
    grid-area: auto / 1 / auto / -1;
  }

  #home .panel-two > h2 {
    font-size: clamp(1.9rem, 7.9vw, 3.6rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  #home [data-cinema-transition] > .panel-one:is([data-cinema-active], [data-cinema-outgoing])::before {
    animation: gallery-slide-left 470ms var(--ease-expressive) 35ms both;
  }

  #home [data-cinema-transition] > .panel-one:is([data-cinema-active], [data-cinema-outgoing])::after {
    animation: gallery-plane-descend 500ms var(--ease-expressive) both;
  }

  #home [data-cinema-transition] > .panel-one[data-cinema-outgoing]::before,
  #home [data-cinema-transition] > .panel-one[data-cinema-outgoing]::after {
    animation-direction: reverse;
  }
}

@keyframes gallery-slide-left {
  from {
    opacity: 0;
    transform: translate3d(clamp(120px, 26vw, 430px), 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes gallery-plane-descend {
  from {
    opacity: 0;
    transform: translate3d(clamp(45px, 9vw, 165px), clamp(-210px, -23svh, -90px), 0) skewX(-14deg);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(-14deg);
  }
}
