/* ============================================================
   ROB CAGNIN — FIELD JOURNAL
   handmade static site · earth tones on cream
   ============================================================ */

:root {
  --paper: #f4eee0;
  --paper-warm: #ece3cf;
  --paper-deep: #e4d8bd;
  --ink: #2b2317;
  --ink-soft: #5c5243;
  --green: #2e4b34;
  --green-deep: #1f3626;
  --brown: #7a5537;
  --rust: #a65a33;
  --amber: #c99e46;
  --stamp-red: #9c3b2e;
  --tape: rgba(222, 202, 152, 0.6);

  --font-display: "Fraunces", "Georgia", serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --font-mono: "Space Mono", "Courier New", monospace;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.06rem;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--green); color: var(--paper); }

img, svg { max-width: 100%; }

a { color: inherit; }

/* ---------- utility type ---------- */
.mono { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; }
.hand { font-family: var(--font-hand); }
.ink-green { color: var(--green); }
.ink-brown { color: var(--brown); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem;
  font-family: var(--font-mono); font-size: 0.8rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible { outline: 2px dashed var(--green); outline-offset: 3px; }

/* ---------- paper grain ---------- */
.grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 90;
  opacity: 0.12; mix-blend-mode: multiply;
}

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 100;
  pointer-events: none;
  transform: translate(-50%, -20%);
  transition: opacity 0.25s ease;
  opacity: 0;
}
body.cursor-active .cursor { opacity: 1; }
body.cursor-active, body.cursor-active * { cursor: none !important; }
.cursor svg { display: block; transform-origin: 50% 90%; transition: transform 0.15s var(--ease-out); }
.cursor-pencil { transform-origin: 16px 29px; }
.cursor.is-hover svg { transform: rotate(-18deg) scale(1.15); }
.cursor.is-down svg { transform: rotate(-30deg) scale(0.92); }
.cursor-label {
  position: absolute; left: 26px; top: 4px;
  font-family: var(--font-hand); font-size: 1rem; color: var(--green);
  white-space: nowrap; opacity: 0; transform: rotate(-4deg) translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-spring);
}
.cursor.has-label .cursor-label { opacity: 1; transform: rotate(-4deg) translateY(0); }

/* graphite trail specks */
.speck {
  position: fixed; z-index: 89; pointer-events: none;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-soft); opacity: 0.35;
  animation: speck-fade 0.7s ease-out forwards;
}
@keyframes speck-fade { to { opacity: 0; transform: translateY(3px) scale(0.4); } }

/* ============================================================
   COVER
   ============================================================ */
.cover {
  min-height: 100svh;
  display: grid; place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  position: relative;
}
.cover-frame {
  width: 100%; max-width: 1120px; min-height: calc(100svh - 5rem);
  border: 2px solid var(--ink);
  border-radius: 255px 18px 245px 20px / 20px 235px 16px 255px; /* wobbly hand-drawn box */
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  background:
    radial-gradient(ellipse at 70% 20%, rgba(201, 158, 70, 0.06), transparent 50%),
    var(--paper);
}
.cover-topline {
  display: flex; justify-content: space-between; gap: 1rem;
  color: var(--ink-soft);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 0.7rem;
}
/* no z-index here — the draggable ephemera (later in the DOM) must stay
   grabbable and stack above this block */
.cover-center { text-align: center; padding: 2rem 0 3rem; position: relative; }
.cover-kicker {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  color: var(--brown);
  transform: rotate(-1.5deg);
}
.cover-name {
  font-size: clamp(4rem, 14vw, 11rem);
  font-weight: 800;
  font-variation-settings: "opsz" 144;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.9rem;
}
.cover-name-line { display: block; position: relative; }
.cover-name-line:last-child { color: var(--green); }
/* in normal flow between name and tagline — it can push text but never cross it */
.cover-flourish {
  display: block;
  width: min(58%, 430px);
  height: clamp(8px, 1.6vw, 15px);
  margin: 0 auto 1.1rem;
  color: var(--rust);
  overflow: visible;
}
.cover-role {
  max-width: 34ch; margin: 0 auto;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--ink-soft);
}
.cover-role em { font-style: italic; font-weight: 600; color: var(--ink); }

