/* ============================================================
   PASCAL PRESS & RISO — brutalist zine-collage press sheet
   Signature: CMYK registration marks + crop ticks frame every
   major block, as if the page were an untrimmed press sheet.
   ============================================================ */

:root {
  --bg: #f4f1ea;
  --surface: #e9e4d8;
  --fg: #17150f;
  --muted: #55503f;
  --accent: #b91c1c;
  --accent-fg: #ffffff;
  --border: var(--fg);

  --font: "Archivo", "Arial Narrow", Arial, sans-serif;

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;

  --text-sm: clamp(0.78rem, 0.74rem + 0.18vw, 0.86rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem);
  --text-xl: clamp(1.6rem, 1.25rem + 1.6vw, 2.6rem);
  --text-2xl: clamp(2.2rem, 1.5rem + 3vw, 4rem);
  --text-stamp: clamp(4rem, 2rem + 12vw, 12rem);

  --rule: 3px;

  /* CMYK misregistered registration target (the signature mark) */
  --regmark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cg fill='none' stroke-width='1.3'%3E%3Ccircle cx='13.5' cy='15' r='6' stroke='%2300a7c4'/%3E%3Ccircle cx='16' cy='14' r='6' stroke='%23c4008a'/%3E%3Ccircle cx='15' cy='16' r='6' stroke='%23d9b200'/%3E%3Cline x1='15' y1='1' x2='15' y2='29' stroke='%2317150f'/%3E%3Cline x1='1' y1='15' x2='29' y2='15' stroke='%2317150f'/%3E%3C/g%3E%3C/svg%3E");
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg);
  background-color: var(--bg);
  /* faint newsprint fibre */
  background-image:
    repeating-linear-gradient(90deg, rgba(23,21,15,0.018) 0 1px, transparent 1px 3px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-fg); }

/* ---------- links & focus ---------- */
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--fg); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -200px; left: var(--space-3);
  background: var(--accent);
  color: var(--accent-fg);
  padding: var(--space-2) var(--space-3);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus { top: var(--space-3); }

/* ---------- the press sheet ---------- */
.sheet {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.75rem, 1rem + 3vw, 4rem);
}

/* crop / trim ticks at the four sheet corners */
.crop {
  position: absolute;
  width: 26px; height: 26px;
  pointer-events: none;
}
.crop-tl { top: 10px; left: 10px; border-top: 2px solid var(--fg); border-left: 2px solid var(--fg); }
.crop-tr { top: 10px; right: 10px; border-top: 2px solid var(--fg); border-right: 2px solid var(--fg); }
.crop-bl { bottom: 10px; left: 10px; border-bottom: 2px solid var(--fg); border-left: 2px solid var(--fg); }
.crop-br { bottom: 10px; right: 10px; border-bottom: 2px solid var(--fg); border-right: 2px solid var(--fg); }

/* ---------- the framing device (registration marks + rule) ---------- */
.frame {
  position: relative;
  border: var(--rule) solid var(--fg);
  background-color: var(--bg);
  background-image: var(--regmark), var(--regmark), var(--regmark), var(--regmark);
  background-repeat: no-repeat;
  background-position:
    7px 7px,
    calc(100% - 7px) 7px,
    7px calc(100% - 7px),
    calc(100% - 7px) calc(100% - 7px);
  background-size: 26px 26px;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}
.frame--accent { border-color: var(--accent); }

/* ---------- labels ---------- */
.label {
  font-size: var(--text-sm);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}
.label--accent { color: var(--accent); }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  border-bottom: var(--rule) solid var(--fg);
}
.masthead__mark { text-decoration: none; color: var(--fg); line-height: 0.85; }
.masthead__name {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.masthead__sub {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--accent);
}
.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-left: auto;
}
.masthead__nav a {
  text-decoration: none;
  text-transform: uppercase;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--fg);
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.masthead__nav a:hover,
.masthead__nav a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.masthead__stamp {
  width: 100%;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-top: 1px dashed var(--muted);
  padding-top: var(--space-2);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: var(--space-5);
  align-items: start;
  margin-bottom: var(--space-6);
}
.hero__stamp { grid-column: 1; }
.stamp {
  font-size: var(--text-stamp);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.045em;
  margin: 0.1em 0 0.25em;
  color: var(--fg);
  text-transform: uppercase;
}
.stamp__break { color: var(--accent); }
.hero__tag {
  max-width: 42ch;
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 var(--space-4);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }

