/* the pointy finger
   A survey report that went a bit wrong: squared paper, a serif voice, typewritten
   annotations, and one pink finger pointing at things.
   Mobile first: base styles are for phones; @media (min-width…) adds the desktop layout. */

@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif.woff2") format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #f1ede5;
  --ink: #1b1918;
  --muted: #77706a;
  --rule: #d9d2c6;
  --grid: rgb(27 25 24 / 0.045);
  --pink: #c4648c;
  --pink-soft: #e2a6d0;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1360px;
  --finger: url("/icons/cursor.png") 29 13;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  /* surveyor's squared paper */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  font: 18px/1.55 var(--serif);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; cursor: var(--finger), pointer; }
:focus-visible { outline: 2px dashed var(--pink); outline-offset: 4px; }
h1, h2 { font-weight: 400; margin: 0; }
em { font-style: italic; }
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.kicker, .section-no, .label, .top, .foot, .cover-line, .findings-sign, .work-nav span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.envbar { background: var(--ink); color: var(--paper); font: 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; text-align: center; padding: 6px; }

/* ---- header ---- */
.top {
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { transition: transform 0.3s ease; }
.brand:hover img { transform: translateX(4px); }
.top-ref { display: none; }
@media (min-width: 700px) { .top-ref { display: inline; } }

/* ---- cover ---- */
.cover {
  min-height: calc(100svh - 70px);
  display: grid; align-content: center; justify-items: start; gap: 20px;
  padding: 24px 0 48px;
}
.cover h1 {
  font-size: clamp(76px, 19vw, 260px);
  line-height: 0.82;
  letter-spacing: -0.035em;
}
.cover h1 span { display: block; }
.cover h1 em { display: block; color: var(--pink); padding-left: 0.5em; }
.cover h1 span:last-child { padding-left: 0.18em; }
.cover-line { color: var(--muted); margin: 8px 0 0; }
.cover-down { justify-self: end; margin-top: -40px; }
.cover-down img { width: clamp(84px, 12vw, 150px); height: auto; transform: rotate(90deg); animation: nudge 2.8s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { translate: 0 0; } 80% { translate: 0 14px; } 90% { translate: 0 0; } }

/* ---- section numbering ---- */
.section-no {
  display: flex; align-items: center; gap: 14px; color: var(--muted); margin: 0 0 28px;
}
.section-no::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ---- § 1 background ---- */
.concept { padding: 10vh 0 14vh; }
.concept-body { max-width: 34em; }
.concept-lede { font-size: clamp(36px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 28px; }
.concept-body p:not(.concept-lede) { font-size: clamp(20px, 2.2vw, 26px); color: #3d3936; margin: 0 0 14px; max-width: 26em; }
.concept-body em { color: var(--pink); }
@media (min-width: 900px) { .concept-body { margin-left: 25%; } }

/* ---- § 2 schedule (asymmetric hang) ---- */
.items { list-style: none; margin: 0; padding: 0; }
.item { margin: 0 0 16vh; }
.piece { margin: 0; display: grid; gap: 18px; }
.piece-link { display: block; }
.piece-link img {
  width: 100%;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 22px 44px -18px rgb(40 30 20 / 0.45);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1), box-shadow 0.5s ease;
}
.piece-link:hover img { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 0 2px 4px rgb(0 0 0 / 0.08), 0 30px 60px -20px rgb(40 30 20 / 0.5); }
figcaption { display: grid; gap: 12px; justify-items: start; align-content: start; }
.piece-finger { width: 44px; transform: rotate(-90deg); transform-origin: center; } /* phones: points up at the work */
.piece-note { font-style: italic; font-size: 22px; line-height: 1.3; margin: 0; max-width: 16em; color: #3d3936; }

.label {
  display: grid; gap: 2px;
  background: #fbf9f5; border: 1px solid var(--rule);
  padding: 10px 14px 11px; min-width: 210px;
  text-transform: none; letter-spacing: 0.02em; color: #4a4542;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.04);
}
.label-no { color: var(--pink); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px; }
.label-title { font-family: var(--serif); font-style: italic; font-size: 22px; letter-spacing: 0; color: var(--ink); line-height: 1.15; margin: 2px 0 4px; }

@media (min-width: 800px) {
  .piece { grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
  .piece-finger { transform: none; width: 56px; }
  /* 0: big left, notes right */
  .item--0 .piece-link { grid-column: 1 / span 8; }
  .item--0 figcaption { grid-column: 9 / span 4; }
  .item--0 .piece-finger { transform: scaleX(-1); }
  /* 1: smaller right, notes left */
  .item--1 .piece-link { grid-column: 6 / span 6; grid-row: 1; }
  .item--1 figcaption { grid-column: 2 / span 4; grid-row: 1; justify-items: end; text-align: right; align-self: center; }
  /* 2: medium, inset left */
  .item--2 .piece-link { grid-column: 2 / span 7; }
  .item--2 figcaption { grid-column: 9 / span 4; align-self: start; padding-top: 12vh; }
  .item--2 .piece-finger { transform: scaleX(-1); }
  /* 3: small far right, notes left low */
  .item--3 .piece-link { grid-column: 8 / span 5; grid-row: 1; }
  .item--3 figcaption { grid-column: 3 / span 5; grid-row: 1; justify-items: end; text-align: right; }
  .item--1, .item--3 { margin-top: -4vh; }
}

/* ---- § 3 findings ---- */
.findings { padding: 6vh 0 16vh; }
.findings-text { font-size: clamp(40px, 7.5vw, 112px); line-height: 0.98; letter-spacing: -0.025em; margin: 0 0 32px; }
.findings-text em { color: var(--pink); }
.findings-sign { color: var(--muted); }
.findings-sign a { color: var(--ink); text-decoration-color: var(--pink); text-underline-offset: 4px; }

/* ---- single item ---- */
.work { padding: 24px 0 48px; display: grid; gap: 24px; }
.work .section-no { margin-bottom: 8px; }
.work-art { margin: 0; }
.work-art img { max-height: 80vh; width: auto; margin: 0 auto; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 26px 52px -20px rgb(40 30 20 / 0.5); }
.work-info { display: grid; gap: 14px; justify-items: start; }
.work-info .piece-finger { transform: rotate(-90deg); }
@media (min-width: 900px) {
  .work { grid-template-columns: 1fr minmax(260px, 340px); align-items: end; column-gap: 48px; }
  .work .section-no { grid-column: 1 / -1; }
  .work-info .piece-finger { transform: scaleX(-1); }
}
.work-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px;
  border-top: 1px solid var(--rule); padding: 20px 0 8px; font-size: 20px; font-style: italic;
}
.work-nav a { text-decoration: none; display: grid; gap: 2px; }
.work-nav a:hover { color: var(--pink); }
.work-nav span { font-style: normal; color: var(--muted); font-size: 11px; }
.work-all { text-align: center; }
.work-nav [rel="next"] { text-align: right; }

/* ---- text pages, 404, admin ---- */
.prose { padding: 8vh 0; max-width: 36em; }
.prose h1, .missing h1, .admin h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1; letter-spacing: -0.02em; margin: 0 0 24px; }
.missing { padding: 14vh 0; display: grid; justify-items: start; gap: 10px; }
.missing > img { transform: rotate(180deg) scaleY(-1); width: 120px; }
.admin { padding: 8vh 0; max-width: 40em; }
.admin .card { border: 1px solid var(--rule); background: #fbf9f5; padding: 4px 22px; margin: 24px 0; }
.admin h2 { font-size: 30px; margin-top: 18px; }
.btn { font: 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; cursor: var(--finger), pointer; background: var(--ink); color: var(--paper); border: 0; padding: 12px 20px; margin-top: 16px; }
.btn:hover { background: var(--pink); }
.msg { color: var(--muted); }

/* ---- footer ---- */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter) 34px;
  border-top: 1px solid var(--rule); color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px 24px;
}
.foot span:first-child { color: var(--ink); margin-right: auto; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--pink); }

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