/* Happy Minds School of Music: the opening page. Read in the order the page is read. */

/* The first window: the lemon band of words lies along its head, under the two upper keys,
   and the photograph fills everything below it down to the foot of the window.
   The words stand at the top, so nothing pinned at the foot (the two lower keys, the cookie
   choice, the offer ribbon) can ever lie over them: the h1 and its sentence are whole at rest
   whichever notice is up, and in a window of any height.
   The window is a definite height and the print is taken out of the row's intrinsic size, so the
   picture never pushes anything under the fold. */
.firstWindow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  background: var(--colour-of-the-lemon);
}

/* The print keeps the key silhouette at shallow radii and carries no type across its middle.
   It is held to its very top edge, so every bit of the head and the score that the print has is shown;
   whatever the window cannot hold is lost from the foot, behind nothing that matters. */
.windowPicture {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  background: var(--colour-of-the-navy);
  border-radius: 0 0 0.9rem 0.9rem;
  overflow: hidden;
}
.windowPicture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 32% top;
  filter: grayscale(1);
}

/* The band: h1 at the left, one short line beside it, the orange key at the right of that copy.
   Its head keeps clear of the two upper keys; its foot meets the print. */
.captionBand {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 0.6rem;
  padding: var(--room-under-the-upper-keys) var(--margin-of-the-spread) 0.9rem;
  background: var(--colour-of-the-lemon);
  color: var(--colour-of-the-navy);
}
.bandWords { display: grid; gap: 0.3rem; }
.bandLine {
  max-width: 40ch;
  font-size: var(--size-of-reading-text);
  line-height: 1.35;
}
.bandAction { justify-self: start; }

@media (min-width: 56rem) {
  .windowPicture img { object-position: 50% top; }
  .captionBand {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: clamp(1.5rem, 4vw, 4.5rem);
  }
  .bandWords {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 1.5rem;
  }
  .bandWords h1 { flex: none; }
  .bandLine { flex: 1 1 20rem; min-width: 0; max-width: 70ch; }
  .bandAction { justify-self: end; }
}

/* Hard cut to the blue spread: the six columns, the later rows sitting under the first. */
.homeColumns { row-gap: clamp(1.75rem, 4vh, 3rem); }

/* Measure one: the article, its two-line initial, the link to the practice page. */
.practiceArticle h2 { margin-bottom: 0.7rem; }
.practiceArticle p { line-height: 1.5; }
.practiceArticle .openingInitial::first-letter {
  padding-right: 0.05em;
  font-size: 2.8em;
  line-height: 1.05;
  text-transform: uppercase;
}
.articleLink { margin-top: 1rem; }
.articleLink a { text-decoration-thickness: 0.12em; }

/* The line carried out of the article: h3 size, hung from the top line the two article heads share,
   at the head of the inset column with the pencilled bar under it. */
.pencilLine {
  font-size: var(--size-of-a-minor-heading);
  line-height: 1.2;
}

/* Measure two: the pulled line, then the pencilled bar. */
.pencilColumn { display: grid; gap: 0.85rem; align-content: start; }
.pencilColumn img { aspect-ratio: 4 / 3; }

/* Measure three: the recital room, two sentences, the link on to the recitals. */
.recitalBlock { display: grid; gap: 0.9rem; align-content: start; }
.recitalBlock h2 { margin-bottom: 0.1rem; }
.recitalBlock p { line-height: 1.5; }

/* The last row of the spread: the lesson index on the left three columns, the two cities on the right three. */
.lessonIndexBlock { display: grid; gap: 0.9rem; align-content: start; }
.lessonIndexList li + li { margin-top: 0.9rem; }
.lessonIndexList a {
  font-size: var(--size-of-reading-text);
  text-decoration-thickness: 0.1em;
}
.lessonNote {
  display: block;
  font-size: var(--size-of-reading-text);
  line-height: 1.45;
}
.indexAside {
  font-size: var(--size-of-reading-text);
  line-height: 1.45;
}

.placesMeasure { display: grid; gap: 0.8rem; align-content: start; }
.placesMeasure a { text-decoration-thickness: 0.1em; }

/* On a desk screen the article, the inset and the recital block all start on the first row, on one top edge. */
@media (min-width: 56rem) {
  .pencilColumn img { aspect-ratio: 3 / 4; }
  .sixColumns > .practiceArticle { grid-row: 1; }
  .sixColumns > .pencilColumn { grid-row: 1; }
  .sixColumns > .recitalBlock { grid-row: 1; }
  .sixColumns > .indexMeasure { grid-column: 1 / span 3; grid-row: 2; }
  .sixColumns > .placesMeasure { grid-column: 4 / span 3; grid-row: 2; }
}

/* The handoff keys hang from the blue spread as short keys, tops flush to it and feet on one line. */
.onwardKeys { align-items: stretch; }
.onwardKeys > .keyFace { min-height: 3.5rem; }
.lemonGround .keyFace.marked { color: var(--colour-of-the-navy); }

@media (min-width: 56rem) {
  .onwardKeys > .keyFace { min-height: 4.5rem; }
}
