/* Duck Duck Jeep Perú — cartel chicha. See DESIGN.md for the system. */

@font-face {
  font-family: "Shrikhand";
  src: url("/fonts/shrikhand-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Chau Philomene One";
  src: url("/fonts/chau-philomene-one-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Poster stock and the four fluorescent inks. Off-white is the one other
     colour, kept for running text on black. */
  --stock: #0b0b0b;
  --yellow: #fff200;
  --pink: #ff2d95;
  --green: #39ff14;
  --orange: #ff6a00;
  --white: #fbf8ea;

  --display: "Shrikhand", "Cooper Black", Georgia, serif;
  --caps: "Chau Philomene One", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --sheet-pad: clamp(4rem, 11vw, 8.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--stock);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--pink) var(--stock);
}

body {
  margin: 0;
  background: var(--stock);
  color: var(--white);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--pink);
  color: var(--stock);
}

p,
h1,
h2,
h3,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.09em;
}
:focus-visible {
  outline: 3px solid var(--focus, var(--green));
  outline-offset: 4px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The language switch works with no script: the checked radio decides. */
html:not(:has(#l-en:checked)) body [lang="en"],
html:has(#l-en:checked) body [lang="es"] {
  display: none;
}

/* ---------- Sheets: one poster after another along the wall ---------- */

.inkbar {
  height: 10px;
  background: linear-gradient(
    90deg,
    var(--yellow) 0 25%,
    var(--pink) 25% 50%,
    var(--green) 50% 75%,
    var(--orange) 75%
  );
}

.sheet {
  --ground: var(--stock);
  --ink: var(--white);
  --second: var(--pink);
  background: var(--ground);
  color: var(--ink);
  padding-block: var(--sheet-pad);
}
.sheet--yellow {
  --ground: var(--yellow);
  --ink: var(--stock);
  --second: var(--pink);
  --focus: var(--stock);
}
.sheet--pink {
  --ground: var(--pink);
  --ink: var(--stock);
  --second: var(--yellow);
  --focus: var(--stock);
}
.sheet--green {
  --ground: var(--green);
  --ink: var(--stock);
  --second: var(--pink);
  --focus: var(--stock);
}
.sheet--yellow ::selection,
.sheet--pink ::selection,
.sheet--green ::selection {
  background: var(--stock);
  color: var(--ground);
}

.wrap {
  width: min(100%, 76rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Lettering ---------- */

.title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 1.4rem + 6.4vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
  padding-inline-end: 0.12em;
  /* flat ink sheets: black lettering, the second ink off-register behind it */
  color: var(--ink);
  filter: drop-shadow(0.05em 0.05em 0 var(--second));
}
.sheet--black .title {
  /* black sheets: the iris fill, a keyline, then the second ink */
  color: var(--yellow);
  padding-inline-end: 0;
  margin-inline-start: -0.06em;
  filter: drop-shadow(0.028em 0.028em 0 var(--stock)) drop-shadow(0.045em 0.045em 0 var(--second));
}
.sheet--black .title span {
  /* the iris is pulled per line, as on the lockup: every line fragment
     carries its own yellow-to-orange fade */
  background: linear-gradient(var(--yellow) 30%, var(--orange) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: transparent;
  padding-inline: 0.06em 0.12em;
}
@media (forced-colors: active) {
  .title,
  .quote {
    filter: none;
  }
  .sheet--black .title span {
    background: none;
    color: CanvasText;
  }
}

.lead {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  line-height: 1.35;
  font-weight: 500;
  max-width: 30ch;
  text-wrap: pretty;
}

.prose {
  max-width: 62ch;
}
.prose p + p {
  margin-top: 1em;
}

/* Chau Philomene draws its @ like a C; the handle borrows the body face for it. */
.at {
  font-family: var(--body);
  font-style: normal;
  font-weight: 700;
  font-size: 0.8em;
  margin-inline-end: 0.03em;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(1rem, 3vw, 1.75rem) var(--sheet-pad);
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.handle {
  font-family: var(--caps);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--yellow);
  padding-block: 0.6rem;
}
.handle:hover {
  text-decoration: underline;
}

.lang {
  display: flex;
  margin: 0;
  padding: 0;
  border: 2px solid var(--white);
}
.lang input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lang label {
  font-family: var(--caps);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  min-width: 3rem;
  padding: 0.5rem 0.75rem;
  text-align: center;
  cursor: pointer;
  color: var(--white);
  transition:
    background-color 0.18s var(--ease),
    color 0.18s var(--ease);
}
.lang label:hover {
  background: color-mix(in srgb, var(--white) 16%, transparent);
}
.lang input:checked + label {
  background: var(--green);
  color: var(--stock);
}
.lang input:focus-visible + label {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

.hero-grid {
  display: grid;
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}

.lockup {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--display);
}
.lockup text {
  paint-order: stroke fill;
  stroke-linejoin: round;
}
.lockup .first {
  stroke: var(--stock);
}
.line--1 text {
  font-size: 150px;
}
.line--1 .first {
  fill: url(#iris-sun);
  stroke-width: 11px;
}
.line--1 .second {
  fill: var(--pink);
  stroke: var(--pink);
  stroke-width: 22px;
  --off: 10px;
}
.line--2 text {
  font-size: 345px;
}
.line--2 .first {
  fill: url(#iris-hot);
  stroke-width: 16px;
}
.line--2 .second {
  fill: var(--green);
  stroke: var(--green);
  stroke-width: 30px;
  --off: 16px;
}
.line--3 text {
  font-size: 176px;
}
.line--3 .first {
  fill: var(--green);
  stroke-width: 12px;
}
.line--3 .second {
  fill: var(--yellow);
  stroke: var(--yellow);
  stroke-width: 24px;
  --off: 11px;
}

/* The second ink of every line sits off-register; on load it slides out from
   under the first. The resting state is the printed one, so nothing depends
   on the animation running. */
.lockup .second {
  transform: translate(var(--off), var(--off));
}

.burst-star {
  fill: var(--green);
  stroke: var(--stock);
  stroke-width: 6px;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
}
.lockup .burst-text {
  font-family: var(--caps);
  font-style: italic;
  font-size: 34px;
  letter-spacing: 0.02em;
  text-anchor: middle;
  fill: var(--stock);
}

.duck {
  cursor: pointer;
}
.duck-body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.duck-second {
  fill: var(--pink);
  stroke: var(--pink);
  stroke-width: 16px;
  stroke-linejoin: round;
}
.duck-key {
  fill: var(--stock);
  stroke: var(--stock);
  stroke-width: 12px;
  stroke-linejoin: round;
}
.duck-yellow {
  fill: var(--yellow);
}
.duck-beak {
  fill: var(--orange);
  stroke: var(--stock);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.duck-line {
  fill: none;
  stroke: var(--stock);
  stroke-width: 5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.duck-eye {
  fill: var(--stock);
}
.duck-glint {
  fill: var(--white);
}
.duck.is-squeaked .duck-body {
  animation: squeak 0.5s var(--ease);
}

.hero-copy {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}
.shout {
  font-family: var(--caps);
  font-style: italic;
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.4rem);
  /* room for the acute of PERÚ over the line above it */
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--green);
  text-wrap: balance;
}
.shout--pink {
  color: var(--pink);
}
.aside {
  font-size: 1rem;
}
.aside a {
  display: inline-block;
  padding-block: 0.6rem;
}
.aside a:hover {
  color: var(--yellow);
}

/* The slab: where a poster prints the date and the venue. */
.slab {
  --slab-second: var(--pink);
  --slab-hover: var(--green);
  /* printed like the lettering: block, keyline, second ink off-register,
     the offset cut to the size of the handle */
  --key: 0.09em;
  --off: 0.26em;
  display: inline-grid;
  gap: 0.1rem;
  padding: 0.85rem 1.4rem 0.95rem;
  margin: 0 var(--off) var(--off) 0;
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem);
  background: var(--yellow);
  color: var(--stock);
  text-decoration: none;
  box-shadow:
    0 0 0 var(--key) var(--stock),
    var(--off) var(--off) 0 var(--key) var(--slab-second);
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
.slab:hover {
  box-shadow:
    0 0 0 var(--key) var(--stock),
    var(--off) var(--off) 0 var(--key) var(--slab-hover);
}
.slab:active {
  /* pressed into register */
  transform: translate(var(--off), var(--off));
  box-shadow:
    0 0 0 var(--key) var(--stock),
    0 0 0 var(--key) var(--slab-second);
}
.slab-small {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.slab-big {
  font-family: var(--caps);
  font-style: italic;
  font-size: 1em;
  line-height: 1;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.slab--onink {
  --slab-hover: var(--yellow);
  /* the block is already stock: no keyline to print around it */
  --key: 0px;
  background: var(--stock);
  color: var(--yellow);
}

/* ---------- You got ducked: the program ---------- */

.split {
  display: grid;
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}
.split > .title {
  grid-column: 1 / -1;
}

.program {
  border-top: 4px solid var(--ink);
}
.program li {
  padding-block: 1.05rem 1.15rem;
  border-bottom: 4px solid var(--ink);
  max-width: none;
}
.program strong {
  display: block;
  font-family: var(--caps);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 0.2rem;
}

/* ---------- How to duck: the lineup ---------- */

.lineup {
  margin-top: clamp(2.25rem, 6vw, 4rem);
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.6rem);
}
.lineup h3 {
  font-family: var(--caps);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.5rem, 1.3rem + 6vw, 5.25rem);
  /* no tail of one line may land on the caps of the next */
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--act);
  text-shadow:
    0.03em 0.03em 0 var(--stock),
    0.065em 0.065em 0 var(--act2);
  text-wrap: balance;
}
.lineup p {
  margin-top: 0.45rem;
  max-width: 34ch;
  font-size: 1.12em;
  line-height: 1.4;
}
.lineup li:nth-child(1) {
  --act: var(--yellow);
  --act2: var(--pink);
}
.lineup li:nth-child(2) {
  --act: var(--pink);
  --act2: var(--yellow);
}
.lineup li:nth-child(3) {
  --act: var(--green);
  --act2: var(--pink);
}
.lineup li:nth-child(4) {
  --act: var(--orange);
  --act2: var(--yellow);
}

/* ---------- The tradition ---------- */

.dateline {
  margin-top: 1.5rem;
  font-family: var(--caps);
  font-style: italic;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  max-width: 22ch;
}
.quote {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-family: var(--display);
  font-size: clamp(3.4rem, 1.5rem + 9vw, 6rem);
  line-height: 0.95;
  color: var(--yellow);
  padding-inline-end: 0.12em;
  filter: drop-shadow(0.03em 0.03em 0 var(--stock)) drop-shadow(0.05em 0.05em 0 var(--stock));
  transform: rotate(-4deg);
  transform-origin: left center;
}
.quote::before {
  content: "«";
}
.quote::after {
  content: "»";
}
.split--origin .prose {
  font-weight: 500;
}

/* ---------- Story ---------- */

.story-grid {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.story .prose {
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem);
  line-height: 1.45;
  max-width: 34em;
}

/* ---------- Closing ---------- */

.closing {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.closing-copy {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}
.closing .lead {
  max-width: 26ch;
}
.closing .slab {
  margin-top: 0.5rem;
  font-size: clamp(1.8rem, 1.1rem + 3.4vw, 3.25rem);
  padding: 1rem 1.6rem 1.15rem;
}
.closing-duck {
  display: block;
  width: min(68%, 24rem);
  height: auto;
  justify-self: end;
  overflow: visible;
  transform: rotate(-5deg);
}
.tags {
  font-family: var(--caps);
  font-style: italic;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.foot {
  padding-block: 2.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--white) 78%, var(--stock));
}
.foot p {
  max-width: 68ch;
}
.foot .imprint {
  font-family: var(--caps);
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.6rem;
}

/* ---------- Wider sheets ---------- */

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  }
  .lockup {
    max-height: calc(100svh - 11rem);
    justify-self: start;
  }
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .lineup li {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: 3rem;
    align-items: last baseline;
  }
  .lineup p {
    margin-top: 0;
  }
  .split--origin {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
  .split--origin .prose {
    padding-top: 0.75rem;
  }
  .story-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .closing {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
  .closing-duck {
    width: 100%;
  }
}

/* ---------- Motion: the print pass ---------- */

@keyframes register {
  from {
    transform: translate(0, 0);
  }
}
@keyframes stamp {
  from {
    transform: scale(1.5) rotate(18deg);
    opacity: 0;
  }
}
@keyframes squeak {
  0% {
    transform: scale(1, 1);
  }
  30% {
    transform: scale(1.12, 0.78);
  }
  60% {
    transform: scale(0.96, 1.06);
  }
  100% {
    transform: scale(1, 1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .lockup .second {
    animation: register 0.9s var(--ease) backwards;
  }
  .line--1 .second {
    animation-delay: 0.15s;
  }
  .line--2 .second {
    animation-delay: 0.3s;
  }
  .line--3 .second {
    animation-delay: 0.45s;
  }
  .burst {
    animation: stamp 0.5s var(--ease) 0.75s backwards;
    transform-box: fill-box;
    transform-origin: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .slab,
  .lang label {
    transition: none;
  }
  .duck.is-squeaked .duck-body {
    animation: none;
  }
}

.lost {
  min-height: 100svh;
}
.lost .prose {
  margin-top: 2rem;
}
