/* tokens, locked off the approved collage art + notebook paper world
   palette: cream lined paper, kraft collage tan, ransom-note white/pink/rust/black, red teacher pen
   type: Alfa Slab One (cutout letters) + Gochi Hand (pencil handwriting) + Cutive Mono (CA, real case)
   spacing scale: 8 / 16 / 24 / 40 / 64px. corner radius: 0 (paper has no rounded corners). motion: one stamp-in keyframe. */

@font-face {
  font-family: "Alfa Slab One";
  src: url("assets/fonts/alfa-slab-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gochi Hand";
  src: url("assets/fonts/gochi-hand-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cutive Mono";
  src: url("assets/fonts/cutive-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #F4EEDA;
  --rule: #AFC9E0;
  --margin: #E2574A;
  --tan: #D8C6A0;
  --tan-dark: #C4AF83;
  --ink: #2B2A26;
  --red-pen: #C6281C;
  --cut-white: #FBF9F2;
  --cut-pink: #EFAFC0;
  --cut-rust: #D8492B;
  --cut-black: #1A1A1A;
  --tape-color: rgba(245, 240, 220, 0.75);
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule) 27px 28px),
    linear-gradient(to right, transparent 0 68px, var(--margin) 68px 70px, transparent 70px 100%);
  background-attachment: fixed, fixed;
  color: var(--ink);
  font-family: "Gochi Hand", cursive;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

/* --- CA tape strip: readable and copyable without scrolling or clicking --- */
.tape-strip {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--tape-color);
  backdrop-filter: blur(1px);
  border-bottom: 2px dashed rgba(43,42,38,0.35);
  padding: 10px var(--space-3);
}

.tape-label {
  font-family: "Alfa Slab One", cursive;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--cut-white);
  border: 2px solid var(--ink);
  padding: 3px 8px;
}

.ca {
  font-family: "Cutive Mono", monospace;
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  letter-spacing: 0.02em;
  text-decoration: underline dotted;
}

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-5);
}

/* --- cutout ransom-note letters --- */
.cutout {
  margin: 0 0 var(--space-2);
  line-height: 1.15;
  display: block;
}
.cutout .cut {
  display: inline-block;
  font-family: "Alfa Slab One", cursive;
  color: var(--cut-black);
  background: var(--cut-white);
  border: 2px solid var(--cut-black);
  padding: 2px 8px;
  margin: 0 2px 6px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.2);
  transform: rotate(var(--r, 0deg));
}
h1.cutout .cut { font-size: clamp(2.1rem, 8vw, 4.2rem); }
h2.cutout.small .cut { font-size: clamp(1.1rem, 4vw, 1.8rem); padding: 1px 6px; }

.cut.v1 { background: var(--cut-pink); }
.cut.v2 { background: var(--cut-rust); color: var(--cut-white); }
.cut.v3 { background: var(--tan); }
.cut.v4 { background: var(--cut-black); color: var(--cut-white); }
.cut-space { display: inline-block; width: 0.5em; }
.cut-pair { white-space: nowrap; }

.hero { margin-bottom: var(--space-5); }

.pencil-line, .pencil {
  font-family: "Gochi Hand", cursive;
  font-size: 1.35rem;
  color: var(--ink);
  max-width: 46ch;
  line-height: 1.9;
}

/* --- taped photo of the approved collage --- */
.taped-photo {
  position: relative;
  margin: var(--space-4) auto 0;
  max-width: 480px;
  transform: rotate(-2deg);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
  animation: flutter 9s ease-in-out infinite;
}
.taped-photo img { border: 6px solid #fff; }

.tape {
  position: absolute;
  width: 90px;
  height: 30px;
  background: var(--tape-color);
  border: 1px solid rgba(0,0,0,0.08);
  z-index: 2;
}
.corner-a { top: -14px; left: -18px; transform: rotate(-38deg); }
.corner-b { top: -14px; right: -18px; transform: rotate(38deg); }

@keyframes flutter {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(-0.6deg); }
}

/* --- glued note blocks --- */
.note, .mechanic {
  position: relative;
  background: var(--tan);
  padding: var(--space-3);
  margin: 0 0 var(--space-5);
  clip-path: polygon(1% 4%, 30% 0%, 68% 2%, 100% 5%, 98% 92%, 70% 100%, 32% 98%, 2% 96%);
  box-shadow: 3px 5px 0 rgba(0,0,0,0.14);
}
.tilt-a { transform: rotate(-1.4deg); }
.tilt-b { transform: rotate(1.1deg); }

.margin-mark {
  position: absolute;
  top: 14px;
  right: 20px;
  color: var(--red-pen);
  font-family: "Gochi Hand", cursive;
  font-size: 1.25rem;
  text-decoration: underline;
  transform: rotate(-6deg);
  z-index: 1;
}

.glue-smear {
  position: absolute;
  width: 70px;
  height: 46px;
  right: 14px;
  bottom: -16px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.65), rgba(255,255,255,0));
  border-radius: 42% 58% 62% 38% / 46% 40% 60% 54%;
}
.glue-smear.b { right: auto; left: 14px; bottom: -18px; }

.turnin {
  font-family: "Alfa Slab One", cursive;
  font-size: 1rem;
  color: var(--cut-white);
  background: var(--red-pen);
  border: 2px solid var(--ink);
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.25);
  transform: rotate(-1deg);
}
.turnin:hover { transform: rotate(0deg) translateY(-1px); }
.turnin:active { transform: translateY(1px); }

.tally {
  font-family: "Gochi Hand", cursive;
  font-size: 1.15rem;
  margin: var(--space-2) 0 var(--space-1);
}
.tally #count { font-family: "Cutive Mono", monospace; font-size: 1.05rem; }

.marks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 1.6rem;
}
.mark {
  font-family: "Gochi Hand", cursive;
  color: var(--red-pen);
  border: 2px solid var(--red-pen);
  padding: 3px 10px;
  transform: rotate(var(--mr, -4deg));
  animation: stamp 220ms ease-out;
}
@keyframes stamp {
  0% { transform: scale(1.7) rotate(var(--mr, -4deg)); opacity: 0; }
  100% { transform: scale(1) rotate(var(--mr, -4deg)); opacity: 1; }
}

.chrome {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 2px dashed rgba(43,42,38,0.35);
}
.chrome-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.ticker {
  font-family: "Alfa Slab One", cursive;
  font-size: 1.1rem;
}
.clock {
  font-family: "Cutive Mono", monospace;
  font-size: 0.85rem;
  color: #5a564a;
}
.links {
  display: flex;
  gap: var(--space-3);
}
.links a {
  font-family: "Cutive Mono", monospace;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1px;
}
.links a:hover { color: var(--red-pen); border-color: var(--red-pen); }

@media (max-width: 560px) {
  .page { padding: var(--space-3) var(--space-2) var(--space-4); }
  .taped-photo { max-width: 260px; }
  .tape { width: 64px; height: 22px; }
  .corner-a { left: -6px; }
  .corner-b { right: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  .taped-photo { animation: none; }
  .turnin:hover { transform: rotate(-1deg); }
  .mark { animation: none; }
}
