/* One party's page in direction A (reshaped 14 Nov 2026: the old page looked like the home, Miguel).
   Laptops: the page itself holds still and three parts scroll on their own, only the one under the
   mouse: the home's parties list on the left, every picture of the party in the middle, and on the
   right, where the home has the roster, a card with the party's details, framed by a line.
   Phones: the pictures swipe sideways and the card follows below. */

.ev {
  --card-w: 23rem;
  /* Room the bar takes at the bottom: 44px tall, 10px up, plus air. */
  --foot-r: 4.6rem;
  display: grid;
  grid-template-columns: var(--list-w) minmax(0, 1fr) var(--card-w);
  grid-template-rows: minmax(0, 1fr);
  height: 100svh;
  padding: var(--top-r) 0 var(--foot-r);
  overflow: hidden;
}
/* Wide screens: even side columns, so the pictures sit under the logo as the home's flyer does. */
@media (min-width: 1200px) { .ev { grid-template-columns: var(--card-w) minmax(0, 1fr) var(--card-w); } }
/* Small laptops: a narrower card leaves the pictures near the home's flyer size. */
@media (min-width: 960px) and (max-width: 1199px) {
  .ev { --card-w: 17.5rem; }
  .ev__card .ev__lineup--two ul { columns: 1; }
}
@media (min-width: 960px) {
  html:has(main.ev) { overflow: hidden; }
  /* The card takes the right side, so the roster list steps aside; the bar's ROSTER keeps it. */
  .ev ~ .roster { display: none; }
}
/* Words dissolve into black as they scroll under the logo (phones, where the page scrolls). */
.ev::before {
  content: "";
  position: fixed;
  z-index: 25;
  top: 0; left: 0; right: 0;
  height: var(--top-r);
  background: linear-gradient(var(--ink) 80%, transparent);
  pointer-events: none;
}

/* ---------- the parties list on the left: the home's rows ---------- */

