footer {
  scroll-snap-align: start;
}

body {
  overscroll-behavior-y: contain;
}

.desktop-page-background {
  min-height: 100vh;
  min-height: 100svh;
}

.event-spaces-main {
  min-height: 100vh;
  min-height: 100svh;
}

.event-spaces-desktop {
  display: none;
}

.event-spaces-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 112px var(--page-padding-desktop) 48px;
  overflow: hidden;
  isolation: isolate;
}

.event-spaces-hero::before,
.event-spaces-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.event-spaces-hero::before {
  inset: 0;
  background:
    radial-gradient(
      circle at 54% 35%,
      rgba(203, 255, 0, 0.3) 0%,
      rgba(28, 141, 74, 0.22) 19%,
      rgba(0, 9, 41, 0) 48%
    ),
    radial-gradient(
      circle at 44% 65%,
      rgba(0, 149, 94, 0.28) 0%,
      rgba(0, 149, 94, 0.12) 18%,
      rgba(0, 9, 41, 0) 45%
    );
}

.event-spaces-hero::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 42%;
  background: linear-gradient(
    to bottom,
    rgba(0, 9, 41, 0),
    rgba(0, 0, 0, 0.78)
  );
}

.event-spaces-copy {
  align-self: center;
  justify-self: center;
  width: min(100%, 470px);
  padding-bottom: clamp(18px, 4vh, 48px);
  text-align: center;
}

.event-spaces-title {
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: clamp(58px, 7vw, 112px);
  font-weight: 400;
  line-height: 0.86;
  text-transform: uppercase;
}

.event-spaces-title span {
  display: block;
}

.event-spaces-title span:first-child {
  color: #cbff00;
}

.event-spaces-description {
  max-width: 390px;
  margin: 28px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 400;
  line-height: 1.55;
}

.event-spaces-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 34px;
  color: var(--color-lime);
}

.event-spaces-scroll span {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.event-spaces-dots {
  position: fixed;
  z-index: 10;
  top: 50%;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateY(-50%);
}

.event-spaces-dots[hidden] { display: none; }

.event-spaces-dots button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.event-spaces-dots button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.event-spaces-dots button[aria-current="true"]::before {
  background: var(--color-lime);
}

@media (min-width: 768px) {
  .event-spaces-dots { display: none; }
}

.event-space-panel {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--page-padding-desktop) clamp(42px, 7vh, 78px);
  overflow: hidden;
  isolation: isolate;
  background: var(--color-black);
}

.event-space-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 46%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82));
  pointer-events: none;
}

.event-space-panel-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.event-space-panel-space-2 .event-space-panel-image {
  object-position: center;
}

.event-space-panel-space-3 .event-space-panel-image {
  object-position: 76% center;
}

.event-space-panel-space-4 .event-space-panel-image {
  object-position: 37% center;
}

.event-space-panel-content {
  align-self: end;
  width: min(100%, 620px);
}

.event-space-panel-title {
  margin: 0;
  color: #d9f044;
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 105px);
  font-weight: 400;
  line-height: 0.9;
  text-transform: uppercase;
}

.event-space-panel-meta {
  margin: 18px 0 24px;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-body);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.4;
}

.event-space-panel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: min(100%, 360px);
  min-height: 54px;
  padding: 13px 28px;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-black);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.event-space-panel-button:hover {
  background: var(--color-lime);
  transform: translateY(-1px);
}

.event-space-panel-button svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

@supports (height: 100dvh) {
  .desktop-page-background,
  .event-spaces-main,
  .event-spaces-hero,
  .event-space-panel {
    min-height: 100dvh;
  }
}