/* doubled class beats the generic `.polaroid { position: relative }`
   defined later in the file — same trick in the media queries below */
.polaroid.cover-polaroid {
  position: absolute; right: clamp(0.5rem, 4vw, 4rem); top: 16%;
  width: clamp(210px, 26vw, 320px);
}
.stamp-cover {
  position: absolute; left: clamp(0.5rem, 5vw, 4rem); bottom: 8%;
  transform: rotate(-9deg);
}
.sticker {
  position: absolute; left: clamp(1rem, 10vw, 9rem); top: 18%;
  filter: drop-shadow(1px 2px 0 rgba(43, 35, 23, 0.2));
}
.coffee-ring {
  position: absolute; width: 120px; height: 120px;
  right: 12%; bottom: 8%;
  pointer-events: none;
  overflow: visible;
}
.scroll-cue {
  align-self: center;
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--green); text-decoration: none;
  padding: 0.4rem 0.8rem;
}
.scroll-cue svg { animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ============================================================
   MARQUEE (washi tape strip)
   ============================================================ */
.marquee-wrap { padding: 0.5rem 0 2.5rem; overflow: hidden; }
/* a strip of washi tape stuck across the page — same tape as on the
   polaroids, with the identity words stamped onto it in green ink */
.marquee {
  background: rgba(222, 202, 152, 0.5);
  border-top: 1.5px solid rgba(43, 35, 23, 0.14);
  border-bottom: 1.5px solid rgba(43, 35, 23, 0.14);
  transform: rotate(-1.2deg) scale(1.02);
  padding: 0.6rem 0;
  box-shadow: 0 3px 7px rgba(43, 35, 23, 0.09);
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex; width: max-content;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.14em;
  color: var(--green-deep);
  opacity: 0.8;
  mix-blend-mode: multiply;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0.25'/%3E%3C/filter%3E%3Crect width='120' height='120' fill='white' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0.25'/%3E%3C/filter%3E%3Crect width='120' height='120' fill='white' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: marquee-scroll 26s linear infinite;
}
.marquee-track span { white-space: pre; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll { to { transform: translateX(-50%); } }

/* ============================================================
   SECTIONS · SHARED
   ============================================================ */
.section { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.2rem, 4vw, 3rem); }
.section-inner { max-width: 1080px; margin: 0 auto; position: relative; }

.entry-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.entry-meta { color: var(--rust); margin-bottom: 0.5rem; }
.entry-title {
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  font-weight: 700;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.015em;
  line-height: 1.05;
  display: inline-block; position: relative;
}
.entry-title .underline {
  position: absolute; left: -2%; right: -4%; bottom: -0.22em; height: 0.28em;
  width: 104%; color: var(--amber);
}
.entry-sub { font-size: 1.5rem; color: var(--brown); margin-top: 0.8rem; transform: rotate(-0.8deg); }

/* scribbled ink paths draw themselves on reveal;
   without JS they are simply visible from the start */
.scribble-path { stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; }
html.js .scribble-path { stroke-dasharray: 320; stroke-dashoffset: 320; }
.is-inked .scribble-path { animation: ink-draw 0.9s var(--ease-out) 0.25s forwards; }
@keyframes ink-draw { to { stroke-dashoffset: 0; } }

/* torn paper dividers */
.torn { line-height: 0; margin-top: -1px; }
.torn svg { width: 100%; height: 28px; }
.torn path { fill: var(--paper-warm); }
.torn--flip { transform: scaleY(-1); background: var(--paper-warm); }
.torn--flip path { fill: var(--paper); }

/* ============================================================
   ENTRY 01 · ABOUT
   ============================================================ */
.entry-cols {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.entry-text p { margin-bottom: 1.1rem; max-width: 58ch; }
.entry-text strong { color: var(--green); }
.dropcap {
  float: left;
  font-size: 4.2rem; line-height: 0.8;
  padding: 0.08em 0.12em 0 0;
  font-weight: 800; color: var(--brown);
  font-variation-settings: "opsz" 144;
}
.measurements {
  border: 2px solid var(--ink);
  border-radius: 12px 200px 10px 220px / 200px 12px 230px 10px;
  padding: 1.4rem 1.5rem 1.8rem;
  background: var(--paper-warm);
  transform: rotate(1deg);
  position: relative;
}
.measurements-title { color: var(--green); border-bottom: 1.5px dashed var(--ink-soft); padding-bottom: 0.5rem; margin-bottom: 0.8rem; }
.measurements ul { list-style: none; }
.measurements li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.45rem 0; font-size: 0.78rem;
  border-bottom: 1px dotted rgba(92, 82, 67, 0.4);
}
.measurements li b { color: var(--rust); font-size: 0.95rem; }
.margin-note {
  font-size: 1.35rem; line-height: 1.15; color: var(--green);
  transform: rotate(-3deg);
  display: inline-block;
}
.measurements .margin-note { position: absolute; right: -0.5rem; bottom: -3.2rem; }
.coffee-ring--about { left: 6%; bottom: 4%; right: auto; width: 90px; height: 90px; }

/* ============================================================
   SPECIMENS · SKILLS (graph paper zone)
   ============================================================ */
.specimens {
  background:
    linear-gradient(rgba(122, 85, 55, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 85, 55, 0.07) 1px, transparent 1px),
    var(--paper-warm);
  background-size: 28px 28px, 28px 28px, auto;
}
.specimen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
}
.specimen {
  background: var(--paper);
  border: 1.8px solid var(--ink);
  border-radius: 10px 180px 8px 190px / 190px 10px 180px 8px;
  padding: 1.3rem 1.3rem 1.1rem;
  position: relative;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}
