/* Instrument pages: the pinned title and figure, the closeup, the call sheet, the particulars, the shelf. Order: layout, type, colour, motion. */

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

/* The pinned half: the h1 leads, the figure follows it as a separate step */
.sheet { min-width: 0; }
.sheet__head { padding-top: 1.5rem; }
.sheet__title { margin: 0 0 0.35em; }
.sheet__kind { margin: 0 0 0.9rem; }
.sheet__head .says-more { margin: 0; max-width: 38rem; }
.tally__voice { margin: 0; }
.lesson__pinned .tally { padding-block: 2.5rem 1.5rem; }
.sheet--opening { padding-top: 1.5rem; }

/* The closeup: the picture, pressed to open */
.closeup { display: block; }
.closeup__frame { gap: 0.6rem; }
.closeup__photo { height: auto; aspect-ratio: 3 / 2; max-height: 56vh; min-height: 12rem; object-position: 50% 45%; }
.closeup__press { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; }
.closeup.now-enlarged .closeup__press { cursor: default; }
.closeup__dialog { max-width: min(92vw, 70rem); max-height: 94vh; padding: 1rem; border: 0; }
.closeup__dialog[open] { display: grid; gap: 0.8rem; justify-items: start; }
.closeup__enlarged { width: auto; max-width: 100%; height: auto; max-height: 78vh; }
.closeup__shut { min-height: 2.75rem; padding: 0 1.4rem; border: 0; border-radius: 999px; cursor: pointer; }

/* The call sheet: one silver plate, the sentence once, call and email side by side */
.callsheet { display: grid; gap: 0.8rem; margin-top: 1.6rem; }
.callsheet h2, .callsheet__intro { margin: 0; }
.callsheet__plate { position: relative; isolation: isolate; display: block; padding: 1.2rem 2.2rem 1.3rem; --sam-pitch: 1.1rem; }
.callsheet__plate::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  --sam-edge: radial-gradient(var(--sam-depth) 50% at 0 50%, #0000 96%, #000) 0 0 / 51% var(--sam-pitch) repeat-y, radial-gradient(var(--sam-depth) 50% at 100% 50%, #0000 96%, #000) 100% 0 / 51% var(--sam-pitch) repeat-y;
  -webkit-mask: var(--sam-edge); mask: var(--sam-edge);
}
.callsheet__sentence { margin: 0; }
.callsheet__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0 0; }
.callsheet__act { display: inline-flex; align-items: center; min-height: 2.75rem; max-width: 100%; padding: 0.5rem 1.2rem; border-radius: 1.4rem; overflow-wrap: anywhere; }

/* The particulars: every fact on its own full-width row, ruled in thin white */
.particulars { display: grid; margin: 0; }
.particulars__row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); column-gap: 1rem; align-items: baseline; padding: 0.85rem 0; border-top: 0.0625rem solid; }
.particulars__row:last-child { border-bottom: 0.0625rem solid; }
.particulars__term { grid-column: 1 / 5; margin: 0; }
.particulars__detail { grid-column: 5 / 11; margin: 0; }

/* The hand-off to prices and how to start */
.booking__steps { display: grid; gap: 1rem; margin: 0 0 1.2rem; padding-left: 1.6rem; }
.booking__link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.booking__why { display: block; }
.booking__onward { margin: 0; }
.booking__onward a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* The shelf: other lessons, three equal columns, one picture height, one caption line */
.shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; row-gap: 1rem; padding-top: calc(var(--sam-bar) * 0.5); }
.shelf__title, .shelf__intro { margin: 0; }
.shelf__intro a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.shelf__piece { display: grid; grid-column: span 1; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0.5rem; align-content: start; min-width: 0; }
.shelf__photo { grid-row: 1; width: 100%; height: clamp(13rem, 24vw, 21rem); object-fit: cover; }
.shelf__name { grid-row: 2; margin: 0; }
.shelf__rate { grid-row: 3; margin: 0; }

@media (max-width: 47.49em) {
  .sheet__head { padding-top: 0.75rem; }
  .lesson__pinned .tally { gap: 0.6rem; padding-block: 0.9rem 0; }
  .lesson__pinned .tally__voice { padding: 0.55rem 1.2rem; }
  .sheet--opening { padding-top: 1rem; }
  .closeup__photo { max-height: none; aspect-ratio: 4 / 3; }
  .callsheet__plate { padding-inline: 1.3rem; }
  .shelf__piece { grid-column: 1 / -1; margin-bottom: 0.8rem; }
  .shelf__photo { height: auto; aspect-ratio: 4 / 3; }
}

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

.sheet__title { font-size: clamp(2rem, 1rem + 4.5vw, 2.75rem); }
@media (min-width: 47.5em) { .sheet__title { font-size: clamp(2.5rem, 0.9rem + 3.9vw, 4.5rem); } }
.sheet__kind { font-size: 1.125rem; line-height: 1.3; }
.lesson__pinned .tally__figure { font-size: clamp(1.9rem, 1rem + 3.2vw, 3.75rem); line-height: 0.9; }
.callsheet__sentence { font-size: var(--sam-size-lede); line-height: 1.35; }
.callsheet__act { font-size: 1rem; line-height: 1.3; text-decoration: none; }
.callsheet__intro { font-size: 1.0625rem; }
.particulars__term { font-size: 1.0625rem; line-height: 1.4; }
.particulars__detail { font-size: var(--sam-size-lede); line-height: 1.35; }
.booking__link { font-size: var(--sam-size-lede); }
.booking__why, .booking__onward { font-size: 1.0625rem; }
.shelf__name { font-size: 1.3rem; line-height: 1.2; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
.shelf__rate, .shelf__intro { font-size: 1rem; line-height: 1.4; }
.shelf__piece { text-decoration: none; }
.closeup__shut { font-size: 1rem; }

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

.sheet__kind, .shelf__piece { color: var(--sam-chalk); }
.tally .cue { color: var(--sam-lacquer); }
.closeup__press { background: none; color: inherit; }
.closeup__dialog { background: var(--sam-denim); color: var(--sam-chalk); }
.closeup__dialog::backdrop { background: rgb(8 13 17 / 0.82); }
.closeup__shut { background: var(--sam-aluminum); color: var(--sam-lacquer); }
.closeup__shut:hover { background: var(--sam-chalk); }
.callsheet__plate { color: var(--sam-lacquer); }
.callsheet__plate::before { background: var(--sam-aluminum); }
.callsheet__act { background: var(--sam-lacquer); color: var(--sam-aluminum); box-shadow: inset 0 0 0 0.125rem var(--sam-lacquer); }
.callsheet__act:hover { background: transparent; color: var(--sam-lacquer); }
.callsheet__act:focus-visible { outline-color: var(--sam-lacquer); }
.particulars__row { border-color: var(--sam-chalk); }
.particulars__term, .particulars__detail { color: var(--sam-chalk); }

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

.closeup__shut { transition: background-color var(--sam-tempo) var(--sam-attack); }
.shelf__name { transition: text-decoration-thickness var(--sam-tempo) var(--sam-attack); }
.shelf__piece:hover .shelf__name { text-decoration-thickness: 0.16em; }
.closeup__dialog[open] { animation: sam-closeup-in 180ms var(--sam-attack); }
@keyframes sam-closeup-in { from { opacity: 0; } to { opacity: 1; } }
