/* Painted landscapes: fixed brushwork, with slowly changing light. */
@media screen {
  .editorial-home .light-passage {
    width: 100%;
    margin-top: 0;
    mask-image: none;
  }
  .editorial-home .hero { border-bottom: 1px solid var(--hair); }
  .editorial-home .journal { padding-top: clamp(3rem,5cqw,5rem); }
  /* Keep the same pigment depth across wide and portrait compositions. */
  .editorial-home .light-passage .water-study__surface {
    opacity: 1;
    filter: contrast(1.12) saturate(1.08) brightness(.97);
  }
  html[data-appearance-scheme="dark"] .editorial-home .light-passage .water-study__surface {
    filter: contrast(1.035) saturate(1.08) brightness(.90);
  }
  @media (prefers-color-scheme: dark) {
    html:not([data-appearance-scheme]) .editorial-home .light-passage .water-study__surface {
      filter: contrast(1.035) saturate(1.08) brightness(.90);
    }
  }
  /* Keep the reading palette coherent while a matching edition decodes. */
  .editorial-home [data-painted-scheme-mismatch="true"] .water-study__surface { visibility: hidden; }
  .editorial-home [data-painted-scheme-mismatch="true"] :is(.water-study__fallback,.water-study__canvas) { visibility: hidden; }
  .editorial-home .water-study__surface :is(img,canvas) { object-fit: cover; object-position: 50% 50%; }
  html[data-appearance-scheme="light"] .editorial-home .hero__lede { color: var(--ink); }
  html[data-appearance-scheme="dark"] .editorial-home .hero__lede { color: color-mix(in srgb,var(--ink) 20%,var(--muted)); }
  .editorial-home .light-passage:has([data-painted-scene="forest"])::after {
    mask-image: linear-gradient(180deg,#000 calc(var(--painted-copy-end,70%) + 1rem),transparent);
  }
  @container (min-width: 75rem) {
    html[data-appearance-scheme="light"] .editorial-home .hero__premise { color: color-mix(in srgb,var(--ink) 90%,var(--paper)); }
    html[data-appearance-scheme="light"] .editorial-home .hero__lede { color: var(--ink); }
    html[data-appearance-scheme="light"] .editorial-home .hero__contact { color: color-mix(in srgb,var(--signal) 10%,var(--ink)); }
    .editorial-home .hero { position: relative; isolation: isolate; overflow: clip; }
    .editorial-home .hero__opening {
      display: block;
      min-height: clamp(38rem,65svh,43rem);
      padding-bottom: 5rem;
    }
    .editorial-home .hero__copy { position: relative; z-index: 1; max-width: 42rem; }
    .editorial-home .light-passage {
      position: absolute;
      z-index: 0;
      inset: 0;
      width: 100%;
      height: 100%;
      aspect-ratio: auto;
      margin: 0;
    }
    .editorial-home .light-passage::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg,color-mix(in srgb,var(--paper) 55%,transparent),color-mix(in srgb,var(--paper) 44%,transparent) 30%,color-mix(in srgb,var(--paper) 20%,transparent) 46%,transparent 62%);
      pointer-events: none;
    }
    html[data-appearance-scheme="dark"] .editorial-home .light-passage::after {
      background: linear-gradient(90deg,color-mix(in srgb,var(--paper) 66%,transparent),color-mix(in srgb,var(--paper) 60%,transparent) 30%,color-mix(in srgb,var(--paper) 45%,transparent) 48%,transparent 65%);
    }
  }
  @container (max-width: 74.999rem) {
    /* End the reading veil below the copy, leaving the lower painting clear. */
    .editorial-home .light-passage:has([data-painted-scene="forest"])::after {
      mask-image: linear-gradient(180deg,#000 calc(var(--painted-copy-end,70%) + 1rem),transparent calc(var(--painted-copy-end,70%) + 6rem));
    }
    .editorial-home .light-passage {
      height: 100%;
      aspect-ratio: auto;
      mask-image: none;
      mask-composite: add;
      -webkit-mask-composite: source-over;
    }
    .editorial-home .light-passage .water-study__surface { opacity: 1; }
    html[data-appearance-scheme="dark"] .editorial-home .light-passage .water-study__surface { opacity: 1; }
    .editorial-home .light-passage::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg,color-mix(in srgb,var(--paper) 20%,transparent),transparent 64%);
      pointer-events: none;
    }
    html[data-appearance-scheme="light"] .editorial-home .light-passage:has([data-painted-scene="forest"])::after {
      background: linear-gradient(90deg,color-mix(in srgb,var(--paper) 46%,transparent),color-mix(in srgb,var(--paper) 42%,transparent) 88%,color-mix(in srgb,var(--paper) 32%,transparent));
    }
    html[data-appearance-scheme="dark"] .editorial-home .light-passage::after {
      background: linear-gradient(180deg,color-mix(in srgb,var(--paper) 32%,transparent),transparent 64%);
    }
    html[data-appearance-scheme] .editorial-home .light-passage:has([data-water-copy-overlap="true"])::after {
      background: linear-gradient(180deg,color-mix(in srgb,var(--paper) 40%,transparent),color-mix(in srgb,var(--paper) 76%,transparent) 52%,color-mix(in srgb,var(--paper) 76%,transparent) 92%,transparent);
    }
  }
  @media (min-width: 48rem) and (max-width: 74.999rem) and (orientation: portrait) {
    .editorial-home .light-passage { top: -12rem; height: calc(100% + 12rem); }
    html[data-appearance-scheme="dark"] .editorial-home .light-passage::after {
      background: linear-gradient(90deg,color-mix(in srgb,var(--paper) 60%,transparent),color-mix(in srgb,var(--paper) 52%,transparent) 62%,transparent);
    }
  }
  @media (max-width: 47.999rem) and (orientation: portrait) {
    .editorial-home [data-painted-scene="forest"] .water-study__surface img { object-position: 25% 50%; }
    html[data-appearance-scheme="dark"] .editorial-home .light-passage::after {
      background: linear-gradient(90deg,color-mix(in srgb,var(--paper) 55%,transparent),color-mix(in srgb,var(--paper) 48%,transparent) 88%,color-mix(in srgb,var(--paper) 35%,transparent));
    }
  }
  @media (max-width: 74.999rem) and (orientation: landscape) {
    html[data-appearance-scheme] .editorial-home .light-passage::after { background: linear-gradient(90deg,color-mix(in srgb,var(--paper) 80%,transparent),color-mix(in srgb,var(--paper) 65%,transparent) 40%,transparent 82%); }
  }
  /* Without script, the copy itself sets the veil's height as text reflows. */
  html:not([data-appearance-scheme]) .editorial-home .light-passage::after { content: none; }
  html:not([data-appearance-scheme]) .editorial-home .hero__copy::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -2rem -8rem -4rem calc(-1 * var(--pad));
    background: linear-gradient(90deg,transparent,color-mix(in srgb,var(--paper) 74%,transparent) var(--pad),color-mix(in srgb,var(--paper) 74%,transparent) calc(100% - 8rem),transparent);
    mask-image: linear-gradient(180deg,transparent,#000 2rem,#000 calc(100% - 4rem),transparent);
    pointer-events: none;
  }
  html:not([data-appearance-scheme]) .editorial-home .hero__premise { color: color-mix(in srgb,var(--ink) 90%,var(--paper)); }
  html:not([data-appearance-scheme]) .editorial-home .hero__lede { color: var(--ink); }
  html:not([data-appearance-scheme]) .editorial-home .hero__contact { color: color-mix(in srgb,var(--signal) 10%,var(--ink)); }
}
