/* ==========================================================================
   Brand shelf: "Every brand here earned its shelf."
   The roster section under the homepage hero. Self-contained: every class is
   prefixed bshelf- and the two fonts are registered under their own names, so
   nothing here changes the rest of the page. Script: brand-shelf.js.
   Without JavaScript the section is a plain list of brand links.
   ========================================================================== */

@font-face { font-family: 'Bshelf Archivo'; src: url('brand-shelf/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bshelf Newsreader'; src: url('brand-shelf/newsreader-italic.woff2') format('woff2'); font-weight: 300 600; font-style: italic; font-display: swap; }

.bshelf {
  --bs-bg: #12241F;
  --bs-fade: rgba(18, 36, 31, 0);
  --bs-text: #E9EEE8;
  --bs-text-2: rgba(233, 238, 232, 0.72);
  --bs-dim: rgba(233, 238, 232, 0.44);
  --bs-tan: #C8A96E;
  --bs-plate: #F2F4EF;
  --bs-ink: #12241F;
  --bs-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bs-pad: 32px;
  --bs-hdr: 60px;
  /* The two web fonts are switched on by brand-shelf.js once the hero has finished loading
     (class .bshelf-fonts), so they never compete with the hero video for bandwidth. */
  --bs-ff: 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --bs-voice: Georgia, 'Times New Roman', serif;

  position: relative;
  isolation: isolate;
  background: var(--bs-bg);
  color: var(--bs-text);
  padding: clamp(64px, 9vw, 130px) 0 clamp(70px, 9vw, 130px);
  font-family: var(--bs-ff);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
}
.bshelf.bshelf-fonts { --bs-ff: 'Bshelf Archivo', 'Helvetica Neue', Arial, sans-serif; --bs-voice: 'Bshelf Newsreader', Georgia, 'Times New Roman', serif; }
[data-theme="dark"] .bshelf { --bs-bg: #080F0D; --bs-fade: rgba(8, 15, 13, 0); --bs-plate: #E6EAE3; }
@media (max-width: 768px) { .bshelf { --bs-pad: 20px; } }
@media (max-width: 480px) { .bshelf { --bs-pad: 16px; } }

.bshelf *, .bshelf *::before, .bshelf *::after { box-sizing: border-box; }
.bshelf a:focus-visible { outline: 3px solid #E88A47; outline-offset: 3px; border-radius: 4px; }
.bshelf-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--bs-pad); }
.bshelf-contours { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; fill: none; stroke: rgba(233, 238, 232, 0.07); stroke-width: 1.1; }
.bshelf-contours .idx { stroke: rgba(200, 169, 110, 0.16); stroke-width: 1.6; }

.bshelf-head { display: grid; gap: 20px; max-width: 980px; margin: 0 0 clamp(32px, 5vw, 64px); }
.bshelf-title { margin: 0; font-family: var(--bs-ff); font-stretch: 66%; font-weight: 760; font-size: clamp(2.5rem, 6.4vw, 5.75rem); line-height: 0.92; letter-spacing: -0.012em; color: var(--bs-text); text-wrap: balance; text-transform: none; }
.bshelf-lede { margin: 0; max-width: 34em; font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.45; color: var(--bs-text-2); }

/* ---- plain list (no JavaScript) ---- */
.bshelf-stage { display: none; }
.bshelf-list { list-style: none; margin: 0; padding: 0; }
.bshelf-list li { margin: 0; padding: 0; }
.bshelf-brand { display: block; padding: 0.07em 0; text-decoration: none; color: var(--bs-text); -webkit-tap-highlight-color: transparent; }
.bshelf-name { display: inline-block; font-family: var(--bs-ff); font-stretch: 62%; font-weight: 780; font-size: clamp(2.9rem, 6.6vw, 6.6rem); line-height: 0.92; letter-spacing: -0.012em; transform-origin: left center; }
.bshelf-tagline { font-family: var(--bs-voice); font-style: italic; font-size: 1.1rem; color: var(--bs-text-2); }

/* ---- live roster (brand-shelf.js adds .is-live) ---- */
.bshelf.is-live .bshelf-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 100px); align-items: start; }
.bshelf.is-live .bshelf-stage { display: block; position: sticky; top: calc(var(--bs-hdr) + 3svh); height: calc(94svh - var(--bs-hdr)); min-height: 480px; }
.bshelf.is-live .bshelf-list { padding: 10svh 0 30svh; }
.bshelf.is-live .bshelf-tagline { display: none; }
.bshelf.is-live .bshelf-brand { color: var(--bs-dim); transition: color .22s ease; }
.bshelf.is-live .bshelf-brand:hover { color: rgba(233, 238, 232, 0.78); }
.bshelf.is-live .bshelf-brand.is-on { color: var(--bs-text); }
.bshelf.is-live .bshelf-brand.is-on:hover { color: var(--bs-tan); }

