/* Site styling for hero blocks. Loaded only on pages that use a hero. */

/* ── Page hero (split) ─────────────────────────────────────────────────────── */
.block--hero:not(.statement) { padding-block: 4rem 5rem; }
.block--hero .hero--split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 3rem; }
.block--hero .hero--split .hero__content { display: flex; flex-direction: column; align-items: flex-start; gap: 1.75rem; }
.block--hero .hero--split .hero__content > * + * { margin-top: 0; }

/* Eyebrow with a Sea Glass accent bar */
.block--hero .hero--split .eyebrow { display: inline-flex; align-items: center; gap: 0.75rem; }
.block--hero .hero--split .eyebrow::before { content: ""; flex: none; width: 3rem; height: 0.5rem; background: var(--pec-sea-glass); }

.block--hero .hero__title { font-size: var(--maw-text-4xl); line-height: 1.04; letter-spacing: -0.015em; }

/* First paragraph is the serif statement, the rest is quieter body copy */
.block--hero .hero--split .hero__text { max-width: 34em; font-size: var(--maw-text-base); }
.block--hero .hero--split .hero__text p:first-child { max-width: 30em; font-family: var(--maw-font-heading); font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.35; color: var(--maw-text); }
.block--hero .hero--split .hero__text p + p { margin-top: 1.75rem; }

.block--hero .hero--split .hero__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

@media (max-width: 860px) {
  .block--hero .hero--split { grid-template-columns: 1fr; }
  .block--hero:not(.statement) { padding-block: 3rem 4rem; }
}

/* ── Statement band (hero, background layout, class "statement") ───────────── */
.block--hero.statement { background: var(--pec-deep-pacific); overflow: hidden; }
.block--hero.statement .hero--background { min-height: 0; align-items: end; }
.block--hero.statement .hero--background .hero__media img { object-position: 50% 30%; }
.block--hero.statement .hero--background .hero__media::after { background: rgb(36 70 83 / 0.55); }
.block--hero.statement .hero--background .hero__content {
  max-width: none;
  margin-inline: max(var(--maw-gutter), calc((100vw - var(--maw-container)) / 2));
  padding-block: 10.5rem 4rem;
  color: var(--pec-ivory);
}
.block--hero.statement .hero__title { max-width: 22em; font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1.18; letter-spacing: -0.01em; text-wrap: pretty; }
.block--hero.statement .hero__title em { color: var(--pec-eucalyptus); }

@media (max-width: 640px) {
  .block--hero.statement .hero--background .hero__content { padding-block: 7rem 3rem; }
}

/* ── Hero photograph: a soft shadow and an offset Sea Glass keyline so it lifts off the band ── */
.block--hero .hero--split .hero__media { isolation: isolate; margin: 0 0.875rem 0.875rem 0; }
.block--hero .hero--split .hero__media::before { content: ""; position: absolute; inset: 0.875rem -0.875rem -0.875rem 0.875rem; z-index: -1; border: 1px solid var(--pec-sea-glass); }
.block--hero .hero--split .hero__media img { box-shadow: 0 1.5rem 3rem -1.5rem rgb(8 24 30 / 0.6); }

/* Centered hero (Services index) */
.block--hero .hero--centered .hero__content > * + * { margin-top: 1.5rem; }
.block--hero .hero--centered .hero__title { font-size: clamp(2.5rem, 5vw, 4rem); }
.block--hero .hero--centered .hero__text { font-size: var(--maw-text-lg); }

/* Service and About heroes use long titles: a smaller display size than the home page */
.block--hero .hero--split .hero__title { overflow-wrap: break-word; }
body:not(.home) .block--hero .hero--split .hero__title { font-size: clamp(2.25rem, 4.2vw, 3.5rem); line-height: 1.1; }

/* Class "hero-portrait": keep the face in frame */
.block--hero.hero-portrait .hero__media img { object-position: 50% 20%; }

/* Class "hero-natural": show the whole image (artwork such as infographics), not a 4:5 crop */
.block--hero.hero-natural .hero--split .hero__media img { aspect-ratio: auto; }

/* Class "hero-focus-right": the subject sits right of centre in the photograph */
.block--hero.hero-focus-right .hero__media img { object-position: 72% 50%; }
