/* Bird Whisper — Stills
   Cine staggered grid (from the cinematographer page), in forest / firefly / washi.
   Each still keeps its native aspect ratio. Never cropped. */

.page-stills {
  --forest: #0b281c;
  --firefly: #AFFFB9;
  --washi: #E8DFCB;
  --ink: #07160f;
  --mist: rgba(232, 223, 203, 0.14);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --unit-gutter: 50px;
  --unit-100vh: 100vh;
  --stills-max: 1800px;
  --halo: 0 0 18px rgba(175, 255, 185, 0.16), 0 0 48px rgba(232, 223, 203, 0.08);
}

@supports (height: 100dvh) {
  .page-stills { --unit-100vh: 100dvh; }
}

@media only screen and (max-width: 750px) {
  .page-stills { --unit-gutter: 20px; }
}

.page-stills {
  background: var(--forest);
  color: var(--washi);
}

.page-stills ::selection {
  color: var(--forest);
  background: var(--firefly);
}

/* Intro title ------------------------------------------------------ */
.stills-intro {
  position: relative;
  min-height: var(--unit-100vh);
  margin: 0;
}

.stills-name {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100%;
  z-index: 80;
  margin: 0;
  text-align: center;
  pointer-events: none;
  font-family: var(--serif), "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(64px, 10vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--washi);
  text-shadow: var(--halo);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: transform 0.8s var(--ease), opacity 0.6s var(--ease), top 0.4s var(--ease);
  transition-delay: 1.2s, 0.8s, 0s;
}

.stills-name::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(140vw, 1400px);
  height: 70vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(175, 255, 185, 0.14) 0%, rgba(232, 223, 203, 0.06) 40%, transparent 70%);
  filter: blur(36px);
  z-index: -1;
  pointer-events: none;
}

.stills-name.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.stills-name h1 {
  margin: 0;
  font: inherit;
  color: inherit;
}

.stills-kicker {
  margin: 18px 0 0;
  font-family: var(--mono), Cousine, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--firefly);
  text-shadow: 0 0 16px rgba(175, 255, 185, 0.25);
  line-height: 1.4;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
}

@media only screen and (max-width: 750px) {
  .stills-name {
    font-size: 48px;
    transform: translate(-50%, -50%) scale(1);
    transition-delay: 1s, 0.6s, 0s;
  }
  .stills-name.is-active { transform: translate(-50%, -50%) scale(1); }
  .is-scrolled .stills-name.is-active {
    top: 0;
    transform: translate(-50%, -110%) scale(1);
  }
  .stills-kicker { font-size: 9px; margin-top: 12px; }
}

/* Grid ------------------------------------------------------------- */
.stills-grid {
  width: 100%;
  max-width: var(--stills-max);
  margin: 0 auto;
  padding: 0 var(--unit-gutter) 80px;
  transform: translateY(48vh);
  min-height: var(--unit-100vh);
  position: relative;
  z-index: 90;
  transition: transform 0.8s var(--ease);
  will-change: transform;
}

.is-scrolled .stills-grid { transform: translateY(8vh); }

.stills-blocks { position: relative; }

.block-still {
  position: relative;
  display: block;
  width: 100%;
  margin: 56px auto;
  padding-left: 50px;
  color: inherit;
  cursor: pointer;
  transition: transform 0.4s var(--ease);
}

.block-still:nth-child(even) {
  padding-left: 0;
  padding-right: 50px;
}

/* Mixed native ratios: anamorphic reads wide, vertical stays narrow. */
.block-still .block-image { width: 52%; }
.block-still.is-scope .block-image { width: 82%; }
.block-still.is-wide .block-image { width: 62%; }
.block-still.is-vertical .block-image { width: 30%; }
.block-still:nth-child(even) .block-image { margin-left: auto; }
.block-still:nth-child(3n + 2):not(.is-scope):not(.is-vertical) .block-image { width: 44%; }
.block-still:nth-child(3n + 3):not(.is-scope):not(.is-vertical) .block-image { width: 38%; }
.block-still.is-vertical:nth-child(3n + 2) .block-image { width: 28%; }
.block-still.is-vertical:nth-child(3n + 3) .block-image { width: 26%; }

