/* Projects & Fieldwork: page-scoped styles (mockup image5, slide 10, 1672px comp) */

/* ---------- Hero ----------------------------------------------------------
   The photo band is pulled up 88px behind the transparent nav, so the full
   photo box is 1672x444. hero-projects-pan.jpg (2026-09, a 1672x444 band cut
   from the owner's ChatGPT panorama in Final Image Website, source rows
   60-637 downscaled 0.77x: daylight cave rocks centre, wadi and slope at
   left under the scrim, clouds top-right). Exact crop - cover scale 1:1,
   nothing hidden. Earlier versions (hero-projects-day/-final/-sunset.jpg)
   kept on disk. */
.hero-projects {
  position: relative;
  /* 356, not the comp's 274: the longer intro paragraph (2026-08) runs six
     lines and needs the room - at 274 it spilled over the content below. */
  height: 356px;
  /* visible, not hidden (2026-08, transparent-nav change): hidden clipped the
     pulled-up crop at the hero's edge, so the photo never actually showed
     through the now-transparent bar */
  overflow: visible;
}

.hero-projects::before {
  content: "";
  position: absolute;
  inset: -88px 0 0;
  background: url("../../assets/img/hero-projects-pan.jpg") top center / cover no-repeat;
}

/* the comp darkens the left third so the white headline holds against the
   sunlit cliff behind it; pulled up with the photo so the wash also carries
   the nav links floating over it */
.hero-projects::after {
  content: "";
  position: absolute;
  inset: -88px 0 0;
  /* warm grey, tracking the regraded --page, not the old sampled near-black */
  background: linear-gradient(90deg, rgba(25, 22, 19, .88) 0%, rgba(25, 22, 19, .72) 28%, rgba(25, 22, 19, 0) 62%);
}

.hero-projects > * {
  position: relative;
  z-index: 1;
}

/* this page's nav band runs DARKER than the shared wash (owner request,
   2026-10: "fade shadow behind the navigation bar words") - the panorama's
   top-right clouds are bright under the links; same values as watch's. */
.nav::before {
  background: linear-gradient(180deg,
    rgba(25, 22, 19, .78) 0,
    rgba(25, 22, 19, .70) 55%,
    rgba(25, 22, 19, .35) 78%,
    rgba(25, 22, 19, 0) 100%);
}

.hero-projects h1 {
  position: absolute;
  left: 58px;
  top: 26px;
  font-family: var(--f-smallcaps);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: .94;
  color: var(--head);
}

/* pinned to the 273px "Projects & Fieldwork" h1, aligned with its left edge */
.hero-projects .ornament-center {
  position: absolute;
  left: 58px;
  top: 158px;
  width: 273px;
  margin: 0;
}

.hero-projects .intro {
  position: absolute;
  left: 58px;
  top: 182px;
  width: 452px;
  /* raised from 16.5px (owner request, 2026-08: readability pass) */
  font-size: 18px;
  line-height: 1.32;
  color: var(--text);
}

/* (the page's own wide ornament styles came off, 2026-09 - the shared
   .ornament-center motif from style.css is used instead) */

/* (the filter strip between hero and cards came off entirely, owner request
   2026-08 - the gallery has its own filter bar, styled in gallery.css) */

/* ---------- Cards ---------------------------------------------------------
   Three equal cards in one row, each with a single photo (owner request,
   2026-08 - a fourth Fieldwork & Documentation card was added and then
   removed the same week). */
.projects-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  padding: 25px 56px 22px;
  background: var(--page);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--hairline);
}

/* padding lives on the text block, not the card: the photo runs full-bleed to
   the card edges at the bottom.

   The cards carry different amounts of copy, so the text block is a grid with
   a reserved title row (two card names wrap to two lines, two do not) and the
   grid's own stretch equalising the copy row: every card is as tall as the
   longest one, the buttons pin to the bottom of that shared height, and the
   photos all start on the same line. */
.project-card .card-body {
  flex: 1 1 auto;
  display: grid;
  /* 56px: two lines of the 24px title - Teomot's Hidden Chamber wraps even
     at three-across, so the reserved row keeps every card's copy starting on
     the same line */
  grid-template-rows: 56px auto;
  row-gap: 10px;
  padding: 16px 20px 14px;
}

.project-card h2 {
  font-family: var(--f-smallcaps);
  /* raised from 22px (owner request, 2026-08: readability pass) */
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.15;
  color: var(--gold-bright);
}

/* at four-across the columns are too narrow for copy and button side by side,
   so the button sits under the copy, pinned to the card's bottom-right; the
   flexing paragraph absorbs the stretch, so the buttons line up across the
   row whatever each paragraph runs. */
.project-card .card-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.project-card p {
  flex: 1 1 auto;
  align-self: stretch;
  /* raised from 15px/1.28 (owner request, 2026-08: readability pass) */
  font-size: 16px;
  line-height: 1.3;
  color: #DEDFDD;
}

