/**
 * The Keep (/the-keep) — templates/includes/the-keep.html.twig.
 * Same world as Miasma, different continent: a wall band set well apart from
 * the nav, with a show flyer for The Keep taped to it. Two riso inks on
 * paper; Alfa Slab One for the poster face, Archivo (variable width) for
 * everything else. Fonts are bundled (OFL) in fonts/the-keep/.
 */

@font-face {
  font-family: "Alfa Slab One";
  src: url(../fonts/the-keep/AlfaSlabOne-Regular.ttf) format("truetype");
  font-display: swap;
}
@font-face {
  font-family: Archivo;
  src: url(../fonts/the-keep/Archivo-wdth-wght.ttf) format("truetype");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* The flyer is the h1; drop the theme's title block, and keep the
   full-bleed wall from adding a sideways scroll. */
body.page-node-type-page .block-page-title-block { display: none; }
body:has(.keep) { overflow-x: clip; }

.keep {
  --keep-blue: #0078bf;
  --keep-pink: #ff48b0;
  --keep-paper: #fffefa;
  --keep-wall: #d5dadd;
  --keep-ink: #1d2a33;
  --keep-poster: "Alfa Slab One", Rockwell, "Courier New", serif;
  --keep-sans: Archivo, "Helvetica Neue", Arial, sans-serif;

  color: var(--keep-ink);
  font-family: var(--keep-sans);
  font-size: 1.125rem;
  line-height: 1.6;
}

[data-bs-theme="dark"] .keep {
  --keep-wall: #2b3238;
  --keep-ink: #e3e8eb;
}

/* ---------- the wall: full-bleed, well clear of the nav ---------- */
.keep .keep-wall {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(4rem, 10vw, 8rem) 1rem clamp(4.5rem, 10vw, 7.5rem);
  background: var(--keep-wall);
  overflow: hidden;
}

/* ---------- the flyer ---------- */
.keep .keep-flyer {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2.25rem, 6vw, 3.75rem) clamp(1.5rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 3.5rem);
  background: var(--keep-paper);
  color: var(--keep-blue);
  text-align: center;
  transform: rotate(-1.25deg);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .12), 0 18px 30px -18px rgba(0, 0, 0, .45);
}

/* Two pieces of tape at the top corners. */
.keep .keep-flyer::before,
.keep .keep-flyer::after {
  content: "";
  position: absolute;
  top: -.9rem;
  width: 7.5rem;
  height: 2.1rem;
  background: rgba(255, 255, 255, .55);
  border-left: 1px dashed rgba(0, 0, 0, .08);
  border-right: 1px dashed rgba(0, 0, 0, .08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.keep .keep-flyer::before { left: -1.75rem; transform: rotate(-32deg); }
.keep .keep-flyer::after { right: -1.75rem; transform: rotate(28deg); }

.keep .keep-tagline {
  margin: 0 0 1rem;
  font-family: var(--keep-sans);
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  letter-spacing: .01em;
}

/* The name: blue ink over a pink pass a touch out of register. */
.keep .keep-title {
  position: relative;
  z-index: 0;
  margin: 0;
  font-family: var(--keep-poster);
  font-weight: 400;
  font-size: clamp(4rem, 16vw, 9.5rem);
  line-height: .86;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--keep-blue);
}
.keep .keep-title::after {
  content: attr(data-print);
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translate(.05em, .04em);
  color: var(--keep-pink);
  pointer-events: none;
}

/* The photo, printed in blue over a misregistered pink block. */
.keep .keep-print {
  position: relative;
  margin: clamp(1.75rem, 5vw, 2.5rem) auto;
  isolation: isolate;
}
.keep .keep-print::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(.6rem, .5rem);
  background: var(--keep-pink);
  z-index: -1;
}
.keep .keep-print::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--keep-blue);
  mix-blend-mode: lighten;
}
.keep .keep-print img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.25) brightness(1.05);
  mix-blend-mode: multiply;
}

/* What's in it, billed like a lineup: headliner first. */
.keep .keep-bill {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--keep-sans);
  line-height: 1;
  text-transform: uppercase;
}
.keep .keep-bill li + li { margin-top: .45rem; }
.keep .keep-bill-1 {
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 6.25rem);
  letter-spacing: .01em;
}
.keep .keep-bill-2 {
  font-stretch: 70%;
  font-weight: 800;
  font-size: clamp(1.6rem, 6vw, 2.9rem);
  color: var(--keep-pink);
}
.keep .keep-bill-3 {
  font-stretch: 80%;
  font-weight: 700;
  font-size: clamp(1.05rem, 3.4vw, 1.45rem);
  line-height: 1.15;
}

