/* hero — how its words and its photo stand, by its own classes (`hero--side`, `hero--cover`,
   `hero--editorial`). No outer padding: the section's large space gives it its height. */

.hero         { position: relative; isolation: isolate; }
.hero-inner   { display: grid; grid-template-columns: 1fr; gap: var(--grid-gap); align-items: center; }
.hero-photo   { width: 100%; border-radius: var(--radius); }
/* The photo's frame takes no box of its own but in the editorial look: side and cover place the photo itself. */
.hero-figure  { display: contents; margin: 0; }

.hero .lead { margin-bottom: 2.4rem; }

/* side: the photo beside the words — the band's whole height, top edge to bottom edge, out to its side edge (a
   small framed picture beside a tall heading read as a thumbnail). The band's space goes inside, to the words; the
   photo's column stays reserved in the grid. */
.hero--side.has-photo .hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 4vw, 4rem); padding-block: var(--space); }
.hero--side.has-photo .hero-copy  { grid-column: 1; grid-row: 1; }
.hero--side.has-photo .hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 45%; height: 100%; object-fit: cover; border-radius: 0; }
.section:has(> .hero--side.has-photo) { padding-block: 0; }
/* …in the page's column (a band of normal or narrow width): a card there, its corners rounded */
.container .hero--side.has-photo                 { border-radius: var(--radius); overflow: hidden; }

/* cover: the photo behind the words — placed against the hero (the column is not positioned), edge to edge —
   a scrim over it, the words light */
.hero--cover .hero-photo            { position: absolute; inset: 0; height: 100%; object-fit: cover; border-radius: 0; z-index: -1; }
.hero--cover.has-photo              { color: #fff; padding-block: var(--space); }
/* Over the darkened photo the words are light whatever the design's ground: its colours are set again here, so
   the heading (--ink), the lead (--body-text), the eyebrow and the outlined button (--mark) follow. */
.hero--cover.has-photo              { --ink: #fff; --body-text: rgba(255, 255, 255, .88); --muted: rgba(255, 255, 255, .72);
                                      --mark: #fff; --line: rgba(255, 255, 255, .4); }
/* …the whole band: the section's space is taken inside the hero, under the photo (the drawer's «space» still sets it) */
.section:has(> .hero--cover.has-photo) { padding-block: 0; }
.hero--cover.has-photo::after       { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, .55); }
/* …in the page's column (a band of normal or narrow width), not edge to edge: the photo is a card there — its
   corners rounded as a photo beside the words is — and the words keep a margin inside it; a container in a
   container has none of its own. */
.container .hero--cover.has-photo                                  { border-radius: var(--radius); overflow: hidden; }
.container .hero--cover.has-photo .hero-inner                      { padding-inline: clamp(24px, 5vw, 64px); }

/* editorial: the photo tall in a column of its own, with air around it — not to the band's edge; the words held
   down to its foot; a second photo over its lower corner, framed by the page's ground; a line under them. */
.hero--editorial.has-photo .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 35rem); gap: clamp(2rem, 5.5vw, 5rem); align-items: end; }
.hero--editorial .hero-figure          { display: block; grid-column: 2; grid-row: 1; position: relative; }
.hero--editorial .hero-copy            { grid-column: 1; grid-row: 1; padding-bottom: clamp(0rem, 3vw, 3.75rem); padding-right: clamp(0rem, 3vw, 3rem); }
.hero--editorial .hero-photo           { display: block; height: clamp(24rem, min(48vw, 100svh - 13rem), 43.75rem); object-fit: cover; }
.hero--editorial .hero-photo2          { position: absolute; left: clamp(-5rem, -5vw, -2rem); bottom: 3.75rem; width: clamp(9rem, 16vw, 14.4rem);
                                         aspect-ratio: 23 / 29; object-fit: cover; border-radius: var(--radius); box-shadow: 0 0 0 12px var(--bg); }
.hero--editorial .hero-caption         { margin-top: .9rem; font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--muted); }
/* …under the header it starts close: the photo's height is the first screen's, the band's large space would push the
   buttons below it */
.section:has(> .hero--editorial.has-photo) { padding-top: clamp(1.5rem, 4vw, 3.5rem); }

/* poster: the words alone across the page — the lead and the buttons side by side under the headline — and the photo
   (the second beside it) a band from edge to edge under them, between rules. */
.hero--poster .hero-inner            { grid-template-columns: 1fr; gap: 0; }
.hero--poster .hero-copy             { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 2.5rem; padding-bottom: clamp(2rem, 3vw, 2.5rem); }
.hero--poster .hero-copy > :not(.lead, .hero-actions) { grid-column: 1 / -1; }
.hero--poster .hero-copy .lead       { margin-bottom: 0; max-width: 40rem; }
.hero--poster .hero-actions          { justify-content: flex-end; }
.hero--poster .hero-figure           { order: 2; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-inline: calc(50% - 50vw); border-block: 2px solid var(--line); }
.hero--poster .hero-figure:not(:has(.hero-photo2)) { grid-template-columns: 1fr; }
.hero--poster :is(.hero-photo, .hero-photo2) { display: block; width: 100%; height: clamp(20rem, 36vw, 32.5rem); object-fit: cover; border-radius: 0; }
.hero--poster .hero-photo2           { border-left: 2px solid var(--line); }
.section:has(> .hero--poster.has-photo) { padding-bottom: 0; }

@media (max-width: 900px) {
  .hero--poster .hero-copy             { grid-template-columns: 1fr; }
  .hero--poster .hero-actions          { justify-content: flex-start; margin-top: 1.5rem; }
  /* narrow: the words, then the photo under them across the column; the second photo over its corner, smaller */
  .hero--editorial.has-photo .hero-inner { grid-template-columns: 1fr; }
  .hero--editorial .hero-figure          { grid-column: 1; grid-row: 2; }
  .hero--editorial .hero-photo           { height: auto; aspect-ratio: 4 / 5; }
  .hero--editorial .hero-photo2          { left: 1rem; bottom: 2.5rem; width: 34%; }

  /* narrow: no room beside the words — the photo goes behind them, as the cover's: the whole band, a scrim over
     it, the words light */
  .hero--side.has-photo .hero-inner { grid-template-columns: 1fr; }
  .hero--side.has-photo .hero-photo { width: 100%; left: 0; }
  .hero--side.has-photo             { color: #fff; --ink: #fff; --body-text: rgba(255, 255, 255, .88); --muted: rgba(255, 255, 255, .72);
                                      --mark: #fff; --line: rgba(255, 255, 255, .4); }
  .hero--side.has-photo .hero-photo { z-index: -1; }
  .hero--side.has-photo::after      { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, .55); }
}

/* The note: a short line in a bubble on the photo's upper corner — where a direction asks for it (`bubble`). */
.hero-note { position: absolute; z-index: 2; top: clamp(1.5rem, 3vw, 2.5rem); right: clamp(-1.25rem, -1.5vw, -.5rem); max-width: 16rem; margin: 0;
             padding: .9rem 1.2rem; border-radius: 1.25rem; background: var(--bg); color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.35;
             box-shadow: 0 20px 40px -20px var(--shade, rgba(0, 0, 0, .3)); }
.hero--side .hero-note { right: clamp(1rem, 3vw, 2.5rem); }
.hero--cover .hero-note { display: none; }
