@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&display=swap");
/* =====================================================================
   textures + typography (MARK 7) — matched to Angel's moodboard 1
   Grotesk  = Instrument Sans (wide-ish, big x-height, angled t, humanist UI)
   Serif    = Newsreader (narrow editorial text serif + true italic, opsz)
   Assets   = assets/tex/*  (webp paper, torn patches/tags, SVG marks)
   Only surface / type / borders / shadows / masks — never layout.
   ===================================================================== */
:root {
  --f-head: "Instrument Sans", "Inter Tight", system-ui, sans-serif;
  --f-ui: "Instrument Sans", "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Newsreader", "Instrument Serif", Georgia, serif;
  --f-body: "Newsreader", Georgia, serif;
  --teal: #7FB8C2;
  --grid-line: #D6966A;
  /* texture tokens */
  --tex-cream: url("../assets/tex/paper-cream.webp");
  --tex-card: url("../assets/tex/paper-card.webp");
  --tex-crumpled: url("../assets/tex/paper-crumpled.webp");
  --tex-xerox: url("../assets/tex/paper-xerox.webp");
  --tex-grid: url("../assets/tex/grid-paper.webp");
  --tex-halftone: url("../assets/tex/halftone.svg");
  --torn-top: url("../assets/tex/torn-top.svg");
  --torn-bottom: url("../assets/tex/torn-bottom.svg");
  --paper-shadow: 0 1px 1px rgba(26,26,26,.08), 0 8px 18px -10px rgba(26,26,26,.45);
}

/* ---------- ground + type roles ---------- */
body { background-color: var(--cream); background-image: var(--tex-cream); background-size: 512px 512px;
  font-family: var(--f-ui); font-feature-settings: "ss01" 0; -webkit-font-smoothing: antialiased; }
.light, .section.light, .light-panel { background-color: var(--card); background-image: var(--tex-card); background-size: 512px 512px; }

/* wordmark: Instrument Sans Bold, tight, stacked */
.wordmark { font-family: var(--f-head); font-weight: 700; letter-spacing: -.035em; line-height: .88; }
.wordmark .brush path { stroke: var(--orange); }
.brand, .nav-brand, .logo { font-family: var(--f-head); font-weight: 700; letter-spacing: -.035em; }
/* panel H1s: SemiBold, tight, like "Imagining Institutions Otherwise." */
h1, h2, h3, .display { font-family: var(--f-head); }
h1, h2 { font-weight: 600; letter-spacing: -.035em; }
.mb-h, .panel-title { font-family: var(--f-head); font-weight: 600; letter-spacing: -.04em; line-height: .96; }
h1 em, h2 em, h3 em, .display em, .serif-it { font-family: var(--f-display); font-style: italic; font-weight: 400; letter-spacing: -.015em; font-variation-settings: "opsz" 72; }
/* serif titles: "The Institution Builder" (italic), "Institution Proposals" (roman) */
.builder-h, .ib-title, .cr-builder-title { font-family: var(--f-display); font-style: italic; font-weight: 400; letter-spacing: -.02em; font-variation-settings: "opsz" 72; }
.p-title, .cm-prop-title, .serif { font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em; font-variation-settings: "opsz" 72; }
.hero-intro, .banner-intro, .lede, .body-serif, .mb-intro { font-family: var(--f-body); font-weight: 400; letter-spacing: -.005em; font-variation-settings: "opsz" 24; }
.mb-body, .pcard-line { font-family: var(--f-ui); font-weight: 450; letter-spacing: -.005em; }
.btn, .pill, nav a, .nav a, .tab, button { font-family: var(--f-ui); }
.btn { font-weight: 600; letter-spacing: -.005em; }
.pcard-body b, .bcard h3 { font-family: var(--f-head); font-weight: 600; letter-spacing: -.02em; }
.keyx-h { font-family: var(--f-head); font-weight: 700; letter-spacing: .04em; }
/* labels / tags: Newsreader roman on paper */
.tag-paper, .sticky-label, .exp-label { font-family: var(--f-display); font-weight: 400; letter-spacing: -.01em; font-variation-settings: "opsz" 36; }