.keep .keep-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
  padding-top: 1.25rem;
  border-top: 3px solid var(--keep-blue);
}
.keep .keep-details p {
  margin: 0;
  font-stretch: 85%;
  font-weight: 650;
  font-size: clamp(.85rem, 2.4vw, 1.05rem);
  line-height: 1.2;
}

/* The ask, as a ticket stub: one perforated edge. */
.keep .keep-ticket,
.keep .keep-body .btn {
  display: inline-block;
  margin-top: clamp(1.75rem, 5vw, 2.5rem);
  padding: .95rem 1.6rem .95rem 1.9rem;
  background: var(--keep-pink);
  color: var(--keep-paper);
  font-family: var(--keep-sans);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.1;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  border-left: 4px dotted var(--keep-paper);
  box-shadow: -4px 0 0 var(--keep-pink);
  transition: background-color .15s;
}
.keep .keep-ticket:hover,
.keep .keep-body .btn:hover {
  background: var(--keep-blue);
  box-shadow: -4px 0 0 var(--keep-blue);
  color: var(--keep-paper);
}
.keep .keep-ticket:focus-visible,
.keep .keep-body .btn:focus-visible {
  outline: 3px solid var(--keep-ink);
  outline-offset: 3px;
}

/* ---------- the page text below ---------- */
.keep .keep-body {
  max-width: 38rem;
  margin: clamp(4rem, 9vw, 6.5rem) auto clamp(4rem, 9vw, 6rem);
  padding: 0 .25rem;
}
.keep .keep-body .field { margin: 0; }
.keep .keep-body p,
.keep .keep-body li { font-stretch: 95%; }
.keep .keep-body p { margin: 0 0 1.15rem; }
.keep .keep-body h2 {
  margin: 3.5rem 0 1rem;
  font-family: var(--keep-poster);
  font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  line-height: 1.1;
  color: var(--keep-blue);
}
[data-bs-theme="dark"] .keep .keep-body h2 { color: #3fa6ea; }
.keep .keep-body ul { padding-left: 1.2rem; margin: 0 0 1.25rem; }
.keep .keep-body li { margin-bottom: .4rem; }
.keep .keep-body li::marker { color: var(--keep-pink); }
.keep .keep-body a:not(.btn) {
  color: inherit;
  text-decoration-color: var(--keep-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* The collection photos run wider than the text, one above the other. */
.keep .keep-body .mia-photos {
  display: grid;
  gap: 2.5rem;
  margin: 3.5rem 0;
}
@media (min-width: 992px) {
  .keep .keep-body .mia-photos { margin-left: -6rem; margin-right: -6rem; }
}
.keep .keep-body .mia-photos figure { margin: 0; }
.keep .keep-body .mia-photos img { display: block; width: 100%; height: auto; }
.keep .keep-body .mia-photos figcaption {
  margin-top: .6rem;
  font-stretch: 85%;
  font-size: .95rem;
  line-height: 1.4;
  opacity: .8;
}

@media (max-width: 575.98px) {
  .keep .keep-flyer { transform: rotate(-.75deg); }
  .keep .keep-details { grid-template-columns: 1fr; gap: .6rem; }
  .keep .keep-details br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .keep .keep-ticket, .keep .keep-body .btn { transition: none; }
}

/* ---------- the flyer wall (includes/the-keep-flyers.html.twig) ---------- */
.keep .keep-flyers {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(3.5rem, 8vw, 6rem) 1rem clamp(3.5rem, 8vw, 5.5rem);
  background: var(--keep-wall);
  border-top: 3px solid var(--keep-paper);
}
.keep .keep-flyers-inner { max-width: 76rem; margin: 0 auto; }
.keep .keep-flyers-title {
  margin: 0;
  font-family: var(--keep-poster);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  color: var(--keep-blue);
  text-shadow: .05em .04em 0 var(--keep-pink);
}
[data-bs-theme="dark"] .keep .keep-flyers-title { color: #3fa6ea; }
.keep .keep-flyers-note {
  max-width: 46rem;
  margin: 1.25rem auto 0;
  text-align: center;
  font-stretch: 90%;
  font-weight: 600;
  text-wrap: pretty;
}
.keep .keep-flyers-note p { margin: 0 0 .75rem; }
.keep .keep-flyers-note p + p { font-weight: 500; }
.keep .keep-flyers-note a {
  color: inherit;
  text-decoration-color: var(--keep-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.keep .keep-flyers-hint {
  margin: .5rem 0 clamp(2rem, 5vw, 3rem);
  text-align: center;
  font-stretch: 85%;
  font-size: .9rem;
  opacity: .7;
}

/* Masonry by columns; each flyer pinned a touch off-square. */
.keep .keep-flyers-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 10rem;
  column-gap: clamp(1rem, 3vw, 2rem);
}
@media (min-width: 768px) { .keep .keep-flyers-grid { columns: 3; } }
@media (min-width: 1200px) { .keep .keep-flyers-grid { columns: 4; } }
.keep .keep-flyers-grid li {
  break-inside: avoid;
  margin: 0 0 clamp(1rem, 3vw, 2rem);
}
.keep .keep-flyers-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  transform: rotate(var(--tilt, -.6deg));
  transition: transform .2s;
}
.keep .keep-flyers-grid li:nth-child(3n+2) .keep-flyers-thumb { --tilt: .7deg; }
.keep .keep-flyers-grid li:nth-child(3n) .keep-flyers-thumb { --tilt: -.25deg; }
.keep .keep-flyers-thumb:hover,
.keep .keep-flyers-thumb:focus-visible { transform: rotate(0) scale(1.03); }
.keep .keep-flyers-thumb:focus-visible { outline: 3px solid var(--keep-pink); outline-offset: 4px; }
/* drop-shadow, not box-shadow: some flyers are cut out with transparent edges. */
.keep .keep-flyers-thumb img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15)) drop-shadow(0 10px 14px rgba(0, 0, 0, .22));
}
/* A bookmark-sized piece: both sides at about real scale, centered. */
.keep .keep-flyers-thumb--small {
  display: flex;
  justify-content: center;
  gap: 8%;
  padding: 1rem 0;
}
.keep .keep-flyers-thumb--small img { width: 26%; }
.keep .keep-flyers-flip {
  position: absolute;
  right: -.35rem;
  bottom: .6rem;
  padding: .2rem .55rem;
  background: var(--keep-pink);
  color: var(--keep-paper);
  font-stretch: 75%;
  font-weight: 800;
  font-size: .75rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ---------- the full-screen viewer ---------- */
.keep-lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 18, 21, .96);
  color: #f2f4f5;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
}
.keep-lightbox::backdrop { background: rgba(14, 18, 21, .6); }
.keep-lightbox[open] { display: flex; }
.keep-lightbox-figure {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 3.5rem 4.25rem 1.5rem;
  min-height: 0;
}
.keep-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 11rem);
  width: auto;
  height: auto;
  object-fit: contain;
  min-height: 0;
}
.keep-lightbox-cap {
  max-width: 44rem;
  text-align: center;
  line-height: 1.35;
}
.keep-lightbox-title {
  display: block;
  font-stretch: 85%;
  font-weight: 750;
  font-size: 1.1rem;
}
.keep-lightbox-detail { display: block; font-stretch: 90%; font-size: .95rem; opacity: .8; }
.keep-lightbox-side {
  display: inline-block;
  margin-top: .4rem;
  color: #ff48b0;
  font-stretch: 75%;
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.keep-lightbox-side:empty { display: none; }
.keep-lightbox-btn {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.keep-lightbox-btn:hover { background: #ff48b0; }
.keep-lightbox-btn:focus-visible { outline: 3px solid #ff48b0; outline-offset: 2px; }
.keep-lightbox-prev, .keep-lightbox-next { top: calc(50% - 1.5rem); }
.keep-lightbox-prev { left: .75rem; }
.keep-lightbox-next { right: .75rem; }
.keep-lightbox-close { top: .75rem; right: .75rem; font-size: 2rem; }

@media (max-width: 575.98px) {
  .keep-lightbox-figure { padding: 4rem .75rem 5rem; }
  .keep-lightbox-img { max-height: calc(100dvh - 15rem); }
  .keep-lightbox-prev, .keep-lightbox-next { top: auto; bottom: 1rem; }
  .keep-lightbox-prev { left: calc(50% - 4rem); }
  .keep-lightbox-next { right: calc(50% - 4rem); }
}

@media (prefers-reduced-motion: reduce) {
  .keep .keep-flyers-thumb { transition: none; }
}
