/* Three About layouts behind ?about= (js/about-options.js). Nothing here applies without the switch. */

/* Cinema: the film first, full-bleed, its frame opening; the headline on the film; the numbers under it */
.about-cinema #about { padding-top: 0; }
.about-cine { width: 100vw; margin-left: calc(50% - 50vw); }
.about-cinema .about-film { aspect-ratio: auto; height: 92vh; height: 92dvh; clip-path: inset(var(--i, 0) round var(--r, 0)); box-shadow: none; }
.about-cinema .about-film .tag { top: calc(var(--pad) + 74px); left: var(--pad); }
.cine-over { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; padding: 18vh var(--pad) clamp(36px, 5vw, 70px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px clamp(28px, 5vw, 90px); align-items: end;
  background: linear-gradient(rgba(20, 19, 18, 0), rgba(20, 19, 18, .72) 62%); color: var(--paper); }
.cine-over .kick { grid-column: 1 / -1; color: rgba(244, 241, 233, .78); }
.pg .cine-over h2 { color: var(--paper); margin-bottom: 0; }
.pg .cine-over .lede { color: rgba(244, 241, 233, .84); }
.about-cinema .figs { margin-top: clamp(40px, 5vw, 70px); }

/* Split (Sam's pick): one screen that locks in, the film on the right, everything else on the left */
.about-split #about { padding-top: 0; padding-bottom: 0; }
.ab-pin { position: relative; height: 175vh; }
.ab-split { position: sticky; top: 0; height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 90px); align-items: center; padding: 86px 0 34px; box-sizing: border-box; }
.ab-split .about-head { display: block; margin: 0; }
.ab-split .about-head h2 { margin: 18px 0 18px; font-size: clamp(34px, 3.4vw, 60px); }
.ab-split .about-head .lede { font-size: clamp(16px, 1.15vw, 19px); max-width: 30em; }
.split-film { height: min(76vh, 760px); }
.about-split .about-film { aspect-ratio: auto; height: 100%; }
.about-split .figs dd { font-variant-numeric: tabular-nums; }

