/* ==========================================================================
   THIS IS NOT A RISO — site stylesheet
   © Seppe Lestienne. All rights reserved.
   Paper, ink, registration marks. Palette = the five drums of TINAR.mp4.
   ========================================================================== */

/* ---------- fonts (self-hosted, SIL Open Font License — see /credits) ---- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-italic.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-wdth-italic.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* stock */
  /* dark stock: the press room with the lights off */
  --paper:   #000000;
  --paper-2: #000000;
  --paper-3: #1C1C1C;
  /* "ink" is the light type colour on dark stock */
  --ink:   #EDE7DA;
  --ink-2: #B8B1A4;
  --ink-3: #807A70;
  --line:  #34312D;            /* hairlines & frames */
  --rule:  rgba(237, 231, 218, 0.14);
  --rule-soft: rgba(237, 231, 218, 0.07);
  --dark-ink: #000000;         /* text on bright ink colours */
  color-scheme: dark;

  /* the five drums of TINAR */
  --pink:   #FF48B0;
  --yellow: #FFE800;
  --green:  #00A95C;
  --gold:   #BB8B41;
  --blue:   #62A8E5;
  /* support inks */
  --riso-blue: #0078BF;
  --federal:   #3D5588;
  --red:       #F15060;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3.2vw, 40px);
  --maxw: 1360px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--yellow); color: var(--dark-ink); }
:focus-visible { outline: 2px dashed var(--yellow); outline-offset: 3px; }

/* paper tooth — fixed fibre overlay over everything */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: .10; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .92  0 0 0 0 .88  0 0 0 0 .80  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10000;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
  font-family: var(--font-mono); font-size: 12px;
}
.skip:focus { left: 8px; }

/* ---------- utility type ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}
.label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ==========================================================================
   COLOUR CONTROL STRIP (top of every sheet)
   ========================================================================== */
.colorbar {
  display: grid; grid-template-columns: repeat(16, 1fr);
  height: 12px; border-bottom: 1px solid var(--line);
}
.colorbar span { display: block; }
.colorbar span:nth-child(1)  { background: var(--pink); }
.colorbar span:nth-child(2)  { background: color-mix(in srgb, var(--pink) 55%, var(--paper)); }
.colorbar span:nth-child(3)  { background: color-mix(in srgb, var(--pink) 22%, var(--paper)); }
.colorbar span:nth-child(4)  { background: var(--yellow); }
.colorbar span:nth-child(5)  { background: color-mix(in srgb, var(--yellow) 50%, var(--paper)); }
.colorbar span:nth-child(6)  { background: var(--green); }
.colorbar span:nth-child(7)  { background: color-mix(in srgb, var(--green) 50%, var(--paper)); }
.colorbar span:nth-child(8)  { background: var(--gold); }
.colorbar span:nth-child(9)  { background: color-mix(in srgb, var(--gold) 50%, var(--paper)); }
.colorbar span:nth-child(10) { background: var(--blue); }
.colorbar span:nth-child(11) { background: color-mix(in srgb, var(--blue) 50%, var(--paper)); }
.colorbar span:nth-child(12) { background: var(--ink); }
.colorbar span:nth-child(13) { background: color-mix(in srgb, var(--ink) 60%, var(--paper)); }
.colorbar span:nth-child(14) { background: color-mix(in srgb, var(--ink) 30%, var(--paper)); }
.colorbar span:nth-child(15) { background: color-mix(in srgb, var(--ink) 10%, var(--paper)); }
.colorbar span:nth-child(16) { background: var(--paper); }

/* ==========================================================================
   MASTHEAD
   ========================================================================== */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 24px; height: 64px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; justify-content: flex-end; gap: 4px; }
