/* Hero events strip — v4.
   Architecture: .hero reserves real, guaranteed space for the strip via
   padding-bottom (part of the box model, not a visual trick) — the
   original .hero-content markup/CSS is otherwise completely untouched,
   so its centering behavior and position barely move. The strip itself
   is positioned with position:absolute, but — unlike earlier versions —
   it is absolute INTO a zone that padding-bottom has already reserved,
   so it can never collide with .hero-content: the browser's box model
   guarantees .hero-content's content box stops before the padding
   starts, full stop, regardless of how many lines the heading/paragraph
   wrap to at any width.

   Earlier attempts nested .hero-content inside a new flex wrapper and
   tried to split height via flex:1 / flex:0 0 auto. That measurably
   failed (verified with Playwright + getBoundingClientRect, not just
   visually): at 1024px width .hero-content's rendered box came out
   ~24px shorter than its own content (scrollHeight), so the CTA button
   row silently overflowed into the band. Root-caused to how flex-basis:
   auto is resolved for a flex item that is itself a column flex
   container — not worth re-fighting. padding-bottom reservation sidesteps
   the whole class of bug because it uses the plain box model instead of
   nested flex distribution. */

.hero{
  padding-bottom:168px;
}
.lx-hero-events{
  position:absolute;
  left:0; right:0;
  bottom:16px; /* gap above the destination-name marquee that follows .hero */
  z-index:2;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.lx-he-heading{
  margin:0 0 0 48px;
  font-family:'Jost',sans-serif;
  font-weight:500;
  font-size:.66rem;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:#D8BC7A;
  text-shadow:0 1px 10px rgba(0,0,0,.85);
}

.lx-he-viewport{
  position:relative;
  width:100%;
  overflow:hidden;
}

.lx-he-track{
  display:flex;
  flex-wrap:nowrap;
  width:max-content;
  will-change:transform;
  transform:translate3d(0,0,0);
}
/* Motion is driven by requestAnimationFrame in hero-events-strip.js, not a
   CSS @keyframes animation. Two reasons: (1) a CSS animation starts
   counting the instant the (still-empty) track is style-computed, before
   the async events.json fetch has populated any cards — the strip would
   sit empty for a beat and then snap in already mid-cycle; (2)
   animation-play-state:paused combined with will-change:transform on a
   composited layer is not reliably glitch-free across browsers — Safari
   in particular can snap a paused transform animation back to its
   keyframe start when a child's own :hover transform repaints the layer.
   Driving transform imperatively sidesteps both: the loop only starts once
   content exists, and "pause" is just not writing a new transform value —
   there is no animation engine to reset. See the pause/resume logic in
   hero-events-strip.js. */

.lx-he-group{
  display:flex;
  flex-wrap:nowrap;
  flex-shrink:0;
  align-items:center;
  gap:12px;
  padding-left:48px;
}

/* Compact horizontal card: thumbnail left, name (up to 2 lines) + date
   right. No venue/description — that detail lives on the event page.
   Fixed width everywhere so content length never causes overlap; the
   name uses a 2-line clamp instead of 1-line truncation so a long title
   stays readable rather than cutting off after a few words. */
.lx-he-card{
  display:flex;
  align-items:stretch;
  flex:0 0 184px;
  width:184px;
  height:92px;
  border-radius:12px;
  overflow:hidden;
  background:rgba(11,36,56,.3);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.16);
  text-decoration:none;
  transition:border-color .3s ease, transform .3s ease, background .3s ease;
}
.lx-he-card:hover{
  border-color:rgba(201,165,92,.8);
  background:rgba(11,36,56,.46);
  transform:translateY(-2px);
}
.lx-he-card:focus-visible{outline:2px solid #D8BC7A;outline-offset:2px}

.lx-he-thumb{
  flex:0 0 74px;
  width:74px;
  height:100%;
  overflow:hidden;
}
.lx-he-thumb img{display:block;width:100%;height:100%;object-fit:cover}

.lx-he-body{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  padding:0 12px;
  /* Soft, subtle contrast panel behind the text only (not the whole
     card/thumbnail) — a light horizontal fade, not a solid block, so it
     reads as "slightly shaded" rather than a visible box. */
  background:linear-gradient(90deg, rgba(6,16,27,.12), rgba(6,16,27,.5) 28%, rgba(6,16,27,.5));
}
.lx-he-name{
  /* Sans-serif (Jost) — the project's existing UI font — instead of the
     display serif used for headings; a clean, modern weight reads better
     at this small a size than a serif does. */
  font-family:'Jost',sans-serif;
  font-weight:600;
  font-size:.92rem; /* ~14.7px */
  line-height:1.3;
  letter-spacing:.005em;
  color:#fff;
  text-shadow:0 1px 3px rgba(0,0,0,.65);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.lx-he-date-line{
  font-family:'Jost',sans-serif;
  font-weight:700;
  font-size:.8rem; /* ~12.8px */
  letter-spacing:.02em;
  color:#F0D9A0;
  text-shadow:0 1px 3px rgba(0,0,0,.55);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.lx-he-more-card{
  flex:0 0 96px;
  width:96px;
  height:92px;
  border-radius:12px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  background:rgba(201,165,92,.08);
  border:1px solid rgba(201,165,92,.5);
  text-decoration:none;
  font-family:'Jost',sans-serif;
  font-size:.62rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#fff;
  text-align:center;
  line-height:1.25;
  transition:background .3s,border-color .3s;
}
.lx-he-more-card:hover{background:rgba(201,165,92,.2);border-color:#D8BC7A}
.lx-he-more-card svg{width:17px;height:17px}

/* static noscript fallback: plain inline link list, no card chrome */
.lx-he-noscript{margin:0 0 0 48px}
.lx-he-noscript ul{list-style:none;display:flex;flex-wrap:wrap;gap:6px 16px;margin:0;padding:0}
.lx-he-noscript a{font-family:'Jost',sans-serif;font-size:.78rem;color:#fff;text-shadow:0 1px 8px rgba(0,0,0,.8);text-decoration:underline;text-underline-offset:3px}

@media(max-width:1100px){
  .hero{padding-bottom:172px}
  .lx-he-card{flex-basis:166px;width:166px;height:84px}
  .lx-he-thumb{flex-basis:66px;width:66px}
  .lx-he-more-card{flex-basis:86px;width:86px;height:84px}
}

/* Mobile: native touch scroll instead of the CSS marquee (so autoplay
   never fights a swipe gesture); 1–1.2 cards visible. */
@media(max-width:720px){
  /* index-01.css sets .hero{padding-bottom:26px!important} at this same
     breakpoint (for align-items:flex-end spacing) — needs !important to
     win.

     Measured with Playwright at 390x844 and 375x667 (real
     getBoundingClientRect, not guesswork): hero's own text content
     (unchanged, per "keep hero text position as-is") already needs
     ~725px at this width. The fixed bottom nav bar (.lx-cta-bar, always
     visible on mobile) permanently occupies the bottom ~73px of every
     viewport. There is mathematically no padding/offset combination that
     fits CTA-gap + a real image card + the bar's reserved zone inside a
     667–844px viewport WITHOUT either shrinking the hero text (ruled out)
     or shrinking the band to an unusably thin sliver (~26px, no room for
     an image) — fitting all of it above the fold at scroll position 0 is
     not possible here.
     Chose the better of two imperfect options: push the band fully PAST
     the first viewport (clean — you scroll a little and the full card
     appears correctly above the bar) rather than let it render exactly
     at the boundary, where the top of the band would be visibly cut off
     by the fixed bar for a stretch of the scroll range. 320px of extra
     hero height is just more of the same background photo scrolling by
     (hero-img covers the full padding area) — not an empty gap. */
  .hero{padding-bottom:320px!important}
  .lx-hero-events{bottom:calc(100px + env(safe-area-inset-bottom));gap:6px}
  .lx-he-heading{margin-left:20px;font-size:.6rem}
  .lx-he-track{
    transform:none!important; /* safety net: wins over any inline transform the JS loop set before the breakpoint was detected */
    overflow-x:auto; overflow-y:hidden;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    max-width:100vw;
  }
  .lx-he-track::-webkit-scrollbar{display:none}
  .lx-he-group{gap:10px;padding-left:20px;padding-right:20px}
  .lx-he-group:last-child{display:none} /* no loop needed once scroll is native */
  .lx-he-card{flex-basis:156px;width:156px;height:78px;scroll-snap-align:center}
  .lx-he-thumb{flex-basis:60px;width:60px}
  .lx-he-body{padding:0 10px;gap:4px}
  .lx-he-name{font-size:.88rem;line-height:1.22} /* ~14px — stays readable, same as desktop in px terms */
  .lx-he-date-line{font-size:.76rem} /* ~12.2px */
  .lx-he-more-card{flex-basis:78px;width:78px;height:78px;scroll-snap-align:center}
}

@media(prefers-reduced-motion:reduce){
  .lx-he-track{transform:none!important} /* JS loop also checks this query and never starts; this is a safety net */
  .lx-he-card:hover{transform:none}
}
