.journal-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template: auto minmax(32px,1fr) auto / minmax(0,1fr);
  background: linear-gradient(112deg,#13222d,#233b4b);
}
.journal-hero:has(.folio-cover:not([hidden])) {
  --hero-fade: clamp(100px,32svh,350px);
  min-height: calc(100svh - var(--brand-header));
}
.interior.folio .journal-hero > .folio-cover {
  position: absolute; inset: 0; z-index: -2; display: block;
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  object-fit: cover; object-position: center 45%; border: 0; border-radius: 0; box-shadow: none;
}
.interior.folio .journal-hero > .folio-cover[hidden] { display: none; }
@media (orientation:portrait) {
  /* Add space above the square from its topmost pixels and continue the blue ground below. */
  .interior.folio .journal-hero > .folio-cover[data-portrait-scene="chain"] {
    --scene-top: clamp(0px, calc((100svh - var(--brand-header) - 100vw) * .75 - 165px), 200px);
    box-sizing: border-box;
    border-top: var(--scene-top) solid transparent;
    border-image: var(--scene-edge) 1 0 0 / var(--scene-top) 0 0 stretch;
    object-fit: contain;
    object-position: center top;
    background: linear-gradient(to bottom, #7093ad min(100vw,100%), #253e50) padding-box;
  }
}
@media (orientation:portrait) and (max-height:620px) {
  .journal-hero:has(> .folio-cover:not([hidden])) h1 { font-size: 26px; }
  .journal-hero:has(> .folio-cover:not([hidden])) .journal-hero-heading { padding-bottom: 18px; }
}
/* Both fades follow their text rows so a wrapping heading stays over the dark part. */
.journal-hero:has(.folio-cover:not([hidden]))::before {
  content: ''; grid-area: 3 / 1; z-index: -1; pointer-events: none;
  margin-top: calc(-1 * var(--hero-fade));
  background: linear-gradient(to bottom, rgb(10 23 35 / 0),
    rgb(10 23 35 / .13) calc(var(--hero-fade) * .36),
    rgb(10 23 35 / .47) calc(var(--hero-fade) * .72),
    rgb(10 23 35 / .74) var(--hero-fade), rgb(10 23 35 / .89));
}
.journal-hero:has(.folio-cover:not([hidden]))::after {
  content: ''; grid-area: 1 / 1; z-index: -1; pointer-events: none;
  margin-bottom: -80px;
  background: linear-gradient(to bottom,rgb(10 23 35 / .8),rgb(10 23 35 / .69) 38%,transparent);
}
.interior.folio .journal-hero .folio-crumb {
  grid-area: 1 / 1; margin-block: 0; padding-top: clamp(14px,2.5vh,24px); color: #e3edf1;
}
.journal-hero-heading { grid-area: 3 / 1; padding-bottom: clamp(26px,6svh,72px); }
.journal-hero .journal-hero-date {
  margin: 0 0 14px; color: #b3d6df; font: 500 13px/1.5 var(--brand-font); text-wrap: pretty;
}
.journal-hero .journal-hero-date::before {
  content: ''; display: inline-block; vertical-align: middle; width: 28px; height: 1px;
  margin-right: 10px; background: #84c8d3;
}
.journal-hero h1 {
  max-width: 30ch; color: #f2f6f7; font: 490 clamp(30px,3.9vw,68px)/1.08 var(--brand-font);
  letter-spacing: -.048em; overflow-wrap: anywhere; text-wrap: balance; margin: 0;
}
.journal-title-lead { display: block; margin-bottom: .13em; color: #b0dfe7; }
.journal-title-detail { display: block; font-size: .86em; line-height: 1.14; letter-spacing: -.034em; }
.journal-hero > .journal-cover-wash {
  display: none; position: absolute; inset: 0; z-index: -3;
  width: 100%; height: 100%; transform: scale(1.12); pointer-events: none;
}

@media (orientation:portrait), (max-width:1000px) and (max-height:500px) {
  .journal-hero:has(> .folio-cover:not([hidden],[data-portrait-scene])) {
    --hero-fade: clamp(32px,8svh,72px);
    grid-template-rows: auto minmax(min(40vw,26svh),1fr) auto;
  }
  .journal-hero:has(> .folio-cover:not([hidden],[data-portrait-scene])) > .journal-cover-wash:not([hidden]) {
    display: block; object-fit: fill; filter: blur(28px);
  }
  .interior.folio .journal-hero > .folio-cover:not([hidden],[data-portrait-scene]) {
    grid-area: 2 / 1 / 3 / 2;
    width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto;
    object-fit: contain; object-position: center;
    mask-image: linear-gradient(to bottom,#000c,#000 min(12px,3%),#000 max(calc(100% - 12px),97%),#000c);
  }
}
@media (orientation:landscape) and (max-width:1000px) and (max-height:500px) {
  .journal-hero:has(> .folio-cover:not([hidden])) {
    grid-template: auto minmax(130px,1fr) / minmax(0,1fr) minmax(0,1.15fr);
  }
  .journal-hero:has(> .folio-cover:not([hidden])) > .journal-cover-wash:not([hidden]) {
    display: block; object-fit: cover; filter: blur(24px) brightness(.4);
  }
  .interior.folio .journal-hero > .folio-cover:not([hidden]) { grid-area: 2 / 1 / 3 / 2; object-fit: contain; object-position: center; }
  .journal-hero:has(> .folio-cover:not([hidden])) .folio-crumb { grid-area: 1 / 1 / 2 / -1; }
  .interior .journal-hero:has(> .folio-cover:not([hidden])) .journal-hero-heading { grid-area: 2 / 2; align-self: end; width: auto; margin-inline: 20px; }
  .journal-hero:has(> .folio-cover:not([hidden]))::before { grid-area: 1 / 2 / -1; margin: 0; background: #0a1723aa; }
}
