@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --green: #006B50;
  --green-deep: #063E32;
  --ivory: #F0E9D8;
  --paper: #FFFCF4;
  --kraft: #D8C39B;
  --ink: #1D1B17;
  --marker: #F5D35A;
  --tomato: #E0583C;
  --display: "Fraunces", Georgia, serif;
  --body: "Lora", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --torn-a: polygon(0% 6%, 4% 1%, 13% 3%, 27% 0%, 41% 2%, 58% 0%, 72% 3%, 86% 0%, 96% 2%, 100% 7%, 99% 34%, 100% 63%, 99% 93%, 95% 99%, 82% 97%, 67% 100%, 51% 98%, 36% 100%, 20% 97%, 6% 100%, 1% 95%, 0% 66%, 1% 35%);
  --torn-b: polygon(1% 3%, 9% 0%, 24% 2%, 39% 0%, 55% 3%, 70% 1%, 84% 3%, 97% 0%, 100% 5%, 99% 41%, 100% 72%, 98% 97%, 88% 100%, 73% 97%, 57% 100%, 42% 97%, 26% 100%, 11% 98%, 2% 100%, 0% 78%, 1% 44%, 0% 15%);
  --torn-c: polygon(0% 2%, 18% 0%, 33% 3%, 49% 0%, 63% 2%, 81% 0%, 99% 2%, 100% 30%, 98% 58%, 100% 98%, 79% 100%, 62% 97%, 44% 100%, 28% 98%, 12% 100%, 0% 97%, 2% 64%, 0% 33%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 18px/1.65 var(--body);
  overflow-x: hidden;
}
img { display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 4px; }
[id] { scroll-margin-top: 72px; }
.mono { font-family: var(--mono); font-size: .85em; letter-spacing: .02em; }

/* Paper grain overlay: SVG turbulence noise multiplied over everything. */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .2 0 0 0 0 .12 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px var(--display); }
.nav nav { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 28px); }
.nav nav a { text-decoration: none; font-weight: 600; }
.nav nav a:not(.btn-scrap):hover { text-decoration: underline wavy var(--green); text-underline-offset: 5px; }

.btn-scrap {
  display: inline-block; padding: 8px 18px;
  background: var(--green); color: var(--ivory) !important;
  clip-path: var(--torn-c);
  transform: rotate(-2deg);
  transition: transform .25s;
}
.btn-scrap:hover { transform: rotate(0) scale(1.06); }
.btn-scrap.big { padding: 14px 28px; font: 600 20px var(--display); text-decoration: none; }

/* Layout */
section { padding: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 64px); max-width: 1180px; margin: 0 auto; }
.title { font: 800 clamp(34px, 5vw, 58px)/1.1 var(--display); margin: 0 0 8px; }
.sub { margin: 0 0 40px; opacity: .7; font-style: italic; }

/* Hero */
.hero { position: relative; min-height: 82vh; display: flex; flex-direction: column; justify-content: center; }
.kicker { color: var(--green); margin: 0 0 18px; }
.ransom { margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 10px 16px; font: 800 clamp(48px, 9vw, 116px)/1 var(--display); max-width: 900px; }
.scrap {
  display: inline-block; padding: .08em .28em .14em;
  background: var(--paper);
  clip-path: var(--torn-a);
  filter: drop-shadow(2px 3px 0 rgba(0,0,0,.12));
  animation: drop .7s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0s) both;
}
.scrap.ink { background: var(--ink); color: var(--paper); clip-path: var(--torn-b); }
.scrap.green { background: var(--green); color: var(--ivory); clip-path: var(--torn-c); }
.s1 { --r: -3deg; --d: .1s; }
.s2 { --r: 2deg; --d: .25s; font-style: italic; }
.s3 { --r: -1deg; --d: .4s; background: var(--kraft); }
.s4 { --r: 3deg; --d: .55s; }
.scrap { transform: rotate(var(--r)); }
.scrap:hover { animation: drop .7s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0s) both, wobble .5s ease-in-out; }

