/* Supplies: the looking glass. One photograph, four views, one caption at a time. */

/* Headline set across three columns of the twelve */
.sup-head {
  display: grid; grid-template-columns: minmax(0, 1fr); row-gap: .05em;
  font-size: clamp(2.25rem, .75rem + 3.4vw, 4.75rem); line-height: .96; letter-spacing: -.025em;
}
.sup-head span { display: block; min-width: 0; }
@media (min-width: 56rem) {
  .sup-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  .sup-head span:nth-child(1) { grid-column: 1 / span 4; }
  .sup-head span:nth-child(2) { grid-column: 5 / span 4; padding-top: .45em; }
  .sup-head span:nth-child(3) { grid-column: 9 / span 4; padding-top: .9em; }
}

/* The glass: photograph runs the full width of the screen */
.glass {
  --ox: 18%; --oy: 58%; --z: 1.5;
  grid-column: 1 / -1;
  margin-inline: calc(var(--gut) * -1);
}
.glass[data-view="feed"]    { --ox: 18%; --oy: 58%; --z: 1.5; }
.glass[data-view="tanks"]   { --ox: 50%; --oy: 50%; --z: 1; }
.glass[data-view="water"]   { --ox: 52%; --oy: 62%; --z: 1.5; }
.glass[data-view="habitat"] { --ox: 84%; --oy: 48%; --z: 1.5; }

.glass-frame { height: clamp(17rem, 46vh, 32rem); }
.glass-frame img {
  object-position: var(--ox) var(--oy);
  transform: scale(var(--z)); transform-origin: var(--ox) var(--oy);
  transition: object-position 1.2s var(--ease), transform 1.2s var(--ease);
}

/* Fixed caption slot: all four stacked in one cell, three always visibility:hidden */
.glass-cap { display: grid; margin-top: .9rem; padding-inline: var(--gut); }
.glass-cap .cap { grid-area: 1 / 1; margin: 0; max-width: 26rem; visibility: hidden; }
.glass[data-view="feed"] .cap[data-for="feed"],
.glass[data-view="tanks"] .cap[data-for="tanks"],
.glass[data-view="water"] .cap[data-for="water"],
.glass[data-view="habitat"] .cap[data-for="habitat"] { visibility: visible; }

/* The four rows: names only, a hairline between */
.shelf {
  list-style: none; padding: 0; margin: clamp(1.5rem, 4vh, 2.5rem) var(--gut) 0;
  border-bottom: var(--hair) solid var(--line);
}
.shelf li { border-top: var(--hair) solid var(--line); }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem 1rem; align-items: center;
  width: 100%; min-height: 2.75rem; padding: clamp(.8rem, 2vh, 1.25rem) 0;
  background: none; border: 0; text-align: left; cursor: pointer;
  color: var(--ink-dim); transition: color .4s var(--ease);
}
.row:hover, .row:focus-visible, .row[aria-pressed="true"] { color: var(--ink); }
.row:focus-visible { outline-offset: -.125rem; }
.row-name {
  font-family: var(--serif); font-size: clamp(1.75rem, 1rem + 2.2vw, 3rem); line-height: 1.05;
  letter-spacing: -.02em; font-variation-settings: "SOFT" 100, "WONK" 1;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: var(--hair);
  text-underline-offset: .18em; transition: text-decoration-color .4s var(--ease);
}
.row[aria-pressed="true"] .row-name { text-decoration-color: var(--teal-lit); }
.row-note { font-size: var(--t-note); line-height: 1.5; max-width: 26rem; color: var(--ink-dim); }
@media (min-width: 56rem) {
  .row { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  .row-name { grid-column: 1 / span 5; }
  .row-note { grid-column: 8 / span 4; }
}

/* The empty tank and the address screen */
.sup-setup .lede { max-width: 30rem; }
.sup-setup .note { max-width: 28rem; }
.sup-setup .action { margin-top: clamp(1.25rem, 3vh, 2rem); }
.sup-find { padding-top: clamp(1.25rem, 3vh, 2rem); }
.sup-addr { font-family: var(--serif); font-size: var(--t-sub); line-height: 1.12; letter-spacing: -.01em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.sup-addr span { display: block; }
.sup-find .action { margin-top: clamp(1rem, 3vh, 1.75rem); }
