/* ==========================================================================
   BanSek Trade v2 — homepage
   ========================================================================== */

/* --------------------------------------------------------------------------
   §3.1 Hero
   -------------------------------------------------------------------------- */
.hero {
  --hero-inset: var(--inset);
  padding: var(--hero-inset) var(--hero-inset) 0;
}
.hero__frame {
  position: relative;
  height: min(88svh, 900px);
  min-height: 520px;
  border-radius: var(--r-hero);
  overflow: hidden;
  background: var(--paper-2);
  isolation: isolate;
  outline: none;
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--dur-xslow) var(--ease-soft);
  /* Where the subject sits in the frame; shared by photograph and cut-out. */
  --pos: 50% 50%;
  /* The wordmark's baseline, as a fraction of the frame height. */
  --word-base: 46%;
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
/* Per slide and per frame shape. Wide frames show the whole photograph and
   the figures stand in front of the letters; on tall phone frames the crop
   narrows, so the fleet slide pans to the nearest driver and the team
   slide's word moves up into the sky, where it stays legible. */
.hero__slide[data-slide="1"] { --word-base: 29%; }
.hero__slide[data-slide="2"] { --word-base: 35%; --pos: 80% 50%; }
.hero__slide[data-slide="3"] { --word-base: 58%; --pos: 72% 50%; }
@media (min-width: 768px) {
  .hero__slide[data-slide="1"] { --word-base: 40%; }
  .hero__slide[data-slide="2"] { --word-base: 39%; --pos: 70% 50%; }
}
@media (min-width: 1200px) and (min-aspect-ratio: 4/3) {
  .hero__slide[data-slide="1"] { --word-base: 46%; }
  .hero__slide[data-slide="2"] { --word-base: 41%; --pos: 50% 50%; }
  .hero__slide[data-slide="3"] { --word-base: 62%; --pos: 50% 50%; }
}

.hero__bg, .hero__cut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos);
}
.hero__bg { z-index: 0; }
.hero__cut { z-index: 2; pointer-events: none; }

.hero__word {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: calc(100% - var(--word-base));
  margin: 0;
  /* The brief's clamp, capped so the six letters always fit the frame. */
  font-size: min(var(--fs-word), calc((100vw - 2 * var(--hero-inset)) * var(--word-fit, .27)));
  font-family: var(--font-serif);
  font-weight: 420;
  font-optical-sizing: auto;
  letter-spacing: -0.04em;
  line-height: .74;
  text-align: center;
  white-space: nowrap;
  color: var(--ink);
  user-select: none;
}
/* Slide 3: no cut-out — the wordmark lies over the bearing (brief §3.1). */
.hero__slide--over .hero__word {
  z-index: 2;
  opacity: .7;
  mix-blend-mode: multiply;
}

/* A soft paper scrim under the navbar, so the menu reads over any slide. */
.hero__frame::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  height: 140px;
  background: linear-gradient(to bottom, rgb(243 240 234 / .72), rgb(243 240 234 / 0));
  pointer-events: none;
}

/* Controls */
.hero__ui {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 32px);
  color: var(--ink);
}
.hero__start { display: grid; gap: 16px; justify-items: start; }
.hero__controls { display: flex; gap: 8px; }
.hero__pause { border-color: currentColor; background: rgb(243 240 234 / .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero__pause[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hero__rule { width: 48px; height: 1px; background: currentColor; opacity: .55; }
.hero__next { border-color: currentColor; background: rgb(243 240 234 / .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero__end {
  display: grid;
  gap: 8px;
  justify-items: end;
  padding: 12px 14px 6px 18px;
  border-radius: var(--r-tile);
  background: rgb(243 240 234 / .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-align: right;
}
.hero__caption, .hero__count { color: var(--ink); }
.hero__count { letter-spacing: .2em; }
.hero__dots { display: flex; gap: 6px; }
.hero__dot { display: grid; place-items: center; width: 36px; height: 24px; }
.hero__dot span { display: block; width: 100%; height: 1px; background: currentColor; opacity: .35; transition: opacity var(--dur-mid) var(--ease-soft); }
.hero__dot[aria-current="true"] span { opacity: 1; height: 1.5px; }
.hero__dot:hover span { opacity: .8; }

/* Without JS only slide 1 exists on screen, and nothing to control. */
html:not(.js) .hero__next, html:not(.js) .hero__pause, html:not(.js) .hero__dots, html:not(.js) .hero__count { display: none; }

/* --------------------------------------------------------------------------
   §3.2a The parts search on a night band (direction correction A3.2): the
   v1 three-tab search, restyled on night — paper text, lime submit, lime
   tab pill.
   -------------------------------------------------------------------------- */
.sband { margin-top: var(--space-m); padding-block: clamp(40px, 6vw, 88px); }
.sband__grid { display: grid; gap: 40px; }
.sband__main { min-width: 0; }
.sband__eyebrow { margin-bottom: 14px; }
.sband__title { margin-bottom: 28px; max-width: 16ch; }

.sband .psearch__tabs { box-shadow: inset 0 0 0 1px var(--night-line); }
.sband.night .psearch__pill { background: var(--lime); }
.sband .psearch__tab { color: rgb(243 240 234 / .78); }
.sband .psearch__tab[aria-selected="true"] { color: var(--night); }
.sband.night .psearch__tabs:not(.has-pill) .psearch__tab[aria-selected="true"] { background: var(--lime); }
.sband .psearch__field { border-bottom-color: rgb(243 240 234 / .5); color: rgb(243 240 234 / .6); }
.sband.night .psearch__panel.is-focused .psearch__field { border-bottom-color: var(--lime); }
.sband .psearch__input { color: var(--paper); }
.sband .psearch__input::placeholder { color: rgb(243 240 234 / .5); }
.sband .psearch__clear { color: var(--paper); }
.sband .psearch__select select { border-color: var(--night-line); background: var(--night-2); color: var(--paper); }
.sband .psearch__select select:disabled { color: rgb(243 240 234 / .45); }
.sband .psearch__chip { box-shadow: inset 0 0 0 1px var(--night-line); color: rgb(243 240 234 / .82); }
.sband .psearch__chip:hover { box-shadow: inset 0 0 0 1px var(--paper); color: var(--paper); }
.sband .psearch__result { background: var(--night-2); color: rgb(243 240 234 / .82); }
.sband.night .psearch__result-icon { color: var(--lime); }
.sband .psearch__result-title { color: var(--paper); }
.sband .psearch__result-body a { color: var(--paper); }
.sband .search__help { color: rgb(243 240 234 / .82); }
.sband .search__list li { border-bottom-color: var(--night-line); color: rgb(243 240 234 / .82); }
.sband__aside { display: grid; gap: 12px; align-content: start; }
@media (min-width: 1024px) {
  .sband__grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 80px; }
  .sband__aside { padding-left: 40px; border-left: 1px solid var(--night-line); }
}

/* The stats band follows the first feature closely. */
.stats { margin-bottom: var(--space-s); }