.block-text {
  position: absolute;
  top: 8%;
  left: 0;
  z-index: 40;
  max-width: min(420px, 46%);
  padding: 16px 16px 16px 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.block-still:nth-child(even) .block-text {
  right: 0;
  left: auto;
  text-align: right;
  padding: 16px 0 16px 16px;
}

.block-still.is-empty-caption .block-text { display: none; }

.block-still .title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  color: var(--washi);
  text-shadow: 0 1px 18px rgba(7, 22, 15, 0.65), var(--halo);
}

.block-still .title .line { display: block; }

.block-still .title .line-1 {
  font-family: var(--serif), "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.block-still .title .line-2,
.block-still .title .line-3 {
  font-family: var(--mono), Cousine, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--firefly);
  font-weight: 400;
}

.block-still .title .line-3 {
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--washi);
  opacity: 0.86;
}

.block-still .title .line-3 i {
  font-style: italic;
  font-family: var(--serif), "Instrument Serif", Georgia, serif;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--washi);
}

.block-image {
  position: relative;
  margin: 0;
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.block-still:nth-child(even) .block-image { transform-origin: right; }

.block-image .sizer {
  position: relative;
  width: 100%;
  background: #102e21;
}

.block-image picture,
.block-image .media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.block-image .media {
  object-fit: contain; /* native ratio box — contain == cover, never crop */
  background: #102e21;
}

@media (hover: hover) {
  .block-still:hover { z-index: 30; }
  .block-still:hover .block-image { transform: scale(1.28); }
  .block-still.is-scope:hover .block-image { transform: scale(1.12); }
  .block-still.is-vertical:hover .block-image { transform: scale(1.18); }
}

.block-still:focus-visible { outline: none; }
.block-still:focus-visible .block-image {
  outline: 2px solid var(--firefly);
  outline-offset: 4px;
}

@media only screen and (max-width: 1024px) {
  .block-still .block-image,
  .block-still.is-wide .block-image,
  .block-still:nth-child(3n + 2):not(.is-vertical) .block-image,
  .block-still:nth-child(3n + 3):not(.is-vertical) .block-image { width: 72%; }
  .block-still.is-scope .block-image { width: 92%; }
  .block-still.is-vertical .block-image,
  .block-still.is-vertical:nth-child(3n + 2) .block-image,
  .block-still.is-vertical:nth-child(3n + 3) .block-image { width: 48%; }
}

@media only screen and (max-width: 750px) {
  .stills-grid { margin-top: 20px; padding-bottom: 50px; }
  .block-still,
  .block-still:nth-child(odd),
  .block-still:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    transform: translateY(28px);
    transition: transform 0.6s var(--ease);
  }
  .block-still.has-intersected { transform: translateY(0); }
  .block-image,
  .block-still .block-image,
  .block-still.is-scope .block-image,
  .block-still.is-wide .block-image,
  .block-still.is-vertical .block-image,
  .block-still:nth-child(3n + 2) .block-image,
  .block-still:nth-child(3n + 3) .block-image,
  .block-still.is-vertical:nth-child(3n + 2) .block-image,
  .block-still.is-vertical:nth-child(3n + 3) .block-image { width: 100%; }
  .block-text,
  .block-still:nth-child(even) .block-text {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    max-width: none;
    padding: 0 0 14px;
    text-align: left;
  }
}

/* Soft mist rising into the footer -------------------------------- */
.page-stills .site-foot {
  position: relative;
}

