/* Home: the specimen index and six shelves. Order: layout, type, colour, motion. */

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

/* Tablet widths: the rail is too narrow for slab shelf titles, so labels go above their entries. */
@container page_column (min-width: 40.01rem) and (max-width: 64rem) {
  .intake_row { grid-template-columns: 4rem minmax(0, 1fr); grid-template-areas: "number label" "number body"; grid-template-rows: auto 1fr; }
  .intake_number { padding: 1.25rem 0.75rem; }
  .intake_label { border-left: var(--measure-rule) solid; padding: 1.25rem var(--measure-space) 0.25rem; }
  .intake_body { padding: 0.75rem var(--measure-space) 1.75rem; }
}

/* Row 01: the tag hangs from the row's top rule. */
.specimen_row .intake_body { padding-top: 0; }
.strip_head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.75rem 1.5rem; }
.strip_hint { padding-top: var(--measure-entry); max-width: 44ch; flex: 1 1 16rem; }

.quote_tag { position: relative; isolation: isolate; display: grid; gap: 0.125rem; max-width: 17rem;
  padding: 1.375rem 1.125rem calc(0.75rem + var(--measure-bite-control)); --measure-bite: var(--measure-bite-control); }
.quote_tag::before { content: ""; position: absolute; inset: 0; z-index: -1;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--measure-bite) + 0.0625rem) no-repeat,
    radial-gradient(40% 100% at 50% 100%, #0000 94%, #000 100%) bottom / calc(var(--measure-bite) * 3) var(--measure-bite) round no-repeat;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--measure-bite) + 0.0625rem) no-repeat,
    radial-gradient(40% 100% at 50% 100%, #0000 94%, #000 100%) bottom / calc(var(--measure-bite) * 3) var(--measure-bite) round no-repeat; }
.quote_tag::after { content: ""; position: absolute; top: 0.5rem; left: 1.125rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; }
.quote_call { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; min-height: 2.75rem; }

.specimen_strip { display: grid; gap: 0.75rem; margin-top: 1rem; padding: 0.25rem 0.25rem 0.5rem; overflow-x: auto;
  grid-template-columns: minmax(4rem, 20fr) minmax(4.75rem, 27fr) minmax(5.25rem, 31fr) minmax(4rem, 22fr); align-items: start; }
.specimen_bay { min-width: 0; }
/* Every bay stands on the same darker mount: the photo is inset, the punched foot is cut in the mount's own fill. */
.specimen_strip .specimen_mount { height: clamp(11rem, 38vh, 22rem);
  padding: 0.375rem 0.375rem calc(var(--measure-bite-photo) + 0.375rem); }
.specimen_mount video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The first bay is the narrowest: its hook is fitted whole inside the bay instead of being cropped. */
.specimen_strip .specimen_bay:first-child .specimen_mount img,
.specimen_strip .specimen_bay:first-child .specimen_mount video { object-fit: contain; object-position: center; }
.strip_link { display: inline-flex; align-items: center; min-height: 2.75rem; }

@container entry_column (max-width: 30rem) {
  /* The strip stays inside the column: no floor widths, no sideways scroll, the 20:27:31:22 split in full. */
  .specimen_strip { gap: 0.25rem; padding-inline: 0; overflow-x: visible;
    grid-template-columns: minmax(0, 20fr) minmax(0, 27fr) minmax(0, 31fr) minmax(0, 22fr); }
  .specimen_strip .specimen_mount { height: 10.5rem;
    padding: 0.1875rem 0.1875rem calc(var(--measure-bite-photo) + 0.1875rem); }
  .specimen_strip .specimen_caption { overflow-wrap: anywhere; }
  .strip_head { flex-direction: column-reverse; align-items: stretch; }
  .quote_tag { max-width: none; align-self: flex-end; }
  /* In a column the 16rem basis would become a height: the hint takes only its own lines. */
  .strip_hint { padding-top: 0; flex: 0 0 auto; }
}

/* Shelves: a specimen beside ruled entries. */
.shelf_lead { max-width: 60ch; margin-bottom: 1.25rem; }
.shelf_split { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 1.25rem calc(var(--measure-space) * 1.25); align-items: start; }
.shelf_wide { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }
.shelf_next { margin-top: var(--measure-entry); padding-top: var(--measure-entry); border-top: var(--measure-rule) solid; }
/* The photo and its caption travel down the shelf with the entries beside them. */
.shelf_split .shelf_figure { position: sticky; top: var(--measure-entry); }
.shelf_figure .specimen_mount { aspect-ratio: 3 / 2; }
.shelf_entries { min-width: 0; }
.shelf_entry { container: entry_column / inline-size; border-top: var(--measure-rule) solid; padding-block: 1rem 1.25rem; }
.shelf_entries > .shelf_lead + .shelf_entry { margin-top: 0; }
.shelf_aside { margin-top: 0.5rem; }
.shelf_voice { margin: var(--measure-entry) 0 0; }
.wash_figure { margin-bottom: 1.25rem; }
.wash_figure .specimen_mount { aspect-ratio: 2 / 1; max-height: 34rem; }

/* A shelf with two entries sets them side by side, so the row ends about where the photo and caption end. */
@container entry_column (min-width: 56.01rem) {
  .shelf_paired { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); }
  .shelf_paired .shelf_entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 calc(var(--measure-space) * 1.25); align-items: start; }
}

