/* =====================================================================================================
   Project detail hero (project-hero-1.0, 2026-11-11)

   Loaded by /projects/<slug>/ only (scripts/build-projects.mjs), after css/atelier.css. The photograph is the
   hero, edge to edge and nearly a screen tall; the introduction sits on it: "All projects" at the top left,
   then number / location / year, the name and the intro over the calmest part of the picture. Each project's
   `hero` entry in js/data.js sets the photo's focal point (object-position) and where the intro goes:
     data-intro="beside"      the intro at the bottom right, across from the name (default)
     data-intro="with-title"  the intro under the name, so the right side of the photo stays clear
     data-intro="top"         the intro at the top right
   data-title-size (s / m / l, from the name's length) keeps long names from filling the photograph.
   The scrims are gradients behind the text only: a light one at the top for the back link, a deeper one at
   the bottom for the name and intro. The facts strip stays below the photograph, on the page column.
   ===================================================================================================== */
.at .at-phero.at-phero--over { display: block; max-width: none; margin: 0; padding: 0 0 24px; }
.at .at-phero.at-phero--over > .at-phero__stage { position: relative; width: 100%; padding: 0; overflow: hidden; background: var(--ink); }
.at .at-phero.at-phero--over .at-phero__fig { margin: 0; }
.at .at-phero.at-phero--over .at-phero__fig img {
  display: block; width: 100%; aspect-ratio: auto; object-fit: cover;
  height: clamp(560px, calc(100svh - var(--at-nav)), 980px);
}

/* scrims */
.at .at-phero--over .at-phero__stage::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12, 12, 10, 0.42) 0%, rgba(12, 12, 10, 0) 22%),
    linear-gradient(0deg, rgba(12, 12, 10, 0.76) 0%, rgba(12, 12, 10, 0.52) 26%, rgba(12, 12, 10, 0.2) 46%, rgba(12, 12, 10, 0) 62%);
}
.at .at-phero--over[data-intro="with-title"] .at-phero__stage::after {
  background:
    linear-gradient(180deg, rgba(12, 12, 10, 0.42) 0%, rgba(12, 12, 10, 0) 22%),
    linear-gradient(0deg, rgba(12, 12, 10, 0.74) 0%, rgba(12, 12, 10, 0.5) 30%, rgba(12, 12, 10, 0.18) 50%, rgba(12, 12, 10, 0) 64%),
    linear-gradient(90deg, rgba(12, 12, 10, 0.3) 0%, rgba(12, 12, 10, 0) 58%);
}
.at .at-phero--over[data-intro="top"] .at-phero__stage::after {
  background:
    linear-gradient(180deg, rgba(12, 12, 10, 0.58) 0%, rgba(12, 12, 10, 0) 34%),
    linear-gradient(0deg, rgba(12, 12, 10, 0.7) 0%, rgba(12, 12, 10, 0.4) 22%, rgba(12, 12, 10, 0) 48%);
}

/* the introduction, laid on the photograph */
.at .at-phero--over .at-phero__over {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto;
  column-gap: clamp(32px, 5vw, 96px);
  padding: clamp(22px, 2.6vw, 40px) var(--at-inset) clamp(36px, 4.6vw, 76px);
  color: var(--ivory);
}
.at .at-phero--over .at-back { grid-column: 1; grid-row: 1; align-self: start; justify-self: start; color: var(--ivory); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5); }
.at .at-phero--over .at-back:hover, .at .at-phero--over .at-back:focus-visible { color: var(--ivory); }
.at .at-phero--over .at-phero__id { grid-column: 1; grid-row: 3; align-self: end; min-width: 0; }
.at .at-phero--over .at-eyebrow { margin: 0 0 18px; color: rgba(245, 242, 234, 0.92); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5); }
.at .at-phero--over .at-phero__h { margin: 0; color: var(--ivory); text-wrap: balance; text-shadow: 0 1px 28px rgba(0, 0, 0, 0.22); }
.at .at-phero--over[data-title-size="s"] .at-phero__h { font-size: clamp(56px, 9.2vw, 136px); }
.at .at-phero--over[data-title-size="m"] .at-phero__h { font-size: clamp(48px, 6.8vw, 108px); }
.at .at-phero--over[data-title-size="l"] .at-phero__h { font-size: clamp(44px, 5.6vw, 90px); }
.at .at-phero--over .at-phero__intro {
  grid-column: 2; grid-row: 3; align-self: end; justify-self: end;
  max-width: 34ch; margin: 0; color: rgba(245, 242, 234, 0.94); text-shadow: 0 1px 18px rgba(0, 0, 0, 0.3);
  font: 400 clamp(17px, 1.5vw, 21px)/1.45 var(--serif); letter-spacing: -0.005em;
}
.at .at-phero--over[data-intro="with-title"] .at-phero__over { grid-template-rows: auto 1fr auto auto; }
.at .at-phero--over[data-intro="with-title"] .at-phero__intro { grid-column: 1; grid-row: 4; justify-self: start; margin-top: 22px; max-width: 44ch; }
.at .at-phero--over[data-intro="top"] .at-phero__intro { grid-row: 1 / span 2; align-self: start; }

.at .at-phero--over .at-facts { margin-top: 32px; }

/* phones: a taller crop, everything stacked at the bottom of the photograph */
@media (max-width: 760px) {
  .at .at-phero.at-phero--over .at-phero__fig img { height: clamp(540px, calc(100svh - var(--at-nav) - 24px), 720px); aspect-ratio: auto; }
  .at .at-phero--over .at-phero__over {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto;
    padding: 18px var(--at-gut) 30px;
  }
  .at .at-phero--over .at-phero__intro,
  .at .at-phero--over[data-intro] .at-phero__intro { grid-column: 1; grid-row: 4; align-self: end; justify-self: start; margin-top: 16px; max-width: none; font-size: 16.5px; line-height: 1.5; }
  .at .at-phero--over .at-eyebrow { margin-bottom: 12px; }
  .at .at-phero--over[data-title-size="s"] .at-phero__h { font-size: clamp(46px, 13vw, 60px); }
  .at .at-phero--over[data-title-size="m"] .at-phero__h { font-size: clamp(38px, 10.6vw, 50px); }
  .at .at-phero--over[data-title-size="l"] .at-phero__h { font-size: clamp(34px, 9.2vw, 44px); }
  .at .at-phero--over .at-phero__stage::after,
  .at .at-phero--over[data-intro] .at-phero__stage::after {
    background:
      linear-gradient(180deg, rgba(12, 12, 10, 0.44) 0%, rgba(12, 12, 10, 0) 18%),
      linear-gradient(0deg, rgba(12, 12, 10, 0.82) 0%, rgba(12, 12, 10, 0.56) 34%, rgba(12, 12, 10, 0) 68%);
  }
  .at .at-phero--over .at-facts { margin-top: 20px; }
}
