/* ==========================================================================
   Component: portada (cartell + targeta). Variants del panell:
   .h-curtain (teló SVG, veure curtain.css) · .h-kenburns (zoom lent amb estrelles) · .h-parallax
   ========================================================================== */
.hero { background: var(--sand); padding-bottom: 56px; }
.hero-inner { max-width: 1280px; margin: 0 auto; }
.hero-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; }
.hero-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; transform-origin: 60% 40%; }

/* Targeta: a l'escriptori munta sobre el peu del cartell (on només hi ha neu) */
.hero-card { position: relative; z-index: 4; box-sizing: border-box; max-width: 540px; margin: clamp(-170px, -11vw, -28px) 16px 0 clamp(16px, 6%, 80px); padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid #CFCAC0; border-radius: 20px; }
.hero-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); }
.hero-dates { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.1; color: var(--forest); }
.hero-lead { margin: 0; font-size: 17px; color: #33414C; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.hero-cta { min-height: 54px; gap: 10px; padding: 0 26px; font-size: 18px; }
.hero-cta--soon { flex-direction: column; justify-content: center; align-items: stretch; gap: 0; padding: 6px 26px; line-height: 1.2; font-size: inherit; font-weight: inherit; }
.hero-cta-main { font-size: 17px; font-weight: 700; }
.hero-cta-sub { font-size: 13px; font-weight: 600; }
.hero-cta--video { padding: 0 20px; font-size: 16px; }

/* Mòbil: el cartell guanya alçada (4:3, retallat pels costats on només hi ha bosc)
   i la targeta va a sota, sense tapar-lo */
@media (max-width: 640px) {
  .hero-media { aspect-ratio: 4 / 3; }
  .hero-card { margin: 14px 12px 0; padding: 20px 20px 22px; gap: 12px; }
  .hero-dates { font-size: 28px; }
  .hero-lead { font-size: 16px; }
}

/* ---------- Animacions de la portada ---------- */
.h-curtain:not(.is-in) .hero-card { opacity: 0; }
.h-curtain.is-in .hero-card { animation: pujar 1s 1.7s cubic-bezier(.16, 1, .3, 1) both; }
.h-kenburns.is-in .hero-card, .h-parallax.is-in .hero-card { animation: pujar 1s .25s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes pujar { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.h-kenburns .hero-img { animation: kb 20s ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.1); } }

/* Estrelles que brillen sobre el cartell (variant zoom lent) */
.twinkle { display: none; position: absolute; z-index: 2; pointer-events: none; }
.twinkle.i0 { left: 5%; top: 12%; }
.twinkle.i1 { left: 24%; top: 8%; }
.twinkle.i2 { left: 88%; top: 7%; }
.twinkle.i3 { left: 16%; top: 30%; }
.twinkle.i4 { left: 9%; top: 48%; }
.twinkle.i5 { left: 94%; top: 30%; }
.h-kenburns .twinkle { display: block; animation: brilla 2.8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .5s); }
@keyframes brilla { 0%, 100% { opacity: .25; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(20deg); } }

@supports (animation-timeline: view()) {
  .h-parallax .hero-img { animation: plx linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
}
@keyframes plx { from { transform: translateY(0) scale(1.02); } to { transform: translateY(30%) scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  .hero-card { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
  .twinkle { display: none !important; }
}
