/* Industries. Loaded after site.css and page.css.
   One yellow strap stays where it is. The loads under it are whole screens, one on top of the other (js/industries.js). */

.haul { --strap: max(33svh, 14.2rem); --foot: 6svh; background: #16181c; }
.load { position: relative; height: 100svh; min-height: 34rem; overflow: clip; background: #16181c; }
.load__in { position: absolute; inset: 0; }
.load__pic { position: absolute; left: 0; top: -5%; width: 100%; height: 110%; }
.load__pic > * { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--x, 50%) var(--y, 30%); }
.load__pic video { opacity: 0; transition: opacity .5s; }
.load__pic video.is-on { opacity: 1; }
.strips { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; background: var(--yellow); }
.strips img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: var(--x) 50%; }
.haul__pause { position: absolute; z-index: 5; right: calc(var(--gut) - .7rem); bottom: calc(var(--strap) + var(--foot) + .7rem); width: 2.75rem; height: 2.75rem; display: grid; place-items: center; transition: opacity .3s; filter: drop-shadow(0 0 6px rgb(0 0 0 / .6)); }
.haul__pause[hidden] { display: none; }
.load__in::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto; height: 8.5rem; background: linear-gradient(180deg, rgb(8 12 20 / .72), rgb(8 12 20 / 0)); pointer-events: none; }     /* for the menu */

/* the strap: woven, pulled tight over the load */
.strap { position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--foot); height: var(--strap); display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto auto; gap: 0 3.4vw; align-items: end; padding: .7rem var(--gut) 1.5rem; color: var(--ink); background: repeating-linear-gradient(90deg, rgb(0 0 0 / 0) 0 3px, rgb(120 80 0 / .05) 3px 4px), linear-gradient(180deg, #fdd630, var(--yellow) 9% 90%, #e6b800); box-shadow: 0 1.5rem 2.2rem rgb(4 7 14 / .5), 0 .25rem .5rem rgb(4 7 14 / .45), 0 -.3rem 1rem rgb(4 7 14 / .4); }
.strap h2 { grid-column: 1 / -1; align-self: center; font-size: min(8.4vw, 16svh); font-weight: 650; line-height: .9; letter-spacing: -.055em; white-space: nowrap; margin-left: -.05em; }
.strap p:not(.page-lead) { font-size: clamp(1.0625rem, 1.42vw, 1.75rem); font-weight: 500; line-height: 1.28; letter-spacing: -.014em; text-wrap: balance; }
.strap b { font-weight: 700; }
.strap h2 ~ p { grid-column: 1; }      /* the need, and straight under it what we do about it */
.strap h2 ~ .link { grid-column: 2; grid-row: 2 / 4; }
.strap p span { white-space: nowrap; }
.strap .link { margin-bottom: .1em; font-size: clamp(1.0625rem, 1.42vw, 1.75rem); letter-spacing: -.014em; white-space: nowrap; }
.strap :focus-visible { outline-color: var(--blue); }

.strap__h { grid-column: 1 / -1; align-self: center; font-size: min(5.5vw, 11.2svh); }
.strap__all { grid-column: 1 / -1; }
.strap__all a { background: linear-gradient(currentColor, currentColor) 0 98% / 100% 1px no-repeat; transition: background-size .45s var(--out); }
.strap__all a:hover { background-size: 0 1px; background-position: 100% 98%; }

.load--all .strap { bottom: calc(50% - var(--strap) / 2); }
.load--all, .load--all .strap { background-color: var(--yellow); }
.load--all .strap { box-shadow: none; background-image: none; }
.load--all .load__in::before { content: none; }

main > .go { padding-top: clamp(1.5rem, 3vw, 3rem); }       /* it goes on from the yellow above it */
@media (max-width: 900px), (max-aspect-ratio: 1/1) { .live main > .go { margin-top: -18vh; } }

/* standing still, each is a little shorter */
html:not(.live) .load:not(.load--open) { height: 86svh; }
html:not(.live) .load--all { height: 62svh; min-height: 0; }

/* live: the loads are stacked, and each is drawn up over the last */
.live .haul { height: 588vh; }
.live .haul__pin { position: sticky; top: 0; height: 100vh; min-height: 34rem; overflow: clip; }
.live .load { position: absolute; inset: 0; height: auto; min-height: 0; will-change: transform; }
.live .load__in { will-change: transform; }
.live .load + .load { transform: translateY(100%); }
.live .load--open .strap { animation: pull 1s .1s cubic-bezier(.2, .9, .25, 1) backwards; transform-origin: 0 50%; }
.live .load--open :is(.strap__h, .strap__all) { animation: ind-in .8s .75s backwards; }
.live .load--open .strap__all { animation-delay: .95s; }
@keyframes pull { from { transform: translateX(-101%); } }
@keyframes ind-in { from { opacity: 0; } }

@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .haul { --strap: clamp(19.5rem, 47svh, 27rem); --foot: calc(2.5svh + var(--bar)); }
  .strips { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, calc((100vh - var(--strap) - var(--foot)) / 2)) 1fr; }
  .strips img:last-child { grid-column: 1 / -1; }
  .strap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; align-content: center; gap: .75rem; padding: 1.1rem var(--gut) 1.3rem; }
  .strap h2 { font-size: min(13.2vw, 9.4svh); letter-spacing: -.05em; margin-bottom: .1em; white-space: normal; }
  .strap p:not(.page-lead), .strap .link { font-size: clamp(1.0625rem, 2.7vw, 1.75rem); justify-self: start; }
  .strap p + p { margin-top: -.45rem; }
  .strap h2 ~ .link { grid-column: 1; grid-row: auto; }
  .strap .link { white-space: normal; margin-top: .2rem; }
  .strap__h { font-size: min(9vw, 8svh); }
  .strap__all { font-size: clamp(1.0625rem, 2.7vw, 1.75rem); text-wrap: pretty; }
}

/* ---------- a phone held sideways ---------- */
@media (max-height: 480px) and (min-aspect-ratio: 5/4) {
  .haul { --strap: 66svh; --foot: var(--bar); }
  .load, .live .haul__pin { min-height: 0; }
  .strips { grid-template-columns: repeat(7, 1fr); grid-template-rows: 1fr; }
  .strips img:last-child { grid-column: auto; }
  .strap { grid-template-columns: 1fr auto; align-content: center; gap: .5rem 2rem; padding-block: .6rem; }
  .strap h2, .strap__h { margin: 0; font-size: 10svh; }
  .strap p:not(.page-lead), .strap .link, .strap__all { font-size: 1rem; }
}
