/*
  Event 07 — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy these three
  files into any project and open index.html as-is.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --slate-950: #020617;
  --blue-400: #60a5fa;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--white);
  background-color: var(--slate-950);
  line-height: 1.5;
}

.events {
  padding: clamp(4rem, 3.5rem + 2vw, 6rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.events__inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.intro {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}

.kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--blue-400);
}

.heading {
  margin: 0.75rem 0 0;
  font-weight: 600;
  font-size: clamp(1.875rem, 1.5rem + 1.9vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--white);
}

.mosaic {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
}

.tile--large {
  aspect-ratio: 4 / 5;
}

.tile__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The photo visually overflows its clipped tile once scaled up, so it
     must never itself be the pointer hit-target — otherwise a fast
     pointer move can land on its (unclipped) hit region right as its
     transform is mid-transition and spuriously fire the tile's
     pointerleave, snapping the parallax offset back to 0 mid-hover. All
     hover tracking stays on the tile/overlay/body instead. */
  pointer-events: none;
  transform: scale(1.08);
}

.tile__overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to top, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.1) 55%, transparent);
}

.tile__body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 0.875rem;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--white);
}

.tile__title {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--white);
}

@media (min-width: 640px) {
  .mosaic {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* Motion — disabled entirely under reduced motion; every tile already
   renders at its final, fully visible state and the photo's pointer
   parallax offset never applies outside this media query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-event07-tile {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .tile {
    animation: al-event07-tile 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .tile__photo {
    transform: translate(calc(var(--al-event07-px, 0) * 1px), calc(var(--al-event07-py, 0) * 1px)) scale(1.08);
    transition: transform 300ms ease-out;
  }
}
