/* haru.quest — riso-printed anti-design bento almanac
   Palette: Ink #0A0A0A, Petal #FF3D6E, Newsprint #FAF6EC, Stem #1F4D2E, Pressed #E8E1CC */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #0A0A0A;
  --petal: #FF3D6E;
  --cream: #FAF6EC;
  --stem: #1F4D2E;
  --pressed: #E8E1CC;
  --ink-faint: #0A0A0A14;
  --petal-faint: #FF3D6E33;
}

html {
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  overflow-x: hidden;
  cursor: crosshair;
  border-radius: 0;
}

/* ---------- print overlays ---------- */
.halftone {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.06;
  z-index: 9000;
}
.trail {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 8999;
}
.trail-dot { animation: inkbleed 0.8s linear forwards; }
@keyframes inkbleed {
  from { opacity: 0.85; }
  to   { opacity: 0; }
}

/* page-turn flash */
.page-flash {
  position: fixed; inset: 0;
  background: var(--petal);
  pointer-events: none;
  z-index: 9500;
  opacity: 0;
}
.page-flash.go { animation: flashpass 0.08s linear; }
@keyframes flashpass {
  0% { opacity: 0; transform: translateX(-100%); }
  50% { opacity: 0.5; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(100%); }
}

/* ---------- progress bar ---------- */
.progress {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 14px;
  background: var(--cream);
  border-bottom: 1px solid var(--ink);
  z-index: 9100;
}
.progress-fill {
  height: 100%; width: 0%;
  background: var(--petal);
  transition: width 0.15s linear;
}
.progress-label {
  position: absolute; top: 1px; right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; letter-spacing: 0.06em;
  color: var(--ink);
  mix-blend-mode: difference;
}

/* ---------- page-edge marks ---------- */
.edge {
  position: fixed;
  font-family: 'JetBrains Mono', monospace;
  font-size: 6px; letter-spacing: 0.3em;
  color: var(--ink);
  opacity: 0.5;
  pointer-events: none;
  z-index: 9050;
  white-space: nowrap;
}
.edge-trim-top { top: 16px; left: 50%; transform: translateX(-50%); }
.edge-bleed-left { left: 2px; top: 50%; transform: rotate(-90deg) translateX(-50%); transform-origin: left center; }
.edge-bleed-right { right: 2px; top: 50%; transform: rotate(90deg) translateX(50%); transform-origin: right center; }
.pagenum {
  position: fixed;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; letter-spacing: 0.1em;
  color: var(--ink); opacity: 0.6;
  z-index: 9050; pointer-events: none;
}
.pagenum-1 { top: 20px; left: 6px; writing-mode: vertical-rl; }
.pagenum-side { display: none; }
.pagenum-3 { bottom: 6px; right: 8px; }
.pagenum-4 { bottom: 6px; left: 8px; color: var(--petal); }
.pagenum-5 { bottom: 6px; right: 8px; }

/* ---------- stages / bento grid ---------- */
.stage {
  min-height: 100vh;
  scroll-snap-align: start;
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(14, 1fr);
  gap: 0;
  padding: 16px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
}

.geo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

/* generic cell */
.cell {
  position: relative;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 0.5px var(--ink);
  background: transparent;
  z-index: 4;
}
.cell.pressed { background: var(--pressed); }

.cell-label {
  position: absolute; top: 3px; left: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; letter-spacing: 0.06em;
  color: var(--ink); opacity: 0.7;
}

/* registration crosses */
.reg-cross {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; color: var(--petal);
  line-height: 1;
}
.reg-cross.tl { top: -6px; left: -6px; }
.reg-cross.tr { top: -6px; right: -6px; }
.reg-cross.bl { bottom: -6px; left: -6px; }
.reg-cross.br { bottom: -6px; right: -6px; }

/* ---------- typography ---------- */
.shout {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.82;
  color: var(--ink);
  text-wrap: balance;
  font-size: clamp(5rem, 14vw, 18rem);
}
.shout.med { font-size: clamp(3.5rem, 10vw, 11rem); }
.shout.big { font-size: clamp(4.5rem, 13vw, 16rem); }

.anton-sub {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 5vw, 4.5rem);
  color: var(--petal);
  text-transform: uppercase;
  line-height: 0.95;
  transform: rotate(-4deg);
}
.anton-sub.small { font-size: clamp(1rem, 2.4vw, 1.8rem); color: var(--ink); }
.anton-sub.small.rot { transform: rotate(-3deg); }