.nav a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; padding: 7px 12px; border: 1px solid transparent; border-radius: 999px;
  transition: background .2s, border-color .2s, color .2s;
}
.nav a:hover { border-color: var(--line); background: var(--paper-2); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav a.nav-cta { background: var(--pink); border-color: var(--pink); color: var(--dark-ink); }
.nav a.nav-cta:hover { background: var(--yellow); border-color: var(--yellow); }
.nav-toggle { display: none; }

/* ==========================================================================
   REGISTRATION & CROP MARKS
   ========================================================================== */

.crop { position: relative; }
.crop > .cm { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.crop > .cm::before, .crop > .cm::after { content: ""; position: absolute; background: var(--ink-3); }
.crop > .cm::before { width: 1px; height: 14px; }
.crop > .cm::after  { height: 1px; width: 14px; }
.cm.tl { top: -22px; left: -22px; }   .cm.tl::before { right: 4px; top: 0; }    .cm.tl::after { bottom: 4px; left: 0; }
.cm.tr { top: -22px; right: -22px; }  .cm.tr::before { left: 4px; top: 0; }     .cm.tr::after { bottom: 4px; right: 0; }
.cm.bl { bottom: -22px; left: -22px; }.cm.bl::before { right: 4px; bottom: 0; } .cm.bl::after { top: 4px; left: 0; }
.cm.br { bottom: -22px; right: -22px;}.cm.br::before { left: 4px; bottom: 0; }  .cm.br::after { top: 4px; right: 0; }

/* ==========================================================================
   MISREGISTERED DISPLAY TYPE
   Two "drums": pink base + riso-blue layer, multiplied, knocked off-register.
   ========================================================================== */
.display {
  font-family: var(--font-display);
  font-weight: 900; font-stretch: 125%;
  text-transform: uppercase; line-height: .86; letter-spacing: -.02em;
}
.misreg { display: block; position: relative; color: var(--pink); isolation: isolate; }
.misreg::after {
  content: attr(data-text); position: absolute; left: 0; top: 0;
  color: var(--riso-blue); mix-blend-mode: screen;
  transform: translate(.045em, .03em) rotate(-.25deg);
  animation: drift 7s steps(1) infinite;
}
.misreg.gy { color: var(--yellow); }
.misreg.gy::after { color: var(--green); }
@keyframes drift {
  0%   { transform: translate(.045em, .03em) rotate(-.25deg); }
  25%  { transform: translate(.035em, .042em) rotate(-.1deg); }
  50%  { transform: translate(.05em, .022em) rotate(-.3deg); }
  75%  { transform: translate(.03em, .036em) rotate(-.18deg); }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  padding: 14px 22px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); color: var(--dark-ink); border-color: var(--ink); }
.btn.pink   { background: var(--pink); border-color: var(--pink); color: var(--dark-ink); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--dark-ink); }
.btn.ink    { background: var(--ink); color: var(--dark-ink); }
.btn.pink:hover, .btn.yellow:hover, .btn.ink:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .35; cursor: not-allowed; background: transparent; color: var(--ink); border-color: var(--line);
}
.btn .arrow { font-family: var(--font-body); font-size: 15px; line-height: 1; }

/* ==========================================================================
   SECTIONS / SHEET HEADERS
   ========================================================================== */
.sheet { padding: clamp(56px, 8vw, 112px) 0; border-bottom: 1px solid var(--line); position: relative; }
.sheet-head {
  display: block;
  padding-bottom: 18px; margin-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line);
}
.sheet-no {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  display: flex; align-items: center; gap: 10px;
}
.sheet-title {
  font-family: var(--font-display); font-weight: 800; font-stretch: 112%;
  text-transform: uppercase; font-size: clamp(28px, 4.4vw, 60px); line-height: .92; letter-spacing: -.015em;
}

