/* ============================================================
   ROLLEX — HERO SLIDER  (rx-hero)  v2
   Full-screen (100vh) premium industrial hero slider.
   Bright palette — matches the rest of the site's design system
   (white / light-gray, charcoal text, Rollex red accent). A dark
   backdrop was tried and rejected: white-studio product photos
   read as an artificial "cutout" against black, whereas a light,
   neutral backdrop close to the photo's own studio tone lets the
   machine sit naturally in the scene.
   Namespaced under .rx- to avoid collisions with the rest of the
   site's CSS. Self-contained: safe to lift into another project.
   ============================================================ */

.rx-hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  max-height: 1100px;
  overflow: hidden;
  background: var(--wash, #FAFAFA);
  color: var(--ink, #1A1A1A);
  outline: none;
}
.rx-hero:focus-visible { box-shadow: inset 0 0 0 3px rgba(227,30,36,.5); }

/* ---------- Background: bright, light-gray, subtle warmth ---------- */
.rx-hero__bg { position: absolute; inset: 0; z-index: 0; }
.rx-hero__bg::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 800px at 85% 10%, rgba(227,30,36,.05) 0%, transparent 55%),
    radial-gradient(900px 700px at 8% 95%, rgba(227,30,36,.03) 0%, transparent 60%),
    linear-gradient(160deg, #FFFFFF 0%, #F3F4F6 55%, #EDEEF1 100%);
}
.rx-hero__grid {
  position: absolute; inset: 0; opacity: .6;
  background-image: radial-gradient(rgba(26,26,26,.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(75% 75% at 75% 30%, #000 35%, transparent 82%);
}
.rx-hero__glow {
  position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none;
  transition: transform .4s ease-out;
}
.rx-hero__glow--a { width: 560px; height: 560px; right: -100px; top: -140px; background: rgba(227,30,36,.08); }
.rx-hero__glow--b { width: 480px; height: 480px; left: -100px; bottom: -120px; background: rgba(227,30,36,.05); }

/* faint industrial blueprint sketch lines — very subtle, charcoal on light */
.rx-hero__blueprint { position: absolute; right: 0; top: 0; width: 55%; height: 100%; opacity: .5; transition: transform .4s ease-out; }
.rx-hero__blueprint g { stroke: rgba(26,26,26,.06); }

/* floating dust motes — tiny, slow, barely-there */
.rx-dust { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.rx-dust__mote {
  position: absolute; bottom: -4%; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(227,30,36,.22);
  animation: rxDust linear infinite;
}
.rx-dust__mote:nth-child(3n) { background: rgba(26,26,26,.12); width: 3px; height: 3px; }
@keyframes rxDust {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: .4; }
  100% { transform: translateY(-108vh) translateX(24px); opacity: 0; }
}

/* ---------- Slide track ---------- */
.rx-hero__track { position: relative; z-index: 2; height: 100%; }
.rx-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
}
.rx-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }

/* ---------- Layered transition: zoom + directional slide ----------
   Forward (next): incoming slide drifts in from the right with a
   gentle scale-down-to-rest; outgoing drifts left and fades.
   Backward (prev): mirrored. This reads as a "camera move" rather
   than a flat cross-fade, using only opacity/transform (GPU-cheap). */
.rx-slide.is-entering-fwd  { animation: rxEnterFwd  1s cubic-bezier(.22,1,.36,1) both; }
.rx-slide.is-entering-back { animation: rxEnterBack 1s cubic-bezier(.22,1,.36,1) both; }
.rx-slide.is-leaving-fwd   { animation: rxLeaveFwd   .7s cubic-bezier(.55,0,1,.45) both; }
.rx-slide.is-leaving-back  { animation: rxLeaveBack  .7s cubic-bezier(.55,0,1,.45) both; }
@keyframes rxEnterFwd  { from { opacity:0; transform: translateX(4%) scale(1.03); } to { opacity:1; transform:none; } }
@keyframes rxEnterBack { from { opacity:0; transform: translateX(-4%) scale(1.03); } to { opacity:1; transform:none; } }
@keyframes rxLeaveFwd  { from { opacity:1; transform:none; } to { opacity:0; transform: translateX(-3%) scale(.98); } }
@keyframes rxLeaveBack { from { opacity:1; transform:none; } to { opacity:0; transform: translateX(3%) scale(.98); } }

/* ---------- Text content — overlays bottom-left of the full image,
   Pelican-style, instead of sitting in its own side column ---------- */
.rx-slide__content {
  position: absolute; left: 0; bottom: 0; top: 10%; z-index: 5; 
  padding: 2.5rem clamp(1.5rem, 5vw, 6rem) 7.5rem;
  max-width: 430px;
}
.rx-slide__content::before {
  content: ""; position: absolute; z-index: -1;
  left: -3rem; right: -3rem; top: -2rem; bottom: -3rem;
  background: radial-gradient(75% 100% at 5% 100%, rgba(250,250,250,.98) 0%, rgba(250,250,250,.94) 40%, rgba(250,250,250,.6) 65%, transparent 90%);
}
.rx-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .54rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent, #E31E24); background: var(--accent-soft, #FFF5F5); border: 1px solid rgba(227,30,36,.16);
  padding: .55rem 1.1rem; border-radius: 999px;
  margin-bottom: 1.6rem; max-width: 100%;
  opacity: 0; transform: translateY(14px);
}
.rx-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #E31E24; flex: none; }

