/* Foto. Every class is prefixed ft-.
   The index is seven slanted strips; an occasion and an album show photographs in stored order as full rows with no holes.
   Type: the page word (.x), names and ledes at --t-lg, titles at --t-2xl, labels at --t-xs. Nothing else. */

.ft-occ, .ft-al { --ft-g: clamp(4px, 0.55vw, 10px); --ft-cg: 1.5rem; padding-top: clamp(1rem, 2.4vw, 3rem); }
.ft-word { font-size: clamp(2rem, 9.6vw, 6rem); }

/* ---------- the grid: full rows, no holes ---------- */
.ft-grid { display: grid; row-gap: var(--ft-g); }
.ft-row { display: flex; align-items: flex-start; gap: var(--ft-g); }
/* within a row every photograph has the same height: width in proportion to its own shape */
.ft-p { display: block; flex: var(--fr) 1 0%; min-width: 0; aspect-ratio: var(--fr); margin: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow: hidden; cursor: zoom-in; -webkit-appearance: none; appearance: none; }
.ft-p .ph { width: 100%; height: 100%; }
.ft-p:focus-visible { outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) {
  .ft-p .ph img { transition: opacity 0.5s var(--out), scale 0.9s var(--out); }
  .ft-p:hover .ph img { scale: 1.04; }
}
@media (max-width: 39.99rem) { .ft-grid { margin-inline: calc(-1 * var(--gut)); } }

/* ---------- index: seven slanted strips ---------- */
.ft-ix { padding: 0; }
.ft-strips { --sh: max(26rem, 100svh - var(--top-h)); height: var(--sh); overflow: hidden; background: var(--ink); }
/* the row of strips is wider than the screen by the lean of its outer edges, so the slanted ends never show a corner */
.ft-strips__in { display: flex; gap: 3px; height: 100%; margin-inline: calc(var(--sh) * -0.09); }
.ft-strip { position: relative; flex: 1 1 0%; min-width: 0; overflow: hidden; transform: skewX(-10deg); color: var(--fog); text-decoration: none; transition: flex-grow 0.55s var(--out); }
/* the photograph stands upright inside its leaning strip, wide enough to reach both slanted edges */
.ft-strip__pic { position: absolute; inset: 0 calc(var(--sh) * -0.1); transform: skewX(10deg); }
.ft-strip__pic .ph { position: absolute; inset: 0; }
.ft-strip__pic .ph img { transform: scale(1.02); transition: opacity 0.5s var(--out), transform 1.2s var(--out); }
.ft-strip__pic::after { content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--ink) 44%, transparent); transition: opacity 0.4s var(--out); }
/* the names step down from strip to strip, following the lean: each sits where its strip is fully on screen */
.ft-strip__txt { position: absolute; left: 0; right: 0; top: calc(18% + var(--i) * 8%); display: grid; gap: 0.375rem; padding-inline: 1rem 0.5rem; transform: skewX(10deg); }
/* the two outer strips lose a wedge to the screen's edge, so they start wider and keep their names inside what shows */
.ft-strip:first-child, .ft-strip:last-child { flex-grow: 1.35; }
.ft-strip:first-child .ft-strip__txt { padding-left: calc(var(--sh) * 0.045 + 1.25rem); }
.ft-strip:last-child .ft-strip__txt { padding-right: calc(var(--sh) * 0.085 + 0.5rem); }
.ft-strip:last-child { min-width: calc(var(--sh) * 0.085 + 11.5rem); }
.ft-strip__name { font-size: clamp(0.9375rem, 1.4vw, 1.4375rem); font-weight: 640; line-height: 1.2; overflow-wrap: break-word; }
.ft-strip__meta { font-size: var(--t-xs); font-weight: 500; color: var(--fog-2); opacity: 0; transition: opacity 0.3s var(--out); }
.ft-strip:focus-visible { outline-offset: -6px; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .ft-strip:hover, .ft-strip:first-child:hover, .ft-strip:last-child:hover { flex-grow: 2.3; }
  .ft-strip:hover .ft-strip__pic::after { opacity: 0.35; }
  .ft-strip:hover .ft-strip__pic .ph img { transform: scale(1.07); }
  .ft-strip:hover .ft-strip__meta { opacity: 1; }
}
.ft-strip:focus-visible, .ft-strip:first-child:focus-visible, .ft-strip:last-child:focus-visible { flex-grow: 2.3; }
.ft-strip:focus-visible .ft-strip__pic::after { opacity: 0.35; }
.ft-strip:focus-visible .ft-strip__meta { opacity: 1; }
.ft-strip:active .ft-strip__pic::after { opacity: 0.2; }
@media (max-width: 52rem), (max-aspect-ratio: 1/1) {
  /* phone and upright tablet: the strips lie flat, one under another, each a wide band with its name on the left */
  .ft-strips { height: auto; }
  .ft-strips__in { flex-direction: column; margin: 0; }
  .ft-strip { flex: none; height: max(5.25rem, (100svh - var(--top-h) - var(--dock-h, 0px) - 18px) / 7); transform: none; }
  .ft-strip__pic { inset: 0; transform: none; }
  .ft-strip__txt, .ft-strip:first-child .ft-strip__txt, .ft-strip:last-child .ft-strip__txt { top: 50%; transform: translateY(-50%); padding-inline: var(--gut); }
  .ft-strip:first-child, .ft-strip:last-child { flex-grow: 0; min-width: 0; }
  .ft-strip__meta { opacity: 1; }
  .ft-strip__name { font-size: var(--t-lg); }
}