.lead { max-width: 560px; font-size: 21px; margin: 0 0 24px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { padding: 4px 14px; border: 2px dashed var(--ink); border-radius: 40px; font-size: 15px; }
.hero-logo {
  position: absolute; right: clamp(16px, 5vw, 64px); top: 18%;
  width: clamp(120px, 18vw, 220px); height: auto;
  transform: rotate(6deg);
  filter: drop-shadow(4px 6px 0 rgba(0,0,0,.15));
}

/* Marker highlight that sweeps in when revealed */
.marker {
  background: linear-gradient(100deg, transparent 2%, var(--marker) 4%, var(--marker) 96%, transparent 98%) no-repeat 0 60% / 0% 70%;
  color: inherit; padding: 0 .1em;
  transition: background-size .8s cubic-bezier(.6, 0, .2, 1) .3s;
}
.in .marker, .marker.in, html:not(.js) .marker { background-size: 100% 70%; }

/* Torn green strip between sections */
.tear {
  height: 70px; background: var(--green);
  clip-path: polygon(0% 40%, 5% 25%, 11% 45%, 17% 20%, 24% 38%, 31% 15%, 38% 35%, 46% 22%, 53% 42%, 61% 18%, 68% 36%, 75% 20%, 83% 40%, 90% 24%, 96% 38%, 100% 26%, 100% 70%, 94% 85%, 87% 66%, 80% 82%, 72% 62%, 65% 80%, 57% 64%, 50% 84%, 42% 66%, 35% 78%, 27% 60%, 20% 82%, 13% 64%, 6% 80%, 0% 66%);
}
.tear.flip { transform: scaleX(-1); background: var(--tomato); }

/* Clipping cards: clip-path lives on ::before so drop-shadow on the parent survives */
.clippings { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 32px; }
.clip, .note, .step, .letter, .stat {
  position: relative; isolation: isolate;
  transform: rotate(var(--r, 0deg));
  filter: drop-shadow(3px 5px 6px rgba(40, 30, 10, .18));
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), filter .35s;
}
.clip::before, .note::before, .step::before, .letter::before, .stat::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--paper); clip-path: var(--torn-a);
}
.clip { display: block; padding: 34px 28px 28px; text-decoration: none; }
.clip:nth-child(2)::before { clip-path: var(--torn-b); }
.clip:nth-child(3)::before { clip-path: var(--torn-c); }
.clip h3 { font: 800 26px/1.15 var(--display); margin: 10px 0 8px; }
.clip p { margin: 0; }
.clip-go { display: inline-block; margin-top: 16px; padding-bottom: 2px; border-bottom: 2px solid var(--green); color: var(--green); }
.clip-tag { color: var(--green); }
.clip:hover, .note:hover, .step:hover, .stat:hover {
  transform: rotate(0) translateY(-6px) scale(1.02);
  filter: drop-shadow(6px 14px 14px rgba(40, 30, 10, .22));
}
.clip:hover h3 { text-decoration: underline wavy var(--tomato); text-underline-offset: 6px; }

.tape {
  position: absolute; top: -14px; left: 50%; width: 96px; height: 30px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(245, 211, 90, .6);
  clip-path: polygon(0 10%, 4% 0, 8% 12%, 12% 0, 88% 0, 92% 12%, 96% 0, 100% 10%, 100% 90%, 96% 100%, 92% 88%, 88% 100%, 12% 100%, 8% 88%, 4% 100%, 0 90%);
}

/* Stats */
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; padding-top: 20px; }
.stat { padding: 20px 34px; text-align: center; }
.stat::before { background: var(--kraft); clip-path: var(--torn-b); }
.stat span { display: block; max-width: 13ch; line-height: 1.3; margin: 6px auto 0; }
.stat b { display: block; font: 800 56px/1 var(--display); color: var(--green); }

