/* MISPRINT: everything is printed. Four spot inks (pink, yellow, blue, black) multiplied onto warm
   paper, halftone dots, a little grain and a little misregistration. No gradients, no glass. */

@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(/fonts/space-mono-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #F3EDE2;
  --paper-2: #EAE2D3;
  --pink: #FF48B0;
  --yellow: #FFE800;
  --blue: #62A8E5;
  --ink: #24232B;
  --orange: #FF4100;
  --green: #629900;
  --violet: #622F9E;
  --muted: #5d5a66;
  --rule: #24232b33;
  --display: "Archivo Black", Impact, "Arial Black", sans-serif;
  --body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --shadow: 7px 7px 0 var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--body);
  /* paper tooth: a faint key-ink dot screen */
  background-image: radial-gradient(circle at 1px 1px, #24232b12 1px, transparent 1.3px);
  background-size: 7px 7px;
  overflow-x: hidden;
}
/* grain over everything, like toner on uncoated stock */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .22; mix-blend-mode: multiply;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .14 0 0 0 0 .13 0 0 0 0 .17 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--ink); text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
p { margin: 0 0 .8em; }
code { font: 700 .85em/1 var(--mono); background: #ffe80066; padding: .1em .3em; border-radius: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: max(16px, 4vw); }
.label { font: 700 12px/1.3 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.label--pink { color: var(--pink); }
.display { font: 400 clamp(30px, 5vw, 56px)/1.02 var(--display); letter-spacing: .01em; margin: 0 0 .35em; text-wrap: balance; }
.display--m { font-size: clamp(24px, 3.4vw, 36px); }
.lede { font-size: clamp(19px, 2.2vw, 23px); max-width: 52ch; }
.mono-wrap { font: 700 13px/1.5 var(--mono); word-break: break-all; }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── logo: black key word, pink and blue plates off register ───────── */
.logo { position: relative; display: inline-block; margin: 0; font: 400 clamp(64px, 15vw, 176px)/.88 var(--display); letter-spacing: .03em; text-decoration: none; color: var(--ink); }
.logo__word { position: relative; display: inline-block; mix-blend-mode: multiply; }
.logo__word::before, .logo__word::after { content: attr(data-word); position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none; }
.logo__word::before { color: var(--pink); transform: translate(-.04em, -.018em); animation: drift-p 7s ease-in-out infinite; }
.logo__word::after { color: var(--blue); transform: translate(.034em, .014em); animation: drift-b 9s ease-in-out infinite; }
.logo--small { font-size: 30px; }
@keyframes drift-p { 50% { transform: translate(-.05em, -.008em); } }
@keyframes drift-b { 50% { transform: translate(.026em, .022em); } }

/* ───────── header bar ───────── */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px max(16px, 4vw); border-bottom: 3px solid var(--ink); background: var(--paper); position: relative; z-index: 5; }
.bar nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.bar nav a { font: 700 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.bar nav a:hover { color: var(--pink); }
/* Discord mark, printed in ink with a pink plate slipped off register (like the logo).
   Last in the bar; on phones it stays on the logo's row and the nav wraps below. */
.bar nav { margin-left: auto; }
.bar__discord { display: inline-flex; padding: 4px; margin: -4px -4px -4px 0; color: var(--ink); }
.bar__discord svg { width: 28px; height: 22px; filter: drop-shadow(2px 1.5px 0 var(--pink)); transition: transform .12s; }
.bar__discord:hover svg { filter: drop-shadow(-2px 1.5px 0 var(--blue)) drop-shadow(2px -1px 0 var(--pink)); transform: rotate(-4deg); }
@media (max-width: 720px) { .bar nav { order: 3; width: 100%; margin-left: 0; } .bar__discord { margin-left: auto; } }

/* ───────── rubber stamp ───────── */
.stamp {
  display: inline-grid; justify-items: center; gap: 4px; padding: 12px 22px 10px; cursor: pointer;
  color: var(--pink); background: var(--paper); text-decoration: none;
  border: 4px solid var(--pink); border-radius: 10px; outline: 2px solid var(--ink); outline-offset: 5px;
  box-shadow: 10px 10px 0 -2px var(--paper), 10px 10px 0 0 var(--ink);
  transform: rotate(-2.2deg); transition: transform .12s ease, box-shadow .12s ease;
  font: inherit;
}
.stamp:hover { transform: rotate(-1deg) translate(-2px, -2px); box-shadow: 13px 13px 0 -2px var(--paper), 13px 13px 0 0 var(--ink); }
.stamp:active { transform: rotate(-2.2deg) translate(4px, 4px); box-shadow: 4px 4px 0 -2px var(--paper), 4px 4px 0 0 var(--ink); }
.stamp__big { font: 400 clamp(20px, 2.6vw, 30px)/1 var(--display); letter-spacing: .02em; white-space: nowrap; }
.stamp__small { font: 700 12px/1.2 var(--mono); letter-spacing: .16em; color: var(--ink); text-transform: uppercase; }
.stamp--big .stamp__big { font-size: clamp(30px, 5vw, 50px); }
.stamp[disabled] { opacity: .5; cursor: progress; }

/* ───────── paper slips ───────── */
.slip { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 4px; box-shadow: var(--shadow); padding: clamp(18px, 3vw, 34px); position: relative; }
.slip--warn { border-color: var(--orange); box-shadow: 6px 6px 0 var(--orange); }
.slip--ok { border-color: var(--green); box-shadow: 6px 6px 0 var(--green); }
.slip > :last-child { margin-bottom: 0; }

/* ───────── hero ───────── */
.hero { position: relative; padding-block: clamp(36px, 6vw, 80px) clamp(48px, 7vw, 100px); }
.hero .wrap { max-width: 1320px; }
.hero__grid { display: grid; gap: clamp(28px, 4vw, 48px); position: relative; z-index: 1; }
/* headline left, pitch + stamp right; the trailer gets the full width underneath */
.hero__copy { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px clamp(28px, 5vw, 72px); align-items: end; }
.hero__title { display: grid; gap: 18px; justify-items: start; container-type: inline-size; min-width: 0; }
/* the word is ~5.8 em wide: size it to its column, not the viewport */
.hero__title .logo { font-size: min(176px, 16cqi); }
.hero__title .lede { font-weight: 600; margin: 0; }
.hero__pitch { display: grid; gap: 22px; justify-items: start; }
.hero__pitch p { margin: 0; }
@media (max-width: 860px) { .hero__copy { grid-template-columns: 1fr; } }
.hero__film { transform: rotate(.5deg); padding: clamp(6px, 1vw, 12px); margin: 0; }
.hero__film figcaption { font: 700 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 2px 0; display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 860px) { .hero__film { transform: none; } }
.film { position: relative; container-type: inline-size; border: 2px solid var(--ink); background: var(--paper-2); }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* end card: a printed slip over the last frame, with the call to action */
.endcard {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: clamp(6px, 2cqi, 22px);
  padding: 4cqi; text-align: center; background-color: var(--paper);
  background-image: radial-gradient(circle, #ff48b02e 40%, transparent 44%); background-size: 9px 9px;
  animation: endcard-in .35s cubic-bezier(.2, 1.4, .4, 1);
}
.endcard[hidden] { display: none; }
.endcard .label { font-size: clamp(9px, 1.4cqi, 14px); }
.endcard__line { margin: 0; font: 400 clamp(22px, 7.4cqi, 92px)/.95 var(--display); letter-spacing: .02em; }
.endcard__line .logo__word::before { color: var(--pink); }
.endcard__sub { margin: 0; font-weight: 600; font-size: clamp(13px, 2.1cqi, 24px); }
.endcard .stamp { margin-top: clamp(2px, 1cqi, 12px); }
.endcard .stamp__big { font-size: clamp(16px, 4cqi, 48px); }
.endcard .stamp__small { font-size: clamp(9px, 1.3cqi, 13px); }
.replay { font: 700 clamp(10px, 1.3cqi, 13px)/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; text-decoration: underline 2px var(--blue); text-underline-offset: 4px; }
.replay:hover { color: var(--pink); }
@keyframes endcard-in { from { opacity: 0; transform: scale(1.04); } }
@media (max-width: 520px) { .endcard__sub, .endcard .label { display: none; } }

/* translucent ink shapes overprinting behind the hero, the way stencils stack in the game */
.inks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.inks i { position: absolute; display: block; mix-blend-mode: multiply; opacity: .55; background-size: 6px 6px; }
.inks .p { background-image: radial-gradient(circle, var(--pink) 46%, transparent 50%); }
.inks .y { background-image: radial-gradient(circle, var(--yellow) 52%, transparent 56%); opacity: .8; }
.inks .b { background-image: radial-gradient(circle, var(--blue) 46%, transparent 50%); }
.inks .s1 { width: 220px; height: 150px; right: -40px; top: 30px; transform: rotate(8deg); }
.inks .s2 { width: 170px; height: 230px; right: 90px; top: -40px; transform: rotate(-6deg); }
.inks .s3 { width: 260px; height: 90px; left: -60px; bottom: 30px; transform: rotate(-4deg); }
.inks .s4 { width: 120px; height: 120px; left: 120px; bottom: -30px; transform: rotate(12deg); }

/* ───────── sections ───────── */
.section { padding-block: clamp(48px, 7vw, 96px); border-top: 3px solid var(--ink); position: relative; }
.section__head { display: grid; gap: 10px; margin-bottom: clamp(26px, 4vw, 44px); max-width: 760px; }
.section--blue { background-color: #62a8e526; }
.section--pink { background-color: #ff48b01a; }

.beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); counter-reset: beat; }
@media (max-width: 860px) { .beats { grid-template-columns: 1fr; max-width: 560px; } }
.beat { display: grid; gap: 14px; align-content: start; }
.beat:nth-child(2) { transform: translateY(26px); }
.beat:nth-child(3) { transform: translateY(52px); }
@media (max-width: 860px) { .beat:nth-child(n) { transform: none; } }
.beat .slip { padding: 8px; }
.beat video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--paper-2); }
.beat h3 { font: 400 26px/1.05 var(--display); margin: 0; display: flex; gap: 12px; align-items: baseline; }
.beat h3::before { counter-increment: beat; content: "0" counter(beat); font: 700 14px/1 var(--mono); color: var(--pink); letter-spacing: .1em; }
.beat p { margin: 0; }
.beat:nth-child(1) .slip { box-shadow: 7px 7px 0 var(--pink); }
.beat:nth-child(2) .slip { box-shadow: 7px 7px 0 var(--blue); }
.beat:nth-child(3) .slip { box-shadow: 7px 7px 0 var(--ink); }

.frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 700px) { .frames { grid-template-columns: 1fr; } }
.frame { margin: 0; display: grid; gap: 10px; }
.frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 2.5px solid var(--ink); box-shadow: var(--shadow); background: var(--paper-2); }
.frame:nth-child(odd) img { transform: rotate(-.6deg); }
.frame:nth-child(even) img { transform: rotate(.5deg); }
.frame figcaption { display: grid; gap: 2px; }
.frame figcaption b { font: 400 20px/1.15 var(--display); }