@media (min-width: 768px) {
  footer {
    scroll-snap-align: none;
  }

  .desktop-page-background {
    min-height: auto;
  }

  .event-spaces-main {
    min-height: 0;
  }

  .event-spaces-desktop {
    position: relative;
    display: block;
    min-height: 100vh;
    padding: 10% 8% 58px;
    overflow: hidden;
  }

  .event-spaces-hero,
  .event-space-panel {
    display: none;
  }

  .event-spaces-desktop-copy {
    width: min(100%, 610px);
    margin: 0 auto;
    text-align: center;
  }

  .event-spaces-desktop-title {
    display: inline-flex;
    align-items: baseline;
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 60px;
    font-weight: 400;
    line-height: 0.9;
    text-transform: uppercase;
  }

  .event-spaces-desktop-title span:last-child {
    color: var(--color-lime);
  }

  .event-spaces-desktop-description {
    max-width: 560px;
    margin: 16px auto 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.45;
  }

  .event-spaces-carousel {
    --event-card-gap: clamp(18px, 1.7vw, 30px);
    position: relative;
    width: min(100%, 1280px);
    margin: clamp(42px, 6vh, 72px) auto 0;
  }

  .event-spaces-card-track {
    display: flex;
    gap: var(--event-card-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .event-spaces-card-track::-webkit-scrollbar {
    display: none;
  }

  .event-spaces-card {
    display: block;
    flex: 0 0 calc((100% - (var(--event-card-gap) * 3)) / 4);
    min-width: 0;
    scroll-snap-align: start;
  }

  .event-spaces-card-media {
    position: relative;
    overflow: hidden;
    border-radius: 7px;
  }

  .event-spaces-card img {
    width: 100%;
    aspect-ratio: 1 / 1.3;
    object-fit: cover;
    object-position: center;
    transition: transform 220ms ease;
  }

  .event-spaces-card:nth-child(2) img {
    object-position: 50% center;
  }

  .event-spaces-card-space-3 img {
    object-position: 76% center;
  }

  .event-spaces-card-space-4 img {
    object-position: 37% center;
  }

  .event-spaces-card-title {
    margin-top: 14px;
    color: var(--color-white);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    transition: color 180ms ease;
  }

  .event-spaces-card:hover .event-spaces-card-title,
  .event-spaces-card:focus-visible .event-spaces-card-title {
    color: var(--color-lime);
  }

  .event-spaces-card-meta {
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.48);
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.35;
  }

  .event-spaces-card-button {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 18px;
    border-radius: 7px;
    background: var(--color-white);
    color: var(--color-black);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      background-color 180ms ease;
  }

  .event-spaces-card-button::after {
    content: "";
    width: 14px;
    height: 14px;
    margin-left: 10px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / contain no-repeat;
  }

  .event-spaces-card:hover img,
  .event-spaces-card:focus-visible img {
    transform: scale(1.035);
  }

  .event-spaces-card:hover .event-spaces-card-button,
  .event-spaces-card:focus-visible .event-spaces-card-button {
    opacity: 1;
    transform: translateY(0);
  }

  .event-spaces-carousel-arrow {
    position: absolute;
    top: 39%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
    transform: translateY(-50%);
    transition:
      background-color 180ms ease,
      border-color 180ms ease,
      color 180ms ease;
  }

  .event-spaces-carousel-arrow-left {
    left: -48px;
  }

  .event-spaces-carousel-arrow-right {
    right: -48px;
  }

  .event-spaces-carousel-arrow:hover,
  .event-spaces-carousel-arrow:focus-visible {
    border-color: var(--color-white);
    background: var(--color-white);
    color: var(--color-black);
  }

  .event-spaces-carousel-arrow span {
    width: 7px;
    height: 7px;
    border-bottom: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    transform: translateX(1px) rotate(45deg);
  }

  .event-spaces-carousel-arrow-right span {
    transform: translateX(-1px) rotate(225deg);
  }

  .event-spaces-carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
  }

  .event-spaces-carousel-pagination button {
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .event-spaces-carousel-pagination button[aria-current="true"] {
    background: var(--color-white);
  }

  .event-spaces-carousel-arrow[hidden],
  .event-spaces-carousel-pagination[hidden] { display: none; }

  .event-spaces-carousel-arrow:disabled { opacity: 0.35; cursor: default; }
}

@media (max-width: 767px) {
  html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
  }

  .event-spaces-main > section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .event-spaces-hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: 100px var(--page-padding-mobile) 34px;
  }

  .event-spaces-hero::before {
    background:
      radial-gradient(
        circle at 60% 27%,
        rgba(203, 255, 0, 0.24) 0%,
        rgba(26, 129, 75, 0.2) 18%,
        rgba(0, 9, 41, 0) 43%
      ),
      radial-gradient(
        circle at 42% 69%,
        rgba(0, 164, 99, 0.31) 0%,
        rgba(0, 164, 99, 0.14) 20%,
        rgba(0, 9, 41, 0) 48%
      );
  }

  .event-spaces-copy {
    width: min(100%, 310px);
    padding-bottom: 18px;
  }

  .event-spaces-title {
    font-size: 40px;
    line-height: 100%;
    gap: 8px;
  }

  .event-spaces-description {
    max-width: 292px;
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.55;
  }

  .event-spaces-scroll {
    width: 32px;
    height: 32px;
    margin-top: 24px;
  }

  .event-spaces-dots {
    right: 25px;
    gap: 9px;
  }

  .event-spaces-dots span {
    width: 6px;
    height: 6px;
  }

  .event-space-panel {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 22px 42px;
  }

  .event-space-panel-image {
    object-position: 51% center;
  }

  .event-space-panel-space-2 .event-space-panel-image {
    object-position: 54% center;
  }

  .event-space-panel-space-3 .event-space-panel-image {
    object-position: 78% center;
  }

  .event-space-panel-space-4 .event-space-panel-image {
    object-position: 37% center;
  }

  .event-space-panel::after {
    height: 48%;
  }

  .event-space-panel-content {
    width: 100%;
  }

  .event-space-panel-title {
    font-size: 44px;
  }

  .event-space-panel-meta {
    margin: 30px 0 30px;
    font-size: 16px;
    color: rgba(249, 249, 249, 1);
  }

  .event-space-panel-button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-radius: 8px;
    font-size: 15px;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 767px) {
    .event-spaces-hero,
    .event-space-panel {
      min-height: 100dvh;
    }
  }
}