.bshelf-stage-inner { contain: layout style; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: clamp(16px, 3svh, 30px); }
.bshelf-shots { position: relative; flex: 0 1 56svh; min-height: 260px; }
.bshelf-set { position: absolute; inset: 0; pointer-events: none; }
.bshelf-set.is-on { pointer-events: auto; }
.bshelf-shot { position: absolute; display: block; background: var(--bs-plate); border-radius: 3px; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55); opacity: 0; transform: rotate(var(--bs-rot, 0deg)); transition: opacity .3s ease; backface-visibility: hidden; }
.bshelf-set.is-on .bshelf-shot { opacity: 1; }
.bshelf .bshelf-shot img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; mix-blend-mode: multiply; padding: 7%; }
.bshelf-shot:nth-child(1) { left: 0; top: 0; width: 58%; height: 86%; }
.bshelf-shot:nth-child(2) { right: 0; top: 9%; width: 37%; height: 50%; --bs-rot: 2.2deg; }
.bshelf-shot:nth-child(3) { right: 9%; bottom: 0; width: 33%; height: 36%; --bs-rot: -2.6deg; }
.bshelf-set[data-n="1"] .bshelf-shot:nth-child(1) { width: 72%; height: 100%; left: 14%; }
.bshelf-set[data-n="2"] .bshelf-shot:nth-child(2) { top: 26%; }
.bshelf-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; font-size: 0.8rem; line-height: 1.25; font-weight: 560; color: var(--bs-ink); background: linear-gradient(0deg, rgba(242, 244, 239, 0.96) 60%, rgba(242, 244, 239, 0)); display: flex; justify-content: space-between; gap: 10px; }
.bshelf-cap b { font-weight: 720; white-space: nowrap; }
.bshelf-cap span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.bshelf-shot:not(:first-child) .bshelf-cap { display: none; }
.bshelf-empty { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; border: 1px dashed rgba(233, 238, 232, 0.25); border-radius: 3px; color: var(--bs-text-2); font-family: var(--bs-voice); font-style: italic; font-size: 1.2rem; text-align: center; padding: 24px; }

.bshelf-text { display: grid; gap: 8px; justify-items: start; }
.bshelf-count { margin: 0; font-size: 0.86rem; font-weight: 560; color: var(--bs-tan); font-variant-numeric: tabular-nums; }
.bshelf-tag { margin: 0; height: 2.24em; overflow: hidden; display: flex; align-items: flex-end; font-family: var(--bs-voice); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 2.3vw, 2.15rem); line-height: 1.12; color: var(--bs-text); }
.bshelf-blurb { margin: 0; height: 4.35em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; max-width: 30em; font-size: 0.98rem; line-height: 1.45; color: var(--bs-text-2); }
.bshelf-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 10px; padding: 0 26px; border-radius: 4px; background: var(--bs-text); color: var(--bs-ink); font-family: var(--bs-ff); font-size: 1rem; font-weight: 640; font-stretch: 96%; line-height: 1; text-decoration: none; transition: background-color .25s; -webkit-tap-highlight-color: transparent; }
.bshelf-btn:hover { background: var(--bs-tan); color: var(--bs-ink); }

@media (max-width: 899px) {
  .bshelf.is-live .bshelf-body { display: block; }
  .bshelf.is-live .bshelf-stage { top: var(--bs-hdr); height: auto; min-height: 0; z-index: 2; margin: 0 calc(var(--bs-pad) * -1); padding: 12px var(--bs-pad) 26px; background: linear-gradient(180deg, var(--bs-bg) 0, var(--bs-bg) 84%, var(--bs-fade)); }
  .bshelf-stage-inner { gap: 12px; }
  .bshelf-shots { flex: none; height: 31vw; max-height: 190px; min-height: 0; }
  .bshelf-shot, .bshelf-shot:nth-child(n) { top: 0; bottom: auto; height: 100%; width: calc((100% - 16px) / 3); --bs-rot: 0deg; box-shadow: none; }
  /* phones: no rotate transform or 3D hint on the pictures, a plain slow cross-fade */
  .bshelf-shot { transform: none; backface-visibility: visible; transition: opacity .45s ease; }
  .bshelf-shot:nth-child(1) { left: 0; }
  .bshelf-shot:nth-child(2) { left: calc((100% + 8px) / 3); right: auto; }
  .bshelf-shot:nth-child(3) { left: calc((100% + 8px) / 3 * 2); right: auto; }
  .bshelf-set[data-n="1"] .bshelf-shot:nth-child(1) { left: 0; width: calc((100% - 16px) / 3); height: 100%; }
  .bshelf-cap { display: none; }
  .bshelf .bshelf-shot img { padding: 5%; }
  .bshelf-text { grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
  .bshelf-count { grid-column: 1; }
  .bshelf-tag { grid-column: 1; font-size: 1.22rem; align-items: flex-start; height: 2.3em; }
  .bshelf-blurb { display: none; }
  .bshelf-btn { grid-column: 2; grid-row: 1 / span 2; display: block; margin: 0; min-height: 46px; line-height: 46px; padding: 0 12px; font-size: 0.94rem; width: 44vw; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
  .bshelf.is-live .bshelf-list { padding: 4svh 0 6svh; }
  .bshelf-name { font-size: clamp(2.7rem, 13.4vw, 4.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  .bshelf *, .bshelf *::before, .bshelf *::after { transition-duration: 0.01ms !important; }
}

/* Nov 25 2026: the stage now has one permanent set of frames whose photos switch instantly
   (brand-shelf.js), so nothing fades or overlaps while the list scrolls. */
.bshelf-set .bshelf-shot { opacity: 1; transition: none; }
.bshelf-shot img { transition: none !important; }
/* Phones: pinned by brand-shelf.js with position:fixed (class bs-pinjs) instead of position:sticky,
   which shakes under a finger in iOS Safari. The body keeps the stage's height free at its top. */
@media (max-width: 899px) {
  .bshelf.is-live.bs-pinjs .bshelf-body { position: relative; padding-top: var(--bs-stage-h, 240px); }
  .bshelf.is-live.bs-pinjs .bshelf-stage { position: absolute; top: 0; bottom: auto; left: calc(var(--bs-pad) * -1); right: calc(var(--bs-pad) * -1); margin: 0; }
  .bshelf.is-live.bs-pinjs.is-pinned .bshelf-stage { position: fixed; top: var(--bs-hdr); left: 0; right: 0; }
  .bshelf.is-live.bs-pinjs.is-past .bshelf-stage { top: auto; bottom: 0; }
}
