.yard-hero {
  --yard-ink: #171d20;
  --yard-gold: #ffca48;
  --yard-gutter: max(6vw, calc((100vw - 1400px) / 2));
  --yard-fade: 1050ms;
  isolation: isolate;
  display: grid;
  overflow: hidden;
  background: var(--yard-ink);
  color: white;
}

.yard-panel {
  grid-area: 1 / 1;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(510px, 43vw, 760px);
  min-width: 0;
  padding: clamp(42px, 5vw, 90px) var(--yard-gutter) clamp(104px, 8vw, 140px);
  background: var(--yard-ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--yard-fade) ease-in-out, visibility 0s linear var(--yard-fade);
}

.yard-panel[aria-hidden="false"] {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.yard-photos,
.yard-panel::after {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.yard-photos {
  left: 17%;
  display: grid;
}

/* Lower the contrast of overhead cables against the blue sky. */
.yard-photos::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(157,195,233,.18), rgba(157,195,233,.09) 28%, transparent 49%);
}

.yard-photos img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: 52% 48%;
}

.yard-triptych {
  left: 0;
  grid-template-columns: 66fr 34fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 3px;
  background: #414343;
}

.yard-triptych img:first-child { grid-row: span 2; object-position: 62% 62%; }
.yard-triptych img:nth-child(2) { object-position: 60% 56%; }
.yard-triptych img:last-child { object-position: 64% 65%; }

.yard-panel::after {
  content: "";
  background:
    linear-gradient(90deg, var(--yard-ink) 5%, rgba(23,29,32,.96) 19%, rgba(23,29,32,.86) 30%, rgba(23,29,32,.68) 43%, rgba(23,29,32,.12) 65%, transparent 80%),
    linear-gradient(0deg, rgba(13,17,18,.72), transparent 27%);
}

.yard-panel:has(.yard-triptych)::after {
  background:
    linear-gradient(90deg, rgba(17,22,24,.94), rgba(17,22,24,.8) 28%, rgba(17,22,24,.58) 43%, transparent 62%),
    linear-gradient(0deg, rgba(13,17,18,.72), transparent 27%);
}

.yard-copy {
  max-width: min(47vw, 40rem);
  opacity: 0;
  transition: opacity 240ms ease-out;
}

.yard-panel[aria-hidden="false"] .yard-copy {
  opacity: 1;
  transition: opacity 700ms ease-out 260ms;
}

.yard-label {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: clamp(.83rem, 1vw, .96rem);
  font-weight: 720;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--yard-gold);
}

.yard-label::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  flex: none;
  background: currentColor;
}

.yard-copy h1, .yard-copy h2 {
  max-width: 12ch;
  margin: .2em 0 .26em;
  font-size: clamp(3.1rem, 5.6vw, 5.65rem);
  line-height: 1.015;
  font-weight: 760;
  letter-spacing: -.046em;
  text-wrap: balance;
}

html:lang(zh) .yard-copy h1, html:lang(zh) .yard-copy h2 {
  max-width: 10.2em;
  font-size: clamp(2.7rem, 3.9vw, 4.45rem);
  line-height: 1.16;
  letter-spacing: -.035em;
}

.yard-copy p {
  max-width: 33rem;
  margin: 0;
  color: #f4f5f6;
  font-size: clamp(1rem, 1.25vw, 1.24rem);
  line-height: 1.56;
  text-wrap: pretty;
}

.yard-copy .pill {
  margin-top: clamp(18px, 2vw, 32px);
  border-radius: 3px;
  background: var(--yard-gold);
  color: #201907;
}

.yard-copy .pill:hover { background: #ffdb78; }
.yard-hero :focus-visible { outline: 3px solid white; outline-offset: 3px; }

.yard-controls {
  position: absolute;
  z-index: 3;
  bottom: clamp(16px, 2vw, 36px);
  inset-inline: var(--yard-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.yard-controls > div { display: flex; pointer-events: auto; }
.yard-controls button {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #fff;
}

.yard-pages { gap: 4px; }
.yard-pages button::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,.51);
  transition: background-color 350ms;
}
.yard-pages button[aria-pressed="true"]::before { background: var(--yard-gold); }

.yard-playback {
  overflow: visible;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 3px;
  background: rgba(16,21,23,.65);
}
.yard-playback button:hover { background: rgba(255,255,255,.13); }
.yard-prev, .yard-next {
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.yard-prev { transform: rotate(-135deg); }
#rotate-control::before {
  content: "";
  width: 9px;
  height: 12px;
  border-inline: 3px solid currentColor;
  box-sizing: border-box;
}
#rotate-control[aria-pressed="true"]::before {
  width: 0;
  height: 0;
  border: solid transparent;
  border-width: 6px 0 6px 9px;
  border-left-color: currentColor;
}

