/* Keep the closing billing block quieter and more compact than body copy. */
.credits {
  font-size: clamp(11px, 1vw, 16px);
  line-height: 1.55;
}
.credits p + p {
  margin-top: 0.5em;
}
@media (max-width: 767px) {
  .credits {
    font-size: 9px;
    line-height: 1.65;
  }
  .credits p + p {
    margin-top: 6px;
  }
}

/* The raised hand needs shading above the photograph, below the live text.
   Fade in below the face to preserve the existing portrait composition. */
@media (min-width: 1200px) {
  .person-yusuke .person-shade {
    z-index: 2;
    background: linear-gradient(
      90deg,
      #11140d 0%,
      rgba(17, 20, 13, 0.98) 54%,
      rgba(17, 20, 13, 0.84) 62%,
      rgba(17, 20, 13, 0.24) 72%,
      transparent 82%
    );
    -webkit-mask-image: linear-gradient(180deg, transparent 42%, #000 65%);
    mask-image: linear-gradient(180deg, transparent 42%, #000 65%);
  }
}

/* Center a defined label/icon group instead of anonymous text flex items.
   The slight optical lift balances the Noto Sans JP glyphs in their line box. */
.button-label,
.button-arrow {
  display: block;
  line-height: 1;
  transform: translateY(-0.06em);
}
.button-play-icon {
  display: block;
  flex: 0 0 auto;
  width: 0.82em;
  height: 0.9em;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.event-link,
.host-link {
  line-height: 1;
  text-align: center;
}

/* Matching quote boxes and inner gaps make opening/closing marks symmetrical. */
.statement blockquote::before,
.statement blockquote::after {
  display: inline-block;
  width: 0.72em;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}
.statement blockquote::before {
  margin-inline-end: 0.26em;
}
.statement blockquote::after {
  margin-inline-start: 0.26em;
}

/* The Japanese hero labels shrink independently of English and navigation. */
.kala-language-ja .hero-actions .button {
  font-size: calc(20 * var(--u));
}
@media (min-width: 768px) and (max-width: 1199px) {
  .kala-language-ja .hero-actions .button {
    font-size: 12.5px;
  }
}
@media (max-width: 767px) {
  .kala-language-ja .hero-actions .button {
    font-size: 11.5px;
  }
}

/* Keep button dimensions while making English labels one step smaller. */
.kala-language-en .button {
  font-size: calc(20 * var(--u));
}
.kala-language-en .site-nav .nav-cta {
  font-size: calc(15 * var(--u));
}
.kala-language-en .event-link {
  font-size: calc(24 * var(--u));
}
.kala-language-en .host-link {
  font-size: calc(15 * var(--u));
}
.kala-language-en .contact-submit .wpcf7-submit {
  font-size: 12.5px;
}
@media (max-width: 1199px) {
  .kala-language-en .site-nav .nav-cta,
  .kala-language-en .host-link {
    font-size: 12.5px;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .kala-language-en .button {
    font-size: 12.5px;
  }
}
@media (max-width: 767px) {
  .kala-language-en .hero-actions .button {
    font-size: 11px;
  }
  .kala-language-en .event-link {
    font-size: 14px;
  }
}

/* Full-size photographs are links when JavaScript is unavailable. */
.still-expand {
  display: block;
  position: relative;
  cursor: zoom-in;
}
.still-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(247, 241, 232, 0.65);
  border-radius: 50%;
  background: rgba(11, 23, 19, 0.75);
  color: var(--cream);
  font: 22px/1 var(--sans);
  pointer-events: none;
  transition: background 0.2s;
}
.still-expand:hover .still-zoom {
  background: #334734;
}
.still-dialog {
  width: 1440px;
}
.still-image {
  display: grid;
  place-items: center;
  min-height: 160px;
}
.still-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(90dvh - 150px);
  object-fit: contain;
}
.still-viewer figcaption {
  margin-top: 16px;
  text-align: center;
  font: 14px/1.7 var(--sans);
}
.video-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.video-fullscreen {
  padding: 10px 14px;
  min-height: 44px;
  border: 1px solid #73816d;
  border-radius: 24px;
  background: transparent;
  font: 13px/1.4 var(--sans);
}
.video-fullscreen:hover {
  background: #263528;
}
/* Fullscreen must target a regular element, not the <dialog> itself. */
.video-stage:is(:fullscreen, :-webkit-full-screen) {
  width: 100%;
  height: 100%;
  padding: 12px;
  background: #000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.video-stage:is(:fullscreen, :-webkit-full-screen) .video-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}
/* Browsers without element fullscreen still get a viewport-filling player. */
.video-dialog.is-expanded {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 12px;
  border: 0;
  background: #000;
}
.video-dialog.is-expanded .video-stage {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.video-dialog.is-expanded .video-frame {
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}
.video-dialog.is-expanded .video-fallback {
  display: none;
}

@media (max-width: 767px) {
  .hero-scene {
    background: linear-gradient(180deg, #51321e, #895327 55%, #090401);
  }
  .hero-picture {
    top: auto;
    height: min(64svh, 560px);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%);
    mask-image: linear-gradient(180deg, transparent, #000 24%);
  }
  .hero-scene .scene-image {
    object-position: 86% center;
  }

  /* Keep the sapling unobscured above the complete copy in either language. */
  .origin {
    --origin-photo-height: clamp(340px, 95vw, 520px);
    min-height: max(780px, 100svh);
    padding: calc(var(--origin-photo-height) + 36px) 24px 48px;
    align-items: flex-end;
    background: var(--paper);
  }
  .origin .scene-image {
    height: var(--origin-photo-height);
    object-position: 35% 55%;
  }
  .origin::after {
    inset: calc(var(--origin-photo-height) - 56px) 0 auto;
    height: 58px;
    background: linear-gradient(transparent, var(--paper));
  }
  .origin .scene-copy::before {
    content: none;
  }
  .origin .scene-copy {
    padding: 0;
  }

  /* A landscape photo needs its own shallow frame to retain the action. */
  .hamamatsu {
    --story-photo-height: clamp(230px, 60vw, 400px);
    padding-top: calc(var(--story-photo-height) + 28px);
    padding-bottom: 48px;
    background: var(--ink);
  }
  .hamamatsu .scene-image {
    height: var(--story-photo-height);
    object-position: 80% center;
  }
  .hamamatsu::after {
    background: linear-gradient(
      transparent calc(var(--story-photo-height) - 48px),
      var(--ink) var(--story-photo-height)
    );
  }
  .forest-count {
    --forest-photo-height: clamp(260px, 70vw, 480px);
    padding-top: calc(var(--forest-photo-height) + 28px);
    padding-bottom: 56px;
    align-items: flex-start;
    background: var(--ink);
  }
  .forest-count .scene-image {
    height: var(--forest-photo-height);
    object-position: left center;
  }
  .forest-count::after {
    background: linear-gradient(
      transparent calc(var(--forest-photo-height) - 48px),
      var(--ink) var(--forest-photo-height)
    );
  }

  /* Keep both planters together below the headline and map. */
  .bodhgaya {
    --bodhgaya-photo-height: clamp(340px, 90vw, 540px);
    padding-bottom: calc(var(--bodhgaya-photo-height) + 36px);
    background: var(--ink);
  }
  .bodhgaya .scene-image {
    top: auto;
    bottom: 0;
    height: var(--bodhgaya-photo-height);
    object-position: right center;
  }
  .bodhgaya::after {
    inset: calc(100% - var(--bodhgaya-photo-height) - 1px) 0 auto;
    height: 56px;
    background: linear-gradient(var(--ink), transparent);
  }
  .question .scene-image {
    object-position: 32% center;
  }
  .video-dialog .dialog-heading {
    gap: 8px;
  }
  .video-dialog .dialog-heading h2 {
    font-size: 14px;
  }
  .video-controls {
    gap: 4px;
  }
  .video-fullscreen {
    padding: 8px 10px;
    font-size: 12px;
  }
  .still-dialog {
    padding: 14px;
  }
}