.body {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: 'tnum';
  color: var(--ink);
}
.body strong { font-weight: 700; }
.body .emph { font-weight: 700; border-bottom: 2px solid var(--ink); }
.twocol { column-count: 2; column-gap: 16px; column-fill: auto; }
@media (max-width: 640px) { .twocol { column-count: 1; } }

.micro {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; line-height: 1.5;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.leaf { color: var(--stem); font-size: 11px; }

.poem {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(15px, 1.8vw, 22px);
  line-height: 1.7;
  color: var(--ink);
}

.vert-note {
  writing-mode: vertical-rl;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.08em;
  height: 100%;
  color: var(--ink);
}

/* floral footnote bullets */
.flower-bullet {
  color: var(--petal);
  font-size: 11px;
  margin-right: 5px;
  display: inline-block;
}

/* leaf icon in colophon */
.leaf-icon {
  position: absolute; bottom: 6px; right: 6px;
  width: 16px; height: 16px;
}

/* colour bars */
.colorbars { display: flex; align-items: flex-end; gap: 3px; }
.colorbars .bar { flex: 1; height: 60%; min-height: 18px; box-shadow: inset 0 0 0 0.5px var(--ink); }

/* price tag */
.price-tag {
  position: absolute; top: -12px; right: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  background: var(--petal); color: var(--cream);
  padding: 3px 8px;
  transform: rotate(6deg);
  z-index: 10;
}

/* footnote stamp overlapping headlines */
.footnote-stamp { box-shadow: none; background: transparent; pointer-events: none; }
.footnote-stamp .anton-sub.small { background: var(--cream); padding: 2px 6px; display: inline-block; }
.footnote-stamp .anton-sub.small.rot { background: var(--petal); color: var(--cream); }

/* rotated cell */
.rot-cell { transform: rotate(-3deg); }

/* sticker — the one rounded element */
.sticker {
  border-radius: 50%;
  background: var(--petal);
  color: var(--cream);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transform: rotate(-8deg);
  z-index: 12;
}

/* botanical svg */
.botanical { width: 100%; height: 100%; display: block; overflow: visible; }
.botan-cell { display: flex; align-items: center; justify-content: center; }

/* hand annotations */
.annotation { position: absolute; z-index: 13; pointer-events: none; }
.anno-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  fill: var(--ink);
  text-transform: uppercase;
}
.anno-text.big-anno { font-size: 16px; }
.anno-1 { width: 200px; top: 38%; left: 4%; transform: rotate(-6deg); }
.anno-2 { width: 200px; bottom: 6%; right: 8%; transform: rotate(8deg); }
.anno-3 { width: 200px; top: 30%; right: 6%; transform: rotate(-4deg); }
.anno-4 { width: 220px; bottom: 12%; left: 6%; transform: rotate(10deg); }
.anno-5 { width: 200px; bottom: 8%; left: 8%; transform: rotate(-3deg); }

/* ---------- Stage 4 — RANSOM ---------- */
.stage-4 { display: block; padding: 60px 24px; }
.ransom-art {
  position: absolute; top: 50%; left: 50%;
  width: min(60vw, 600px); height: min(60vw, 600px);
  transform: translate(-50%, -50%) rotate(-6deg);
  z-index: 2; pointer-events: none;
}
.ransom-title {
  position: relative;
  text-align: center;
  font-size: clamp(4rem, 16vw, 18rem);
  line-height: 0.85;
  margin: 4vh 0;
  z-index: 8;
  text-transform: uppercase;
}
.ransom-title .rl {
  display: inline-block;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--ink);
  padding: 0 0.04em;
  margin: 0 -0.01em;
}
.ransom-title .rl.pink { background: var(--petal); color: var(--cream); box-shadow: none; }

.scrap {
  position: absolute;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--ink), 4px 4px 0 var(--petal-faint);
  padding: 14px 16px;
  width: clamp(180px, 26vw, 320px);
  z-index: 7;
}
.scrap.pressed { background: var(--pressed); }
.scrap .price-tag, .scrap .cell-label { z-index: 10; }
.sticker-scrap {
  border-radius: 50%;
  width: 130px !important; height: 130px;
  background: var(--petal); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* colophon-end on stage 5 */
.colophon-end .micro { padding-top: 10px; }

/* ---------- responsive softening ---------- */
@media (max-width: 720px) {
  .stage { grid-template-rows: repeat(20, minmax(28px, auto)); padding: 14px; }
  .cell { padding: 10px 10px; }
  .shout { font-size: clamp(3rem, 18vw, 6rem); }
}