/* rotated notice slab overlapping the grid */
.slab {
  grid-column: 2;
  align-self: start;
  margin-top: var(--space-5);
  background: var(--accent);
  color: var(--accent-fg);
  border: var(--rule) solid var(--fg);
  padding: var(--space-4);
  transform: rotate(-4.5deg);
  z-index: 3;
  box-shadow: 8px 8px 0 var(--fg);
}
.slab__kicker {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.16em;
}
.slab__big {
  margin: 0;
  font-size: clamp(1.7rem, 1rem + 3vw, 2.8rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.slab__foot { margin: var(--space-3) 0 0; font-weight: 700; }

/* rate card fragment */
.ratecard {
  grid-column: 2;
  margin-top: calc(-1 * var(--space-5));
  transform: rotate(1.5deg);
}
.ratetable {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.ratetable th, .ratetable td {
  border-bottom: 2px solid var(--fg);
  padding: var(--space-2) var(--space-2);
  text-align: right;
  font-weight: 700;
}
.ratetable th:first-child, .ratetable td:first-child { text-align: left; }
.ratetable th {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom-width: var(--rule);
}
.ratetable .cut { color: var(--muted); }
.ratecard__note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--muted);
  border-top: 1px dashed var(--muted);
  padding-top: var(--space-2);
}

/* ---------- intro band ---------- */
.intro { margin-bottom: var(--space-6); }

/* ---------- collage of tiles ---------- */
.collage {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--fg);
  min-height: 190px;
  transition: transform 140ms ease-out, box-shadow 140ms ease-out;
}
.tile:hover, .tile:focus-visible {
  transform: translate(-3px, -3px) rotate(0deg);
  box-shadow: 8px 8px 0 var(--fg);
}
.tile__no {
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.tile__name {
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}
.tile__desc { font-size: var(--text-sm); font-weight: 500; color: var(--fg); margin-top: auto; }
.tile--1 { grid-column: 1 / span 3; transform: rotate(-1.4deg); }
.tile--2 { grid-column: 4 / span 3; transform: rotate(1.2deg); }
.tile--3 { grid-column: 1 / span 2; transform: rotate(1deg); }
.tile--4 { grid-column: 3 / span 2; transform: rotate(-1.2deg); }
.tile--5 { grid-column: 5 / span 2; transform: rotate(1.6deg); }
.tile--1 .tile__name, .tile--5 .tile__name { color: var(--accent); }

/* ---------- generic page ---------- */
.page { margin-bottom: var(--space-6); }
.page__title {
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
}
.page__lede {
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.35;
  max-width: 60ch;
  margin: 0 0 var(--space-4);
  color: var(--fg);
}

/* ---------- prose ---------- */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--space-3); }
.prose h2 {
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-top: var(--space-5);
  padding-bottom: var(--space-2);
  border-bottom: var(--rule) solid var(--fg);
}
.prose h3 {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: var(--space-4);
}
.prose p { line-height: 1.65; }
.prose a { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--space-2); }
.prose blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border-left: var(--rule) solid var(--accent);
  background: var(--surface);
  font-weight: 600;
}
.prose blockquote p { margin: 0; }
.prose hr { border: none; border-top: var(--rule) solid var(--fg); margin: var(--space-5) 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-variant-numeric: tabular-nums;
}
.prose th, .prose td {
  border: 2px solid var(--fg);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}
.prose th {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  background: var(--surface);
}

.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border: 1px solid var(--fg);
}
.prose pre {
  background: var(--surface);
  border: var(--rule) solid var(--fg);
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
  line-height: 1.5;
}
.prose pre code { background: transparent; border: none; padding: 0; font-size: 0.86em; }

img { max-width: 100%; height: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--accent-fg);
  border: var(--rule) solid var(--fg);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 140ms ease-out, box-shadow 140ms ease-out;
}
.btn:hover, .btn:focus-visible {
  color: var(--accent-fg);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--fg);
}
.btn--ghost { background: var(--bg); color: var(--fg); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--fg); }

/* ---------- run list (section listing) ---------- */
.run-list { list-style: none; padding: 0; margin: var(--space-5) 0 0; }
.run-list__item {
  padding: var(--space-3) 0;
  border-top: 2px solid var(--fg);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.run-list__item:last-child { border-bottom: 2px solid var(--fg); }
.run-list__item a {
  font-size: var(--text-lg);
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.run-list__desc { font-size: var(--text-sm); color: var(--muted); font-weight: 500; }

/* ---------- 404 ---------- */
.notfound__code {
  font-size: var(--text-stamp);
  line-height: 0.82;
  color: var(--accent);
}

/* ---------- colophon ---------- */
.colophon { margin-top: var(--space-5); }
.colophon__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.colophon__name { font-weight: 900; font-size: var(--text-lg); margin: 0 0 var(--space-2); text-transform: uppercase; }
.colophon__line { margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--muted); }
.colophon__line a { font-weight: 700; }
.colophon__foot {
  margin: var(--space-4) 0 0;
  padding-top: var(--space-3);
  border-top: 2px solid var(--fg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero__stamp, .slab, .ratecard { grid-column: 1; }
  .slab { margin-top: 0; transform: rotate(-3deg); justify-self: start; }
  .ratecard { margin-top: var(--space-3); transform: rotate(0.8deg); }
  .collage { grid-template-columns: 1fr; }
  .tile,
  .tile--1, .tile--2, .tile--3, .tile--4, .tile--5 { grid-column: 1; transform: rotate(0deg); }
}

@media (max-width: 520px) {
  .prose table { display: block; overflow-x: auto; }
  .masthead__nav { margin-left: 0; width: 100%; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
