/* =====================================================================
   Hero pictures slider (provided artwork) - shared by ALL themes
   ---------------------------------------------------------------------
   Loaded on the home page only. Only the provided pictures are shown.
   They slide sideways: swipe / drag with the hand, or automatically
   every few seconds (see main.js). The frame uses the active theme's CSS
   variables, so it matches Green & White, Red & White and White & Blue.
   ===================================================================== */

.hero-visual { max-width: 820px; }

/* only the pictures are shown: the small floating text chips are hidden */
.hero-visual .hero-float-card { display: none; }

/* soft themed glow behind the pictures */
.hero-visual::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 14%;
  bottom: 6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 22%, transparent), transparent 72%);
  filter: blur(34px);
  pointer-events: none;
}

/* ---------- Slider ---------- */
/* padding + negative margin leave room for the frame's shadow inside the clipping area */
.hero-slider {
  overflow: hidden;
  padding: 14px 16px 52px;
  margin: -14px -16px -38px;
  touch-action: pan-y;            /* vertical scroll stays normal, horizontal swipe moves the pictures */
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  animation: heroSliderIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-slider:active { cursor: grabbing; }

@keyframes heroSliderIn {
  from { opacity: 0; transform: translateY(26px) scale(0.96); filter: blur(6px); }
  60%  { filter: blur(0); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.hero-track {
  display: flex;
  gap: 32px;                       /* wider than the side padding, so the next picture never peeks in */
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.hero-slide {
  display: block;
  flex: 0 0 100%;
  min-width: 0;
}
.hero-slide.active { animation: none; }

/* ---------- Picture frame ---------- */
.hero-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--radius) + 12px);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  /* compact shadow so it fits inside the slider's clipping area without a visible edge */
  box-shadow: 0 22px 44px -26px color-mix(in srgb, var(--primary) 45%, rgba(10, 20, 50, 0.35)),
              0 0 0 6px color-mix(in srgb, var(--surface) 55%, transparent);
  transform: translateZ(0);
}
.hero-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;           /* dragging moves the slider, not the picture itself */
  -webkit-user-drag: none;
  user-select: none;
}

/* light sheen that glides over the picture now and then */
.hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.3) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: heroArtSheen 7s ease-in-out 1.6s infinite;
}
@keyframes heroArtSheen {
  0%   { transform: translateX(-120%); }
  22%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-visual { margin-top: 40px; }
  .hero-art { border-radius: calc(var(--radius) + 6px); }
}
@media (max-width: 480px) {
  .hero-visual { margin-top: 32px; }
  .hero-art { border-radius: 18px; }
  .hero-visual::before { filter: blur(24px); }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-slider,
  .hero-art::after { animation: none !important; }
  .hero-track { transition-duration: 0.01ms; }
}
