/* Page templates opt in through EditorialHero. The selectors below supersede
   the Modernist's generic hero skin without changing any other sections. */
.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] {
  --editorial-navy: #0b1627;
  --editorial-ink: #fff;
  --editorial-subtle: #e0e8f0;
  --editorial-lime: #d6ff7a;
  --editorial-copy: min(55vw, 650px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 470px;
  padding: clamp(46px, 5.5vw, 82px) 0 !important;
  color: var(--editorial-ink) !important;
  background: var(--editorial-navy) !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero="compact"][data-editorial-hero] {
  min-height: 0;
  padding-block: clamp(36px, 4.5vw, 66px) !important;
}

.editorial-hero-media {
  display: block !important;
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.editorial-hero-media img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus);
}

.editorial-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(11 22 39 / 42%), transparent 44%),
    linear-gradient(90deg, rgb(11 22 39 / 97%) 0%, rgb(11 22 39 / 92%) 29%, rgb(11 22 39 / 78%) 49%, rgb(11 22 39 / 28%) 68%, transparent 86%);
}

.editorial-hero-media[data-editorial-framing="right"] img {
  position: absolute;
  right: 0;
  width: 76%;
}

[data-editorial-framing="right"].editorial-hero-media::after {
  background:
    linear-gradient(to top, rgb(11 22 39 / 40%), transparent 44%),
    linear-gradient(90deg, var(--editorial-navy) 0 24%, rgb(11 22 39 / 90%) 39%, rgb(11 22 39 / 76%) 49%, rgb(11 22 39 / 25%) 63%, transparent 78%);
}

[data-editorial-hero="centered"] .editorial-hero-media::after {
  background: linear-gradient(90deg, rgb(11 22 39 / 76%), rgb(11 22 39 / 90%) 36%, rgb(11 22 39 / 80%) 69%, rgb(11 22 39 / 36%));
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] > .absolute {
  display: none !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-badge] {
  display: none !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] > [data-editorial-hero-copy] {
  position: relative;
  z-index: 0;
  width: min(100%, 1440px);
  max-width: 1440px !important;
  min-width: 0;
  margin: 0 auto !important;
  padding: 0 clamp(24px, 6vw, 90px) !important;
  text-align: left !important;
}

