/* Section labels follow the existing journal typography. */
.marine-chapter,
.marine-chapter__heading,
.marine-chapter__location {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.marine-chapter__intro {
  padding-bottom: 0;
}

.marine-chapter__empty {
  margin: 0;
  padding: 24px 0 clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--muted);
  color: #666963;
  font-size: 17px;
}

.marine-chapter__location {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

/* Match Compass's .wrap + .figure geometry, including both gutter insets.
   Block flow preserves its figure spacing without adding grid gaps. */
.marine-gallery {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  scroll-margin-top: var(--header-h);
}

.marine-gallery figure {
  min-width: 0;
  margin: 0 var(--gutter) 16px;
  scroll-margin-top: var(--header-h);
}

.marine-gallery [id] {
  scroll-margin-top: var(--header-h);
}

.marine-gallery img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
}

.marine-gallery figcaption {
  padding: 10px var(--gutter) 0;
  color: #666963;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.marine-video {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  overflow: hidden;
  background: #252a26;
  --marine-video-position: 50% 50%;
}

.marine-video video,
.marine-gallery .marine-video__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--marine-video-position);
}

.marine-gallery .marine-video__poster {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.marine-video [hidden] {
  display: none;
}

.marine-video__controls {
  position: absolute;
  right: clamp(12px, 2vw, 28px);
  bottom: clamp(12px, 2vw, 28px);
  z-index: 2;
  display: flex;
  gap: 6px;
}

.marine-video__controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgb(217 221 217 / 35%);
  border-radius: 2px;
  background: rgb(25 31 27 / 82%);
  color: #f2f3ed;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .04em;
  cursor: pointer;
  touch-action: manipulation;
}

.marine-video__controls button:hover {
  background: #252a26;
  border-color: #d9ddd9;
}

.marine-video__controls button:focus-visible {
  outline: 2px solid #f2f3ed;
  outline-offset: 3px;
}

.marine-video__placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  background: rgb(25 31 27 / 88%);
  color: #d9ddd9;
  text-align: center;
}

.marine-video__placeholder strong {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.marine-video__placeholder span {
  max-width: 32ch;
  font-size: 12px;
  line-height: 1.5;
  color: #b6bdb6;
}

@media (min-width: 768px) {
  .marine-gallery figure {
    margin-bottom: 24px;
  }
}

/* Bias portrait-screen crops slightly upward; keep landscape footage centered. */
@media (max-width: 767px) and (orientation: portrait) {
  .marine-video {
    --marine-video-position: 50% 42%;
  }
}
