/* Hallmark · component: pinned-image / paper-cover scenes · genre: editorial
 * studied-DNA: user's Claude PatternF · existing Carlman palette/type preserved
 * pre-emit critique: P4 H4 E4 S5 R4 V4
 * CSS sticky follows native scrolling; no scroll hijack or extra replay controls.
 */
:root {
  --pin-photo-height: min(55svh, 520px);
  --pin-paper-padding: clamp(24px, 5vw, 72px);
  --pin-z-image: 1;
  --pin-z-paper: 2;
}
.e-intro-sequence { position: relative; isolation: isolate; }
.e-intro-sequence > .e-hero { overflow: clip; z-index: var(--pin-z-image); }
html[data-pin-ready] .e-intro-sequence > .e-hero {
  position: sticky;
  /* A tall FV scrolls to its bottom before pinning. Its CTA is never trapped. */
  top: min(var(--e-header-height), calc(100svh - var(--pin-hero-height)));
}
.e-intro-sequence > .story-signs {
  position: relative;
  z-index: var(--pin-z-paper);
  background: var(--color-paper-2);
  border-top: 1px solid var(--color-rule);
}
.e-intro-sequence > .story-signs::before,
.field-records .field-pin-story > figcaption::before {
  content: '';
  position: absolute;
  inset: -12px 0 auto;
  height: 13px;
  background: inherit;
  clip-path: polygon(0 100%, 0 45%, 12% 58%, 25% 30%, 40% 55%, 58% 24%, 73% 50%, 88% 32%, 100% 55%, 100% 100%);
  pointer-events: none;
}

.field-records { padding-bottom: 0; overflow: clip; }
.field-records .field-wrap { width: 100%; }
.field-records .field-heading { width: min(1320px, calc(100% - 36px)); margin: 0 auto 32px; padding: 0; }
.field-records .field-showcase,
.field-records .field-detail-pair { display: block; margin: 0; padding: 0; border: 0; }
.field-records .field-pin-story {
  display: block;
  position: relative;
  isolation: isolate;
  margin: 0 !important;
  background: var(--color-green-dark);
}
.field-pin-visual {
  position: sticky;
  top: var(--e-header-height);
  z-index: var(--pin-z-image);
  height: var(--pin-photo-height);
  overflow: clip;
  background: var(--color-green-dark);
}
.field-records .field-pin-visual img {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 45%;
}
.field-records .field-side-photo .field-pin-visual img { object-position: 50% 38%; }
.field-records .field-detail-pair .field-pin-story:first-child img { object-position: 60% 50%; }
.field-records .field-pin-story > figcaption {
  position: relative;
  z-index: var(--pin-z-paper);
  display: grid;
  align-content: center;
  gap: 20px;
  min-height: var(--pin-photo-height);
  margin: 0;
  padding: 36px max(24px, calc((100% - 1200px) / 2));
  background: var(--color-paper);
  color: var(--color-green);
}
.field-records .field-pin-story > figcaption h3 {
  font-family: var(--font-display);
  color: var(--color-green);
  font-size: clamp(26px, 4.1vw, 56px);
  line-height: 1.55;
  margin: 0;
}
.field-records .field-pin-story > figcaption p {
  font-size: 16px;
  line-height: 1.95;
  max-width: 36em;
  margin: 0;
  color: var(--color-ink);
}
.field-records .field-pin-story > figcaption strong { color: var(--color-green); font-weight: 800; }
@media (min-width: 48rem) {
  :root { --pin-photo-height: min(70svh, 760px); }
  .field-records .field-heading { width: min(1320px, calc(100% - 80px)); margin-bottom: 48px; }
  .field-records .field-pin-story > figcaption {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 112px);
    padding: var(--pin-paper-padding) max(40px, calc((100% - 1200px) / 2));
  }
  .field-records .field-pin-story > figcaption p { font-size: 18px; }
}
/* Short landscape screens keep every image within the available viewport. */
@media (max-height: 500px) {
  :root { --pin-photo-height: calc(100svh - var(--e-header-height) - 24px); }
}
/* Stop spatial pinning as well as animations. Content and image order remain. */
html[data-motion="off"] .e-intro-sequence > .e-hero,
html[data-motion="off"] .field-pin-visual { position: relative; top: auto; }
html[data-motion="off"] .field-records .field-pin-story > figcaption { min-height: 0; }
@media (prefers-reduced-motion: reduce) {
  html[data-pin-ready] .e-intro-sequence > .e-hero,
  .field-pin-visual { position: relative; top: auto; }
  .field-records .field-pin-story > figcaption { min-height: 0; }
}
@media print {
  html[data-pin-ready] .e-intro-sequence > .e-hero,
  .field-pin-visual { position: relative; top: auto; height: auto; }
  .field-records .field-pin-story > figcaption { min-height: 0; }
  .field-records .field-pin-visual img { height: auto; }
}