/* ---------- one occasion ---------- */
.ft-hd { row-gap: clamp(1.25rem, 2.6vw, 2.25rem); align-items: start; }
.ft-hd .ft-word { grid-column: 1 / -1; }
.ft-hd__txt { grid-column: 1 / span 7; }
.ft-hd__long { margin-bottom: 0.5rem; }
.ft-hd__lead { max-width: 36ch; }
.ft-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; margin-top: 1rem; }
.ft-films { display: inline-flex; align-items: center; min-height: 2.75rem; }
.ft-toc { grid-column: 9 / -1; }
.ft-toc a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.28em; text-decoration-color: transparent; transition: text-decoration-color var(--d-fast) var(--out); }
.ft-toc a:hover { text-decoration-color: currentColor; }
.ft-toc ul { margin-top: -0.55rem; }
/* with the long name above the lede, the list starts level with the lede, not with the label */
.ft-hd.ft-has-long .ft-toc { padding-top: calc(var(--t-xs) * 1.4 + 0.5rem); }
/* what a real estate order includes: three hairline rows, then the one button */
.ft-offer { margin-top: clamp(1.75rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.ft-offer__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); column-gap: var(--ft-cg); padding-block: 1rem; border-top: 1px solid var(--line); }
.ft-offer dt { font-weight: 640; }
.ft-offer dd { font-size: var(--t-lg); line-height: 1.38; color: var(--fog-2); text-wrap: pretty; }
.ft-offer + .ft-acts { margin-top: 1.75rem; }

/* an album's name belongs to the photographs after it: four to five times more room above the name than under it */
.ft-ch { margin-top: clamp(6.5rem, 14vw, 12.5rem); scroll-margin-top: 1.5rem; }
.ft-hd + .ft-ch { margin-top: clamp(3.5rem, 7.5vw, 6.5rem); }
.ft-ch__hd, .ft-al__hd { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.ft-ch__hd h2 { outline: none; max-width: 18ch; }
.ft-ch__hd .t-label, .ft-al__hd .t-label { margin-top: 0.75rem; }
/* the one album named like its occasion: no second name, its count closes the header block */
.ft-ch__hd.ft-is-same { margin: 0; position: relative; }
.ft-ch__hd.ft-is-same h2 { top: -0.5rem; }
.ft-hd__count { margin-top: 0.75rem; }
.ft-occ, .ft-al { padding-bottom: var(--sec); }

@media (max-width: 52rem) {
  .ft-hd__txt, .ft-toc { grid-column: 1 / -1; }
  .ft-toc, .ft-hd.ft-has-long .ft-toc { margin-top: 0.75rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
  .ft-toc ul { margin-top: 0; }
  .ft-offer__row { grid-template-columns: minmax(0, 1fr); row-gap: 0.25rem; }
}

/* ---------- one album ---------- */
.ft-al__hd .back { margin-bottom: 0.75rem; }
.ft-al__name { max-width: 18ch; }

/* ---------- the ending: what comes next, in its own field ---------- */
.ft-next { display: block; background: var(--field); color: var(--fog); text-decoration: none; padding-block: clamp(3rem, 7vw, 6rem); }
.ft-next__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; align-items: end; }
/* the picture first on the page edge, its name beside the picture's foot: one unit, read left to right */
.ft-next__fr { grid-column: 1 / span 4; grid-row: 1; display: block; }
.ft-next__ph { aspect-ratio: 4 / 5; }
.ft-next__txt { grid-column: 5 / -1; grid-row: 1; display: grid; row-gap: 0.75rem; padding-left: 0.5rem; }
.ft-next__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; text-decoration-color: transparent; transition: text-decoration-color var(--d-fast) var(--out); }
.ft-next:hover .ft-next__name { text-decoration-color: currentColor; }
.ft-next:focus-visible { outline-offset: -6px; }
@media (max-width: 39.99rem) {
  /* phone: the name first, its picture after a clear gap */
  .ft-next__in { column-gap: 0.75rem; }
  .ft-next__txt { grid-column: 1 / -1; grid-row: 1; padding-left: 0; margin-bottom: 1.5rem; }
  .ft-next__fr { grid-column: 1 / span 8; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .ft-next__ph img, .ft-toc a, .ft-next__name, .ft-p .ph img, .ft-strip, .ft-strip__pic .ph img, .ft-strip__pic::after, .ft-strip__meta { transition: none; }
}