/* the label over the headline, three ways */
.ab-kick { display: flex; align-items: center; gap: 12px; }
.ab-kick.k1 .mk { width: 7px; height: 7px; background: var(--red); display: block; }
.ab-kick .est { color: var(--ink2); opacity: .75; }
.ab-kick.k1 .est { padding-left: 12px; border-left: 1px solid var(--rule); }
.ab-kick.k2 { justify-content: space-between; max-width: 34em; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.ab-kick .stamp { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px 6px 9px; border: 1px solid var(--ink); color: var(--ink); }
.ab-kick .stamp svg { width: 16px; height: 16px; }

/* the four numbers: Ledger, a two by two with hairlines */
.figs-ledger .figs { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(22px, 3vh, 36px); border-top: 1px solid var(--ink); }
.figs-ledger .figs div { display: flex; flex-direction: column-reverse; padding: 14px 0 14px; border-bottom: 1px solid var(--rule); }
.figs-ledger .figs div:nth-child(odd) { padding-right: 18px; border-right: 1px solid var(--rule); }
.figs-ledger .figs div:nth-child(even) { padding-left: 22px; }
.figs-ledger .figs dd { font-size: clamp(34px, 3.2vw, 54px); margin: 0 0 6px; line-height: 1; }
.figs-ledger .figs dt { font-size: 11px; }

/* Row: four in one line, hairlines between, the label above */
.figs-row .figs { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; margin-top: clamp(24px, 3.4vh, 40px); border-top: 0; }
.figs-row .figs div { padding: 2px 22px 0 0; margin-right: 22px; border-right: 1px solid var(--rule); }
.figs-row .figs div:last-child { border-right: 0; margin-right: 0; }
.figs-row .figs dt { font-size: 10.5px; }
.figs-row .figs dd { font-size: clamp(28px, 2.3vw, 40px); margin-top: 8px; line-height: 1; white-space: nowrap; }

/* Film: the numbers sit on the film, in a band across its foot */
.figs-film .about-film .figs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(244, 241, 233, .28);
  background: linear-gradient(rgba(20, 19, 18, .1), rgba(20, 19, 18, .62)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 16px 20px 18px; color: var(--paper); }
.figs-film .about-film .figs div { padding: 0 12px 0 0; }
.figs-film .about-film .figs dt { color: rgba(244, 241, 233, .7); font-size: 10.5px; }
.figs-film .about-film .figs dd { font-size: clamp(22px, 1.8vw, 32px); margin-top: 6px; line-height: 1; white-space: nowrap; }
.figs-film .about-film .bar { bottom: auto; top: 0; }

/* Window: a hole in the page; the maquette behind it, then the film */
.about-window #about { padding-top: clamp(40px, 6vw, 90px); }
.about-track { position: relative; height: 270vh; width: 100vw; margin: 0 0 clamp(50px, 6vw, 90px) calc(50% - 50vw); }
.about-stage { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.about-window .about-film { aspect-ratio: auto; flex: none; border-radius: var(--r, 0); box-shadow: 0 0 0 1px rgba(23, 22, 21, .12); background: transparent; }
.about-window .about-film::after { opacity: 0; }
.about-window .about-film canvas { position: absolute; inset: 0; }
.about-window .about-film canvas.cut { z-index: 1; }
.about-window .about-film .tag, .about-window .about-film .si { z-index: 2; opacity: 0; }
.win-cap { position: absolute; left: 24px; bottom: 20px; z-index: 2; pointer-events: none; }
.win-cap .kick { color: rgba(244, 241, 233, .85); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }

@media (max-width: 760px) {
  .cine-over { grid-template-columns: 1fr; padding-top: 14vh; }
  .ab-pin { height: auto; }
  .ab-split { position: relative; height: auto; grid-template-columns: 1fr; gap: 30px; padding: 70px 0 60px; }
  .split-film { height: auto; aspect-ratio: 4 / 5; order: -1; }
  .figs-row .figs { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .figs-row .figs div:nth-child(2) { border-right: 0; }
  .figs-film .about-film .figs { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .about-track { height: 230vh; }
}
.figs-film .about-film .si { bottom: auto; top: 26px; }

/* Round ten: the Ledger, three more premium takes (?ledger=). Shared: bigger, lighter numbers, the unit set apart,
   a red index on each cell */
.ledger-x .figs { border-top: 0; margin-top: clamp(26px, 3.4vh, 42px); }
.ledger-x .figs div { position: relative; padding: 24px 0 18px; border-bottom: 0; }
.ledger-x .figs div:nth-child(odd) { border-right: 0; padding-right: 22px; }
.ledger-x .figs div:nth-child(even) { padding-left: 26px; }
.ledger-x .figs dd { display: flex; align-items: baseline; gap: 10px; font-weight: 300; font-size: clamp(42px, 4vw, 68px); letter-spacing: -.035em; line-height: .92; margin: 0; }
.ledger-x .figs dd .u { font-family: var(--caps); font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink2); }
.ledger-x .figs dt { font-size: 10.5px; letter-spacing: .22em; margin-top: 12px; color: var(--ink2); }
.ledger-x .figs .ix { position: absolute; top: 12px; right: 0; font-style: normal; font-family: var(--caps); font-size: 10px; font-weight: 600; letter-spacing: .18em; color: var(--red); opacity: var(--d, 1); }
.ledger-x .figs div:nth-child(odd) .ix { right: 22px; }
.ledger-x .figs .tk { position: absolute; left: 0; top: -4px; width: 1px; height: 9px; background: var(--red); transform: scaleY(var(--d, 1)); transform-origin: top; }
.ledger-x .figs div:nth-child(even) .tk { left: 26px; }
/* every cell's rules draw themselves: the top line from the left, the middle line from the top */
.ledger-x .figs div::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform: scaleX(var(--d, 1)); transform-origin: left; }
.ledger-x .figs div:nth-child(even)::before { left: 26px; }
.ledger-x .figs div:nth-child(odd)::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: var(--rule); transform: scaleY(var(--d, 1)); transform-origin: top; }

/* Draft: the rules are ink, the cells close at the bottom */
.ledger-draft .figs div:nth-child(n+3) { border-bottom: 1px solid var(--rule); }
.ledger-draft .figs div:nth-child(-n+2)::before { height: 1.5px; }

/* Marks: a small line drawing above each number */
.ledger-marks .figs div { padding-top: 62px; }
.ledger-marks .figs .mark { position: absolute; left: 0; top: 20px; width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--d, 1)); overflow: visible; }
.ledger-marks .figs div:nth-child(even) .mark { left: 26px; }
.ledger-marks .figs .mark.wk rect { fill: rgba(23, 22, 21, .14); stroke: none; transition: fill .2s; }
.ledger-marks .figs .mark.wk rect.on { fill: var(--red); }
.ledger-marks .figs div::before { background: var(--rule); }

/* Dims: a dimension line under each number, with its end ticks, like the drawings; the weeks fill its ten ticks */
.ledger-dims .figs dd { order: 0; }
.ledger-dims .figs .dim { display: flex; justify-content: space-between; align-items: center; position: relative; height: 12px; margin-top: 14px; transform: scaleX(var(--d, 1)); transform-origin: left; }
.ledger-dims .figs .dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink); }
.ledger-dims .figs .dim::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(45deg, transparent 45%, var(--ink) 45%, var(--ink) 58%, transparent 58%) left center / 10px 10px no-repeat,
  linear-gradient(45deg, transparent 45%, var(--ink) 45%, var(--ink) 58%, transparent 58%) right center / 10px 10px no-repeat; }
.ledger-dims .figs .dim s { position: relative; z-index: 1; display: block; width: 2px; height: 9px; background: rgba(23, 22, 21, .22); text-decoration: none; }
.ledger-dims .figs .dim s.on { background: var(--red); }
.ledger-dims .figs div::before { display: none; }
.ledger-dims .figs div { display: flex; flex-direction: column; }
.ledger-dims .figs dt { order: 3; }
.ledger-dims .figs dd { order: 1; }
.ledger-dims .figs .dim { order: 2; }
@media (max-width: 760px) {
  .ledger-x .figs dd { font-size: 40px; }
  .ledger-x .figs div:nth-child(odd) { padding-right: 14px; }
  .ledger-x .figs div:nth-child(even) { padding-left: 16px; }
  .ledger-x .figs div:nth-child(even)::before, .ledger-x .figs div:nth-child(even) .tk { left: 16px; }
  .ledger-marks .figs div:nth-child(even) .mark { left: 16px; }
}

/* no corner brackets on the About film (Sam, Nov 23) */
.about-split .about-film::after { display: none; }

/* the About film itself, once it has loaded, over the stand-in */
.about-film .film-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.about-film.has-film .film-v { opacity: 1; }
.about-film.has-film canvas { visibility: hidden; }
