/* The Pointe School of Dance: class page. Order: layout, type, colour, motion. Desk first. */

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

:root { --tda-rise: clamp(1.25rem, 4vh, 2.5rem); }

/* The seam with a ledger: photograph and facts down the left, the class told down the right. */
.doorway-ledger { grid-template-rows: auto 1fr; }
.doorway-ledger > .hall { grid-column: 1; grid-row: 1; }
.doorway-ledger > .studio { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
.doorway-ledger > .hallnotes { grid-column: 1; grid-row: 2; min-width: 0; }
.hallnotes > .scene:first-child { padding-top: clamp(1.5rem, 5vh, 3rem); }

/* Hall pane: the photograph's top edge sits on the line of the h1's capitals. */
.hallframe { padding: calc(var(--tda-rise) + 0.5rem) var(--tda-edge) 0; }
.peeker { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; }

.scene-first { padding-top: var(--tda-rise); }
.kindline { display: block; margin-top: 0.7rem; }

/* The age tape: square tiles, 1 through 18+, in two even rows of nine, edge to edge of the column. */
.floortape-line { display: grid; gap: 0.6rem; }
.floortape {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.25rem;
  width: 100%;
}
.floortape-party { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.floortape-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 1;
  border: var(--tda-tread) solid;
}
.floortape-extra { grid-column: 1 / -1; }

.sendoff { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.sendoff .tile { max-width: 100%; white-space: normal; text-align: left; }
.sendoff-phone { display: inline-flex; align-items: center; min-height: 2.75rem; }
.sendoff-words { max-width: 38rem; }

/* Leading on: one large 16:9 tile, two matched small ones stacked beside it. */
.passing { padding: clamp(2.5rem, 9vh, 6.5rem) var(--tda-edge); }
.passing-row {
  display: grid;
  grid-template-columns: 2.4fr 1fr;
  gap: var(--tda-beat) clamp(1rem, 2.5vw, 2rem);
  align-items: start;
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.passing-item { min-width: 0; }
.passing-item:first-child { grid-column: 1; grid-row: 1 / span 2; }
.passing-item:nth-child(n+2) { grid-column: 2; }
.passing-item:nth-child(3) { align-self: end; }
.lookin { display: block; }
.lookin .mirror { display: block; }
.lookin-name, .lookin-price { display: block; }
.lookin-name { margin-top: 0.6rem; }

/* The photograph opened large. */
.fullframe {
  width: min(96vw, calc((92vh - 4.5rem) * 1.7778));
  max-width: 96vw;
  padding: 0;
  overflow: hidden;
}
.fullframe img { width: 100%; height: auto; }
.fullframe-bar { display: flex; justify-content: flex-end; padding: 0.5rem; }

@media (max-width: 48rem) {
  .doorway-ledger { grid-template-rows: auto; }
  .doorway-ledger > .hall,
  .doorway-ledger > .studio,
  .doorway-ledger > .hallnotes { grid-column: auto; grid-row: auto; }
  .hallnotes > .scene:first-child { padding-top: 0; }
  .hallframe { padding-top: 1.25rem; }
  .scene-first { padding-top: 1.25rem; }
  .passing-row { grid-template-columns: 1fr 1fr; }
  .passing-item:first-child { grid-column: 1 / -1; grid-row: auto; }
  .passing-item:nth-child(n+2) { grid-column: auto; }
  .passing-item:nth-child(3) { align-self: start; }
  .sendoff .tile { width: 100%; }
}

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

.kindline { font-family: var(--tda-counting); font-weight: 400; font-size: 1rem; line-height: 1.4; }
.floortape-tile { font-size: 0.9rem; line-height: 1; letter-spacing: -0.04em; }
.floortape-words, .floortape-extra { font-size: 0.9375rem; line-height: 1.5; }
.cue { font-family: var(--tda-voice); font-weight: 650; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.22; max-width: 30rem; }
.preface { font-size: 1.125rem; line-height: 1.7; max-width: 38rem; }
.callsheet dd { overflow-wrap: anywhere; }
.sendoff-words { font-size: 1.0625rem; }
.sendoff .tile { line-height: 1.3; }
.lookin { text-decoration: none; }
.lookin-name { font-family: var(--tda-voice); font-weight: 650; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.15; }
.lookin-price { margin-top: 0.2rem; font-size: 0.9375rem; line-height: 1.5; }
.lookin:hover .lookin-name { text-decoration: underline; text-decoration-thickness: 0.125rem; text-underline-offset: 0.22em; }
.fullframe-close { font-size: 0.9375rem; }

@media (max-width: 48rem) {
  .preface { font-size: 1rem; }
  .cue { font-size: 1.5rem; line-height: 1.2; }
}

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

.peeker { background: transparent; }
.peeker:focus-visible { outline: 0.1875rem solid var(--tda-straw); outline-offset: -0.5rem; }
.floortape-tile { background: transparent; border-color: var(--tda-bark); color: var(--tda-bark); }
.floortape-tile-filled { background: var(--tda-blue); border-color: var(--tda-blue); color: var(--tda-straw); }
.lookin { color: var(--tda-bark); }
.fullframe { background: var(--tda-straw); color: var(--tda-bark); border: var(--tda-tread) solid var(--tda-bark); }
.fullframe img { background: var(--tda-bark); }
.fullframe::backdrop { background: rgb(51 39 7 / 0.78); }

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

/* The age tape wipes in through the shared .arrival rule (190 ms) and is static for reduced motion. */
.fullframe[open] { animation: fullframe-in var(--tda-quick) ease-out; }
@keyframes fullframe-in {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}
