/* index.html: the opening, the three price cells and the salon wall. Builds on css/site.css. */

/* OPENING: heading and lead at the left, tall box sliver at the right, pinned note against the picture. */
.open { padding-block: clamp(1rem, 2.6vh, 1.75rem) 0; }
.open__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 26%;
  grid-template-areas: "text pic" "note note";
  gap: var(--gap); align-items: start;
}
.open__text { grid-area: text; display: grid; gap: .85rem; justify-items: start; align-content: start; }
.open__h { font-size: clamp(1.625rem, 1.05rem + 2vw, 2.375rem); }
.open__lead { max-width: 34ch; }
.open__hours { font-size: 1rem; line-height: 1.45; margin: 0; max-width: 42ch; }
/* the photograph takes the height of the text beside it; it never sets the row's height itself. */
.open__pic { grid-area: pic; align-self: stretch; min-height: 10rem; position: relative; }
.open__pic img { position: absolute; inset: 0; }
.open__note { grid-area: note; justify-self: end; margin: .35rem 0 0; }

/* PRICE CELLS: one ticket per line on phones (name left, price right), three across from 40rem. */
.open__prices { padding-top: clamp(.9rem, 2.4vh, 1.4rem); }
.prices { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; list-style: none; margin: 0; padding: 0; }
.prices__cell a {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem 1rem;
  min-height: 3rem;
  padding: .6rem .8rem 1.05rem; background: var(--second); color: var(--ink); text-decoration: none;
}
.prices__cell a:hover, .prices__cell a:focus-visible { background: var(--ink); color: var(--ground); }
.prices__name { font-size: 1rem; line-height: 1.25; }
.prices__num { font-size: 1.0625rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prices__note { margin-top: .55rem; max-width: 46ch; }

/* THE WALL: unequal crops, two-up on phones, hung across twelve columns above 52rem. */
.wall {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap); row-gap: clamp(1.25rem, 3vw, 2rem); align-items: start;
  margin-top: clamp(1rem, 3vh, 1.75rem);
}
.wall .hang { min-width: 0; }
.wall .hang--full { grid-column: 1 / -1; }
.wall .label { max-width: 26rem; }
.band__say { max-width: 60ch; margin: 0; }

/* VISIT: the wall closes on a practical block, address set as a counter readout. */
.visit__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.visit__addr { font-size: clamp(1.75rem, 1rem + 3vw, 3.25rem); line-height: 1.04; margin: .6rem 0 1.1rem; }
.visit__next { margin: 1rem 0 0; }

@media (min-width: 40rem) {
  .open__grid { grid-template-columns: minmax(0, 1fr) 30%; grid-template-areas: "text pic" "note pic"; }
  .open__note { margin-top: .25rem; }
  .prices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .prices__cell a { display: grid; gap: .15rem; align-content: start; justify-content: stretch; min-height: 4.75rem; padding-top: .7rem; }
  .prices__name { font-size: 1.0625rem; }
  .visit__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
}

@media (min-width: 52rem) {
  .wall { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: clamp(1.5rem, 3vw, 2.5rem); }
  /* two classes each, so the spans win over .wall .hang--full and the hangings share a row. */
  .wall .hz-a { grid-column: 1 / span 6; }
  .wall .hz-b { grid-column: 7 / span 3; margin-top: clamp(.75rem, 2vh, 1.5rem); }
  .wall .hz-c { grid-column: 10 / span 3; margin-top: clamp(1.5rem, 5vh, 3rem); }
  .wall .sz-a { grid-column: 1 / span 8; }
  .wall .sz-b { grid-column: 9 / span 4; margin-top: clamp(1rem, 4vh, 2.5rem); }
  .wall .sb-a { grid-column: 1 / span 4; }
  .wall .sb-b { grid-column: 6 / span 7; margin-top: clamp(1.5rem, 8vh, 5rem); }
  .wall .bf-a { grid-column: 1 / span 8; }
  .wall .bf-b { grid-column: 9 / span 4; margin-top: clamp(1rem, 4vh, 2.5rem); }
}

@media (min-width: 60rem) {
  /* one block: heading and lead run the full text width, the button and hours sit at the left
     with the pinned note beside them, and a wider photograph closes the right. */
  .open__grid {
    grid-template-columns: minmax(0, 1fr) auto 40%;
    grid-template-areas:
      "head  head pic"
      "lead  lead pic"
      "btn   note pic"
      "hours note pic";
    row-gap: 1.1rem;
  }
  .open__text { display: contents; }
  .open__text > * { justify-self: start; }
  .open__h { grid-area: head; }
  .open__lead { grid-area: lead; max-width: 52ch; margin: 0; }
  .open__text .btn { grid-area: btn; }
  .open__hours { grid-area: hours; max-width: 46ch; }
  .open__pic { min-height: clamp(12rem, calc(100vh - 30rem), 20rem); }
  .open__note { align-self: center; justify-self: end; max-width: 15rem; margin: 0; }
  /* keep the offer note off the box photograph: it docks below the opening instead. */
  .home #promo { top: auto; bottom: calc(var(--consent-h) + 1rem); }
}