.specimen:nth-child(odd) { transform: rotate(-0.7deg); }
.specimen:nth-child(even) { transform: rotate(0.6deg); }
.specimen:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 3px 6px 0 rgba(43, 35, 23, 0.15);
}
.specimen::before { /* pin */
  content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--rust); border: 1.5px solid var(--ink);
}
.specimen-leaf { width: 44px; height: 44px; margin-bottom: 0.6rem; }
.specimen-leaf path:first-child, .specimen-leaf circle, .specimen-leaf rect {
  fill: rgba(46, 75, 52, 0.14); stroke: var(--green); stroke-width: 1.6;
}
.specimen-leaf .vein { fill: none; stroke: var(--green); stroke-width: 1.2; stroke-linecap: round; }
.specimen h3 {
  font-size: 1.35rem; font-weight: 700; margin-bottom: 0.4rem;
  font-variation-settings: "opsz" 60;
}
.specimen p { color: var(--ink-soft); line-height: 1.7; font-size: 0.7rem; }
.margin-note--specimens { margin-top: 2.5rem; font-size: 1.4rem; }

/* ============================================================
   PROJECTS
   ============================================================ */
.project {
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}
.project + .project { border-top: 1.5px dashed rgba(92, 82, 67, 0.45); }
.project--flip { grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); }
.project--flip .project-media { order: 2; }
.project-media { position: relative; display: grid; place-items: center; }
.project-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700; line-height: 1.1; margin: 0.3rem 0 0.9rem;
  font-variation-settings: "opsz" 100;
}
.project-body p { max-width: 52ch; margin-bottom: 0.9rem; }
.materials { color: var(--brown); font-size: 0.72rem; line-height: 1.8; }
.materials b { color: var(--green); }
.project-links { margin: 1.1rem 0 0.4rem; }
.project-body .margin-note { margin-top: 0.8rem; }

/* index of smaller experiments */
.further {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  border-top: 1.5px dashed rgba(92, 82, 67, 0.45);
  padding-top: 1.6rem;
}
.further-title { color: var(--green); margin-bottom: 0.9rem; }
.further ul { list-style: none; }
.further li {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr auto;
  gap: 0.4rem 1.4rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px dotted rgba(92, 82, 67, 0.4);
}
.f-name { font-weight: 600; font-size: 1.05rem; font-variation-settings: "opsz" 40; }
.f-note { color: var(--ink-soft); font-size: 0.68rem; }
.f-year { color: var(--rust); font-size: 0.72rem; }
@media (max-width: 640px) {
  .further li { grid-template-columns: 1fr auto; }
  .f-note { grid-column: 1 / -1; }
}

