/* Hallmark · Photographic · modern-minimal · existing Coral brand.
   Pre-emit critique: P4 H5 E4 S5 R5 V4. Gallery B and full-width video preserve the catalogue below. */
body[data-view="gallery"] main,
body[data-view="videos"] main { max-width: none; padding: 0; }
body[data-view="gallery"] .library-content,
body[data-view="videos"] .library-content { padding-top: var(--space-8); }

.media-feature {
  --media-feature-shadow: oklch(12% .008 65 / 92%);
  --media-feature-rule: oklch(98.5% .003 80 / 40%);
  --media-feature-player: oklch(12% .008 65);
  min-width: 0;
}
.media-feature-gallery {
  /* Height is derived from the two native aspect ratios so the pair fills the
     same content width as the catalogue without cropping either image. */
  --media-feature-height: clamp(360px, calc((100vw - 120px) / 2.36), 675px);
  width: 100%;
  max-width: 1720px;
  margin: var(--space-5) auto 0;
  padding-inline: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
}
.media-feature-work {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-width: 0;
  min-height: 0;
  background: var(--media-feature-player);
  color: var(--color-on-image);
}
.media-feature-work::after {
  content: '';
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(to bottom, var(--color-clear), var(--media-feature-shadow));
  pointer-events: none;
  z-index: 1;
}
.media-feature-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-feature-skeleton {
  background: linear-gradient(100deg, oklch(23% .008 65) 20%, oklch(30% .012 65) 38%, oklch(23% .008 65) 56%);
  background-size: 220% 100%;
  animation: media-feature-shimmer 1.5s linear infinite;
}
.media-feature-skeleton::after { content: none; }
@keyframes media-feature-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.media-feature-gallery .media-feature-main { height: var(--media-feature-height); width: auto; aspect-ratio: 1920 / 1072; flex: 0 0 auto; border-radius: var(--radius-md); }
.media-feature-main .media-feature-image { object-position: center top; }
.media-feature-companions { min-width: 0; height: var(--media-feature-height); width: auto; display: flex; flex-direction: column; gap: var(--space-5); }
.media-feature-companions-single { display: block; width: auto; height: var(--media-feature-height); aspect-ratio: 768 / 1344; flex: 0 0 auto; }
.media-feature-small { min-height: 0; height: 100%; width: auto; border-radius: var(--radius-md); }
.media-feature-companions-single .media-feature-small { height: 100%; width: 100%; }
.media-feature-solo { grid-template-columns: minmax(0, 1fr); }
.media-feature-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--color-clear);
  color: var(--color-on-image);
  z-index: 2;
}
.media-feature-open:focus-visible { outline: 3px solid var(--color-on-image); outline-offset: -6px; }
.media-feature-open:active { transform: none; }
.media-feature-caption { position: absolute; left: 28px; right: 80px; bottom: 26px; z-index: 3; pointer-events: none; }
.media-feature-caption h2 { margin: 0; font-size: clamp(23px, 2.1vw, 32px); font-weight: 700; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.media-feature-caption p { margin: 10px 0 0; font-size: 13px; color: var(--color-on-image); overflow-wrap: anywhere; }
.media-feature-caption p span + span::before { content: ' / '; opacity: .65; margin-inline: 10px; }
.media-feature-small .media-feature-caption { left: 22px; right: 20px; bottom: 18px; }
.media-feature-small .media-feature-caption h2 { font-size: 19px; }
.media-feature-small .media-feature-caption p { display: none; }
.media-feature .media-feature-save { width: 44px; height: 44px; top: 24px; right: 28px; box-shadow: none; z-index: 4; }
.media-feature .media-feature-save svg { width: 18px; height: 18px; }

.media-feature-videos { width: 100%; height: clamp(380px, 35vw, 560px); }
.media-feature-videos .media-feature-work { height: 100%; }
.media-feature-videos .media-feature-image { object-position: center 42%; }
.media-feature-videos .media-feature-caption { left: max(var(--space-5), calc((100% - 1624px) / 2)); right: 100px; bottom: 30px; }
.media-feature-videos .media-feature-caption h2 { font-size: clamp(25px, 2.3vw, 40px); }
.media-feature-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border: 1px solid var(--media-feature-rule); border-radius: 50%; display: grid; place-items: center; background: var(--color-overlay); transition: background var(--dur-short) var(--ease-out); }
.media-feature-play svg { width: 28px; height: 28px; fill: var(--color-on-image); stroke: none; margin-left: 4px; }
.media-feature-duration { position: absolute; right: 24px; bottom: 24px; padding: 4px 8px; color: var(--color-on-image); background: var(--color-image-overlay); border-radius: 4px; font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; z-index: 3; }
@media (hover: hover) and (pointer: fine) {
  .media-feature-open:hover .media-feature-play { background: var(--color-image-overlay); }
  .media-feature .media-feature-save:hover { background: var(--color-accent-soft); color: var(--color-accent); }
}
@media (min-width: 40rem) {
  .media-feature-gallery { padding-inline: var(--space-8); margin-top: 28px; }
  .media-feature-videos .media-feature-caption { left: max(var(--space-8), calc((100% - 1624px) / 2)); }
}
@media (min-width: 60rem) {
  .media-feature-gallery { padding-inline: var(--space-10); }
  .media-feature-videos .media-feature-caption { left: max(var(--space-10), calc((100% - 1624px) / 2)); }
}
@media (min-width: 85rem) {
  .media-feature-gallery { padding-inline: var(--space-12); }
  .media-feature-videos .media-feature-caption { left: max(var(--space-12), calc((100% - 1624px) / 2)); }
}
@media (min-width: 40rem) and (max-width: 59.99rem) {
  .media-feature-gallery { --media-feature-height: clamp(300px, calc((100vw - 80px) / 2.36), 500px); gap: var(--space-4); }
  .media-feature-companions { gap: var(--space-4); }
  .media-feature-small .media-feature-caption h2 { font-size: 15px; }
  .media-feature-videos { height: 380px; }
}
@media (max-width: 39.99rem) {
  .media-feature-gallery { display: flex; flex-direction: column; align-items: stretch; margin-top: 18px; padding-inline: var(--space-5); }
  .media-feature-gallery .media-feature-main { height: auto; width: 100%; }
  .media-feature-caption { left: 18px; right: 18px; bottom: 18px; }
  .media-feature-caption h2 { font-size: 21px; }
  .media-feature-caption p { font-size: 11px; }
  .media-feature-companions { margin-top: 14px; display: flex; flex-direction: row; gap: 14px; height: auto; }
  .media-feature-companions-single { display: block; width: 62%; height: auto; align-self: center; }
  .media-feature-companions-single .media-feature-small { height: 100%; width: 100%; }
  .media-feature-small .media-feature-caption { left: 10px; right: 10px; bottom: 12px; }
  .media-feature-small .media-feature-caption h2 { font-size: 12px; line-height: 1.4; }
  .media-feature .media-feature-save { top: 14px; right: 14px; }
  .media-feature-videos { height: auto; aspect-ratio: 16 / 10; }
  .media-feature-videos .media-feature-caption { left: var(--space-5); right: 72px; bottom: 16px; }
  .media-feature-videos .media-feature-caption h2 { font-size: clamp(18px, 4.8vw, 21px); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .media-feature-videos .media-feature-caption p { margin-top: 6px; font-size: 10px; }
  .media-feature-videos .media-feature-play { width: 52px; height: 52px; top: 38%; }
  .media-feature-videos .media-feature-play svg { width: 20px; height: 20px; }
  .media-feature-videos .media-feature-duration { right: 14px; bottom: 16px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .media-feature-play { transition: none; }
  .media-feature-skeleton { animation: none; }
}