[data-editorial-hero]:not([data-editorial-hero="centered"]) > [data-editorial-hero-copy] > * {
  max-width: var(--editorial-copy) !important;
  margin-inline: 0 !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero="centered"][data-editorial-hero] > [data-editorial-hero-copy] {
  max-width: 870px !important;
  text-align: center !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is(h1, nav, nav a, nav span, nav svg) {
  color: var(--editorial-ink) !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] h1 {
  max-width: var(--editorial-copy) !important;
  margin: 0 0 18px !important;
  font-size: clamp(38px, 3.85vw, 58px) !important;
  letter-spacing: -.036em !important;
  line-height: 1.08 !important;
  text-transform: none !important;
  text-wrap: balance;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero="centered"][data-editorial-hero] [data-editorial-hero-copy] h1 {
  max-width: none !important;
  text-align: center !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] h1 :is(span, em, strong) {
  color: #b9d6ff !important;
  -webkit-text-fill-color: #b9d6ff !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is(p, small, time, [class*="text-slate-"], .reviewed-byline a):not(:where([data-editorial-primary], [data-editorial-primary] *)) {
  color: var(--editorial-subtle) !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :where(span):not(:where(h1 *, a *, button *)) {
  color: var(--editorial-subtle) !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] p:not(:where(.proof-strip, .proof-strip *, .reviewed-byline, .reviewed-byline *)) {
  line-height: 1.62 !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] h1 + p {
  margin-block: 0 16px !important;
  font-size: clamp(15px, 1.2vw, 18px) !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is(.service-hero-actions, .recovery-actions, div:has(> :is([data-editorial-primary], [data-consultation-anchor], button[data-cta-source], a[href="/30min/"]))) {
  margin-top: 18px !important;
}

[data-editorial-hero] [data-editorial-hero-flow] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

[data-editorial-hero] [data-editorial-hero-flow] [data-editorial-hero-meta] {
  order: 1;
  margin: 16px 0 0 !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] a:not(:where([data-editorial-primary], [data-consultation-anchor], [href="/30min/"], .recovery-button, [data-cta-source][href])) {
  color: var(--editorial-ink) !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] a.border:not(:where([data-editorial-primary], [data-consultation-anchor], [href="/30min/"], .recovery-button)) {
  color: var(--editorial-ink) !important;
  border: 1px solid rgb(224 232 240 / 60%) !important;
  background: transparent !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is([data-editorial-primary], [data-consultation-anchor], [href="/30min/"], .recovery-button, button[data-cta-source]),
.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is([data-editorial-primary], [data-consultation-anchor], [href="/30min/"], .recovery-button, button[data-cta-source]) span {
  color: #102319 !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is([data-editorial-primary], [data-consultation-anchor], [href="/30min/"], .recovery-button, button[data-cta-source]) {
  min-height: 44px;
  border: 1px solid var(--editorial-lime) !important;
  border-radius: 6px !important;
  background: var(--editorial-lime) !important;
  box-shadow: none !important;
  text-align: left;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is([data-editorial-primary], [data-consultation-anchor], [href="/30min/"], .recovery-button, button[data-cta-source]):hover {
  background: #e6ffa7 !important;
}

.modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] :is([data-editorial-primary], [data-consultation-anchor], [href="/30min/"], .recovery-button, button[data-cta-source]) span {
  background: transparent !important;
}

[data-editorial-hero] :is(a, button):focus-visible {
  outline: 2px solid var(--editorial-ink);
  outline-offset: 4px;
}

[data-editorial-hero]:not([data-editorial-hero="centered"]) [data-editorial-hero-copy] .justify-center {
  justify-content: flex-start !important;
}

@media (min-width: 1024px) {
  .modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] {
    padding-top: max(108px, 7.5vw) !important;
  }

  .editorial-hero-media[data-editorial-framing="right"] img {
    top: 84px;
    height: calc(100% - 84px);
  }
}

@media (max-width: 780px) {
  .modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] {
    --editorial-copy: 100%;
    --editorial-scene: clamp(134px, 41vw, 205px);
    min-height: 0;
    padding: calc(var(--editorial-scene) - 14px) 0 28px !important;
  }

  .modernist-site.modernist-site[data-page-path] [data-editorial-hero="compact"][data-editorial-hero] {
    --editorial-scene: clamp(82px, 23vw, 116px);
    padding-block: calc(var(--editorial-scene) - 8px) 24px !important;
  }

  .editorial-hero-media {
    top: 24px;
    bottom: auto;
    height: calc(var(--editorial-scene) + 28px);
  }

  .editorial-hero-media img,
  .editorial-hero-media[data-editorial-framing="right"] img {
    width: 100%;
    object-position: var(--hero-focus-mobile);
  }

  .editorial-hero-media::after,
  [data-editorial-framing="right"].editorial-hero-media::after,
  [data-editorial-hero="centered"] .editorial-hero-media::after {
    background: linear-gradient(to bottom, transparent 26%, rgb(11 22 39 / 30%) 50%, rgb(11 22 39 / 82%) 73%, var(--editorial-navy) 99%);
  }

  .modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] > [data-editorial-hero-copy] {
    padding-inline: clamp(18px, 5.6vw, 42px) !important;
  }

  .modernist-site.modernist-site[data-page-path] [data-editorial-hero][data-editorial-hero] [data-editorial-hero-copy] h1 {
    margin-bottom: 14px !important;
    font-size: clamp(30px, 8.5vw, 46px) !important;
  }
}

@media print {
  [data-editorial-hero] .editorial-hero-media { display: none !important; }
}