/* It starts where the home's list starts (5.75rem from the top) and scrolls by itself; its edges fade. */
.ev__parties {
  grid-column: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 1rem 0 3rem;
  -webkit-mask-image: linear-gradient(transparent, #000 1rem, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(transparent, #000 1rem, #000 calc(100% - 3rem), transparent);
}
.ev__parties::-webkit-scrollbar { display: none; }
.list { list-style: none; margin: 0; padding: 0; width: var(--list-w); }
.row {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  align-items: start;
  padding: 0 0 1.1rem;
}
.row__n { padding: 0.1rem 0 0 1.5rem; color: var(--cream-dim); opacity: var(--faint); font-variant-numeric: tabular-nums; }
.row__hit {
  display: block;
  width: 100%;
  color: var(--cream-dim);
  text-align: left;
  transform-origin: left center;
  transition: color 200ms var(--ease-out), transform var(--release);
}
.row__hit--link:active { transform: scale(0.97); transition: color 200ms var(--ease-out), transform var(--press); }
.row__name { display: block; font-size: 0.8125rem; line-height: 1.35; color: var(--cream); }
.row__arrow {
  display: inline-block;
  width: 0.62em; height: 0.62em;
  margin-left: 0.08em;
  vertical-align: 0.05em;
  opacity: 0;
  transform: translate(-0.12em, 0.12em);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
}
.row__meta { display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem; align-items: center; margin-top: 0.15rem; line-height: 1.5; }
.row__tag--next { background: var(--cream); color: var(--ink); padding: 0.05rem 0.45rem 0; }
.row--next .row__hit { color: var(--cream); }
.row--soon .row__name, .row--soon .row__n { opacity: 0.32; }
@media (hover: hover) {
  .row__hit--link:hover { color: var(--cream); }
  .row:has(.row__hit--link:hover) .row__n { opacity: 1; color: var(--cream); }
  .row__hit--link:hover .row__arrow { opacity: 1; transform: none; }
}
.row__hit--link:focus-visible { color: var(--cream); }
.row__hit--link:focus-visible .row__arrow { opacity: 1; transform: none; }
.row--next .row__arrow { opacity: 0.55; transform: none; }
/* This party: lit and underlined, the way the roster marks whose page it is. */
.row.is-lit .row__hit, .row.is-lit .row__n { color: var(--cream); opacity: 1; }
.row.is-lit .row__name { text-decoration: underline; text-underline-offset: 3px; }
.row.is-lit .row__arrow { opacity: 1; transform: none; }

/* ---------- the middle: every picture of the party, one per screen ---------- */

.ev__media { grid-column: 2; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 0 1.25rem; }
.ev__reel {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  /* Sideways, one picture per screen (Miguel, 15 Nov 2026: "i prefer horizontally"). */
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  container-type: size;
}
.ev__reel::-webkit-scrollbar { display: none; }
/* One picture, no counter: it keeps the counter's room so every party's picture is the same size. */
.ev__reel:only-child { margin-bottom: calc(44px + 0.4rem); }
.ev__reel:focus-visible { outline-offset: -2px; }
.ev__slot { flex: 0 0 100cqw; height: 100cqh; display: flex; align-items: flex-start; justify-content: center; scroll-snap-align: start; }
/* A flyer lines up with the card's top; a wide photo or the film sits centred top to bottom. */
.ev__slot--film, .ev__slot:has(> .ev__frame--photo) { align-items: center; }
/* A flyer fills a 4:5 frame, as tall as the room allows; a photo keeps its own shape. */
.ev__frame {
  display: block;
  width: min(100cqw, 80cqh);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  box-shadow: var(--frame-edge);
  transition: transform var(--release);
}
button.ev__frame:active { transform: scale(0.985); transition: transform var(--press); }
.ev__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ev__frame--photo { width: auto; aspect-ratio: auto; }
.ev__frame--photo .ev__img { width: auto; height: auto; max-width: 100cqw; max-height: 100cqh; filter: grayscale(1); transition: filter 200ms var(--ease-out); }
@media (hover: hover) { .ev__frame--photo:hover .ev__img { filter: none; } }
.ev__frame--photo:active .ev__img, .ev__frame--photo:focus-visible .ev__img { filter: none; }
.ev__slot--film > .video-embed { width: min(100cqw, calc(100cqh * 16 / 9)); }

/* Where you are in the pictures, and a step either way for anyone without a wheel. */
.ev__count { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin: 0.4rem 0 0; color: var(--cream-dim); font-variant-numeric: tabular-nums; }
.ev__step { width: 44px; height: 44px; display: grid; place-items: center; }
.ev__step--prev svg { transform: rotate(180deg); }
.ev__step:disabled { opacity: 0.25; pointer-events: none; }

/* ---------- the right: the party's card, the page's colour inside a line of the type's colour ---------- */
/* Miguel, 15 Nov 2026: not the inverse colour; cream with black type and a black line in the light
   look, black with cream type and a cream line in the dark one. */

.ev__card {
  grid-column: 3;
  align-self: start;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Thin, so a card taller than a small screen shows there is more. */
  scrollbar-width: thin;
  scrollbar-color: var(--rule-hi) transparent;
  margin-right: 1.5rem;
  padding: 1.5rem 1.4rem 1.2rem;
  border: 1px solid var(--cream);
  border-radius: 4px;
  background: var(--ink);
  color: var(--cream-dim);
}
/* A card taller than the screen fades at its foot while there is more below (Mac scrollbars hide). */
.ev__card::after {
  content: "";
  position: sticky;
  /* Down through the card's bottom padding, so the fade ends at the card's edge. */
  bottom: -1.2rem;
  display: block;
  height: 2.2rem;
  margin: -2.2rem -1.4rem 0;
  background: linear-gradient(transparent, var(--ink) 85%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.ev__card.is-more::after { opacity: 1; }
.ev__date { margin: 0; font-variant-numeric: tabular-nums; }
.ev__name { margin: 0.35rem 0 0; font: inherit; font-size: 1.0625rem; line-height: 1.3; letter-spacing: 0.08em; color: var(--cream); }
.ev__meta { display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem; margin: 0.55rem 0 0; line-height: 1.5; }
.ev__note { margin: 0.9rem 0 0; line-height: 1.6; }
.ev__tix { display: flex; flex-direction: column; align-items: flex-start; margin: 0.7rem 0 0; }
.ev__ticket { color: var(--cream); min-height: 44px; line-height: 44px; }
.ev__label { margin: 0 0 0.45rem; color: var(--cream-dim); opacity: var(--faint); }
.ev__lineup { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.ev__lineup ul { list-style: none; margin: 0; padding: 0; }
.ev__lineup li { font-size: 0.8125rem; line-height: 1.85; break-inside: avoid; }
.ev__lineup--two ul { columns: 2; column-gap: 1.2rem; }
/* A roster artist links to their page in full colour; a guest stays dim plain text. */
.ev__act { color: var(--cream); }
.ev__when { color: var(--cream-dim); opacity: var(--faint); font-variant-numeric: tabular-nums; margin-right: 0.35rem; }
/* Previous and next each on their own line, so a long name never breaks in two. */
.ev__pager { display: flex; flex-direction: column; margin-top: 1.2rem; padding-top: 0.4rem; border-top: 1px solid var(--rule); }
.ev__pager a { min-height: 44px; line-height: 44px; }
.ev__pager a:last-child { text-align: right; }
.ev__card .a-foot { margin: 0.2rem 0 0; padding: 0; }
.ev__card .a-foot__line { gap: 0 1rem; }

.ev__missing { grid-column: 2; grid-row: 1; justify-self: center; align-self: center; text-align: center; line-height: 2; }
.ev__missing p { margin: 0 0 1rem; }

/* ---------- phones and tablets: pictures swipe sideways, the card follows ---------- */

@media (max-width: 959px) {
  .ev {
    --pw: min(72vw, 22rem, calc((100svh - 12rem) * 0.8));
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding: calc(var(--top-r) + 0.6rem) 0 6.5rem;
  }
  .ev::before { background: var(--ink); }
  .ev__parties { display: none; }
  .ev__media { padding: 0; }
  .ev__reel {
    flex: none;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    /* Sideways stays in the reel; a thumb going down still scrolls the page (review of e6f1c01). */
    overscroll-behavior: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    container-type: normal;
    padding: 0 calc((100% - var(--pw)) / 2);
  }
  .ev__slot, .ev__slot--film, .ev__slot:has(> .ev__frame--photo) { flex: 0 0 var(--pw); height: auto; align-items: center; scroll-snap-align: center; }
  .ev__reel:only-child { margin-bottom: 0; }
  .ev__slot--film { flex-basis: min(88vw, 30rem); }
  .ev__slot--film > .video-embed { width: 100%; }
  .ev__frame, .ev__frame--photo { width: var(--pw); aspect-ratio: 4 / 5; }
  .ev__frame--photo .ev__img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }

  .ev__card { margin: 1.2rem 1rem 0; max-height: none; overflow: visible; padding: 1.4rem 1.25rem 1rem; }
  .ev__name { font-size: 0.9375rem; }
  .ev__lineup li { line-height: 44px; }
  .ev__lineup--two ul { columns: 1; }
  .ev__lineup li > a { display: inline-block; min-height: 44px; }
  .ev__card .a-foot { text-align: left; padding: 0; }
  .ev__card .a-foot__line { justify-content: flex-start; }

  .ev__missing { padding-top: 20vh; }
}

@media (prefers-reduced-motion: reduce) {
  button.ev__frame:active, .row__hit--link:active { transform: none; }
}

/* Test link only: the body already leaves room for the MODO PRUEBA bar and --top-r counts it, so
   the page takes the body's room back rather than counting the bar twice. */
.has-pb .ev { margin-top: calc(-1 * var(--pb)); }