.page-stills .site-foot::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: calc(100% - 20px);
  height: 180px;
  background: linear-gradient(to top, rgba(232, 223, 203, 0.12), rgba(175, 255, 185, 0.05) 42%, transparent 78%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

/* Lightbox --------------------------------------------------------- */
.stills-lightbox {
  position: fixed;
  inset: 0;
  z-index: 800;
  background:
    radial-gradient(ellipse at center, rgba(11, 40, 28, 0.88), rgba(7, 22, 15, 0.97));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--unit-gutter) 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.stills-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.stills-lightbox[hidden] { display: none; }
.stills-lightbox.is-open[hidden] { display: flex; }

.stills-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 1400px);
  max-height: calc(var(--unit-100vh) - 120px);
}

.stills-lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(var(--unit-100vh) - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #07160f;
  box-shadow: 0 0 0 1px rgba(232, 223, 203, 0.16), 0 0 80px rgba(175, 255, 185, 0.08);
}

.stills-lightbox-caption {
  position: absolute;
  left: var(--unit-gutter);
  right: var(--unit-gutter);
  bottom: 24px;
  margin: 0;
  text-align: center;
  font-family: var(--mono), Cousine, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--washi);
}

.stills-lightbox-caption:empty,
.stills-lightbox-caption.is-empty { display: none; }

.stills-lightbox-caption i {
  font-family: var(--serif), "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--washi);
}

.stills-lightbox-close,
.stills-lightbox-nav {
  position: absolute;
  color: var(--washi);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.stills-lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  font-family: var(--mono), Cousine, monospace;
}

.stills-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif), "Instrument Serif", Georgia, serif;
  font-size: 36px;
  padding: 12px;
}

.stills-lightbox-nav.prev { left: 8px; }
.stills-lightbox-nav.next { right: 8px; }
.stills-lightbox-nav.is-disabled {
  visibility: hidden;
  pointer-events: none;
}

.stills-lightbox-close:hover,
.stills-lightbox-close:focus-visible,
.stills-lightbox-nav:hover,
.stills-lightbox-nav:focus-visible { color: var(--firefly); }

@media (prefers-reduced-motion: reduce) {
  .page-stills .stills-name,
  .page-stills .stills-name.is-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: none;
  }
  .page-stills .stills-grid,
  .page-stills.is-scrolled .stills-grid { transform: none; }
  .page-stills .block-still,
  .page-stills .block-still.has-intersected,
  .page-stills .block-still:hover .block-image { transform: none; }
}



/* Video tiles ------------------------------------------------------ */
.block-still.has-video .media-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #102e21;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 11;
  pointer-events: none;
}
.block-still.has-video.is-playing .media-loop { opacity: 1; }

.play-cue {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(175, 255, 185, 0.55);
  border-radius: 50%;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(175, 255, 185, 0.16);
  background: rgba(7, 22, 15, 0.28);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.play-cue::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 18px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--firefly, #AFFFB9);
  filter: drop-shadow(0 0 8px rgba(175, 255, 185, 0.35));
}
@media (hover: hover) {
  .block-still.has-video:hover .play-cue {
    background: rgba(175, 255, 185, 0.12);
    border-color: var(--firefly, #AFFFB9);
    box-shadow: 0 0 28px rgba(175, 255, 185, 0.28);
  }
}

.stills-lightbox-stage video {
  display: none;
  max-width: 100%;
  max-height: calc(var(--unit-100vh) - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #07160f;
  box-shadow: 0 0 0 1px rgba(232, 223, 203, 0.16), 0 0 80px rgba(175, 255, 185, 0.08);
}
.stills-lightbox.is-video .stills-lightbox-stage img { display: none; }
.stills-lightbox.is-video .stills-lightbox-stage video { display: block; }
.stills-lightbox-stage.is-portrait video {
  height: calc(var(--unit-100vh) - 120px);
  width: auto;
  max-width: 100%;
}

.stills-at-footer .stills-name {
  opacity: 0;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .block-still.has-video .media-loop,
  .block-still.has-video.is-playing .media-loop { opacity: 0; }
}

/* Hide the page title once the grid is in motion, including over the footer */
.page-stills.is-scrolled .stills-name,
.page-stills.is-scrolled .stills-name.is-active,
.stills-at-footer .stills-name {
  opacity: 0;
  pointer-events: none;
  transition-delay: 0s;
}
