/* =========================================================
   Homepage hero slider
   Slide 1 = the original light hero (photo + copy).
   Slides 2–3 = supplied product creatives (text is baked in),
   so the slide adds only a CTA chip.
   Behaviour: autoplay, no dots / no arrows; the whole band can be
   dragged left or right to change slide. Extends design.css;
   index.html adds .hero--slider.
   ========================================================= */

.hero--slider {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #0B1220;          /* shows for a frame before the art paints */
}

/* ---- viewport: clips the horizontal track, owns the drag gesture ---- */
.hero--slider .hero-viewport {
  position: relative;
  height: clamp(520px, 42vw, 640px);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;          /* page still scrolls vertically on touch */
  -webkit-user-select: none;
  user-select: none;
}
.hero--slider .hero-viewport.is-dragging { cursor: grabbing; }

.hero--slider .hero-track {
  display: flex;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform .68s var(--ease);
  will-change: transform;
}
.hero--slider .hero-track.is-dragging { transition: none; }

.hero--slider .hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  -webkit-user-drag: none;      /* the art slides are links: keep the gesture on the track */
}
.hero--slider .hero-slide img {
  -webkit-user-drag: none;      /* keep the native image drag from stealing the gesture */
  user-select: none;
}

/* ---- slide 1: the original hero composition ---- */
.hero-slide--intro {
  display: flex;
  align-items: center;
  padding: 116px var(--pad) 44px;
  background: linear-gradient(180deg, #F8F9FB 0%, #FFFFFF 62%);
}
.hero-slide--intro .hero-spec { margin-top: 40px; }

/* ---- art slides ----
   2026-11-27: the creatives are 1920×640 (3:1) but the band is 2.4–3:1
   depending on the viewport. `cover` cut the left edge of the headline at
   1440 / 1707 ("W FLASHIP…"), so the art is contained instead: nothing is
   cropped and it lands pixel-perfect 1:1 at ≥1920. The strip left above and
   below is filled with a blurred, scaled copy of the same image (via the
   --art-bg custom property set on the slide), so it reads as one piece
   instead of a flat band. */
.hero-slide--art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0B1220;
}
.hero-slide--art::before {
  content: "";
  position: absolute;
  inset: -4%;
  background: var(--art-bg, none) center / cover no-repeat;
  filter: blur(28px) saturate(115%) brightness(.9);
  z-index: 0;
}
.hero-slide--art img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.hero-slide--art.is-light { background: #E8F0F9; }
.hero-slide--art.is-light::before { filter: blur(28px) saturate(105%) brightness(1.02); }

.hero-art-cta {
  position: absolute;
  left: var(--pad);
  bottom: clamp(28px, 4vw, 48px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 560;
  letter-spacing: .002em;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(13, 17, 23, .28);
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.hero-slide--art:hover .hero-art-cta,
.hero-slide--art:focus-visible .hero-art-cta {
  background: var(--accent-ink);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(13, 17, 23, .34);
}
.hero-art-cta span[aria-hidden] { font-size: 15px; transition: transform .2s var(--ease); }
.hero-slide--art:hover .hero-art-cta span[aria-hidden] { transform: translateX(3px); }

/* ---- narrower desktops: keep the whole creative visible ---- */
@media (max-width: 1280px) {
  /* the copy block + spec row no longer fit the band: drop the spec strip */
  .hero-slide--intro .hero-spec { display: none; }
}
@media (max-width: 1080px) {
  .hero--slider .hero-viewport { height: clamp(420px, 56vw, 560px); }
  /* the art already uses contain + its own edge gradient now: no overrides */
}

/* ---- phones: one slide at a time, natural heights, no track ---- */
@media (max-width: 860px) {
  .hero--slider { background: #fff; }
  .hero--slider .hero-viewport { height: auto; cursor: default; touch-action: auto; }
  .hero--slider .hero-track {
    display: block;
    height: auto;
    transform: none !important;  /* beats the inline transform set by banner.js */
    transition: none;
  }
  .hero--slider .hero-slide {
    display: none;
    height: auto;
  }
  .hero--slider .hero-slide.is-active { display: block; }

  .hero-slide--intro { padding: 0 0 34px; }
  .hero-slide--intro .hero-media { position: relative; inset: auto; height: 44dvh; margin-bottom: 26px; }
  .hero-slide--intro .hero-copy { padding: 0 var(--pad); }
  .hero-slide--intro .hero-spec { display: none; }

  /* the creatives carry their own headline at the top: clear the fixed nav,
     drop the tinted bed and let the artwork sit at its natural ratio */
  .hero-slide--art,
  .hero-slide--art.is-light {
    padding: 76px 0 0;
    background: #fff;
  }
  .hero-slide--art::before { display: none; }   /* no blurred bed on phones */
  .hero-slide--art img { width: 100%; height: auto; object-fit: contain; }

  .hero-art-cta {
    position: static;
    margin: 16px var(--pad) 22px;
    height: 44px;
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero--slider .hero-track { transition: none; }
  .hero-slide--art:hover .hero-art-cta { transform: none; }
}

@media (max-width: 520px) {
  /* stack the two hero CTAs and centre the quiet one instead of leaving
     a full-width transparent button behind the primary */
  .hero-slide--intro .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-slide--intro .hero-cta .btn-quiet {
    width: auto !important;
    justify-content: center;
    padding: 0;
    height: 40px;
  }
}