.quote_ledger { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem calc(var(--measure-space) * 1.5); }
.quote_cell > * + * { margin-top: 0.875rem; }
.pickup_cell { border-left: var(--measure-rule) solid; padding-left: calc(var(--measure-space) * 1.25); }
.pickup_cell .handover_row { justify-content: flex-start; margin-top: 1.25rem; }

@container entry_column (max-width: 44rem) {
  .shelf_split, .shelf_wide, .quote_ledger { grid-template-columns: minmax(0, 1fr); }
  .shelf_split .shelf_figure { position: static; }
  .wash_figure .specimen_mount { aspect-ratio: 3 / 2; }
  .pickup_cell { border-left: 0; padding-left: 0; border-top: var(--measure-rule) solid; padding-top: 1.25rem; }
}

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

.intake_label .shelf_title { font-size: clamp(1.75rem, 2.65vw, 3rem); }
.rail_note { margin-top: 0.75rem; font-size: var(--step-small); font-weight: 500; }
.strip_hint, .shelf_lead { font-size: var(--step-body); line-height: 1.5; }
.shelf_lead { font-weight: 500; }
.quote_call { font-weight: 700; font-size: 1.0625rem; line-height: 1.2; text-decoration: none; }
.quote_number { font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }
.quote_line { font-size: 0.9375rem; line-height: 1.35; }
.specimen_strip .specimen_caption { font-size: 0.9375rem; line-height: 1.25; }
.specimen_caption a { text-decoration: underline; }
.shelf_aside { font-style: italic; }
.shelf_voice p { font-size: var(--step-entry); line-height: 1.45; }
.phone_line { font-family: var(--face-slab); font-weight: 900; font-size: clamp(1.75rem, 1.1rem + 3.6vw, 4.25rem); line-height: 1.05; }
.strip_link { font-weight: 600; }
@container entry_column (max-width: 30rem) {
  .specimen_strip .specimen_caption { font-size: 0.9rem; }
}

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

.quote_tag { color: var(--tone-aubergine); }
.quote_tag::before { background: var(--tone-cyan); }
.quote_tag::after { background: var(--tone-plum); }
.quote_call { color: var(--tone-aubergine); }
.quote_tag :focus-visible { outline-color: var(--tone-aubergine); box-shadow: 0 0 0 0.125rem var(--tone-cyan); }
.phone_line a { color: var(--tone-paper); }
.specimen_caption a:hover, .entry_head a:hover { text-decoration-thickness: 0.1875rem; }

/* The four opening mounts share one slightly darker plum, so the punched foot reads on every bay. */
.specimen_strip { --tone-mount: #846684; }
.specimen_strip .specimen_mount { background: var(--tone-mount); }

/* The travelling photo and caption keep their own solid ground. */
.shelf_split .shelf_figure { background-color: var(--tone-plum); }

/* Chrome pinned to the window stands on its own opaque ground, so the shelves and the footer pass
   beneath it. The foundation locks the bookmark's and the notice's own background to none (their
   ground is a pseudo-element), so here the ground is put on the elements themselves, at a higher
   specificity, and each is cut with the same punched mask as its pseudo-element: the scallops stay. */
.call_tag { background-color: var(--tone-cyan); }
body.intake_front nav.bookmark_strip { background: var(--tone-cyan) !important;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 0.375rem) no-repeat,
    radial-gradient(40% 100% at 50% 100%, #0000 94%, #000 100%) bottom / 1.3125rem 0.4375rem round no-repeat;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 0.375rem) no-repeat,
    radial-gradient(40% 100% at 50% 100%, #0000 94%, #000 100%) bottom / 1.3125rem 0.4375rem round no-repeat; }
body.intake_front nav.bookmark_strip .bookmark_pull { background: var(--tone-cyan) !important; }
body.intake_front nav.bookmark_strip .bookmark_links,
body.intake_front nav.bookmark_strip .bookmark_links a { background-color: var(--tone-cyan); }
/* The strip is masked, so the focus ring is drawn inside the control. */
body.intake_front nav.bookmark_strip :focus-visible { outline-offset: -0.1875rem; box-shadow: none; }

/* The consent sheet is pinned to the window on a phone only: there the sheet and its line of text
   stand on solid plum, cut with the sheet's own scalloped top edge. On the desk it stays in the flow. */
@media (max-width: 40rem) {
  body.intake_front #storage { background: var(--tone-plum) !important;
    -webkit-mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--measure-bite) + 0.0625rem) no-repeat,
      radial-gradient(40% 100% at 50% 0, #0000 94%, #000 100%) top / calc(var(--measure-bite) * 3) var(--measure-bite) round no-repeat;
    mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--measure-bite) + 0.0625rem) no-repeat,
      radial-gradient(40% 100% at 50% 0, #0000 94%, #000 100%) top / calc(var(--measure-bite) * 3) var(--measure-bite) round no-repeat; }
  body.intake_front #storage .consent_text,
  body.intake_front #storage .consent_text span,
  body.intake_front #storage .consent_text a { background: var(--tone-plum) !important; }
}

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

/* The tag uses the foundation's tag_drop (three jumps, then dead still); rail numbers swap from site.js with no fade. */
.specimen_caption a, .strip_link, .entry_head a { transition: none; }
