/* Featured cards on the homepage. The agenda has its own independent track. */
#hero {
  --hero-gap: clamp(14px, 2.3vw, 32px);
  --hero-width: min(82%, 1280px);
  --hero-radius: 22px;
  position: relative;
  display: block;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: clamp(16px, 3vw, 44px) 0 0;
  border: 0;
  touch-action: pan-y pinch-zoom;
}
#hero[hidden] { display: none; }
#hero-slides {
  position: relative;
  inset: auto;
  width: var(--hero-width);
  height: auto;
  aspect-ratio: 3.4;
  max-height: var(--hero-max-height, none);
  margin-inline: auto;
  gap: var(--hero-gap);
}
#hero .hero-slide {
  overflow: hidden;
  border-radius: var(--hero-radius);
  background: radial-gradient(ellipse at center, #292326, #151316 74%);
  isolation: isolate;
}
#hero .hero-media img,
#hero .hero-media .hero-video { width: 100%; height: 100%; object-fit: contain; }
/* Keep flyers intact; only videos and their posters fill the entire card. */
#hero .hero-media .hero-video,
#hero .hero-slide:is(:has(.hero-video),.has-video-poster) .hero-media img { object-fit: cover; }
#hero .hero-media img { display: block; }
#hero .hero-index { display: none; }
#hero .hero-slide:has(img,video)::before {
  content:'';position:absolute;z-index:1;inset:0;pointer-events:none;
  background:linear-gradient(0deg,#000e 0%,#0009 30%,transparent 76%);
}
#hero .hero-content {
  position:relative;z-index:2;
  display:flex;align-items:flex-start;justify-content:flex-end;flex-direction:column;
  width:100%;height:100%;padding:clamp(16px,2.6vw,36px);
}
#hero .hero-kicker { font-size:clamp(12px,1.3vw,17px); margin:0 0 5px; }
#hero h2 { font-size:clamp(29px,4.2vw,58px); line-height:.94; overflow-wrap:anywhere; }
#hero .hero-subtitle { font-size:clamp(12px,1.35vw,16px); margin:7px 0 12px; letter-spacing:.055em; }
#hero :is(.hero-kicker,.hero-subtitle):empty { display:none; }
#hero .hero-cta {
  position:static;z-index:2;font-size:14px;min-height:44px;
  padding:8px 12px;margin-top:4px;box-shadow:0 2px 14px #0005;
}
#hero .hero-cta:active { transform:none; }
#hero .hero-cta::after { content:'';position:absolute;inset:0;border-radius:inherit; }
#hero .hero-cta:focus-visible::after { box-shadow:inset 0 0 0 3px var(--yellow); }
#hero .hero-controls {
  position: relative;
  min-height: 48px;
  width: var(--hero-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 6px;
}
#hero .hero-controls[hidden] { display: none; }
#hero .hero-arrow {
  position: static;
  transform: none;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  color: #fff;
  line-height: 1;
}
#hero .hero-arrow:hover { color: var(--yellow); }
#hero .hero-prev { grid-area: 1 / 1; }
#hero .hero-next { grid-area: 1 / 3; }
#hero .hero-dots {
  grid-area: 1 / 2;
  position: static;
  display: flex;
  justify-content: center;
  gap: 0;
}
#hero .hero-dots button {
  position: relative;
  width: 32px;
  height: 44px;
  background: transparent;
  border-radius: 8px;
}
#hero .hero-dots button::after {
  content: '';
  position: absolute;
  inset: 20px 6px;
  background: #ffffff55;
  border-radius: 4px;
}
#hero .hero-dots button.active::after { background: var(--red); }
#hero .hero-dots button:focus-visible,
#hero .hero-arrow:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
@media (max-width: 700px) {
  #hero .hero-content { padding:14px; }
  #hero .hero-slide:has(img,video)::before { background:linear-gradient(0deg,#000e 0%,#000b 31%,transparent 80%); }
  #hero h2 { font-size:clamp(25px,8vw,39px); }
  #hero .hero-kicker { font-size:12px; }
  #hero .hero-subtitle { font-size:12px; margin:5px 0 7px; }
  #hero .hero-cta { font-size:13px; }
}
@media (prefers-reduced-motion: reduce) {
  #hero-slides { transition: none; }
}

/* Match the proportions of the phone reference: 70% artwork, 7% gaps. */
@media (max-width: 700px) {
  #hero { --hero-gap: 7vw; --hero-width: 70%; --hero-radius: 20px; padding-bottom: 14px; }
  #hero-slides { aspect-ratio: 1; }
  #hero .hero-controls:not(:focus-within) {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* Center the next card with a soft ease-out. Neighbors stay visible during the gesture. */
@media (prefers-reduced-motion: no-preference) {
  #hero-slides { transition:transform .6s cubic-bezier(.2,.78,.22,1); }
  #hero-slides.no-transition, #hero-slides.hero-dragging { transition:none; }
  #hero .hero-slide .hero-media { transition:opacity .55s ease; }
  #hero .hero-slide[aria-hidden="true"]:not(.is-wrap-target) .hero-media { opacity:.81; }
}
#hero-slides .hero-slide { -webkit-user-select:none; user-select:none; }
#hero-slides img { -webkit-user-drag:none; }
