/* RDP overrides. Hand-written; not produced by mirror.py (mirror.py only adds the <link>).

   HERO HEIGHT CAP, 12 Nov 2026 (Ryan: "Cap it now"). A design change from the
   Squarespace original. There, the hero grid's row height follows the window's WIDTH,
   so in a wide, short window the hero runs well past the fold.

   What this does, only where the desktop grid is in use (from 901px wide on the home
   page, whose own .rdp-hero mobile layout takes over at 900px; from 768px on the
   other four heroes):
   - The grid may not be taller than the window minus the header and the section's
     own padding (max-height). The empty rows below the text give way first.
   - The rows above the text scale down with the available height, so the text keeps
     its relative position.
   - The rows holding the text still size to the text. Nothing is clipped. When the
     window is too short for the text, the rows above it shrink to nothing first; if
     that is still not enough the cap stops at the text's height (B below), so the
     hero runs past the fold instead of the text leaving the hero.
   - In a window tall enough for the original hero, every value below resolves to the
     original one and the hero is exactly as on Squarespace.

   Per hero: N rows, text block on rows s to e (from the page's own grid-area),
   the section's content-wrapper padding, and B, an upper bound on the text block's
   height in px (measured 768 to 2560 wide, plus a margin). If a hero's text is
   rewritten to be much longer, raise its B. */

/* index.html, commercial-portrait-photographer.html: N=21, text on rows 5 to 15, padding 3.3vmax, B=510px */
@media (min-width: 901px) {
  .page-section .fe-6844b2231583831c2feb6650 {
    --hero-ro: calc(var(--container-width) * var(--row-height-scaling-factor));
    --hero-room: calc(100vh - var(--header-height, 100px) - 2 * 3.3vmax);
    --hero-cap: max(var(--hero-room), 554px);
    --hero-t: max(0px, min(var(--hero-ro), calc((var(--hero-room) - 220px) / 21), calc((var(--hero-room) - 554px) / 4)));
    max-height: var(--hero-cap);
    grid-template-rows:
      repeat(4, var(--hero-t))
      repeat(10, minmax(var(--hero-t), auto))
      repeat(7, minmax(0px, var(--hero-ro)));
  }
}

/* commercial.html: N=15, text on rows 3 to 13, padding 6vmax, B=530px */
@media (min-width: 768px) {
  .page-section .fe-6a16003def70d3423ffc9317 {
    --hero-ro: calc(var(--container-width) * var(--row-height-scaling-factor));
    --hero-room: calc(100vh - var(--header-height, 100px) - 2 * 6vmax);
    --hero-cap: max(var(--hero-room), 552px);
    --hero-t: max(0px, min(var(--hero-ro), calc((var(--hero-room) - 154px) / 15), calc((var(--hero-room) - 552px) / 2)));
    max-height: var(--hero-cap);
    grid-template-rows:
      repeat(2, var(--hero-t))
      repeat(10, minmax(var(--hero-t), auto))
      repeat(3, minmax(0px, var(--hero-ro)));
  }
}

/* portraits.html: N=15, text on rows 3 to 13, padding 3.3vmax, B=545px */
@media (min-width: 768px) {
  .page-section .fe-6a170fe7f0715a52caa2a6eb {
    --hero-ro: calc(var(--container-width) * var(--row-height-scaling-factor));
    --hero-room: calc(100vh - var(--header-height, 100px) - 2 * 3.3vmax);
    --hero-cap: max(var(--hero-room), 567px);
    --hero-t: max(0px, min(var(--hero-ro), calc((var(--hero-room) - 154px) / 15), calc((var(--hero-room) - 567px) / 2)));
    max-height: var(--hero-cap);
    grid-template-rows:
      repeat(2, var(--hero-t))
      repeat(10, minmax(var(--hero-t), auto))
      repeat(3, minmax(0px, var(--hero-ro)));
  }
}

/* professional-headshots.html: N=20, text on rows 4 to 15, padding 0.1vmax, B=680px */
@media (min-width: 768px) {
  .page-section .fe-662b1c7517c19e4b56cb4132 {
    --hero-ro: calc(var(--container-width) * var(--row-height-scaling-factor));
    --hero-room: calc(100vh - var(--header-height, 100px) - 2 * 0.1vmax);
    --hero-cap: max(var(--hero-room), 713px);
    --hero-t: max(0px, min(var(--hero-ro), calc((var(--hero-room) - 209px) / 20), calc((var(--hero-room) - 713px) / 3)));
    max-height: var(--hero-cap);
    grid-template-rows:
      repeat(3, var(--hero-t))
      repeat(11, minmax(var(--hero-t), auto))
      repeat(6, minmax(0px, var(--hero-ro)));
  }
}

/* headshots-austin.html: N=19, text on rows 4 to 14, padding 0.1vmax, B=630px */
@media (min-width: 768px) {
  .page-section .fe-6ad119b43ee9ca1ce9c9e35f {
    --hero-ro: calc(var(--container-width) * var(--row-height-scaling-factor));
    --hero-room: calc(100vh - var(--header-height, 100px) - 2 * 0.1vmax);
    --hero-cap: max(var(--hero-room), 663px);
    --hero-t: max(0px, min(var(--hero-ro), calc((var(--hero-room) - 198px) / 19), calc((var(--hero-room) - 663px) / 3)));
    max-height: var(--hero-cap);
    grid-template-rows:
      repeat(3, var(--hero-t))
      repeat(10, minmax(var(--hero-t), auto))
      repeat(6, minmax(0px, var(--hero-ro)));
  }
}
