/* Home: the opening with its key line and quote strip, then five row bands. Builds on site.css. */

/* First screen wrapper: deep ground, a little deep under the strip so its scallops read */
.first { background: var(--deep); color: var(--pale); padding-bottom: 0.9rem; }
.first .strip { padding-bottom: 0; }
.h1__trade { font-size: max(1.25rem, 0.6em); line-height: 1.15; }
.opening__plate .btn { max-width: 100%; }
.opening__pic video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* Key line: reads the photograph as three rows and jumps to each band */
.key {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.5rem;
  margin: 0; padding: 0.35rem var(--inset);
  font-size: var(--t-row); line-height: 1.3;
}
.key a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-family: var(--display); font-size: 1.25rem; text-decoration: none;
}
.key a::after { content: "\2193"; margin-left: 0.3em; font-family: var(--text); }
.key a:hover { text-decoration: underline; }

@media (max-width: 47.99em) {
  /* The plate row is at least as tall as the directory, so the picture starts below both */
  .opening { grid-template-rows: minmax(30.5rem, auto) auto; }
  .opening__plate { margin-right: 0.75rem; }
  .plate > :first-child, .plate__row, .plate__foot { padding-inline: 0.7rem; }
  .plate__foot .btn { padding-inline: 0.8rem; font-size: 1.2rem; flex-wrap: wrap; }
}
@media (min-width: 48em) {
  .key { padding-left: var(--dir-w); }
  .opening__pic video { height: 100%; aspect-ratio: auto; max-height: 70vh; }
}

/* Phone directory: the links take rows inside the window instead of a rail that runs off the right edge.
   The name and every link wrap rather than being cut, and the pinned bar does the same once it arrives. */
@media (max-width: 47.99em) {
  .dir__nav { min-width: 0; }
  .dir__nav ul,
  .dir.is-compact .dir__nav ul {
    display: flex; flex-wrap: wrap; gap: 0 1.1rem;
    overflow-x: visible; max-width: 100%; padding-bottom: 0;
  }
  .dir__nav li,
  .dir.is-compact .dir__nav li { max-width: 100%; }
  .dir__nav a,
  .dir.is-compact .dir__nav a {
    white-space: normal; overflow-wrap: break-word; max-width: 100%;
    align-items: center; line-height: 1.25;
  }
  .dir__name { min-width: 0; }
  .dir__name span { min-width: 0; overflow-wrap: break-word; }
  .dir.is-compact { top: 0; }
  .dir.is-compact .dir__nav { flex: 1 1 100%; min-width: 0; }
  .dir.is-compact .dir__name { flex: 0 0 auto; }
  .first .opening, .first .key, .first .strip { position: relative; z-index: 1; }
}

/* Left scallop for image crops: the gutter radius along the long edge */
.scallop-l {
  -webkit-mask: radial-gradient(farthest-side at 100% 50%, #000 97%, #0000) 0 0 / var(--sc) calc(var(--sc) * 2.4) repeat-y, linear-gradient(#000 0 0) 100% 0 / calc(100% - var(--sc) + 1px) 100% no-repeat;
          mask: radial-gradient(farthest-side at 100% 50%, #000 97%, #0000) 0 0 / var(--sc) calc(var(--sc) * 2.4) repeat-y, linear-gradient(#000 0 0) 100% 0 / calc(100% - var(--sc) + 1px) 100% no-repeat;
}

/* Row bands: compact, picture bleeds top to bottom and to the right edge */
.hb { padding-block: 0; scroll-margin-top: 4rem; gap: 0; }
.hb .band__in { padding-block: clamp(2rem, 6vh, 3.5rem); }
.hb .band__in p { max-width: 34em; }
.hb__head { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 0.6rem; }
.hb__head .section3 { flex: none; width: 5.5rem; margin-top: 0.6rem; }
.hb__head h2 { margin-bottom: 0.2em; }
.hb__links { display: flex; flex-wrap: wrap; gap: 0 2rem; list-style: none; margin: 0 0 0.4rem; padding: 0; }
.hb__aside { font-size: var(--t-body); margin: 0.6rem 0 0; }
.say { border-left: var(--rule); padding-left: 1rem; }
.hb .tolink + .say { margin-top: 0.8rem; }

.hb .band__pic { position: relative; }
.hb .band__pic img { aspect-ratio: 3 / 2; height: auto; min-height: 0; max-height: none; }
.hb__pic--small { padding-bottom: 1.5rem; }
.hb__pic--small figcaption { font-size: var(--t-row); line-height: 1.4; padding: 0.5rem var(--inset) 0 calc(var(--sc) + 0.25rem); }

@media (min-width: 48em) {
  .hb--roof { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .hb--gutter { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .hb--wall { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); }
  .hb--storm { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .hb__pic--fill { min-height: 16rem; }
  .hb--gutter .hb__pic--fill { min-height: 13rem; }
  .hb .hb__pic--fill img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .hb .hb__pic--small { align-self: center; padding-block: 1.5rem; }
  .hb .hb__pic--small img { height: 13rem; aspect-ratio: auto; }
}

/* Make the call: image-free, two columns of copy and ruled rows */
.callb { scroll-margin-top: 4rem; }
.callb__in { display: grid; gap: var(--gap); }
.callb__say p { max-width: 34em; }
.callb__act { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; margin-top: 1.5rem; }
@media (min-width: 48em) {
  .callb__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
}