.lede { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; max-width: 36ch; }
.prose { max-width: 64ch; }
.prose p + p { margin-top: 1em; }
.prose h2 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 110%; text-transform: uppercase;
  font-size: 22px; letter-spacing: -.005em; margin: 2.2em 0 .6em; line-height: 1.1;
  display: flex; gap: 14px; align-items: baseline;
}
.prose h2 .n { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .06em; flex: none; }
.prose h3 { font-size: 17px; font-weight: 700; margin: 1.6em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: .8em 0; }
.prose li + li { margin-top: .45em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { background: var(--yellow); color: var(--dark-ink); }
.prose strong { font-weight: 700; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about-photo { margin: 22px; }
.about-photo .ph { border: 1px solid var(--line); }
.about-photo figcaption { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.mech { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mech > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px; }
.mech h3 { font-size: 18px; font-weight: 800; font-stretch: 110%; text-transform: uppercase; margin: 12px 0 8px; line-height: 1.1; }
.mech p { color: var(--ink-2); font-size: 15.5px; }
.mech .label { display: flex; gap: 8px; align-items: center; }
.mech .label i { width: 10px; height: 10px; border: 1px solid var(--line); display: inline-block; }

/* ==========================================================================
   LEGAL DOCS
   ========================================================================== */
.doc-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.doc-toc { position: sticky; top: 96px; border-top: 1px solid var(--line); }
.doc-toc a {
  display: grid; grid-template-columns: 30px 1fr; padding: 8px 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; font-size: 14px; line-height: 1.3;
}
.doc-toc a span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); padding-top: 2px; }
.doc-toc a:hover { background: var(--paper-2); color: var(--yellow); }
.doc-meta {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 36px;
  border: 1px solid var(--line); padding: 16px 20px; margin-bottom: 36px; background: var(--paper-2);
}
.doc-meta div { display: flex; flex-direction: column; gap: 2px; }
.doc-meta b { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.summary-box {
  border: 1px solid var(--yellow); background: var(--yellow); color: var(--dark-ink); padding: 20px 22px; margin-bottom: 36px;
}
.summary-box h2 { margin-top: 0 !important; }
.summary-box .n { color: rgba(17,16,16,.6) !important; }
.summary-box a { color: var(--dark-ink); }
.prose section { scroll-margin-top: 96px; }

/* ==========================================================================
   COLOPHON / FOOTER
   ========================================================================== */
.colophon { margin-top: auto; background: #000000; color: var(--ink); border-top: 1px solid var(--line); }
.colophon .wrap { padding-top: 56px; padding-bottom: 28px; }
.colophon-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.colophon h4 { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9b958b; margin-bottom: 14px; }
.colophon ul { list-style: none; }
.colophon li { padding: 3px 0; }
.colophon a { text-decoration: none; }
.colophon a:hover { color: var(--yellow); }
.colophon .big {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(30px, 4vw, 52px); line-height: .88; letter-spacing: -.02em;
}
.colophon .big em { font-style: normal; color: var(--pink); }
.colophon p.small { color: #b3ada3; font-size: 14px; margin-top: 16px; max-width: 34ch; }
.colophon-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  border-top: 1px solid #3a3734; padding-top: 18px; color: #9b958b;
}
.colophon .colorbar { border-bottom: 0; }

/* ==========================================================================
   404
   ========================================================================== */
.err { padding: clamp(72px, 12vw, 160px) 0; text-align: left; }
.err h1 { font-size: clamp(90px, 22vw, 320px); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .colophon-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .masthead .wrap { grid-template-columns: auto 1fr; height: 58px; }
  .nav-toggle {
    display: inline-flex; justify-self: end; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
    letter-spacing: .06em; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { border-radius: 0; border: 0; border-bottom: 1px solid var(--rule); padding: 14px 4px; font-size: 13px; }
  .nav a[aria-current="page"] { background: transparent; color: var(--ink); text-decoration: underline; }
  .nav a.nav-cta { background: var(--pink); margin-top: 10px; border: 1px solid var(--line); border-radius: 999px; text-align: center; }
  .about-grid, .doc-grid { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
  .mech { grid-template-columns: 1fr; }
  .doc-meta { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .colophon-grid { grid-template-columns: 1fr; }
  .about-photo { margin: 18px; }
  .btn { padding: 13px 18px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
