/* ==========================================================================
   /events-specific layout
   ========================================================================== */

.events-hero {
  position: relative;
  /* Full viewport height so the image runs up behind the fixed .nav.
     At 88svh the hero started below the header, leaving a black band. */
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg);
}

/* .events-hero__media is the <img> itself (it doubles as .bleed__media),
   so the filter belongs on the element, not on a descendant. */
.events-hero__media {
  filter: grayscale(0.25) contrast(1.05) brightness(0.7) sepia(0.12);
}

.events-hero__content {
  position: relative;
  z-index: var(--z-content);
  padding-bottom: clamp(3rem, 2rem + 4vw, 6rem);
  /* Same header clearance as the home hero: bottom-anchored content would
     otherwise ride up under the fixed nav on short viewports. */
  padding-top: var(--hero-top-clearance, 6rem);
}

.events-hero__title {
  font-size: var(--fs-hero);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  max-width: 22ch;
  /* Matches .hero__title on the home page. */
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.55), 0 0 38px rgba(255, 255, 255, 0.28);
}

/* "Event" is accent-coloured inline, so it glows in the accent instead. */
.events-hero__title em {
  text-shadow: 0 0 12px rgba(97, 206, 112, 0.6), 0 0 42px rgba(97, 206, 112, 0.32);
}

.events-hero__sub {
  margin-top: var(--space-md);
  max-width: 42ch;
}

.events-hero__actions {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  align-items: center;
}

.back-home {
  position: fixed;
  left: var(--container-pad);
  bottom: var(--space-lg);
  z-index: var(--z-nav);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75em 1.2em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out),
    visibility var(--dur-base) var(--ease-out);
}

/* While the hero is on screen its own CTAs sit in this corner, so the
   floating link would land on top of them. subnav.js sets .is-past-hero
   once the hero scrolls away — the same moment the subnav appears. */
body:not(.is-past-hero) .back-home {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
}

.back-home:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.back-home svg {
  width: 1em;
  height: 1em;
}

@media (max-width: 720px) {
  .back-home {
    left: var(--space-md);
    bottom: var(--space-md);
    padding: 0.65em 1em;
  }
}

/* ---- Leistungen (swipeable tiles) ---- */
.services-slider {
  position: relative;
}

.services__grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: var(--space-md);
}

.services__grid::-webkit-scrollbar {
  display: none;
}

.services__item {
  position: relative;
  /* Wide enough that ~4 tiles show fully with a 5th peeking at typical
     desktop widths, and the headline text has room to wrap on two full
     lines instead of clipping/breaking mid-word. */
  flex: 0 0 19.5rem;
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
}

/* Ready for a background photo later: drop an <img class="services__item-media">
   as the tile's first child and it'll sit behind the scrim/text automatically. */
.services__item-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Strong enough that every tile's lower half reads solid black behind
   the text — like the Aftershows photo naturally does — regardless of
   how bright the individual source image is. */
.services__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 25%,
    rgba(0, 0, 0, 0.55) 55%,
    rgba(0, 0, 0, 0.96) 85%,
    rgba(0, 0, 0, 1) 100%
  );
  z-index: 1;
}

.services__item h3,
.services__item p {
  position: relative;
  z-index: 2;
}

.services__item h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs);
  overflow-wrap: break-word;
}

.services__item p {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.services__prev,
.services__next {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(4px);
  z-index: 2;
  transition: opacity var(--dur-base) var(--ease-out);
}

.services__prev {
  left: var(--space-xs);
}

.services__next {
  right: var(--space-xs);
}

.services__prev svg,
.services__next svg {
  width: 1.1rem;
  height: 1.1rem;
}

.services__prev.is-hidden,
.services__next.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.services__next.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---- Reference case studies (Drink & Paint, Brunch & Paint) ---- */
/* Halved top padding — this section follows directly after Leistungen,
   which already ends with a full section-pad, so stacking two full
   paddings left an oversized gap between them. */
.reference--featured {
  padding-top: calc(var(--section-pad) * 0.5);
}

.reference__intro {
  max-width: 42rem;
  margin-bottom: var(--space-xl);
}

.reference__intro p {
  margin-top: var(--space-md);
}

/* Secondary block sits lower in the visual hierarchy — heading rides
   the shared h2 size, but a smaller intro gap/margin keeps its overall
   footprint noticeably lighter than the featured reference above it. */
.reference__intro--compact {
  margin-bottom: var(--space-lg);
}

.reference__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-md);
}

.reference__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  margin-top: var(--space-md);
}

.reference__stats .reference__badge {
  margin-top: 0;
}

.reference__badge strong {
  color: var(--accent);
}

.reference__badge--accent {
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 0.5em 0.9em 0.5em 0.7em;
}

.reference__badge--accent strong {
  color: var(--accent);
}

.reference__badge--accent svg {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

/* Featured (Drink & Paint): three equal-width portrait shots in a row —
   a clean editorial triptych, reflecting that this is the headline
   partnership (100K+ Instagram audience), not just one reference among
   others. */
.reference__gallery--featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xs);
}

.reference__gallery--featured .reference__media {
  aspect-ratio: 2 / 3;
}

@media (max-width: 720px) {
  .reference__gallery--featured {
    grid-template-columns: 1fr;
  }
  .reference__gallery--featured .reference__media {
    aspect-ratio: 4 / 3;
  }
  /* Third shot (dnp-02) dropped on mobile — redundant next to the other two. */
  .reference__gallery--featured .reference__media:nth-child(3) {
    display: none;
  }
}

/* Secondary (Brunch & Paint): a lower, denser strip — deliberately more
   modest than the featured spread above. */
.reference__gallery--compact {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: clamp(7rem, 5.5rem + 6vw, 11rem);
  gap: var(--space-2xs);
}

@media (max-width: 720px) {
  .reference__gallery--compact {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 9rem;
  }
  /* Third shot (gumo-04, coffee equipment in foreground) dropped on mobile. */
  .reference__gallery--compact .reference__media:nth-child(3) {
    display: none;
  }
}

.reference__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.reference__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out);
  filter: grayscale(0.35) contrast(1.05);
}

.reference__media:hover img {
  transform: scale(1.05);
  filter: grayscale(0) contrast(1.05);
}

/* ---- Mood / music intro on events page ---- */
.mood {
  text-align: left;
}

.mood p {
  margin-top: var(--space-sm);
}
