/* Duration: the still dial and the published half hour. Order: layout, type, colour, motion. */

/* ============ LAYOUT ============ */

/* Opening: words left, the dial in the right of the page */
.overture--dialed { grid-template-columns: repeat(10, minmax(0, 1fr)); column-gap: var(--sam-rest); padding-inline: var(--sam-rest); align-items: center; justify-items: stretch; }
.overture--dialed > * { grid-column: 1 / -1; min-width: 0; }
.overture__words { display: grid; gap: 1.1rem; justify-items: start; }
.overture__half { display: block; margin-top: 1.1rem; }
@media (max-width: 47.49em) {
  /* On the phone the capsule already clears the top: the title starts close under it so the dial shows whole */
  .overture--dialed { padding-top: 0.75rem; }
  .overture__words { gap: 0.8rem; }
  .overture__half { margin-top: 0.85rem; }
}
@media (min-width: 47.5em) {
  .overture--dialed .overture__words { grid-column: 1 / 7; }
  .overture--dialed .hour { grid-column: 7 / 11; }
}

/* The still dial: one flat scalloped disc, half silver and half ink, 24 solid teeth on its edge, marks outside.
   On a desk it fills its four columns, about as tall as the headline block; the caption hangs from its left edge */
.hour { margin: 0; display: grid; justify-items: start; gap: 1rem; }
.hour__dial { position: relative; width: 13.5rem; max-width: 100%; aspect-ratio: 1; }
@media (min-width: 47.5em) {
  .hour__dial { width: clamp(15rem, 36vw, 30rem); }
}
.hour__rim { position: absolute; inset: 14%; }
.hour__tooth { position: absolute; left: 50%; top: 50%; width: 11.6%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) rotate(calc((var(--n) + 0.5) * 15deg)) translateY(-362%); }
.hour__disc { position: absolute; inset: 8%; border-radius: 50%; }
.hour__disc::before { content: ""; position: absolute; left: 50%; top: 50%; width: 0.95rem; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.hour__mark { position: absolute; line-height: 1; }
.hour__mark--top { top: 0; left: 50%; transform: translateX(-50%); }
.hour__mark--right { right: 0; top: 50%; transform: translateY(-50%); }
.hour__mark--bottom { bottom: 0; left: 50%; transform: translateX(-50%); padding: 0.2em 0.45em; }
.hour__mark--left { left: 0; top: 50%; transform: translateY(-50%); }
.hour__words { max-width: 22rem; text-align: left; }

/* Right half passages: every plate runs the full width of the column */
.lesson__passage .still { margin-block: 1.2rem; }
.lesson__passage .still__photo { height: auto; aspect-ratio: 3 / 2; }
.rate { display: grid; gap: 1rem; margin-top: 1.2rem; }
.rate .tag { display: grid; margin: 0; }
.tally__voice { margin: 0; }

/* The asking sequence: a real order, numbered by counter */
.asking { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: beat; }
.asking__step { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); column-gap: 1rem; counter-increment: beat; }
.asking__step::before { content: counter(beat); grid-row: 1 / 3; }
.asking__do, .asking__why { grid-column: 2; }
.asking__do { margin: 0 0 0.3rem; }
.asking__why { margin: 0; }

/* Plates: the silver note, and the two ink hand-offs that are pressed, cut like the site's other labels */
.caveat, .onward__plate {
  --sam-plate-cut: radial-gradient(0.28rem 50% at 0 50%, #0000 96%, #000) 0 0 / 51% 1.3rem repeat-y, radial-gradient(0.28rem 50% at 100% 50%, #0000 96%, #000) 100% 0 / 51% 1.3rem repeat-y;
  position: relative; isolation: isolate;
}
.caveat::before, .onward__plate::before { content: ""; position: absolute; inset: 0; z-index: -1; -webkit-mask: var(--sam-plate-cut); mask: var(--sam-plate-cut); }
.caveat { padding: 1.4rem 1.6rem 0.9rem; }
.onward { display: grid; gap: 1rem; }
.onward__plate { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.4rem; row-gap: 0.3rem; align-items: center; align-content: center; min-height: 5rem; padding: 1.2rem 2rem 1.2rem 1.6rem; }
.onward__name { grid-column: 1; grid-row: 1; }
.onward__says { grid-column: 1; grid-row: 2; }
/* The chevron that says "this one goes somewhere" */
.onward__plate::after { content: ""; grid-column: 2; grid-row: 1 / 3; width: 0.9rem; aspect-ratio: 1; border-top: 0.22rem solid currentColor; border-right: 0.22rem solid currentColor; transform: rotate(45deg); }

/* ============ TYPE ============ */

.overture--dialed .overture__title { margin: 0; }
.overture__half { font-family: var(--sam-serif-face); font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); line-height: 1.3; letter-spacing: 0; text-wrap: pretty; }
@media (min-width: 47.5em) {
  .overture--dialed .overture__title { font-size: clamp(2.75rem, 1rem + 4.6vw, 5.25rem); }
}
.hour__mark { font-family: var(--sam-stencil-face); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.hour__words { font-size: 1rem; line-height: 1.45; }
.asking__step::before { font-family: var(--sam-stencil-face); font-size: 3.2rem; line-height: 0.85; }
.asking__do { font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem); }
.caveat p { margin: 0 0 0.9em; }
.onward__plate { text-decoration: none; }
.onward__name { font-family: var(--sam-stencil-face); font-size: 1.6rem; line-height: 1.05; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
.onward__says { font-size: 1rem; line-height: 1.4; }

/* ============ COLOUR ============ */

.overture__half { color: var(--sam-chalk); }
.hour__disc { background: conic-gradient(from 0deg, var(--sam-aluminum) 0 180deg, var(--sam-lacquer) 180deg 360deg); }
.hour__disc::before { background: var(--sam-denim); }
.hour__tooth { background: var(--sam-lacquer); }
.hour__tooth--lit { background: var(--sam-aluminum); }
/* Stencil numerals are ink, on denim as on silver */
.hour__mark { color: var(--sam-lacquer); }
.hour__mark--bottom { background: var(--sam-aluminum); color: var(--sam-lacquer); }
.tally__action { color: var(--sam-lacquer); }
.asking__step::before { color: var(--sam-lacquer); }
.caveat { color: var(--sam-lacquer); }
.caveat::before { background: var(--sam-aluminum); }
.onward__plate { color: var(--sam-aluminum); }
.onward__plate::before { background: var(--sam-lacquer); }
.onward__plate:hover { color: var(--sam-lacquer); }
.onward__plate:hover::before { background: var(--sam-chalk); }
.caveat a { outline-color: var(--sam-lacquer); }

/* ============ MOTION ============ */

/* The dial never ticks or sweeps; only the hand-off plates answer a hover, in 200 ms */
.onward__plate::before { transition: background-color var(--sam-tempo) var(--sam-attack); }
