/* The chooser: the first row borrows its corners from the mounts and leads; the second
   row is quiet underlined words. On a phone the three household chips stack, each whole
   on its own line; the kinds scroll in their own track and fade out at the right edge,
   so a cut word reads as "more this way". */
.catalogue--house {
  --plan-crossing: .55rem;
  --hall-reach: var(--phone-hall);
  --room-reach: .85rem;
  --row-fade: 2.75rem;
  padding-top: 1.2rem;
  padding-bottom: 0;
}
.catalogue--entry .room--title { max-width: 30ch; }
.catalogue--entry .entry--lead { max-width: 52ch; margin-bottom: .8rem; }
.choices--doors, .choices--walking {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: .4rem;
  overflow: visible;
  padding: .25rem .25rem .55rem;
}
.choices--kinds {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--petrol) var(--receipt);
  padding: .25rem var(--row-fade) .55rem .25rem;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--row-fade)), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - var(--row-fade)), transparent);
}
.choices--walking a { display: inline-flex; align-items: center; box-sizing: border-box; }
.catalogue--kinds:not(:empty) {
  display: grid;
  grid-template-areas: "visits" "choices";
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  margin: .35rem 0 .85rem;
}
.choices--name { grid-area: visits; margin: 0; }
.choices--kinds { grid-area: choices; gap: 0 1.3rem; padding-bottom: .25rem; }
.kind--link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 .1rem;
  border: 0;
  background: none;
  color: var(--petrol);
  font: 1rem var(--pen-text);
  text-decoration: underline;
  text-decoration-color: rgba(10, 44, 63, .35);
  text-decoration-thickness: .0625em;
  text-underline-offset: .28em;
  cursor: pointer;
}
.kind--link:hover { text-decoration-color: var(--biro); }
.kind--link[aria-pressed="true"] {
  color: var(--biro);
  text-decoration-color: currentColor;
  text-decoration-thickness: .125em;
}
.catalogue--house [hidden] { display: none; }

#cookie-note a, #cookie-note button { position: relative; z-index: 2; }
.catalogue--house .knob--toggle,
.catalogue--house .kind--link,
.catalogue--house .visit--details a { position: relative; z-index: 2; }

/* The wall runs through the catalogue. Each visit carries its own length of hall,
   so the plan and the articles stay in the same order even when a door moves.
   Every service has its own door: the wall breaks, two stubs return into the room,
   and a leaf stands shut in the gap until that door is the open one. */
.catalogue--doors { border-top: var(--baseboard) solid var(--petrol); }
.catalogue--visit {
  display: grid;
  grid-template-areas: "hall sill room";
  grid-template-columns: calc(var(--hall-reach) - var(--plan-crossing)) var(--plan-crossing) minmax(0, 1fr);
  grid-template-rows: auto;
}
.catalogue--hall {
  grid-column: hall-start / sill-end;
  grid-row: 1 / -1;
  display: grid;
  grid-template-areas: "threshold" "length";
  grid-template-rows: 7rem 1fr;
  min-width: 0;
}
.catalogue--hall .hall--plan { grid-area: threshold; }
.catalogue--hall .plan--length { grid-area: length; }
.plan--desk, .plan--station { display: none; }
.plan--stub { stroke-linecap: butt; }
.plan--shut, .plan--latch { fill: none; stroke-width: 2; stroke-linecap: square; }
.plan--shut { stroke: var(--petrol); }
.plan--latch { display: none; stroke: var(--biro); }
.catalogue--hall .hall--swing { opacity: .4; stroke: var(--petrol); }
.catalogue--hall[data-state="open"] .hall--swing { stroke: var(--biro); }
[data-door][data-state="open"] .plan--shut { display: none; }
[data-door][data-state="open"] .plan--latch { display: block; }
.visit--room {
  grid-area: room;
  min-width: 0;
  padding: 1rem 0 clamp(1.8rem, 5vh, 3.5rem) var(--room-reach);
}
/* The head is only as wide as its words, so its tilted box stays inside the room's own padding. */
.visit--room > .room--head { margin: 0 0 .55rem; max-width: none; width: fit-content; text-wrap: wrap; }
.visit--words { grid-area: words; }
.visit--words p { margin: 0; max-width: 57ch; }
.visit--picture { grid-area: picture; }
.visit--details {
  grid-area: quote;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1rem;
}
.visit--details a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.visit--first, .visit--regular {
  display: grid;
  grid-template-areas: "words" "picture" "quote";
  grid-template-columns: minmax(0, 1fr);
  row-gap: .45rem;
}
.catalogue--house .view--photo img { height: auto; object-fit: cover; }
.visit--first img { aspect-ratio: 1.4; object-position: 50% 57%; }
.visit--regular img { aspect-ratio: 1.35; object-position: 50% 52%; }