.ink-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: var(--green); font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--amber);
  transition: border-color 0.2s ease, color 0.2s ease;
  padding-bottom: 1px;
}
.ink-link:hover { color: var(--rust); border-color: var(--rust); }
.hand-arrow svg { width: 34px; height: 14px; display: block; }
.ink-link:hover .hand-arrow svg { animation: arrow-nudge 0.5s var(--ease-spring); }
@keyframes arrow-nudge { 50% { transform: translateX(5px); } }

/* ---------- polaroids ---------- */
.polaroid {
  background: #fbf7ec;
  border: 1px solid rgba(43, 35, 23, 0.25);
  padding: 0.7rem 0.7rem 0.5rem;
  box-shadow: 2px 4px 12px rgba(43, 35, 23, 0.18);
  width: clamp(180px, 22vw, 260px);
  position: relative;
}
.polaroid .tape {
  position: absolute; top: -12px; left: 50%;
  width: 84px; height: 26px;
  background: var(--tape);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 1px 2px rgba(43, 35, 23, 0.1);
  backdrop-filter: blur(1px);
}
.polaroid-img {
  background: var(--paper-deep);
  border: 1px solid rgba(43, 35, 23, 0.15);
  aspect-ratio: 200 / 170;
  display: grid; place-items: center;
  overflow: hidden;
}
.polaroid figcaption { text-align: center; font-size: 1.15rem; color: var(--ink-soft); padding-top: 0.35rem; }
.doodle { width: 100%; height: 100%; }
.doodle path, .doodle rect, .doodle circle { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.doodle .d-ink { stroke: var(--ink); }
.doodle .d-green { stroke: var(--green); }
.doodle .d-brown { stroke: var(--brown); }

/* ---------- draggables ---------- */
.drag { cursor: grab; touch-action: none; user-select: none; will-change: transform; }
.drag.is-dragging { cursor: grabbing; box-shadow: 6px 14px 24px rgba(43, 35, 23, 0.28); }
.drag { transform: rotate(var(--tilt, 0deg)); }

/* ---------- stamps ---------- */
.stamp {
  display: inline-grid; place-items: center; gap: 0.15rem;
  text-align: center;
  color: var(--stamp-red);
  border: 3px double var(--stamp-red);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.12em; line-height: 1.25;
  opacity: 0.85;
  mix-blend-mode: multiply;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0.25'/%3E%3C/filter%3E%3Crect width='120' height='120' fill='white' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0.25'/%3E%3C/filter%3E%3Crect width='120' height='120' fill='white' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp small { font-weight: 400; font-size: 0.55rem; letter-spacing: 0.08em; }
.stamp-project {
  position: absolute; right: -4%; top: -6%;
  transform: rotate(8deg);
  color: var(--green); border-color: var(--green);
  font-size: 0.72rem;
}
/* slam-in on reveal */
[data-stamp] { opacity: 0; }
[data-stamp].is-stamped {
  animation: stamp-slam 0.45s var(--ease-spring) forwards;
}
@keyframes stamp-slam {
  0% { opacity: 0; transform: scale(2.6) rotate(-14deg); }
  60% { opacity: 0.9; transform: scale(0.94) rotate(var(--stamp-rot, -9deg)); }
  100% { opacity: 0.85; transform: scale(1) rotate(var(--stamp-rot, -9deg)); }
}
.stamp-project.is-stamped { --stamp-rot: 8deg; }

/* ============================================================
   CORRESPONDENCE · CONTACT
   ============================================================ */
.correspondence { padding-bottom: clamp(4rem, 9vw, 7rem); }
.postcard {
  display: grid; grid-template-columns: 1.2fr auto 1fr;
  gap: clamp(1.2rem, 3vw, 2.5rem);
  background: #fbf7ec;
  border: 2px solid var(--ink);
  border-radius: 14px 220px 12px 240px / 240px 12px 220px 14px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 4px 8px 0 rgba(43, 35, 23, 0.12);
  transform: rotate(-0.6deg);
  max-width: 900px; margin: 0 auto;
}
.postcard-msg { font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.3; color: var(--ink); margin-bottom: 1rem; }
.postcard-msg--sign { color: var(--ink-soft); }
.postcard-sig { font-size: 2.6rem; color: var(--green); display: inline-block; transform: rotate(-4deg); }
.postcard-divider { width: 1.5px; background: repeating-linear-gradient(var(--ink-soft) 0 6px, transparent 6px 12px); opacity: 0.5; }
.postcard-right { display: flex; flex-direction: column; gap: 1.2rem; }
.postage { display: flex; justify-content: flex-end; align-items: flex-start; gap: 0.8rem; }
.postage-stamp {
  width: 62px;
  padding: 4px;
  background:
    radial-gradient(circle at 0 0, transparent 4px, #fbf7ec 4px) 0 0 / 10px 10px;
  filter: drop-shadow(1px 2px 0 rgba(43, 35, 23, 0.15));
  transform: rotate(3deg);
}
.postmark {
  border: 2px solid rgba(92, 82, 67, 0.5); border-radius: 50%;
  width: 74px; height: 74px;
  display: grid; place-items: center; text-align: center;
  color: rgba(92, 82, 67, 0.7);
  transform: rotate(-8deg);
  font-size: 0.5rem;
}
.postmark .mono { font-size: 0.5rem; line-height: 1.4; }
.address p { padding: 0.5rem 0; border-bottom: 1.5px solid rgba(43, 35, 23, 0.35); font-size: 0.78rem; }
.address-label { color: var(--rust); margin-right: 0.4rem; }
.coffee-ring--contact { left: 10%; top: 10%; right: auto; width: 80px; height: 80px; }

/* ============================================================
   COLOPHON
   ============================================================ */
.colophon {
  background: var(--green-deep); color: var(--paper);
  padding: 2.5rem clamp(1.2rem, 4vw, 3rem);
}
.colophon-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.colophon-note { font-size: 1.4rem; color: var(--paper-warm); transform: rotate(-1deg); }
.colophon .mono { color: rgba(244, 238, 224, 0.75); }
.colophon .ink-link { color: var(--amber); border-color: rgba(201, 158, 70, 0.5); }
.colophon .ink-link:hover { color: var(--paper); border-color: var(--paper); }

/* ============================================================
   REVEAL ENGINE
   ============================================================ */
/* uses the independent `translate` property so it never fights
   an element's own transform (specimen tilt, hover lift, drag) */
[data-reveal] {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-inked { opacity: 1; translate: 0 0; }

[data-note] {
  opacity: 0; transform: rotate(-3deg) translateY(8px) scale(0.94);
  transition: opacity 0.5s ease 0.4s, transform 0.5s var(--ease-spring) 0.4s;
}
[data-note].is-inked { opacity: 1; transform: rotate(-3deg) translateY(0) scale(1); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .entry-cols { grid-template-columns: 1fr; }
  .measurements { max-width: 420px; }
  .project, .project--flip { grid-template-columns: 1fr; gap: 1.8rem; }
  .project--flip .project-media { order: 0; }
  .polaroid.cover-polaroid { position: relative; right: auto; top: auto; margin: 1.5rem auto 0; }
  .stamp-cover { position: relative; left: auto; bottom: auto; align-self: flex-start; margin-top: 1rem; }
  .sticker { top: 10%; left: 4%; }
  .postcard { grid-template-columns: 1fr; }
  .postcard-divider { width: auto; height: 1.5px; }
  .postage { justify-content: flex-start; }
}

/* short windows: keep cover ephemera pinned to the corners,
   clear of the centered text */
@media (max-height: 820px) and (min-width: 861px) {
  .stamp-cover { bottom: 4%; }
  .polaroid.cover-polaroid { top: 8%; width: clamp(180px, 23vw, 270px); }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .cover-frame { border-radius: 40px 8px 36px 10px / 10px 36px 8px 40px; }
  .coffee-ring { display: none; }
}

/* ============================================================
   ACCESSIBILITY · REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], [data-note], [data-stamp] { opacity: 1 !important; translate: none !important; }
  [data-note] { transform: rotate(-3deg) !important; }
  .scribble-path { stroke-dashoffset: 0 !important; }
  .marquee-track { animation: none; }
  .cursor { display: none; }
}

/* no custom cursor on touch devices */
@media (pointer: coarse) {
  .cursor { display: none; }
  body.cursor-active, body.cursor-active a, body.cursor-active [data-hover], body.cursor-active .drag { cursor: auto; }
}