/* ---------- paper surfaces ---------- */
.patch-orange { background: url("../assets/tex/patch-orange.webp") center / 100% 100% no-repeat; background-color: transparent; background-blend-mode: normal;
  box-shadow: none; filter: drop-shadow(0 6px 8px rgba(26,26,26,.22)); }
.patch-yellow, .yellow-rect { background: url("../assets/tex/patch-yellow.webp") center / 100% 100% no-repeat; background-color: transparent; box-shadow: none; }
.patch-yellow { filter: drop-shadow(0 6px 8px rgba(26,26,26,.2)); }
.patch-grid-orange { background-color: transparent; background-image: url("../assets/tex/patch-orange.webp"); background-size: 100% 100%; clip-path: none; }
.grid-paper, .grid-scrap, .tex-grid { background-color: #F6E8D4; background-image: var(--tex-grid); background-size: 128px 128px; }
.grid-paper { box-shadow: var(--paper-shadow); -webkit-mask: var(--torn-bottom) bottom / 100% 14px no-repeat, linear-gradient(#000,#000) top / 100% calc(100% - 13px) no-repeat; mask: var(--torn-bottom) bottom / 100% 14px no-repeat, linear-gradient(#000,#000) top / 100% calc(100% - 13px) no-repeat; }
.grid-scrap { opacity: .9; }
.halftone, .tex-halftone { background-image: var(--tex-halftone); background-size: 10px 10px; opacity: .8; }
.letter-paper { background-color: #F4EEE2; background-image: var(--tex-card); background-size: 360px; }

/* torn paper tags (hero + experiment labels) */
.tag-paper, .sticky-label { background-color: transparent; background-image: url("../assets/tex/tag-yellow.webp"); background-size: 100% 100%; background-repeat: no-repeat;
  clip-path: none; box-shadow: none; filter: drop-shadow(0 3px 4px rgba(26,26,26,.22)); }
.tag-paper.pink, .sticky-label.pink { background-color: transparent; background-image: url("../assets/tex/tag-pink.webp"); }
.tag-paper.yellow, .sticky-label.yellow { background-color: transparent; background-image: url("../assets/tex/tag-yellow.webp"); }
.tag-paper.orange, .sticky-label.orange { background-color: transparent; background-image: url("../assets/tex/tag-orange.webp"); }
.tag-paper.teal, .sticky-label.teal { background-color: transparent; background-image: url("../assets/tex/tag-teal.webp"); }
.sticky-label.green { background-color: transparent; background-image: url("../assets/tex/tag-green.webp"); }
.sticky-label.sage { background-color: transparent; background-image: url("../assets/tex/tag-sage.webp"); }
.sticky-label.grey { background-color: transparent; background-image: url("../assets/tex/tag-grey.webp"); }
.sticky-label.cream { background-color: transparent; background-image: url("../assets/tex/tag-cream.webp"); }
@media (hover: hover) and (pointer: fine) { .sticky-label:hover, .tag-paper:hover { box-shadow: none; filter: drop-shadow(0 12px 12px rgba(26,26,26,.3)); } }

/* masking tape */
.tape, .tex-tape { background: url("../assets/tex/tape.webp") center / 100% 100% no-repeat; background-color: transparent; }

/* photos: b&w on white border, xerox halftone placeholders */
.ph-frame { background-color: #FBF8F2; background-image: var(--tex-card); background-size: 300px; box-shadow: var(--paper-shadow); }
.ph-photo { background-color: #A9A397; background-image: var(--tex-halftone), var(--tex-xerox); background-size: 7px 7px, 320px; background-blend-mode: multiply; }
.stack-card.photo .sc-inner { background-color: #FBF8F2; background-image: var(--tex-card); background-size: 300px; }
.stack-card.letter .sc-inner { background-color: #E8D9B5; }
.index-card { background-color: var(--pink); }

/* torn-paper fragment strips: real crumpled paper fibre */
.strip::before { background-image: var(--tex-crumpled); background-size: 420px; background-blend-mode: multiply; }

/* dark panels keep their colour, add fine paper grain */
.dark { background-image: var(--grain); }

/* ---------- marks ---------- */
.scribble, .house, .arc { stroke: var(--ink); }

/* =====================================================================
   UTILITIES for any element (opt-in; position/size are the caller's)
   ===================================================================== */
.tex-cream { background-color: var(--cream); background-image: var(--tex-cream); background-size: 512px; }
.tex-card { background-color: var(--card); background-image: var(--tex-card); background-size: 512px; }
.tex-crumpled { background-color: #D9D6D0; background-image: var(--tex-crumpled); background-size: 640px; }
.tex-xerox { background-image: var(--tex-xerox); background-size: 640px; }
.tex-patch-orange { background: url("../assets/tex/patch-orange.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 6px 8px rgba(26,26,26,.22)); }
.tex-patch-yellow { background: url("../assets/tex/patch-yellow.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 6px 8px rgba(26,26,26,.2)); }
.tex-tag { background: url("../assets/tex/tag-yellow.webp") center / 100% 100% no-repeat; padding: 6px 18px 7px; font-family: var(--f-display); color: var(--ink); filter: drop-shadow(0 3px 4px rgba(26,26,26,.22)); }
.tex-tag.pink { background-image: url("../assets/tex/tag-pink.webp"); } .tex-tag.teal { background-image: url("../assets/tex/tag-teal.webp"); }
.tex-tag.orange { background-image: url("../assets/tex/tag-orange.webp"); } .tex-tag.green { background-image: url("../assets/tex/tag-green.webp"); }
.tex-tag.grey { background-image: url("../assets/tex/tag-grey.webp"); } .tex-tag.cream { background-image: url("../assets/tex/tag-cream.webp"); }
.tex-tag.sage { background-image: url("../assets/tex/tag-sage.webp"); }
.torn-top { -webkit-mask: var(--torn-top) top / 100% 14px no-repeat, linear-gradient(#000,#000) bottom / 100% calc(100% - 13px) no-repeat; mask: var(--torn-top) top / 100% 14px no-repeat, linear-gradient(#000,#000) bottom / 100% calc(100% - 13px) no-repeat; }
.torn-bottom { -webkit-mask: var(--torn-bottom) bottom / 100% 14px no-repeat, linear-gradient(#000,#000) top / 100% calc(100% - 13px) no-repeat; mask: var(--torn-bottom) bottom / 100% 14px no-repeat, linear-gradient(#000,#000) top / 100% calc(100% - 13px) no-repeat; }
.paper-shadow { box-shadow: var(--paper-shadow); }
.mark-scribble { background: url("../assets/tex/scribble.svg") center / contain no-repeat; aspect-ratio: 220 / 90; }
.mark-underline { background: url("../assets/tex/brush-underline.svg") center / 100% 100% no-repeat; height: 14px; }
.mark-arrow { background: url("../assets/tex/arrow-straight.svg") center / contain no-repeat; aspect-ratio: 120 / 24; }
.mark-arrow-curved { background: url("../assets/tex/arrow-curved.svg") center / contain no-repeat; aspect-ratio: 120 / 90; }
.mark-house { background: url("../assets/tex/house.svg") center / contain no-repeat; aspect-ratio: 160 / 110; }
.dashed-connector { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 5 6; stroke-linecap: round; }
.dashed-box { border: 1.4px dashed var(--ink); border-radius: 2px; }
.underline-brush { background: url("../assets/tex/brush-underline.svg") bottom / 100% .32em no-repeat; padding-bottom: .18em; }
