/* THE AUDIO MAGAZINE — a piece of a series as The Quarter Hour sets it, on the Desk.
   Always Ivory Season: the daylight register's tokens, scoped to the article, whatever skin the Desk wears.
   Serif for every voice, Manrope for furniture, radius zero, hairlines, gold a mark and never a fill.
   Motion: transform and opacity only, the house curve, 200/400/700; plates drift slowly (Ken Burns);
   prefers-reduced-motion stills all of it. Made for La Diffusion (~/Developer/LaDiffusion). */

body:has(.am) { background: #FAF8F3; }
/* the Desk's .issue keeps a reading measure on the whole article; the audio magazine keeps it on the words only, so
   the plates can open wide. The wrap is the width the plates bleed to. */
.issue.am { max-width: none; padding-top: 0; }
.am .am-hero { width: 100%; max-width: 1280px; margin-inline: auto; }
.am .am-head h1 { color: var(--ink); }
.am .am-head .deck { color: var(--ink-soft); }
.am {
  --paper:#FAF8F3; --paper-2:#F3EFE6; --ink:#0C1E16; --ink-soft:#334A3F;
  --text-body:#334A3F; --text-muted:#5C7065; --gold:#C5A059; --gold-d:#9A7A3A; --rule:#E1E7E2;
  --am-curve: cubic-bezier(.165,.84,.44,1);
  --am-measure: 36rem;
  container-type: inline-size;
  background: var(--paper);
  color: var(--text-body);
  margin: 0 auto;
  padding: 0 0 6rem;
}
.am a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: .18em; }

/* the plate at the head: bleed, held from the top, a slow drift */
.am-hero { margin: 0 0 3rem; overflow: hidden; }
.am-hero-frame { overflow: hidden; aspect-ratio: 16 / 10; background: var(--paper-2); }
.am-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%;
  transform: scale(1.06); animation: am-drift 38s var(--am-curve) infinite alternate; will-change: transform; }
.am-hero figcaption, .am figure figcaption { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic;
  font-size: 1rem; color: var(--text-muted); padding: .6rem 1rem 0; max-width: var(--am-measure); margin: 0 auto; }

.am-head { max-width: var(--am-measure); margin: 0 auto 2.5rem; padding: 0 1rem; text-align: left; }
.am-head .kicker, .am .kicker { font-family: Manrope, system-ui, sans-serif; font-size: .7rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 1rem; display: flex; align-items: center; gap: .75rem; }
.am .kicker::before { content: ""; width: 22px; height: 1px; background: var(--gold); flex: none; }
.am-head h1 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; color: var(--ink);
  font-size: clamp(2.2rem, 7cqi, 3.9rem); line-height: 1.04; letter-spacing: -.01em; margin: 0 0 1rem;
  animation: am-rise 700ms var(--am-curve) both; }
.am-head .deck { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.35rem;
  line-height: 1.4; color: var(--ink-soft); margin: 0 0 1.25rem; animation: am-rise 700ms var(--am-curve) 120ms both; }
.am-head .byline { font-family: Manrope, system-ui, sans-serif; font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted); display: flex; gap: 1rem; flex-wrap: wrap; }

/* the body: the measure, the serif, plates through it */
.am-body { max-width: var(--am-measure); margin: 0 auto; padding: 0 1rem; font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.32rem; line-height: 1.62; color: var(--text-body); }
.am-body p { margin: 0 0 1.25em; }
.am-body h2, .am-body h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; color: var(--ink);
  font-size: 1.85rem; line-height: 1.15; margin: 2.4em 0 .8em; }
.am-body figure { margin: 2.6rem 0; }
.am-body figure.am-plate { margin-left: calc(50% - min(50cqi, 600px)); margin-right: calc(50% - min(50cqi, 600px)); overflow: hidden; }
.am-body figure.am-plate .am-plate-frame { overflow: hidden; aspect-ratio: 3 / 2; background: var(--paper-2); max-height: 86vh; }
.am-body figure.am-plate img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%;
  transform: scale(1.04); transition: transform 700ms var(--am-curve), opacity 700ms var(--am-curve); opacity: .001; }