.rx-headline {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  font-size: clamp(1.1rem, 3vw, 3.4rem);
  margin: 0 0 1.3rem; color: var(--ink, #1A1A1A);
}
.rx-headline .line { display: block; opacity: 0; transform: translateY(28px); }
.rx-headline .line.accent { color: var(--accent, #E31E24); }

.rx-desc {
  font-size: clamp(0.8rem, 0.8vw, 1.12rem); line-height: 1.65; color: var(--slate, #5F6368);
  max-width: 46ch; margin: 0 0 2.2rem;
  opacity: 0; transform: translateY(20px);
}

.rx-cta { display: flex; gap: 1rem; flex-wrap: wrap; opacity: 0; transform: translateY(20px); }
.rx-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 0.5rem 0.5rem; border-radius: 999px; font-weight: 600; font-size: 0.56rem;
  transition: box-shadow .3s, background .25s, border-color .25s, color .25s;
  white-space: nowrap; border: 1px solid transparent;
  will-change: transform; /* magnetic hover repositions this via inline transform */
}
.rx-btn svg { width: 18px; height: 18px; transition: transform .3s; }
.rx-btn--primary { background: var(--accent, #E31E24); color: #fff; box-shadow: 0 14px 32px -14px rgba(227,30,36,.5); }
.rx-btn--primary:hover { background: var(--cta-700, #C1121F); box-shadow: 0 18px 40px -14px rgba(227,30,36,.6); }
.rx-btn--primary:hover svg { transform: translateX(3px); }
.rx-btn--secondary { background: #fff; color: var(--ink, #1A1A1A); border-color: var(--line, #E5E7EB); }
.rx-btn--secondary:hover { border-color: var(--accent, #E31E24); color: var(--accent, #E31E24); box-shadow: 0 10px 24px -14px rgba(26,26,26,.2); }

/* Staggered page-load / slide entrance (~1.2s total, per spec) */
.rx-slide.is-active .rx-badge { animation: rxFadeUp .7s cubic-bezier(.22,1,.36,1) .15s forwards; }
.rx-slide.is-active .rx-headline .line:nth-child(1) { animation: rxFadeUp .7s cubic-bezier(.22,1,.36,1) .28s forwards; }
.rx-slide.is-active .rx-headline .line:nth-child(2) { animation: rxFadeUp .7s cubic-bezier(.22,1,.36,1) .4s forwards; }
.rx-slide.is-active .rx-desc { animation: rxFadeUp .7s cubic-bezier(.22,1,.36,1) .52s forwards; }
.rx-slide.is-active .rx-cta { animation: rxFadeUp .7s cubic-bezier(.22,1,.36,1) .64s forwards; }
@keyframes rxFadeUp { to { opacity: 1; transform: translateY(0); } }

/* ---------- Image — the full-bleed visual focus, Pelican-style ---------- */
.rx-slide__media {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; overflow: visible;
  padding-top: 100px; padding-right: 2%; box-sizing: border-box;
}
.rx-slide__frame { position: relative; width: 74%; height: 62%; display: flex; align-items: center; justify-content: center; }
.rx-slide__img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(26,26,26,.16));
  /* "Ken Burns" settle-in: starts slightly smaller and eases up TO full
     size — it never scales PAST 100%, so the whole machine (including
     long panoramic ends) always stays fully visible, never cropped. */
  transform: scale(.93);
  transition: transform 1.4s cubic-bezier(.22,1,.36,1);
  will-change: transform;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.rx-slide.is-active .rx-slide__img { transform: scale(1); }
.rx-slide__ground {
  position: absolute; left: 50%; bottom: 10%; width: 56%; height: 34px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(26,26,26,.16), transparent 72%); filter: blur(8px);
}

/* ---------- Floating glassmorphism stat cards ---------- */
.rx-card {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.68); backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,.9); border-radius: 999px;
  padding: .65rem 1.1rem .65rem .7rem;
  box-shadow: 0 14px 34px -14px rgba(26,26,26,.22);
  font-size: .82rem; font-weight: 600; color: var(--ink, #1A1A1A);
  opacity: 0; transform: scale(.85) translateY(10px);
  animation: rxCardIn .6s cubic-bezier(.22,1,.36,1) both, rxCardFloat 5s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes rxCardIn { to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes rxCardFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.rx-card svg { width: 16px; height: 16px; color: var(--accent, #E31E24); flex: none; background: var(--accent-soft,#FFF5F5); border-radius: 50%; padding: 3px; box-sizing: content-box; }
.rx-card--tl { top: 0%; left: 4%; }
.rx-card--br { bottom: 10%; right: 4%; }
.rx-card--bl { top: 8%; right: 4%; }

/* ---------- Controls (bottom-right: arrows / dots / count) ---------- */
.rx-hero__controls {
  position: absolute; right: clamp(1.5rem, 5vw, 6rem); bottom: 2.4rem; z-index: 5;
  display: flex; align-items: center; gap: 1.1rem;
}
.rx-arrow {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: #fff; border: 1px solid var(--line, #E5E7EB);
  color: var(--ink, #1A1A1A); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px -8px rgba(26,26,26,.18);
  transition: background .25s, border-color .25s, color .25s, transform .25s, box-shadow .25s;
}
.rx-arrow:hover { background: var(--accent, #E31E24); border-color: var(--accent, #E31E24); color: #fff; transform: scale(1.06); box-shadow: 0 10px 24px -10px rgba(227,30,36,.5); }
.rx-arrow svg { width: 20px; height: 20px; }
.rx-dots { display: flex; align-items: center; gap: .55rem; }
.rx-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--line, #E5E7EB); border: none; padding: 0; cursor: pointer; transition: all .35s cubic-bezier(.22,1,.36,1); }
.rx-dot.is-active { width: 32px; background: var(--accent, #E31E24); }
.rx-hero__count { font-family: "Plus Jakarta Sans"; font-size: .85rem; letter-spacing: .05em; color: var(--slate, #5F6368); margin-left: .3rem; }
.rx-hero__count b { color: var(--ink, #1A1A1A); }

/* progress bar for the active slide's autoplay timer */
.rx-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--line, #E5E7EB); z-index: 5; }
.rx-progress__bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent, #E31E24), #F2545B); }
.rx-progress__bar.is-running { animation: rxProgress linear forwards; animation-duration: var(--rx-dur, 7000ms); }
@keyframes rxProgress { from { width: 0; } to { width: 100%; } }

/* ---------- Scroll indicator (bottom-left, per spec) ---------- */
.rx-scroll {
  position: absolute; left: clamp(1.5rem, 5vw, 6rem); bottom: 2.6rem; z-index: 5;
  display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
  background: none; border: none; color: var(--slate, #5F6368); cursor: pointer;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
}
.rx-scroll:hover { color: var(--ink, #1A1A1A); }
.rx-scroll__line { width: 1px; height: 34px; background: var(--line, #E5E7EB); position: relative; overflow: hidden; }
.rx-scroll__line::after {
  content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--accent, #E31E24);
  animation: rxScroll 1.8s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes rxScroll { 0% { top: -100%; } 50% { top: 0; } 100% { top: 100%; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rx-slide, .rx-slide__img, .rx-progress__bar, .rx-scroll__line::after,
  .rx-card, .rx-dust__mote { animation: none !important; transition: none !important; }
  .rx-slide.is-active .rx-badge, .rx-slide.is-active .rx-headline .line, .rx-slide.is-active .rx-desc,
  .rx-slide.is-active .rx-cta, .rx-card { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .rx-slide__content { max-width: 520px; }
  .rx-slide__frame { width: 92%; height: 68%; }
  .rx-card--bl { display: none; } /* avoid 3-card crowding on a tighter canvas */
}

@media (max-width: 900px) {
  .rx-hero { height: auto; min-height: 100vh; max-height: none; }
  .rx-slide { position: relative; display: flex; flex-direction: column; height: auto; min-height: 100vh; padding-top: 84px; }
  .rx-slide:not(.is-active) { display: none; }
  .rx-slide__media { position: relative; inset: auto; order: 1; height: 40vh; min-height: 280px; }
  .rx-slide__content {
    position: relative; inset: auto; order: 2; padding: 2rem 1.5rem 8rem; max-width: none;
  }
  .rx-slide__content::before { display: none; } /* no gradient needed once text sits on plain background, not over the photo */
  .rx-card { font-size: .74rem; padding: .5rem .85rem .5rem .55rem; }
  .rx-card--bl { display: none; }
  .rx-card--tl { top: 4%; left: 3%; }
  .rx-card--br { bottom: 8%; right: 3%; }
  .rx-hero__controls { right: 50%; transform: translateX(50%); bottom: 1.6rem; }
  .rx-scroll { display: none; }
  .rx-hero__blueprint { display: none; }
}

@media (max-width: 480px) {
  .rx-cta { flex-direction: column; align-items: stretch; }
  .rx-btn { justify-content: center; }
  .rx-card { display: none; } /* keep the mobile product shot clean */
}