.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 4vw, 44px); padding: 0; list-style: none; }
.facts li { font: 700 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 999px; padding: 9px 13px 8px; background: var(--paper); }
.facts li:nth-child(4n+1) { background: #ff48b033; }
.facts li:nth-child(4n+2) { background: #ffe80073; }
.facts li:nth-child(4n+3) { background: #62a8e54d; }

/* ───────── invite ───────── */
.invite { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .invite { grid-template-columns: 1fr; } }
.invite__about ul { padding-left: 1.1em; margin: 0 0 1em; }
.invite__about li { margin-bottom: .4em; }
.invite__about li::marker { color: var(--pink); }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field input, .field textarea, .form textarea, .form input:not([type]) {
  font: 400 17px/1.4 var(--body); color: var(--ink); background: #fffdf8; width: 100%;
  border: 2px solid var(--ink); border-radius: 4px; padding: 11px 12px;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pink); }
.form .stamp { justify-self: start; margin-top: 6px; }
.form__msg { font-weight: 600; min-height: 1.5em; margin: 0; }
.form__msg.err { color: #c4006f; }
.ts { min-height: 65px; }
.done { display: none; }
.form.is-done { display: none; }
.form.is-done + .done { display: block; }

/* ───────── footer ───────── */
.foot { border-top: 3px solid var(--ink); padding: 28px max(16px, 4vw) 40px; font: 700 13px/1.6 var(--mono); color: var(--muted); }
.foot .wrap { padding: 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot p { margin: 0; }

/* ───────── private pages ───────── */
.page-private .tester { display: grid; gap: clamp(26px, 4vw, 40px); padding-block: clamp(28px, 5vw, 56px); max-width: 860px; }
.slip--hero .display { margin-top: 6px; }
.dl { margin: 26px 0 30px; }
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0 0 18px; }
.spec dt { font: 700 12px/1.7 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; }
.notes { border-left: 6px solid var(--yellow); padding: 6px 14px; margin-top: 8px; }
.steps { padding-left: 1.3em; margin: 0; display: grid; gap: 12px; }
.steps li::marker { font: 700 15px var(--mono); color: var(--pink); }
.kinds { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.kinds legend { margin-bottom: 8px; }
.kinds label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.kinds input { accent-color: var(--pink); }

/* privacy */
.prose h2.label { margin: 1.8em 0 .5em; }
.prose h2.label + p { margin-top: 0; }

/* admin */
.page-admin .admin { display: grid; gap: 32px; padding-block: 32px 64px; max-width: 1400px; }
.page-admin .count { font: 700 13px/1 var(--mono); letter-spacing: .1em; color: var(--pink); vertical-align: middle; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.tbl th { text-align: left; font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 8px 0; }
.tbl td { padding: 8px 10px 8px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.tbl td.note { max-width: 46ch; white-space: normal; }
.tbl td.actions { white-space: nowrap; }
.tbl tr.st-revoked, .tbl tr.st-expired { opacity: .5; }
.btn { font: 700 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 8px 10px 7px; cursor: pointer; }
.btn:hover { background: var(--yellow); }
.btn--pink { background: var(--pink); color: var(--paper); }
.btn--warn:hover { background: var(--orange); color: var(--paper); }
.form--row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 18px; }
.form--row .field { min-width: 180px; }
.form--row .field--s { min-width: 0; width: 100px; }
dialog.slip { max-width: min(680px, 92vw); width: 100%; }
dialog::backdrop { background: #24232b88; }
dialog textarea { width: 100%; font: 400 15px/1.45 var(--body); border: 2px solid var(--ink); padding: 10px; }
dialog input { width: 100%; border: 2px solid var(--ink); padding: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo__word::before, .logo__word::after { animation: none; }
  .stamp { transition: none; }
  .endcard { animation: none; }
}