.am-body figure.am-plate.is-seen img { opacity: 1; animation: am-drift 30s var(--am-curve) infinite alternate; }
.am-body figure.am-plate.is-pair .am-plate-frame { aspect-ratio: 4 / 5; }
.am-body .am-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule);
  margin: 2.6rem calc(50% - min(50cqi, 600px)); }
.am-body .am-pair figure.am-plate { margin: 0; }
.am-body blockquote { border: 0; margin: 2rem 0; padding: 0 0 0 1.4rem; position: relative; font-style: italic; color: var(--ink); }
.am-body blockquote::before { content: ""; position: absolute; left: 0; top: .4em; bottom: .4em; width: 1px; background: var(--gold); }

/* the player: one line, quiet, his voice */
.am-player { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.1rem 0; margin: 0 0 2.4rem;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; font-family: Manrope, system-ui, sans-serif; }
.am-player audio { grid-column: 1 / -1; width: 100%; }
.am-player.is-ready audio { display: none; }
.am-play { width: 52px; height: 52px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
  display: grid; place-items: center; border-radius: 0; transition: transform 200ms var(--am-curve); }
.am-play:active { transform: scale(.96); }
.am-play svg { width: 16px; height: 16px; fill: var(--ink); }
.am-play:focus-visible, .am-door:focus-visible, .am-rail:focus-visible { outline: 1px solid var(--gold-d); outline-offset: 3px; }
.am-meta { min-width: 0; }
.am-meta .am-who { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.05rem; color: var(--ink); margin: 0; }
.am-rail { position: relative; height: 22px; cursor: pointer; margin-top: .3rem; touch-action: none; }
.am-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--rule); }
.am-rail i { position: absolute; left: 0; top: 50%; height: 1px; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.am-time { font-size: .72rem; letter-spacing: .1em; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.am-speed { font-size: .72rem; letter-spacing: .1em; border: 1px solid var(--rule); background: transparent; color: var(--text-muted);
  padding: .5rem .6rem; cursor: pointer; min-height: 44px; border-radius: 0; }

/* the read-along: the word being said carries a gold hairline beneath it */
.am-w { transition: color 200ms var(--am-curve); cursor: pointer; background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; }
.am-reading .am-w { color: var(--text-muted); }
.am-reading .am-w.is-said { color: var(--text-body); }
.am-reading .am-w.is-now { color: var(--ink); background-size: 100% 1px; }

/* the questions: three to sit with, the answer kept until asked for */
.am-questions { border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 2rem; }
.am-questions details { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.am-questions summary { cursor: pointer; list-style: none; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.3rem; color: var(--ink); }
.am-questions summary::-webkit-details-marker { display: none; }
.am-questions ol { font-family: Manrope, system-ui, sans-serif; font-size: .95rem; line-height: 1.5; color: var(--text-body); margin: .8rem 0; }
.am-questions .am-why { font-style: italic; color: var(--ink-soft); }
.am-closing { margin: 3rem 0 0; padding: 2rem 0 0; border-top: 1px solid var(--rule); }
.am-closing p.am-ask { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.55rem; line-height: 1.45; color: var(--ink); }

/* follow, share, respond */
.am-follow, .am-share, .am-comments { max-width: var(--am-measure); margin: 3rem auto 0; padding: 0 1rem; }
.am-follow-line { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; color: var(--ink); margin: 0 0 1rem; }
.am-follow-doors, .am-share-doors { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.am-door { font-family: Manrope, system-ui, sans-serif; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border: 1px solid var(--ink); background: transparent; padding: .9rem 1.1rem;
  min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; border-radius: 0;
  transition: background-color 200ms var(--am-curve), color 200ms var(--am-curve); }
.am-door:hover { background: var(--ink); color: var(--paper); }

/* plates rise into view as the reader arrives at them */
.am-rise { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--am-curve), transform 700ms var(--am-curve); }
.am-rise.is-seen { opacity: 1; transform: none; }

@keyframes am-drift { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
@keyframes am-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .am-body { font-size: 1.2rem; }
  .am-body .am-pair { grid-template-columns: 1fr; }
  .am-player { grid-template-columns: auto 1fr; }
  .am-speed { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .am *, .am *::before { animation: none !important; transition: none !important; }
  .am-body figure.am-plate img, .am-rise { opacity: 1; transform: none; }
}