.rhythm--fork { margin-top: 1.2rem; }
.rhythm--visit {
  display: grid;
  grid-template-areas: "rhythm stairs";
  grid-template-columns: minmax(0, 1fr) minmax(0, 34%);
  gap: .7rem;
  align-items: start;
  padding-block: .8rem;
}
.rhythm--words {
  grid-area: rhythm;
  border-inline-start: var(--corner-weight) solid var(--petrol);
  padding-inline-start: .65rem;
}
.rhythm--words h3 { margin: 0 0 .25rem; }
.rhythm--words p { margin: 0; }
.rhythm--picture { grid-area: stairs; }
.rhythm--picture img { aspect-ratio: 4 / 5; }

/* The quote line sits right under the words; the picture then crosses the sill
   in its own row and runs the whole width of the spread. */
.catalogue--visit[data-service="move-in-out-cleaning"] {
  grid-template-areas: "hall sill room" "hall cross cross";
}
[data-service="move-in-out-cleaning"] .visit--room { padding-bottom: .6rem; }
.catalogue--crossing {
  grid-area: cross;
  z-index: 1;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
  background-color: var(--washed-window);
}
.catalogue--crossing img { aspect-ratio: 1.65; object-position: 50% 59%; }

/* The hall ends in one dark room: the ending stands on its own petrol ground,
   the full width of the house. */
.catalogue--return {
  display: grid;
  grid-template-areas: "heading" "promise" "telephone";
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: .9rem 1.5rem;
  padding: clamp(2.5rem, 9vh, 4.5rem) clamp(1.25rem, 5vw, 3.5rem);
  background-color: var(--petrol);
  color: var(--washed-window);
}
.catalogue--return h2 {
  grid-area: heading;
  margin: 0;
  max-width: none;
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.375rem);
}
.catalogue--return p { grid-area: promise; margin: 0; max-width: 46ch; font-size: 1.1875rem; }
.catalogue--return p a { color: inherit; }
.catalogue--return .knob--press {
  --corner-ink: var(--washed-window);
  grid-area: telephone;
  justify-self: start;
  position: relative;
  z-index: 2;
  min-height: 3.75rem;
  margin-top: .6rem;
  padding: 1rem 1.6rem;
  color: var(--washed-window);
  font-size: 1.1875rem;
}
.catalogue--return :focus-visible { outline-color: var(--washed-window); }
.catalogue--return ::selection { background: var(--washed-window); color: var(--petrol); }

@media (min-width: 48rem) {
  .catalogue--house {
    --plan-crossing: 1.5rem;
    --hall-reach: clamp(4.75rem, 7%, 6rem);
    --room-reach: clamp(1.35rem, 3vw, 2.8rem);
    padding-top: 1.65rem;
  }
  .catalogue--entry .room--title { max-width: none; width: fit-content; margin-block: 1.1rem .5rem; }
  .catalogue--entry .entry--lead { max-width: none; }
  .choices--doors, .choices--walking {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .6rem;
  }
  .choices--kinds {
    flex-wrap: wrap;
    overflow: visible;
    padding: 0 .25rem;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .catalogue--kinds:not(:empty) {
    grid-template-areas: "visits choices";
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: .9rem;
  }
  .catalogue--hall { grid-template-areas: "threshold" "length"; }
  .plan--desk { display: block; }
  .catalogue--hall .plan--pocket { display: none; }
  /* The label is lettered up the narrow hall floor, below the door, close to the
     outer wall and clear of the leaf and of the picture that crosses the sill. */
  .plan--station {
    grid-area: length;
    display: block;
    position: relative;
    z-index: 1;
    align-self: start;
    justify-self: start;
    margin: .6rem 0 0 .85rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    font-family: var(--plan-lettering);
    font-weight: 500;
    font-size: clamp(.95rem, 1.4vw, 1.2rem);
    line-height: 1.3;
  }
  .visit--room { padding-top: 2.1rem; }
  .visit--first, .visit--regular {
    grid-template-areas: "words picture" "quote picture";
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: auto 1fr;
    gap: .5rem 1.3rem;
    align-items: start;
  }
  .visit--first img, .visit--regular img { aspect-ratio: 1.64; }
  /* The fork: three rhythms side by side, each picture over its own words. */
  .rhythm--fork {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.3rem;
    align-items: start;
    margin-top: 1.5rem;
  }
  .rhythm--visit {
    grid-template-areas: "stairs" "rhythm";
    grid-template-columns: minmax(0, 1fr);
    gap: .7rem;
    padding-block: 0;
  }
  .rhythm--picture img { aspect-ratio: 1.45; object-position: 50% 56%; }
  .catalogue--crossing { margin-bottom: clamp(1.5rem, 5vh, 2.5rem); }
  .catalogue--crossing img { aspect-ratio: 2.5; }
  .catalogue--return {
    grid-template-areas: "heading telephone" "promise telephone";
    grid-template-columns: minmax(0, 1fr) auto;
  }
  /* Room above the tilted heading, so its raised end stays on the petrol ground. */
  .catalogue--return h2 { margin: 1.1em 0 .35rem; width: fit-content; }
  .catalogue--return .knob--press { justify-self: end; margin-top: 0; }
}
