/* The section pages (12 Nov): Films, Micro-series, Hybrid capture, Commercials. Loaded after ../style.css and
   built from its type, its menu and its glass film panes, nothing else: no sun, no ink pictures, no letters, no
   branch, no running line (the founder, 12 Nov: on these pages nothing may compete with the work). The plain plane,
   the text block at the top left (the title, its line, its sentence, its button) and the film:
   - a wide or a 4:3 film under the text, about four fifths of the width where the window's height allows it, so
     that the whole pane with its caption fits in the window when it is scrolled to, under the name;
   - a tall film beside the text on a window wider than high (it stands at most about four fifths of the window's
     height, on the first screen with the text), under it on a window held upright, as tall as the window allows on
     a phone;
   then the e-mail, a call, the six sections and the line of copyright. */

.sect {
  /* the name's pane at the top left (style.css .name: its box is 1.82 of the text size tall, its pane reaches .42 of
     its em further): nothing stands under it on arrival, and a film scrolled to stands under it */
  --pill: calc(var(--gut) * .55 + var(--s) * 2.37);
  --top: max(calc(var(--vh) * 14), calc(var(--pill) + 40px));
  --safe-t: calc(var(--pill) + 12px);
  --safe-b: max(calc(var(--vh) * 2), 14px);
  /* a caption's height (style.css .case__cap: its size, line 1.25 and .7em above), a little to spare */
  --cap: calc(var(--m) * .46 * 1.95 + 4px);
  /* the picture's height when the pane fills the window under the name */
  --room: calc(var(--vh) * 100 - var(--safe-t) - var(--safe-b) - 2 * var(--glass-pad) - var(--cap));
  --ar: 1.7778;
  display: block;
  overflow: visible;           /* (main clips in style.css: the pane's shadow must not be cut off) */
  padding: var(--top) var(--gut) 0;
}
.sect--classic { --ar: 1.3333; }
.sect--tall { --ar: .5625; }

/* the text block: as on the front page, with reading measures of its own (no pictures beside it here) */
.sect .title { margin: 0; }
/* (a little more room under the title than on the front page: its descenders kept off the line; the line in even
   lines where it takes two) */
.sect .sub { max-width: 32em; margin-top: max(.7rem, calc(var(--xl) * .16)); text-wrap: balance; }
.sect .more { max-width: 30em; }

/* the film: straight, on its pane of glass, the size the window allows */
.sect .case { margin: max(calc(var(--vh) * 6), 40px) 0 0; }
.sect--wide .case, .sect--classic .case {
  width: min(100%, max(80%, 900px), calc(var(--room) * var(--ar) + 2 * var(--glass-pad)));
}
.sect--tall .case { width: min(100%, calc(var(--th, var(--room)) * var(--ar) + 2 * var(--glass-pad))); }

/* Hybrid capture: those who wrote us letters of endorsement or interest, under the film (style.css sets the block) */
.sect .endorse { margin: max(calc(var(--vh) * 4.5), 28px) 0 0; }

/* the end of every section page: the e-mail, a call, the six sections (this one not a link), the copyright */
.sect__foot { padding: max(calc(var(--vh) * 20), 128px) var(--gut) max(calc(var(--gut) * .8), 24px); }
.sect__ways { margin: max(calc(var(--vh) * 3), 1.6rem) 0 0; font: 300 calc(var(--m) * .56)/1 "Plane Serif", Georgia, serif; }
.sect__nav { margin: max(calc(var(--vh) * 8), 3.2rem) 0 0; font: 300 calc(var(--m) * .56)/1.2 "Plane Serif", Georgia, serif; }
.sect__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45em 1.3em; }
.sect__nav li { display: block; }
.sect__nav a { color: var(--ink); }
.sect__nav a:focus-visible { outline-offset: 4px; }
/* where one is: this page, in the menu and at the end, in the second ink */
.sect__nav [aria-current="page"], .menu__list a[aria-current="page"] { color: var(--ink-2); }
.sect__foot .copy { margin: max(calc(var(--vh) * 3.5), 1.6rem) 0 0 .2em; }

/* wide windows: a tall film no taller than about four fifths of the window (the pane with its caption) */
@media (min-width: 761px) {
  .sect--tall { --th: min(calc(var(--vh) * 82 - 2 * var(--glass-pad) - var(--cap)), var(--room)); }
}
/* a window wider than high: the tall film beside the text, its top level with the title's, the whole pane on the
   first screen; the text keeps its measure and gives way first where the room is short */
@media (min-width: 761px) and (min-aspect-ratio: 5/4) {
  .sect--tall .sect__body { display: grid; grid-template-columns: minmax(min-content, max-content) auto;
    column-gap: clamp(40px, 7vw, 140px); align-items: start; }
  .sect--tall .case { margin: 0; }
  .sect--tall { --th: min(calc(var(--vh) * 82 - 2 * var(--glass-pad) - var(--cap)), var(--room),
    calc(var(--vh) * 100 - var(--top) - var(--safe-b) - 2 * var(--glass-pad) - var(--cap))); }
}

/* phone: the text over the film; a wide film the page's width, a tall one as tall as the window allows */
@media (max-width: 760px) {
  .sect {
    --top: max(calc(var(--vh) * 11), calc(var(--pill) + 32px));
    --cap: calc(var(--s) * .9 * 1.95 + 4px);
  }
  .sect .case { margin-top: max(calc(var(--vh) * 4.5), 28px); }
  .sect__foot { padding-top: max(calc(var(--vh) * 16), 104px); }
  .sect__foot .mail { font-size: 8.4vw; }
}

/* the name lies on its pane of glass from the start here: the title and its lines begin right under it, so the pane
   the front page shows only past its hero would leave them passing under the bare name (and a short page never
   scrolls far enough to show it) */
html:has(.sect) .name::before { opacity: 1; }
html.menu-open:has(.sect) .name::before { opacity: 0; }

/* a film that opens on a click darkens under the cursor (the founder, 18 Nov) and on keyboard focus; a finger has no
   hover. (::before: the pane's own ::after is its rim of light) */
.case__play::before { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(ellipse at center, rgb(28 26 26 / .03) 38%, rgb(28 26 26 / .2) 72%, rgb(28 26 26 / .58) 100%); }
.case__play:focus-visible::before { opacity: 1; }
@media (hover: hover) { .case__play:hover::before { opacity: 1; } }


/* a second film on a section page, an upright one under a wide one (Commercials, 18 Nov): as tall as the window
   allows, like the upright film of a page of its own */
.sect .case--second { --ar: .5625;
  width: min(100%, calc(min(calc(var(--vh) * 82 - 2 * var(--glass-pad) - var(--cap)), var(--room)) * var(--ar) + 2 * var(--glass-pad))); }
