/* policy.css
 * One two-column row, used all the way down: the caption and two of my photographs in the margin, everything else
 * beside it.
 * The gap above each place grows with the journey from the last one.
 */

#main { --pol-margin: 184px; }
.pol-main > * + * { margin-top: var(--space-4); }
.pol-main > h2 + .pol-org { margin-top: var(--space-2); }
.pol-main > .pol-org + * { margin-top: var(--space-6); }
.pol-org { color: var(--ink-muted); }

/* The places */
.pol-route { padding-bottom: calc(var(--space-16) * 1.5); }
.pol-place { margin-top: calc(56px + var(--km, 0) * 1px / 25); }
.pol-main > .pol-clip { max-width: 320px; margin-top: var(--space-10); }
/* five seconds need no progress bar, and the page keeps no line over 120px */
.pol-clip video::-webkit-media-controls-timeline { display: none; }

/* The barrier: a full-width stage behind the header and the title, with room left under the title for the wave */
.pol-hero { position: relative; padding-bottom: clamp(230px, 38vh, 340px); padding-bottom: clamp(230px, 38svh, 340px); }
.pol-hero .page-head { z-index: 1; }
.pol-stage { position: absolute; left: 0; right: 0; bottom: 0; top: -150px; pointer-events: none; }
.pol-stage canvas { display: block; width: 100%; height: 100%; }
.pol-say { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-6); margin-bottom: var(--space-10); }
.pol-say .lead { max-width: 34em; }
/* the names, as text, wherever the moving stage does not carry them */
.pol-names { display: none; color: var(--ink-muted); margin-bottom: var(--space-2); }
html:not(.js) .pol-names, [data-motion="reduce"] .pol-names { display: block; }
#pol-pause { flex: none; }
html:not(.js) .pol-stage, html:not(.js) #pol-pause { display: none; }
html:not(.js) .pol-hero { padding-bottom: 0; }
@media (max-height: 480px) {
  .pol-hero { padding-bottom: 170px; }
  .pol-hero .page-head { padding-block: 16px; }
}

/* the 800w file is 800x451, a hair off 1400:789, so the box keeps the full frame's shape whichever file loads */
.pol-frame img { aspect-ratio: 1400 / 789; }

/* Beside the margin */
@media (min-width: 820px) {
  .pol-row {
    display: grid; grid-template-columns: var(--pol-margin) minmax(0, 1fr); column-gap: var(--space-10); align-items: baseline;
  }
  .pol-main { grid-column: 2; }
  .pol-frame { align-items: end; }
  .pol-frame .plate { grid-row: 1; }
  .pol-frame .figure-cap { grid-column: 1; grid-row: 1; margin-top: 0; }
}

/* My photographs: two plates in the margin with CAMBRIDGE between them, 1000px or more from the top of one to the
 * foot of the other, so a laptop screen never shows both whole. Frame 15, bands of wet sand and water, sits beside
 * WICK; its bands are the stage's ground line. Frame 3, a black peak rising into a narrow white slot, is the Barrier
 * held still, beside the place where the heights are set. CAMBRIDGE stays bare, and so does CAMBRIDGE, MA after the
 * Atlantic gap. From 820px a plate sits in the margin column, left edge on the page's left line: .at-top hangs from
 * the cap height of the place's heading, .at-end stands on the baseline of the section's last line (from 852px,
 * where WICK's paragraph is four lines, frame 15 then runs from WICK's baseline down to it; at 820 to 851 the
 * paragraph is five lines and its top is level with the x-height of the line under WICK). Below 820px it stays in
 * the flow after its paragraph, left aligned, at the same size, 40px under the text (24px on a phone). The width
 * includes the 1px keyline, so the image renders 2px narrower (the sizes attribute). The date shows under the frame
 * on hover or a tap (site.css, .ph). Screen only. */
.pol-main > .pol-ph { width: 168px; margin-top: var(--space-10); }
.pol-main > .pol-ph.sm { width: 136px; }
@media (max-width: 600px) { .pol-main > .pol-ph { margin-top: var(--space-6); } }
@media (max-width: 819px) { .pol-main > .pol-ph + p { margin-top: var(--space-10); } } /* room for the tapped date */
@media (min-width: 820px) {
  .pol-place { position: relative; }
  .pol-main > .pol-ph { position: absolute; left: 0; margin: 0; }
  .pol-main > .pol-ph.at-top { top: 8px; }     /* cap height of the 40px Jost h2 (7.5px at 820, where it is 37.7px) */
  .pol-main > .pol-ph.at-end { bottom: 8px; }  /* baseline of a 17/27 Archivo line */
}

@media print {
  .pol-stage, .pol-clip, #pol-pause { display: none; }
  .pol-hero { padding-bottom: 0; }
  .pol-names { display: block; }
  .pol-route { padding-bottom: 0; }
  .pol-place { margin-top: 8mm; }
}
