/* Watch page: extends main.css */

.watch-header {
  max-width: 680px;
  margin: 0 auto;
  padding: 8rem 1.5rem 3rem;
}

.watch-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

/* Page titles stay in the markup for search engines and screen readers; the menu already names the page. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.watch-header--bare {
  padding-bottom: 0;
}

.watch-intro {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #333;
}

.watch-intro a,
.watch-also a,
.watch-meta a {
  text-decoration: underline;
  text-decoration-color: #ccc;
  text-underline-offset: 2px;
}

.watch-section {
  max-width: 1000px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.watch-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 2rem;
  margin: 0 0 2.5rem;
}

.watch-item {
  margin: 0 0 4rem;
}

.watch-item > img,
.yt img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.watch-item figcaption {
  max-width: 680px;
  margin-top: 1rem;
}

.watch-stage {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.4rem;
}

.watch-caption {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
}

.watch-meta,
.watch-credit {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #888;
  margin: 0 0 0.25rem;
}

.watch-credit--center {
  text-align: center;
  margin-top: 1.5rem;
}

.watch-also {
  max-width: 680px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #666;
}

/* Click-to-load YouTube */
.yt {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
}

.yt-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.yt-button img {
  height: 100%;
  transition: opacity 0.3s ease;
}

.yt-button:hover img,
.yt-button:focus-visible img {
  opacity: 0.85;
}

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.yt-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -12px 0 0 -7px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #1a1a1a;
}

.yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Moments and place grids */
.moments-grid,
.place-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.moments-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.place-grid video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.moments-grid figcaption,
.place-grid figcaption {
  margin-top: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #888;
}

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

  .place-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .place-grid figure:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .moments-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 768px) {
  .watch-header {
    padding-top: 10rem;
  }

  .watch-title {
    font-size: 4rem;
  }

  .watch-section {
    padding: 0 2rem;
  }
}

/* Three-up variants, section intro, postcards shown whole */
.moments-grid--three {
  margin-top: 3rem;
}

.moments-grid--cards img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #f4f2ee;
}

.watch-intro--section {
  max-width: 680px;
  font-size: 1rem;
  margin: -1rem 0 2rem;
}

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

/* Photo gallery and lightbox */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.gallery-item {
  display: block;
  overflow: hidden;
  background: #f4f2ee;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  opacity: 0.85;
}

.gallery + .watch-credit {
  margin-top: 0.75rem;
}

.watch-subhead {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
  margin: 3rem 0 1.25rem;
}

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

@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 1.5rem;
  background: rgba(12, 12, 12, 0.94);
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  object-fit: contain;
}

.lightbox-caption {
  max-width: 680px;
  margin: 1rem auto 0;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.lightbox-caption a { color: inherit; }

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 0.75rem 1rem;
  cursor: pointer;
  opacity: 0.8;
}

.lightbox button:hover,
.lightbox button:focus-visible { opacity: 1; }

.lightbox-close { top: 0.5rem; right: 0.5rem; }
.lightbox-prev { left: 0.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.25rem; top: 50%; transform: translateY(-50%); }

.site-nav a.is-current,
.mobile-menu-nav a.is-current {
  color: #1a1a1a;
}

/* The finished house: set off on a quiet ground, one large image and six smaller */
.watch-finished {
  max-width: none;
  margin-bottom: 5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  background: #f4f2ee;
}

.watch-finished > * {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.gallery--finished {
  grid-template-columns: repeat(2, 1fr);
}

.gallery--finished .gallery-item {
  background: #e9e6df;
}

.gallery--finished .gallery-item img {
  height: 100%;
  aspect-ratio: 1 / 1;
}

.gallery--finished .finished-item--hero,
.gallery--finished .finished-item--wide {
  grid-column: span 2;
}

.gallery--finished .finished-item--wide img {
  aspect-ratio: 2 / 1;
}

.gallery--finished .finished-item--high img {
  object-position: 50% 30%;
}

@media (min-width: 768px) {
  .gallery--finished {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery--finished .finished-item--hero {
    grid-row: span 2;
  }
}

/* Episode anchors, linked from the Build page, land below the fixed header */
.yt {
  scroll-margin-top: 7.5rem;
}
