/* design.pileupdigital.com : the exhibition poster.
   Bodoni for the wall, Bricolage for the labels, one red pulled off the cardinal's robe. */

:root {
  --paper: #f3f0e9;
  --ink: #14110f;
  --ink-2: #4a443d;
  --ink-3: #8b857c;
  --line: #d8d2c6;
  --red: #d8402a;
  --ghost: #fcfbf8;
  --display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --ui: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(18px, 4vw, 64px);
  --bar: clamp(58px, calc(4.8vw + 26px), 86px);
  --big: min(12.4vw, 232px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-variation-settings: "opsz" 14, "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; }

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 6;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px; height: var(--bar);
  padding: 0 var(--pad);
}
.mark { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.mark span {
  font-weight: 700; font-size: 15px; letter-spacing: 0.01em;
  font-variation-settings: "opsz" 96, "wdth" 105, "wght" 700;
}
.mark .pile { width: 26px; height: auto; }
.gallery {
  margin: 0; justify-self: center;
  font-family: var(--display); font-size: clamp(15px, 1.5vw, 21px);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}
.gallery em { font-style: italic; text-transform: none; letter-spacing: 0.01em; }
.topline {
  justify-self: end;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.topline:hover { color: var(--red); }

/* ---------- the poster ---------- */
.poster {
  position: relative;
  min-height: calc(100svh - var(--bar));
  padding: 0 var(--pad) clamp(28px, 5vh, 56px);
}
.grain {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* statue */
.statue { margin: 0; }
.statue img {
  position: absolute; z-index: 1; left: 50%; top: 0; bottom: 0; transform: translateX(-44%);
  height: 100%; width: auto; max-width: none; object-fit: contain; object-position: bottom center;
  filter: contrast(1.04) saturate(0);
}
.statue figcaption {
  position: absolute; z-index: 4; left: var(--pad); bottom: 7%;
  width: min(22ch, 19vw);
  font-size: 11px; line-height: 1.5; color: var(--ink-3);
  font-family: var(--display);
}
.statue figcaption em { font-style: italic; }

/* headline */
.lede { position: absolute; inset: 0; margin: 0; z-index: 3; pointer-events: none; }
.lede .row {
  position: absolute; display: block;
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  text-transform: uppercase;
  line-height: 0.8;
  letter-spacing: -0.012em;
  color: var(--red);
  white-space: nowrap;
}
.lede .stack { position: absolute; top: 2%; left: var(--pad); display: block; }
.lede .stack .row { position: static; display: block; line-height: 0.82; }
.lede .a, .lede .b { font-size: min(9.4vw, 172px); }
.lede .c { bottom: 4%;  left: 23%; font-size: var(--big); }
.lede .ghost {
  top: 45%; left: 27%;
  font-size: var(--big);
  color: var(--ghost);
  z-index: 2;
}
.lede .cursive {
  position: absolute; right: var(--pad); bottom: calc(4% + var(--big) * 0.97);
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(22px, 3.4vw, 62px);
  color: var(--ink);
  line-height: 1;
  transform: rotate(-3deg);
  transform-origin: right bottom;
}

/* wall text */
.wall-text {
  position: absolute; z-index: 4; right: var(--pad); top: 8%;
  width: min(28ch, 30vw);
}
.crest { width: 74px; height: auto; margin: 0 0 14px auto; color: var(--ink-3); opacity: 0.5; }
.wall-text p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(12px, 0.92vw, 15px);
  line-height: 1.62;
  text-align: justify;
  hyphens: auto;
  color: var(--ink-2);
}

/* on view / admission */
.facts {
  position: absolute; z-index: 4; right: var(--pad); top: 45%;
  width: min(28ch, 30vw);
  margin: 0;
}
.facts > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.facts > div:first-child { border-top: 1px solid var(--line); }
.facts dt, .facts dd {
  margin: 0; font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.facts dd { color: var(--red); }

/* ticket */
.stub {
  position: absolute; z-index: 4; left: var(--pad); bottom: 27%;
  width: clamp(150px, 15vw, 218px);
  background: #0d0b0a; color: var(--paper);
  padding: 14px 14px 15px;
  border-radius: 3px;
  transition: transform 0.18s ease;
}
.stub:hover { transform: translateY(-4px) rotate(-1deg); }
.stub-cta {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.perf {
  display: block; height: 1px; margin: 14px -14px 0;
  background-image: radial-gradient(circle, var(--paper) 1px, transparent 1.2px);
  background-size: 7px 1px; background-repeat: repeat-x; opacity: 0.85;
}
.frame { display: block; }
.frame img { width: 100%; height: auto; }
.stub-cta { text-align: center; padding-top: 13px; color: #fff; }
.stub:hover .stub-cta { color: var(--red); }

/* ---------- wall labels ---------- */
.labels { border-top: 1px solid var(--line); padding: clamp(32px, 6vw, 84px) var(--pad); position: relative; z-index: 6; }
.labels-inner { display: grid; gap: clamp(24px, 4vw, 56px); }
@media (min-width: 860px) { .labels-inner { grid-template-columns: repeat(3, 1fr); } }
.label { max-width: 40ch; }
.label p { margin: 0; }
.artist { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.title { font-family: var(--display); font-size: clamp(20px, 2vw, 28px); margin-top: 4px !important; }
.title em { font-style: italic; }
.medium { margin-top: 8px !important; font-size: 13px; color: var(--ink-3); letter-spacing: 0.02em; }
.note {
  margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--display); font-size: 14px; line-height: 1.6; color: var(--ink-2);
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 22px var(--pad) 34px;
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
  font-size: 13px; color: var(--ink-3);
  position: relative; z-index: 6;
}
.foot p { margin: 0; }
.foot a:hover { color: var(--red); }

/* ---------- narrow ---------- */
@media (max-width: 1023px) {
  .poster { min-height: 0; padding-bottom: clamp(32px, 6vh, 64px); display: flex; flex-direction: column; }
  .gallery { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .lede { position: static; order: 1; display: block; margin-top: 2vh; }
  .lede .row, .lede .stack { position: static; white-space: normal; display: block; }
  .lede .a, .lede .b { font-size: 15vw; }
  .lede .c { font-size: 15vw; }
  .lede .ghost { font-size: 15vw; color: #c3bbac; }
  .lede .cursive {
    position: static; display: inline-block; margin-top: 10px; transform: rotate(-2deg);
    font-size: clamp(20px, 6vw, 38px);
  }
  .statue { position: static; order: 2; margin: -1vh calc(var(--pad) * -0.6) 0 auto; width: 80%; }
  .statue img { position: static; transform: none; width: 100%; height: auto; }
  .statue figcaption { position: static; width: auto; max-width: 26ch; text-align: right; margin: 8px 0 0 auto; }
  .wall-text { position: static; order: 3; width: auto; max-width: 52ch; margin-top: 26px; }
  .crest { margin: 0 0 12px; }
  .wall-text p { font-size: 15px; text-align: left; }
  .facts { position: static; order: 4; width: auto; max-width: 52ch; margin-top: 26px; }
  .stub { position: static; order: 5; margin-top: 26px; width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .stub, .stub:hover { transition: none; transform: none; }
}

/* ---------- the pile mark assembles itself ---------- */
.pile { overflow: visible; }
.pile .sheet, .pile .top {
  transform-box: fill-box; transform-origin: 50% 100%;
  opacity: 0; animation-fill-mode: both;
  animation-timing-function: cubic-bezier(.22, .9, .3, 1.12);
}
.pile .sheet { animation-name: land; animation-duration: .42s; }
.pile .s3 { animation-delay: .05s; }
.pile .s2 { animation-delay: .19s; }
.pile .s1 { animation-delay: .33s; }
.pile .top { animation-name: drop; animation-duration: .6s; animation-delay: .58s; transform-origin: 10% 100%; }
@keyframes land {
  from { opacity: 0; transform: translateY(-34px); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes drop {
  0%   { opacity: 0; transform: translateY(-70px) rotate(-6deg); }
  55%  { opacity: 1; transform: translateY(4px) rotate(.8deg); }
  78%  { transform: translateY(-2px) rotate(-.3deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pile .sheet, .pile .top { animation: none; opacity: 1; }
}