@media (max-width: 740px) {
  .yard-hero { --yard-gutter: clamp(20px, 5vw, 32px); }
  .yard-panel {
    grid-template-rows: auto 1fr;
    align-items: start;
    padding: 0 0 74px;
    min-height: 0;
  }
  .yard-photos {
    position: relative;
    inset: auto;
    height: clamp(210px, 63vw, 345px);
    overflow: hidden;
  }
  .yard-photos img { object-position: 50% 48%; }
  .yard-panel::after { display: none; }
  .yard-triptych {
    grid-template-columns: 60fr 40fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .yard-triptych img:first-child { grid-row: span 2; }
  .yard-copy {
    align-self: start;
    max-width: none;
    padding: 21px var(--yard-gutter) 12px;
  }
  .yard-label { font-size: .78rem; letter-spacing: .085em; }
  .yard-label::before { width: 1.1rem; }
  .yard-copy h1, .yard-copy h2 {
    max-width: 18ch;
    font-size: clamp(2.25rem, 7.9vw, 3.45rem);
    line-height: 1.05;
  }
  html:lang(zh) .yard-copy h1, html:lang(zh) .yard-copy h2 {
    max-width: none;
    font-size: clamp(1.95rem, 7vw, 3.2rem);
    line-height: 1.2;
  }
  .yard-copy p { max-width: 40rem; font-size: 1rem; line-height: 1.5; }
  .yard-copy .pill { margin-top: 16px; }
  .yard-controls { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .yard-hero *, .yard-hero *::before { transition: none !important; }
}

.yard-range {
  align-items: stretch;
  grid-template-rows: minmax(clamp(260px, 23.5vw, 450px), 1fr) auto;
  padding: 0 0 clamp(76px, 6vw, 104px);
}
.yard-range::after { display: none; }
.yard-lineup {
  position: relative;
  inset: auto;
  grid-template-columns: 36fr 32fr 32fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 2px;
  min-height: 0;
  background: #262a2a;
}
.yard-lineup figure { position: relative; margin: 0; min-width: 0; overflow: hidden; }
.yard-lineup figure img { position: absolute; inset: 0; object-position: 53% 52%; }
.yard-lineup figure:nth-child(2) img { object-position: 61% 62%; }
.yard-lineup figure:nth-child(3) img { object-position: 45% 57%; }
.yard-lineup figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 28px clamp(14px,2vw,36px) 12px;
  background: linear-gradient(transparent, rgba(12,17,18,.75));
  color: #fff;
  font-size: .94rem;
  font-weight: 650;
}
@media (min-width: 741px) {
  .yard-range .yard-copy {
    display: grid;
    grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
    gap: 0 clamp(36px, 6vw, 120px);
    align-items: start;
    width: 100%;
    max-width: none;
    padding: clamp(22px, 2vw, 36px) var(--yard-gutter) 0;
  }
  .yard-range .yard-label { grid-column: 1; grid-row: 1; }
  .yard-range .yard-copy h1 {
    grid-column: 1;
    grid-row: 2 / span 2;
    max-width: 18ch;
    margin: .19em 0 0;
    font-size: clamp(2.6rem, 4vw, 4.9rem);
    line-height: 1.06;
  }
  html:lang(zh) .yard-range .yard-copy h1 { max-width: 12em; font-size: clamp(2.2rem, 3.3vw, 4.2rem); line-height: 1.18; }
  .yard-range .yard-copy p { grid-column: 2; grid-row: 1 / span 2; }
  .yard-range .yard-copy .pill { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 12px; }
}
@media (max-width: 740px) {
  .yard-range { grid-template-rows: auto 1fr; padding-bottom: 74px; }
  .yard-lineup { height: clamp(226px, 68vw, 345px); grid-template-columns: 56fr 44fr; grid-template-rows: repeat(2,minmax(0,1fr)); }
  .yard-lineup figure:first-child { grid-row: span 2; }
  .yard-lineup figure:first-child img { object-position: 64% center; }
  .yard-lineup figcaption { padding: 16px 9px 5px; font-size: .8rem; }
}
