/* ELO Labs home hero: the animated pixel-art town (elo-town.js) replaces the video field.
   The town dissolves itself to transparent at the bottom, so none of the old dark backing,
   scanline, vignette or gradients are needed. Finding cards are pinned to townsfolk by
   labs-hero-cards.js; the town draws the leader lines. */
.hero-right.hero-town { opacity: 1; background: none !important; }
.hero-right.hero-town::before { display: none; }
.hero-town .town { position: absolute; inset: 0; }

/* No side fade: the hero text sits on a small frosted box instead (.hero-box, set up below) */
.hero-right.hero-town::after { display: none; }
@media (min-width: 769px) {
  .hero-box {
    --bp: min(1.75rem, var(--fw-gut));
    box-sizing: border-box; width: fit-content; max-width: 100%;
    padding: 1.75rem 1.75rem 1.75rem var(--bp); margin-left: calc(-1 * var(--bp));
    background: rgba(245, 246, 242, .66);
    -webkit-backdrop-filter: blur(14px) saturate(1.05); backdrop-filter: blur(14px) saturate(1.05);
    border: 1px solid var(--hl);
  }
}

/* Phones: the text runs full width, so the town gets its own band above it and needs no side fade */
@media (max-width: 768px) {
  .hero-right.hero-town { bottom: auto; height: 52vh; }
  .hero-right.hero-town::after { display: none; }
  .hero-left { padding-top: calc(48vh + 1rem); }
}

/* ---- The same town in the site's greys: home figures and page heroes (elo-town.js, data-tone="mono") */
.town-fig { position: relative; display: block; width: 100%; overflow: hidden; }
.labs-inputs article { transition: box-shadow .2s ease; }
.labs-inputs article.is-layer { box-shadow: inset 3px 0 0 var(--accent); }
.labs-inputs article.is-layer h3 { color: var(--accent); }

/* Page heroes: the town takes the place of the old banner canvas, fading in from the text side */
.townBanner {
  position: absolute; top: 0; right: 0; bottom: 0; width: 62%; height: 100%; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 100%);
}
@media (max-width: 900px) {
  .townBanner { position: relative; width: 100%; height: 34vh; min-height: 200px; -webkit-mask-image: none; mask-image: none; }
  .labs-product-hero .townBanner { position: absolute; top: auto; right: 0; bottom: 0; left: 0; height: 36%; }
}
/* "How Labs fits into ELO" figure, redrawn as pixel art (labs-scrolly.js) */
.labs-scrolly__px { display: block; image-rendering: pixelated; }

/* ---- Photo breaks as annotated observations (labs-breaks.js adds .pb-live once the scene is drawn) */
section.photo-break.pb-live { background: #2a2a2e !important; align-items: flex-start; }
section.photo-break.pb-live::before { display: none; }
/* Pixel transition between the light page and the full-width scene: a randomised dissolve of page-coloured 8px blocks, dense at the edge with a sparse tail
   (px-fade-top.svg / px-fade-bottom.svg) sits over the top and bottom edges of the art, under the quote card */
section.photo-break.pb-live::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; display: block; image-rendering: pixelated;
  background:
    url(/px-fade-top.svg) top left / 2048px 64px repeat-x,
    url(/px-fade-bottom.svg) bottom left / 2048px 64px repeat-x;
}
@media (max-width: 699px) {
  /* band layout: only the top edge of the scene meets the page; the bottom meets the dark quote strip */
  section.photo-break.pb-live.pb-band::after { bottom: auto; height: 64px; background: url(/px-fade-top.svg) top left / 2048px 64px repeat-x; }
}
.pb-live .pb-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; image-rendering: pixelated; }
.pb-live .pb-in { position: relative; z-index: 1; padding-top: clamp(1.6rem, 4vw, 3rem); }
.pb-live blockquote {
  display: flex; flex-direction: column; gap: .7rem; max-width: 17ch; padding: 1.1rem 1.3rem 1.25rem;
  font-size: clamp(1.4rem, 2.5vw, 2.3rem) !important; line-height: 1.02;
  background: rgba(27,27,27,.92); border: 1px solid rgba(245,246,242,.16); border-radius: var(--radius-soft, 6px);
  box-shadow: 0 8px 24px -10px rgba(27,27,27,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pb-live blockquote .pb-tag { font: 600 10.5px/1 var(--disp, "Barlow Condensed", sans-serif); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #b9bab2; }
@media (max-width: 700px) { .pb-live blockquote { max-width: none; } }
/* Phones: the scene is a band on top, the quote sits below it */
@media (max-width: 699px) {
  section.photo-break.pb-live.pb-band { display: block; min-height: 0; background: #1b1b1b !important; }
  .pb-band .pb-cv { position: relative; inset: auto; height: auto; }
  .pb-band .pb-in { padding: 1.3rem clamp(1.2rem, 5vw, 1.6rem) 1.6rem; }
  .pb-band blockquote { background: none; border: 0; box-shadow: none; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Page heroes (research, about, method, mission, trust): the town runs full width and the text sits on a small frosted box, instead of the left-edge fade */
@media (min-width: 901px) {
  .hasBanner.top .townBanner { width: 100%; -webkit-mask-image: none; mask-image: none; }
  .hasBanner.top .banner--hero .bannerTxt {
    align-self: center; box-sizing: border-box; width: min(38%, 34rem); height: auto; padding: 1.75rem;
    margin-left: calc(var(--fw-bx) - 1.75rem);
    background: rgba(245, 246, 242, .66);
    -webkit-backdrop-filter: blur(14px) saturate(1.05); backdrop-filter: blur(14px) saturate(1.05);
    border: 1px solid var(--hl);
  }
}

/* finding-card vignettes */
.fv { position: relative; width: 100%; flex: none; aspect-ratio: 3 / 2; margin: 0 0 1.1rem; overflow: hidden; background: #eceee9; }
.fv canvas { display: block; width: 100%; height: 100%; }

/* where else it might hold: the town's edge */
.world-fig { width: 100%; margin: 0 0 1.6rem; }
.world-fig canvas { display: block; width: 100%; }

/* long figures stay on one line and shrink with the card */
.labs-topfind .labs-finding__fig.fig-1line { white-space: nowrap; font-size: clamp(2.4rem, calc(7vw - 10px), 6.2rem) !important; }
