/* Play page — page-specific styles, built on top of styles.css */

.play-hero {
  padding: 4rem 0 2.5rem;
}

@media (min-width: 768px) {
  .play-hero {
    padding: 5rem 0 3rem;
  }
}

/* hero padding and the first section's padding stack, which reads as a big
   dead band on a phone — tighten both ends of the seam */
@media (max-width: 640px) {
  .play-hero {
    padding-bottom: 1.25rem;
  }

  .play-hero + .play-section {
    padding-top: 1.75rem;
  }
}

.play-title {
  font-family: var(--font-display);
  /* matches the phone step-down applied to the other page headlines */
  font-size: 1.6875rem;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

@media (min-width: 640px) {
  .play-title {
    font-size: 2rem;
  }
}

.play-sub {
  max-width: 40rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.6;
  color: color-mix(in srgb, var(--foreground) 75%, transparent);
}

/* matches .section-intro on the home page */
@media (max-width: 640px) {
  .play-sub {
    font-size: 0.9375rem;
  }
}

.play-section {
  padding: 3rem 0;
  scroll-margin-top: 8rem;
}

.play-section + .play-section {
  border-top: 1px solid var(--border);
}

.play-section-header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.play-section-note {
  margin: 0 0 2rem;
  max-width: 40rem;
  font-size: 1rem;
  font-weight: 300;
  color: color-mix(in srgb, var(--foreground) 70%, transparent);
}

.play-subhead {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--foreground);
}

.play-subhead:not(:first-of-type) {
  margin-top: 3.5rem;
}

.play-inline-link {
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.play-inline-link:hover {
  color: var(--foreground);
}

/* Live experiments — clickable cards */
.play-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

.play-live {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  text-decoration: none;
  color: inherit;
}

.play-live-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #101527;
}

/* clip is 1.321 vs the frame's 1.333, so cover trims ~2px off each of
   top and bottom — and Bubble sits flush to the bottom edge. Anchor to
   the bottom so the trim lands in the empty sky above her instead. */
.play-live-thumb--bubble {
  background: #eae6e3;
}

.play-live-thumb--bubble video {
  object-position: center bottom;
}

.play-live-thumb--overflowing {
  background: #0a0908;
}

.play-live-thumb img,
.play-live-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.play-live:hover .play-live-thumb img,
.play-live:hover .play-live-thumb video {
  transform: scale(1.03);
}

.play-live-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* matches the Architecture captions */
.play-live-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
}

.play-live-desc {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
}

.play-live-cta {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: #d81f45;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.play-live-arrow {
  display: inline-block;
  text-decoration: none;
}

.play-live:hover .play-live-arrow {
  animation: play-live-arrow-bounce 0.6s ease infinite;
}

@keyframes play-live-arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .play-live:hover .play-live-arrow {
    animation: none;
  }
}

@media (max-width: 720px) {
  .play-live-grid {
    grid-template-columns: 1fr;
  }
}

/* Architecture */
.play-arch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

.play-arch-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* crop to fill a uniform frame so every cell matches edge to edge */
.play-arch-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.75rem;
}

/* this render's subject sits low in the frame — bias the crop downward
   so the site model isn't clipped */
.play-arch-item img[src*="full-spectrum"] {
  object-position: center 62%;
}

.play-arch-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.play-arch-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
}

.play-arch-desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
}

/* Drawings — horizontal infinite loop */
.play-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.play-marquee-track {
  display: flex;
  width: max-content;
  animation: play-marquee-scroll 45s linear infinite;
}

.play-marquee:hover .play-marquee-track {
  animation-play-state: paused;
}

@keyframes play-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.play-marquee-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-right: 1.25rem;
}

/* fixed frame clips the zoom so neighbours don't shift */
.play-marquee-item {
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.5rem;
}

.play-marquee-row img {
  display: block;
  height: 17rem;
  width: auto;
  transition: transform 0.25s ease;
}

@media (max-width: 640px) {
  .play-marquee-row img {
    height: 14rem;
  }
}

/* The loop travels a fixed distance, so on a 327px window 45s reads as
   nearly static. Shorten it on phones to keep the same apparent speed. */
@media (max-width: 640px) {
  .play-marquee-track {
    animation-duration: 24s;
  }
}

.play-marquee-item:hover img {
  transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .play-marquee-track {
    animation: none;
  }
  .play-marquee {
    overflow-x: auto;
  }
  .play-marquee-item:hover img {
    transform: none;
  }
}

@media (max-width: 720px) {
  .play-arch-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightbox */
.play-arch-item img {
  cursor: zoom-in;
}

.play-arch-item img:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
}

/* display:flex would otherwise override [hidden], leaving an invisible
   full-screen overlay that swallows every click on the page */
.play-lightbox[hidden] {
  display: none;
}

.play-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: rgba(20, 19, 24, 0.9);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.play-lightbox.is-open {
  opacity: 1;
}

.play-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  cursor: default;
}

.play-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.play-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  .play-lightbox {
    transition: none;
  }
}
