:root {
  color-scheme: dark;
  --page: #111110;
  --ink: #f5f2ee;
  --muted: #b7b2ac;
  --line: #36332f;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, video:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 88px)); margin-inline: auto; }
.skip { position: absolute; top: 10px; left: 10px; z-index: 3; background: var(--page); padding: 10px; transform: translateY(-160%); }
.skip:focus { transform: none; }

.mast, .foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mast { min-height: 76px; border-bottom: 1px solid var(--line); }
.mark { display: grid; place-items: center; width: 106px; height: 46px; }
.mark img { display: block; width: 100%; height: auto; mix-blend-mode: screen; }
.tagline, .age { color: var(--muted); font-size: .875rem; }
.age { font-weight: 700; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-block: 34px 29px; }
h1 { margin: 0; font-size: clamp(4rem, 11vw, 8.5rem); line-height: .83; letter-spacing: -.085em; text-transform: uppercase; }
.filters { display: flex; gap: clamp(12px, 2.4vw, 26px); flex-wrap: wrap; }
.filters a { padding-block: 12px; color: var(--muted); text-decoration: none; font-size: .9375rem; border-bottom: 1px solid transparent; }
.filters a:hover, .filters a[aria-current] { color: var(--ink); border-color: currentColor; }

.events { display: grid; gap: 18px; scroll-margin-top: 20px; }
.section-title { margin: 0; color: var(--muted); font-size: .875rem; letter-spacing: .12em; font-weight: 700; text-transform: uppercase; }
#upcoming:not([hidden]) + #archive {
  margin-top: clamp(24px, 4vw, 48px);
}
#upcoming:not([hidden]) + #archive #archive-title {
  display: flex;
  align-items: center;
  min-height: clamp(90px, 12vw, 142px);
  padding-inline: clamp(16px, 4.1vw, 56px);
  color: var(--ink);
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: .9;
  letter-spacing: -.06em;
  background: radial-gradient(ellipse at 75% 100%, #6b442d46, transparent 70%);
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 100%) {
    #upcoming:not([hidden]) + #archive #archive-title {
      animation: archive-entrance linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }

    @keyframes archive-entrance {
      from { opacity: .35; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }
  }
}
.empty { margin: 0; color: var(--muted); }
.event {
  --field: #252131;
  --wash: #4a3e64;
  --accent: #e4d7ff;
  --card-inset: clamp(24px, 4.1vw, 56px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: clamp(320px, 41vw, 480px);
  background: linear-gradient(105deg, #121113 6%, var(--field) 62%, var(--wash));
  transform: scale(var(--event-scale, 1));
  transition: transform 420ms ease-out;
}
.event::before, .event-backdrop {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  filter: blur(clamp(20px, 3vw, 42px)) saturate(.95);
  pointer-events: none;
}
.event::before {
  content: "";
  z-index: -3;
  background: var(--art) center / cover no-repeat;
  opacity: .8;
}
@media (prefers-reduced-motion: no-preference) {
  .event:has(.poster-reflow)::before {
    animation: poster-wash 14s ease-in-out infinite alternate;
  }
  .event:nth-of-type(even):has(.poster-reflow)::before {
    animation-delay: -7s;
  }
  .event:has(.poster-reflow)::after {
    display: block;
    background-image:
      var(--poster-shade, linear-gradient(105deg, #121113b5, #12111360 48%, #12111322)),
      radial-gradient(ellipse at center,
        color-mix(in srgb, color-mix(in srgb, var(--accent) 62%, var(--wash)) 77%, transparent),
        color-mix(in srgb, var(--wash) 69%, transparent) 33%,
        transparent 69%);
    background-size: 100% 100%, var(--poster-light-size, 76% 112%);
    background-repeat: no-repeat;
    animation: poster-light 6s ease-in-out -2.2s infinite alternate;
  }
  .event:nth-of-type(even):has(.poster-reflow)::after {
    animation-delay: -5.2s;
  }
}
@keyframes poster-wash {
  from {
    transform: translate(-6%, -3%) scale(1.09);
    opacity: var(--wash-low, .64);
  }
  to {
    transform: translate(6%, 3%) scale(1.18);
    opacity: var(--wash-high, .88);
  }
}
@keyframes poster-light {
  from { background-position: 0 0, var(--poster-light-start, -62% 6%); }
  to { background-position: 0 0, var(--poster-light-end, 166% 94%); }
}
.event-backdrop {
  z-index: -2;
  object-fit: cover;
}
.event::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, #121113ef 4%, #121113af 44%, #12111333);
  pointer-events: none;
}
.pink { --field: #3b1433; --wash: #8e376e; --accent: #ffbce5; --art: url("assets/pink-party-poster.png"); --art-ratio: 941 / 587; --art-offset: -105%; }
.exhibit { --field: #282429; --wash: #58505a; --accent: #e7dce7; --art: url("assets/exhibit-2027-wide.webp"); }
.pink, .exhibit { --card-inset: clamp(24px, 3vw, 42px); min-height: clamp(320px, 34vw, 412px); }
.cottage-party { --field: #2e1717; --wash: #63281e; --accent: #ffd2ad; --art: url("assets/cottage-party-odintsovo.png"); --art-ratio: 720 / 513; --art-offset: -60%; }
.cottage-party .text-link { margin-top: 12px; }
.halloween { --field: #3b2013; --wash: #71341f; --accent: #ffc098; --art: url("assets/cottage-halloween-preview.jpg"); }
.alpha { --field: #191c47; --wash: #392f70; --accent: #ccccff; --art: url("assets/alpha-gen.jpg"); --art-ratio: 941 / 490; --art-offset: -150%; }
.dancefloor { --field: #30242a; --wash: #5a3743; --accent: #f2cdd8; --art: url("assets/dancefloor.jpg"); }
.event-copy {
  position: relative;
  isolation: isolate;
  align-self: center;
  min-width: 0;
  margin: var(--card-inset) clamp(24px, 3vw, 42px) var(--card-inset) var(--card-inset);
  padding-block: 12px;
}
.event-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10px -17px;
  border: 1px solid #ffffff25;
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 12% 0%, #ffffff29, transparent 48%),
    linear-gradient(145deg, #ffffff0f, #13101755 68%, #ffffff0e);
  box-shadow:
    inset 0 1px 1px #ffffff57,
    inset 1px 0 1px #ffffff23,
    inset 0 -7px 14px -10px #ffffff61,
    0 12px 30px #0003;
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  pointer-events: none;
}
.event-date { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 16px; color: var(--accent); margin: 0 0 16px; font-size: .875rem; letter-spacing: .075em; text-transform: uppercase; font-weight: 700; }
.event h3 { margin: 0 0 16px; font-size: clamp(2.1rem, 5.3vw, 5rem); line-height: .9; letter-spacing: -.06em; text-transform: uppercase; overflow-wrap: anywhere; }
.halloween h3 { font-size: clamp(1.9rem, 4.2vw, 4rem); }
.event-meta { margin: 0 0 10px; font-size: .9375rem; font-weight: 700; line-height: 1.5; }
.event-description { margin: 0; max-width: 34ch; font-size: 1rem; line-height: 1.5; color: #e9dfe5; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin-top: 24px; }
.button { display: inline-block; padding: 12px 15px; background: var(--accent); color: #171316; text-decoration: none; font-size: .875rem; font-weight: 700; }
.button:hover { background: #fff; }
.text-link { display: inline-block; padding-block: 5px; font-size: .875rem; text-decoration-thickness: 1px; text-underline-offset: .27em; }
.text-link:hover { color: var(--accent, #fff); }
.expired-link { margin-top: 10px; }
.poster {
  position: relative;
  display: block;
  min-width: 0;
  line-height: 0;
}
.poster img, .poster video {
  --fade-start: clamp(24px, 14%, 78px);
  --fade-top: 16px;
  --fade-bottom: 12px;
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mask-image:
    linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - 8px), transparent),
    linear-gradient(to bottom, transparent, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent);
  mask-composite: intersect;
}
.poster video:hover, .poster video:focus-within { --fade-bottom: 4px; }
.poster video:fullscreen { object-fit: contain; mask-image: none; }
.poster:focus-visible, .poster video:focus-visible { outline-offset: -5px; }
a.poster { cursor: zoom-in; }

.poster-reflow {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(16px, 2.2vw, 32px);
  line-height: 1.4;
  text-decoration: none;
  background: linear-gradient(90deg, transparent, #100e1a60 28%, #100e1aaa);
}
.poster-art {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  mask-image: linear-gradient(to bottom, transparent, #000 4%, #000 96%, transparent);
}
.poster-art img { object-fit: contain; mask-image: none; }
.poster-art-crop { aspect-ratio: var(--art-ratio); }
.poster-art-crop img { top: var(--art-offset); bottom: auto; height: auto; }
.poster-heading {
  color: #eee1ff;
  font-size: clamp(1.35rem, 3.2vw, 2.6rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.05em;
  text-transform: uppercase;
}
.poster-details { display: grid; gap: 5px; font-size: .9375rem; }
.poster-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--accent); font-weight: 700; }
.poster-tagline { color: #e9dfe5; }
.mobile-age { display: none; }

.foot { margin-top: 45px; min-height: 78px; border-top: 1px solid var(--line); }
.lightbox { margin: auto; padding: 0; overflow: visible; border: 0; background: transparent; color: var(--ink); max-width: min(90vw, 1200px); max-height: 86dvh; }
.lightbox::backdrop { background: #080808eF; }
.lightbox img { display: block; max-width: 100%; max-height: 86dvh; object-fit: contain; }
.lightbox-close { position: absolute; right: 0; top: 0; translate: 25% -25%; width: 42px; height: 42px; border: 0; background: #141414; color: #fff; font: 1.7rem Arial, sans-serif; cursor: pointer; }
.photo-reports { display: grid; gap: 18px; padding-top: 24px; scroll-margin-top: 64px; }
.photo-albums { display: grid; gap: 16px; }
.photo-album { border-bottom: 1px solid var(--line); }
.photo-album summary { position: relative; display: grid; min-height: 196px; align-content: end; isolation: isolate; overflow: hidden; padding: 20px; border-radius: 12px; cursor: pointer; list-style: none; }
.photo-album summary::-webkit-details-marker { display: none; }
.photo-album summary:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.photo-album summary::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #121211f5, #1212110d 95%); content: ""; }
.photo-album summary img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.album-title { font-size: clamp(1.5rem, 3.8vw, 2.5rem); font-weight: 700; }
.album-action { margin-top: 5px; color: #e8e4de; font-size: .9375rem; text-decoration: underline; text-underline-offset: .2em; }
.photo-album[open] .album-action:not(.album-close), .photo-album:not([open]) .album-close { display: none; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(126px, 42%), 1fr)); gap: 8px; padding-block: 12px 16px; }
.photo-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #222; }
.photo-controls { display: flex; justify-content: center; align-items: center; gap: 12px; padding-top: 4px; }
.photo-controls button { min-width: 44px; min-height: 44px; border: 0; background: #141414; color: var(--ink); font-size: 1.65rem; cursor: pointer; }
.photo-count { min-width: 64px; text-align: center; }
.lightbox:has(.photo-controls:not([hidden])) img { max-height: 75dvh; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .skip { z-index: 5; }
  .mast { min-height: 58px; }
  .mast .mark { width: 82px; height: 40px; }
  .page-head { display: contents; }
  h1 { margin-block: 24px 12px; font-size: clamp(2.75rem, 11vw, 5rem); }
  .filters {
    position: sticky;
    z-index: 4;
    top: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
    background: var(--page);
  }
  .filters a {
    display: grid;
    min-height: 44px;
    place-items: center;
    padding: 6px 2px;
    border: 0;
    border-bottom: 1px solid transparent;
    font-size: .875rem;
  }
  .filters a[aria-current] { border-bottom-color: var(--ink); }
  .events, .event[id] { scroll-margin-top: 60px; }
  .events { gap: 16px; }
  .event { --card-inset: 24px; }
  .event-copy::before { inset: -4px -12px; }
  .event h3 { font-size: clamp(2rem, 6vw, 3rem); }
  .halloween h3 { font-size: clamp(1.6rem, 4.35vw, 2.5rem); }
  .actions { margin-top: 16px; }
  .lightbox { max-width: calc(100vw - 24px); }
  .lightbox-close { top: 6px; right: 6px; width: 44px; height: 44px; translate: none; }
}
@media (max-width: 640px) {
  .tagline { display: none; }
  #upcoming:not([hidden]) + #archive #archive-title {
    min-height: 0;
    padding: 15px 0 0;
    border-top: 1px solid var(--line);
    font-size: 2rem;
    background: none;
  }
  .event { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 12px; background: #1a1919; }
  .event::before, .event-backdrop { opacity: .14; }
  .event::before { --wash-low: .13; --wash-high: .25; }
  .event::after, .event-copy::before { display: none; }
  .event::after {
    --poster-shade: linear-gradient(160deg, #14121262, #14121212 62%, #1412123d);
    --poster-light-size: 126% 65%;
    --poster-light-start: 112% -48%;
    --poster-light-end: -18% 147%;
  }
  .event-copy { margin: 0; padding: 18px 16px 16px; }
  .event-date { gap: 4px 10px; margin-bottom: 8px; color: var(--muted); font-size: .8125rem; letter-spacing: .045em; }
  .mobile-age { display: inline; margin-inline-start: auto; }
  .event h3 { margin-bottom: 10px; font-size: clamp(1.95rem, 8.4vw, 3.1rem); line-height: .96; }
  .halloween h3 { font-size: clamp(1.75rem, 7.6vw, 2.8rem); }
  .exhibit h3 br { display: none; }
  .event-meta { margin-bottom: 6px; }
  .event-description { max-width: none; }
  .pink .event-description { display: none; }
  .actions { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 10px; margin-top: 12px; }
  .button, .text-link { display: inline-flex; min-height: 44px; align-items: center; }
  .button { justify-content: center; padding: 8px; border-radius: 5px; background: var(--ink); text-align: center; line-height: 1.15; }
  .event-copy > .text-link { margin-top: 4px; }
  .poster { aspect-ratio: 4 / 5; }
  .halloween .poster { aspect-ratio: 800 / 808; }
  .poster-reflow { aspect-ratio: auto; gap: 12px; padding: 0 0 16px; background: none; }
  .poster-reflow .poster-heading, .poster-reflow .poster-facts { display: none; }
  .poster-art { mask-image: none; }
  .poster-details { gap: 8px; padding-inline: 16px; }
  .poster-tagline { color: var(--muted); }
  .poster img, .poster video { --fade-start: 8px; --fade-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .event { transform: none; transition: none; }
  .event-backdrop { display: none; }
}

.feature-status { display: none; }
#upcoming:has(.is-featured) > .section-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
body:has(#upcoming:not([hidden]) .is-featured) .page-head {
  align-items: center;
  padding-block: 4px 12px;
}
body:has(#upcoming:not([hidden]) .is-featured) .page-head h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  letter-spacing: -.065em;
}
.event.is-featured {
  --cover-position: center;
  --cover-scale: 1;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-height: max(410px, calc(100svh - 143px));
  background: #171316;
  transform: none;
}
.pink.is-featured {
  --cover-position: center 54%;
  --cover-scale: 1.08;
}
.event.is-featured::before, .event.is-featured::after { display: none; }
.is-featured .poster, .is-featured .event-copy { grid-area: 1 / 1; }
.is-featured .poster {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #171316;
}
.is-featured .poster::before, .is-featured .poster::after {
  content: "";
  position: absolute;
  inset: 0;
}
.is-featured .poster::before {
  background: var(--cover-art, var(--art)) var(--cover-position) / cover no-repeat;
  transform: scale(var(--cover-scale));
}
.is-featured .poster::after {
  background: linear-gradient(90deg, #100b14c2 0%, #100b1447 46%, transparent 76%),
    linear-gradient(0deg, #0d0a11f7 0%, #0d0a1164 36%, transparent 72%);
}
.is-featured .poster > span { display: none; }
.is-featured .event-copy {
  align-self: end;
  justify-self: start;
  z-index: 1;
  margin: 0;
  padding: clamp(24px, 5vw, 64px);
  max-width: min(100%, 650px);
  pointer-events: none;
}
.is-featured .event-copy::before { display: none; }
.is-featured .event-copy a { pointer-events: auto; }
.is-featured .event-date { margin-bottom: 12px; color: var(--accent); }
.is-featured h3 { margin-bottom: 10px; font-size: clamp(2.4rem, 7.7vw, 6.6rem); }
.is-featured .event-meta { margin-bottom: 0; }
.is-featured .event-description { display: none; }
.is-featured .actions { margin-top: 16px; }
.is-featured .button { border-radius: 6px; }
.is-featured .feature-status {
  display: block;
  margin: 0 0 16px;
  color: #fff;
  font-size: .875rem;
}

@media (max-width: 760px) {
  body:has(#upcoming:not([hidden]) .is-featured) .page-head h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  body:has(#upcoming:not([hidden]) .is-featured) .filters { margin-bottom: 6px; }
  .event.is-featured { min-height: max(390px, calc(100svh - 110px)); }
  .pink.is-featured .poster { background: linear-gradient(180deg, #281020, #100a13 86%); }
  .pink.is-featured .poster::before { background-position: center top; background-size: 100% auto; transform: none; }
  .pink.is-featured h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .exhibit.is-featured { --cover-art: url("assets/exhibit-2027.jpg"); }
  .is-featured .poster { aspect-ratio: auto; }
  .is-featured .poster::after {
    background: linear-gradient(0deg, #0e0a12 0%, #0e0a12db 20%, #0e0a1269 42%, transparent 65%);
  }
  .is-featured .event-copy { width: 100%; padding: 18px max(16px, 5vw) 20px; }
  .is-featured h3 { font-size: clamp(2.35rem, 10.4vw, 4rem); }
  .is-featured .event-date { margin-bottom: 8px; }
  .is-featured .feature-status { margin-bottom: 10px; }
}