.project-card .btn-line {
  flex: 0 0 auto;
  /* raised from 13px (owner request, 2026-08: readability pass) */
  font-size: 14px;
  padding: 8px 14px;
  gap: 8px;
  white-space: nowrap;
}

.project-card .card-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
/* the owner's chosen framings (2026-10-21) are taller than the card strip;
   the Hyrcania passage rides up so the tunnel's arched head stays in the
   cover crop; the other two centre */
.project-card .card-photo[src*="card-hyrcania-passage"] { object-position: 50% 30%; }

/* ---------- Footer band ---------------------------------------------------
   The comp's three-part strip (dedication line, caves quote, fieldwork CTA,
   split by two thin verticals), reprinted 2026-08 (owner request) on the
   parchment photograph the other pages end on. All inks darken to the
   parchment's brown family; the gold icon files get a filter for the same
   reason. */
/* the quote alone, centred in the band (owner request, 2026-08 - the
   dedication line came off) */
.site-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 22px 48px;
  background: url("../../assets/img/band-parchment.jpg") center/cover;
}

.foot-quote {
  text-align: center;
  max-width: 720px;
  padding: 0 24px;
}

.foot-quote p {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  /* 26px to match the Gallery band's quote (owner request, 2026-08) */
  font-size: 26px;
  line-height: 1.3;
  color: #33240F;
}

.foot-quote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--f-smallcaps);
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .22em;
  color: #4A3208;
}

/* ---------- Responsive fallback ---------- */
@media (max-width: 1200px) {
  .hero-projects { height: auto; min-height: 240px; padding: 34px 24px 32px; }
  /* nothing is registered on the comp coordinates any more, so the crop sits
     square in the band rather than pulled up behind the bar */
  .hero-projects::before { inset: 0; }
  .hero-projects::after { inset: 0; background: linear-gradient(90deg, rgba(25, 22, 19, .9), rgba(25, 22, 19, .6)); }
  /* relative rather than static: the z-index that lifts these above the wash
     comes from `.hero-projects > *`, and z-index does nothing on an
     unpositioned box */
  .hero-projects h1,
  .hero-projects .ornament-center,
  .hero-projects .intro { position: relative; left: auto; top: auto; }
  .hero-projects h1 { font-size: 42px; }
  .hero-projects .ornament-center { margin: 16px 0 14px; }
  .hero-projects .intro { width: auto; max-width: 560px; }

  .projects-cards { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  /* stacked, the cards no longer have to line up with each other, so the
     reserved rows come off and each one closes up around its own copy */
  .project-card .card-body { grid-template-rows: auto auto; }
  .project-card .card-photo { height: 200px; }

  .site-foot { padding: 28px 24px; }
}

@media (max-width: 760px) {
  .hero-projects h1 { font-size: 32px; }
}

/* ---------- Motion (site-motion variant only) ---------- */
/* Everything below is gated on html.motion; with motion off the page renders
   exactly as above. Hero entrance: the photo settles while the headline
   rises, the ornament draws, and the intro follows. h1/ornament/intro are
   absolutely positioned, so transform animation never moves their pinned
   coordinates. */

/* photo settle — hero ::before only, bottom-anchored so the scale overflow
   leaves the page instead of painting over the cards; desktop comp only */
@media (min-width: 1201px) {
  .motion .hero-projects::before {
    transform-origin: bottom center;
    animation: mSettle var(--m-dur-settle) var(--m-ease-out) both;
  }
}

.motion .hero-projects h1 {
  animation: mRise var(--m-dur-hero) var(--m-ease-out) .15s both;
}

.motion .hero-projects .ornament-center { --orn-delay: 550ms; }

.motion .hero-projects .intro {
  animation: mRise var(--m-dur-hero) var(--m-ease-out) .65s both;
}

/* cards: subtle hover — the border warms and the photo eases in closer.
   overflow: hidden changes nothing statically; it only contains the photo
   zoom. The card carries data-reveal, so this transition list must restate
   the reveal pair: transition is one property, and motion.css's equal-
   specificity [data-reveal] rule loads later — a border-color-only list
   would lose the cascade and the reveal would win, dropping the border
   ease. The extra .projects-cards ancestor lifts this rule above both. */
.motion .projects-cards .project-card {
  overflow: hidden;
  transition:
    opacity var(--m-dur-reveal) var(--m-ease-out) var(--rv-delay, 0ms),
    transform var(--m-dur-reveal) var(--m-ease-out) var(--rv-delay, 0ms),
    border-color var(--m-dur-micro) var(--m-ease-out);
}
.motion .project-card:hover { border-color: rgba(210, 162, 76, .45); }

/* the photo has no transform of its own, so the zoom is safe here; the card
   itself never translates on hover — its reveal owns that transform */
/* .4s, matching the gallery's photo zoom — the same gesture on adjacent
   pages must move at the same speed */
.motion .project-card .card-photo {
  transition: transform .4s var(--m-ease-out);
}
.motion .project-card:hover .card-photo { transform: scale(1.04); }

