/* ============================================================
   Stills index page (/stills/)
   Additive layer on top of styles.css.

   Sections:
     1. Page-level overrides (allow scrolling)
     2. Page wrapper
     3. Grid + cell
     4. Cell info overlay + scrim
     5. Active-nav indicator
   ============================================================ */


/* -------------------------------------------------------
   1. Page-level overrides
   ------------------------------------------------------- */
/* Allow the document to scroll naturally on these pages — base
   styles.css locks html/body to 100vh/overflow:hidden for the
   homepage, so we override with overflow:visible here. Nested
   overflow:auto on both html and body confuses iOS Safari and
   can leave scroll completely stuck. */
html {
  height: auto;
  width: auto;
  overflow: visible;
}
body {
  height: auto;
  min-height: 100vh;
  width: auto;
  overflow-x: hidden;
  overflow-y: visible;
}
body.page-stills { background: var(--bg); }


/* -------------------------------------------------------
   2. Page wrapper
   Matches the Films page math: top gap from screen edge to
   the active-nav underline equals the gap from the underline
   down to the first row of cells.
   ------------------------------------------------------- */
.stills-page {
  position: relative;
  z-index: 5;
  padding: 92px 0 32px;
}


/* -------------------------------------------------------
   3. Grid + cell
   Full-bleed two-column grid, tight gap. Cells use a 3 : 2
   landscape aspect — the natural ratio for most photo work.
   ------------------------------------------------------- */
.stills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.stills-cell {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #131110;     /* placeholder while image loads / before upload */
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  /* Reveal animation is hooked up via @supports (animation-timeline) below. */
}


.stills-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.stills-cell:hover img {
  transform: scale(1.06);
}

/* Subtle hairline that slides in from the left along the bottom edge */
.stills-cell::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
  pointer-events: none;
}
.stills-cell:hover::before {
  transform: scaleX(1);
}


/* -------------------------------------------------------
   4. Cell info overlay
   No darkening scrim — title legibility relies on the
   text-shadow on the heading itself.
   ------------------------------------------------------- */

/* Layout note: title and subject use absolute positioning with fixed bottom
   offsets so the title sits at the SAME vertical position whether or not a
   subject line is present. Cells without a subject just have empty space
   where the subject would go, instead of the title sliding down to fill it. */
.stills-info {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}

.stills-info h3,
.stills-info .subject {
  position: absolute;
  left: 0;
  right: 0;
  transition:
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.4s ease;
  will-change: transform;
}

.stills-info h3 {
  bottom: 44px;             /* always 44px from cell bottom */
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.stills-info .subject {
  bottom: 24px;             /* always 24px from cell bottom */
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* Hover: lift the title block up a touch and tint the subject line */
.stills-cell:hover .stills-info h3,
.stills-cell:hover .stills-info .subject {
  transform: translateY(-6px);
}
.stills-cell:hover .stills-info .subject {
  color: var(--accent);
}




/* -------------------------------------------------------
   5. Active-nav indicator
   ------------------------------------------------------- */
.topnav a.is-current {
  color: #fff;
}
.topnav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left center;
}


/* -------------------------------------------------------
   Responsive
   ------------------------------------------------------- */
@media (max-width: 900px) {
  .stills-info             { left: 22px; right: 22px; }
  .stills-info h3          { bottom: 36px; }
  .stills-info .subject    { bottom: 18px; }
}

@media (max-width: 640px) {
  .stills-page { padding: 92px 0 24px; }
  .stills-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .stills-info             { left: 18px; right: 18px; }
  .stills-info h3          { font-size: 18px; bottom: 32px; }
  .stills-info .subject    { font-size: 9px; letter-spacing: 0.2em; bottom: 16px; }
}