/* Stickers */
.stickers { list-style: none; padding: 0; margin: 28px 0 24px; display: flex; flex-wrap: wrap; gap: 18px; }
.sticker {
  padding: 10px 24px; border-radius: 999px;
  background: var(--green); color: var(--ivory);
  font: 600 20px var(--display);
  border: 5px solid var(--paper);
  box-shadow: 2px 4px 0 rgba(0,0,0,.14);
  transform: rotate(var(--r));
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.sticker:nth-child(3n+2) { background: var(--ink); }
.sticker:nth-child(3n) { background: var(--tomato); }
.sticker:hover { transform: rotate(0) scale(1.12); }

/* Lined notebook note */
.note { max-width: 560px; margin: 56px 0 0 auto; padding: 36px 32px 28px 64px; }
.note::before {
  clip-path: var(--torn-c);
  background:
    linear-gradient(90deg, transparent 46px, rgba(224, 88, 60, .5) 46px 48px, transparent 48px),
    repeating-linear-gradient(transparent 0 31px, rgba(0, 107, 80, .18) 31px 32px),
    var(--paper);
}
.note h3 { font: 800 26px var(--display); margin: 0 0 6px; }
.tools { list-style: none; padding: 0; margin: 0; line-height: 32px; }
.tools em { font-family: var(--body); opacity: .7; }

/* About: text column with a pinned note beside it */
.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-text p { max-width: 58ch; margin: 0 0 18px; }
.about .title { margin-bottom: 24px; }
.about .note { margin: 0; }

/* Process index cards */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.step { padding: 28px 24px; }
.step:nth-child(even)::before { clip-path: var(--torn-b); }
.num { font: 800 44px var(--display); color: var(--tomato); }
.step h3 { font: 800 24px var(--display); margin: 4px 0; }
.step p { margin: 0; }

/* Contact letter */
.contact { display: flex; justify-content: center; }
.letter { padding: 56px clamp(24px, 6vw, 72px); text-align: center; max-width: 680px; }
.letter::before { background: var(--kraft); }
.letter h2 { font: 800 clamp(34px, 5.4vw, 58px)/1.05 var(--display); margin: 8px 0 16px; }
.letter-text { margin: 0 0 28px; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; padding: 30px 16px 50px; color: rgba(29, 27, 23, .7); }
.foot a:hover { color: var(--green); }

/* Fine print page */
.fine { max-width: 820px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) clamp(16px, 5vw, 64px); }
.fine .sub { margin-bottom: 48px; }
.sheet { position: relative; padding: clamp(36px, 6vw, 60px) clamp(22px, 6vw, 60px); background: var(--paper); box-shadow: 3px 5px 0 rgba(40, 30, 10, .1), 4px 10px 18px rgba(40, 30, 10, .12); transform: rotate(-.4deg); }
.sheet h2 { font: 800 26px/1.2 var(--display); margin: 36px 0 8px; }
.sheet h2:first-of-type { margin-top: 0; }
.sheet p { margin: 0 0 12px; }
.sheet a { text-decoration: underline wavy var(--green); text-underline-offset: 4px; }

/* Scroll reveal: pieces "drop" onto the table and settle */
.reveal { transition: opacity .5s, transform .55s cubic-bezier(.2, 1.5, .4, 1), filter .35s; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.in) { opacity: 0; transform: translateY(28px) rotate(calc(var(--r, 0deg) + 4deg)); }
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-40px) rotate(calc(var(--r) - 10deg)) scale(1.15); }
  to { opacity: 1; transform: rotate(var(--r)); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(var(--r)); }
  25% { transform: rotate(calc(var(--r) - 3deg)) translateY(-2px); }
  60% { transform: rotate(calc(var(--r) + 2deg)) translateY(1px); }
}

@media (max-width: 720px) {
  .hero-logo { position: static; margin-top: 36px; }
  .nav nav a:not(.btn-scrap) { display: none; }
  .note { margin-left: 0; }
  .about { grid-template-columns: 1fr; }
  .sheet { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .marker { background-size: 100% 70%; }
}
