:root {
  --ink: #071014;
  --paper: #FDFBF3;
  --blue: #145CFF;
  --orange: #FF6B1A;
  --yellow: #FFE95C;
  --lilac: #CBB7FF;
  --cyan: #00B8C8;
}

/* DESIGN typography tokens: Source Sans 3** in 400/600 */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

.paper-ocean {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 233, 92, .45), transparent 22rem),
    radial-gradient(circle at 82% 9%, rgba(203, 183, 255, .55), transparent 20rem),
    linear-gradient(115deg, rgba(20, 92, 255, .07), transparent 42%),
    var(--paper);
}

.scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 5.6rem);
  border-bottom: 5px solid var(--ink);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(90deg, rgba(7, 16, 20, .05) 1px, transparent 1px),
    linear-gradient(rgba(7, 16, 20, .035) 1px, transparent 1px);
  background-size: 37px 37px, 53px 53px;
  mix-blend-mode: multiply;
}

.tide {
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-copy {
  width: min(1160px, 92vw);
  z-index: 4;
  transform: rotate(-1.2deg);
}

.stamp,
.scene-label {
  display: inline-block;
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-size: clamp(1.05rem, 2.2vw, 1.65rem);
  letter-spacing: .03em;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: .28rem .85rem .38rem;
  box-shadow: 5px 6px 0 var(--ink);
}

.scene-label {
  position: relative;
  z-index: 5;
  margin-bottom: 3rem;
  background: var(--lilac);
}

.scene-label.orange { background: var(--orange); color: var(--paper); }

h1,
h2 {
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  line-height: .9;
  margin: 0;
  letter-spacing: -.075em;
}

h1 {
  font-size: clamp(4.4rem, 16vw, 13.8rem);
  text-shadow: .055em .055em 0 var(--lilac);
}

h2 { font-size: clamp(2.4rem, 6.3vw, 6.8rem); }

.lede {
  max-width: 790px;
  font-size: clamp(1.28rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  font-weight: 600;
  margin: 1.2rem 0 2rem auto;
  background: rgba(253, 251, 243, .84);
  border-left: 9px solid var(--blue);
  padding: 1rem 1.35rem;
  transform: rotate(1.4deg);
}

.draw-line {
  width: min(920px, 86vw);
  height: clamp(48px, 8vw, 96px);
  margin-top: -.65rem;
}

.draw-line svg,
.scene-wave,
.wave-divider,
.final-current,
.annotation-arrow { width: 100%; height: 100%; overflow: visible; }

.orange-mark,
.blue-wave,
.scene-wave path,
.wave-divider path,
.final-current path,
.annotation-arrow path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.orange-mark {
  stroke: var(--orange);
  stroke-width: 26;
  stroke-dasharray: 950;
  stroke-dashoffset: 950;
  animation: underlineDraw 1.6s cubic-bezier(.2, .8, .2, 1) .3s forwards;
}

.blue-wave {
  stroke: var(--blue);
  stroke-width: 11;
  stroke-dasharray: 950;
  stroke-dashoffset: 950;
  animation: underlineDraw 1.4s cubic-bezier(.2, .8, .2, 1) 1.35s forwards, waveWobble 4s ease-in-out 2.8s infinite;
}

@keyframes underlineDraw { to { stroke-dashoffset: 0; } }
@keyframes waveWobble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

.floating-tab {
  display: inline-block;
  position: relative;
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  text-decoration: none;
  background: var(--paper);
  border: 4px solid var(--ink);
  padding: .65rem 1.15rem .78rem;
  box-shadow: 8px 8px 0 var(--blue);
  transform: rotate(-2deg);
  transition: transform .25s ease, box-shadow .25s ease;
}

.floating-tab:hover { transform: rotate(1deg) translateY(-7px); box-shadow: 10px 14px 0 var(--orange); }

.drifters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.page,
.diagonal-sheet,
.paper-strip,
.excerpt-page,
.sticky,
.bubble,
.stack {
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 10px 11px 0 rgba(7, 16, 20, .95);
}

.page {
  position: absolute;
  width: clamp(104px, 14vw, 205px);
  height: clamp(138px, 19vw, 275px);
  border-radius: 8px 24px 8px 8px;
  animation: bob 6s ease-in-out infinite;
}

.page::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 31%;
  height: 28%;
  background: var(--lilac);
  border-left: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  border-radius: 0 18px 0 12px;
}

.page span,
.page i {
  position: absolute;
  left: 16%;
  right: 18%;
  height: 4px;
  background: var(--ink);
  border-radius: 5px;
}

.page span { top: 43%; box-shadow: 0 22px 0 var(--ink), 0 44px 0 var(--ink); }
.page i { top: 25%; right: 45%; background: var(--orange); }
.page-a { left: -3%; top: 12%; transform: rotate(12deg); animation-duration: 7s; }
.page-b { right: 4%; top: 9%; transform: rotate(-9deg); animation-duration: 8.5s; }
.page-c { left: 7%; bottom: 6%; transform: rotate(-15deg); animation-duration: 6.5s; }
.page-d { right: -2%; bottom: 10%; transform: rotate(14deg); animation-duration: 9s; }

@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -28px; } }

.doc-creature {
  position: absolute;
  right: clamp(1rem, 8vw, 9rem);
  bottom: clamp(5rem, 11vw, 10rem);
  z-index: 3;
  animation: creaturePaddle 3.6s ease-in-out infinite;
}

.paper-face {
  width: 150px;
  height: 190px;
  background: var(--paper);
  border: 5px solid var(--ink);
  border-radius: 12px 30px 12px 12px;
  box-shadow: 10px 10px 0 var(--cyan);
  position: relative;
}

.paper-face b { position: absolute; top: 65px; width: 16px; height: 16px; background: var(--ink); border-radius: 50%; }
.paper-face b:first-child { left: 43px; }
.paper-face b:nth-child(2) { right: 43px; }
.paper-face em { position: absolute; left: 50px; top: 102px; width: 50px; height: 18px; border-bottom: 5px solid var(--orange); border-radius: 50%; }
.leg { position: absolute; bottom: -28px; width: 42px; height: 28px; border-bottom: 6px solid var(--ink); border-radius: 50%; }
.l1 { left: 24px; } .l2 { right: 24px; }
@keyframes creaturePaddle { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-16px); } }

.bottom-wave { position: absolute; left: -4%; bottom: -10px; width: 108%; height: 180px; z-index: 2; }
.scene-wave path { stroke: var(--blue); stroke-width: 20; }

.current {
  background:
    linear-gradient(158deg, transparent 0 17%, rgba(0, 184, 200, .18) 17% 36%, transparent 36% 100%),
    var(--paper);
}

.diagonal-sheet {
  position: absolute;
  width: 60vw;
  height: 38vh;
  opacity: .7;
  background: var(--lilac);
  transform: rotate(-13deg);
}

.sheet-one { top: 12%; right: -18%; }
.sheet-two { bottom: 7%; left: -21%; background: var(--yellow); transform: rotate(10deg); }

.current-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: center;
  position: relative;
  z-index: 3;
  min-height: 60vh;
}

.paper-strip {
  padding: clamp(1.2rem, 3vw, 2.2rem);
  min-height: 360px;
  transform: rotate(-3deg);
  transition: transform .35s ease;
}
.paper-strip:nth-child(2) { transform: translateY(10vh) rotate(2deg); background: #FDFBF3; box-shadow: 10px 11px 0 var(--blue); }
.paper-strip:nth-child(3) { transform: translateY(-4vh) rotate(-1deg); box-shadow: 10px 11px 0 var(--orange); }
.paper-strip:hover { transform: translateY(-12px) rotate(1deg); }
.paper-strip h2 { font-size: clamp(2rem, 4vw, 4.1rem); letter-spacing: -.055em; margin: .4rem 0 1rem; }
.paper-strip p { font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.25; margin: 0; }
.hand-note { font-family: "Patrick Hand", cursive; font-size: 1.45rem; color: var(--blue); }

.diagram-goggles { position: absolute; right: 9%; bottom: 15%; width: 210px; height: 86px; border: 5px solid var(--ink); border-radius: 999px; background: var(--cyan); z-index: 4; transform: rotate(-8deg); }
.diagram-goggles span { position: absolute; top: 17px; width: 55px; height: 45px; border: 5px solid var(--ink); border-radius: 50%; background: var(--paper); }
.diagram-goggles span:first-child { left: 37px; } .diagram-goggles span:nth-child(2) { right: 37px; }
.diagram-goggles i { position: absolute; left: 95px; top: 39px; width: 22px; height: 5px; background: var(--ink); }
.wave-divider { position: absolute; left: -5%; right: -5%; bottom: 4%; width: 110%; height: 150px; z-index: 1; }
.wave-divider path, .final-current path { stroke: var(--blue); stroke-width: 14; }

.marginalia {
  background:
    radial-gradient(circle at 70% 28%, rgba(255, 107, 26, .18), transparent 19rem),
    linear-gradient(88deg, rgba(203, 183, 255, .4), transparent 40%),
    var(--paper);
}

.excerpt-spread {
  position: relative;
  min-height: 68vh;
  display: grid;
  place-items: center;
}

.excerpt-page {
  width: min(720px, 82vw);
  min-height: 470px;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  transform: rotate(1.5deg);
  z-index: 2;
}

.excerpt-page .round { background: var(--orange); color: var(--paper); box-shadow: 5px 6px 0 var(--ink); }
.excerpt-page h2 { font-size: clamp(2.4rem, 6vw, 5.8rem); margin-top: 1.2rem; }
.excerpt { font-size: clamp(1.25rem, 2.1vw, 1.8rem); line-height: 1.18; border-left: 8px solid var(--blue); padding-left: 1rem; }
.ruled-lines { height: 86px; background: repeating-linear-gradient(to bottom, transparent 0 19px, rgba(7, 16, 20, .24) 20px 23px); }

.sticky,
.bubble {
  position: absolute;
  z-index: 4;
  font-family: "Patrick Hand", cursive;
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  line-height: 1.05;
  padding: 1rem;
  max-width: 260px;
  transition: transform .28s ease, box-shadow .28s ease;
}
.sticky { background: var(--yellow); }
.sticky-a { left: 7%; top: 12%; transform: rotate(-7deg); }
.sticky-b { right: 6%; bottom: 17%; transform: rotate(9deg); background: var(--lilac); }
.bubble { right: 11%; top: 7%; background: var(--paper); border-radius: 32px 32px 32px 4px; box-shadow: 9px 9px 0 var(--cyan); }
.peelable:hover, .peelable.is-peeled { transform: rotate(2deg) translateY(-16px); box-shadow: 13px 17px 0 var(--orange); }

.paperclip { position: absolute; left: 18%; bottom: 14%; width: 74px; height: 116px; border: 10px solid var(--blue); border-left-width: 13px; border-radius: 40px; z-index: 5; transform: rotate(18deg); animation: wiggle 2.8s ease-in-out infinite; }
.paperclip::after { content: ""; position: absolute; inset: 18px 14px; border: 8px solid var(--blue); border-radius: 28px; }
@keyframes wiggle { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(26deg) translateY(-5px); } }

.bracket { position: absolute; width: 120px; height: 420px; border: 8px solid var(--ink); border-right: 0; left: 20%; top: 16%; transform: rotate(-4deg); z-index: 1; }
.annotation-arrow { position: absolute; left: 6%; bottom: 7%; width: 320px; height: 180px; }
.annotation-arrow path { stroke: var(--orange); stroke-width: 10; }

.buoy {
  display: grid;
  grid-template-columns: minmax(260px, 46vw) 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  background:
    radial-gradient(circle at 32% 34%, rgba(20, 92, 255, .18), transparent 18rem),
    var(--paper);
}

.lighthouse { position: relative; height: 620px; z-index: 3; }
.stack { position: absolute; left: 50%; transform: translateX(-50%) rotate(var(--r)); height: 74px; border-radius: 8px; }
.s1 { --r: -3deg; bottom: 72px; width: 360px; background: var(--blue); }
.s2 { --r: 4deg; bottom: 146px; width: 315px; background: var(--paper); }
.s3 { --r: -5deg; bottom: 220px; width: 270px; background: var(--orange); }
.s4 { --r: 2deg; bottom: 294px; width: 225px; background: var(--lilac); }
.s5 { --r: -2deg; bottom: 368px; width: 170px; background: var(--yellow); }
.beam { position: absolute; left: 50%; top: 40px; width: 430px; height: 185px; background: rgba(255, 233, 92, .68); clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 60%); transform-origin: left center; animation: beamSweep 4.2s ease-in-out infinite; }
@keyframes beamSweep { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }

.closing-copy { position: relative; z-index: 4; transform: rotate(-1deg); }
.closing-copy h2 { text-shadow: .06em .06em 0 var(--cyan); }
.closing-copy p { font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.2; max-width: 640px; font-weight: 600; }
.final-tab { margin-top: 1rem; box-shadow: 8px 8px 0 var(--orange); }
.final-current { position: absolute; left: -4%; bottom: 2rem; width: 108%; height: 180px; }

.reactive-wave path { transform-origin: center; transition: transform .12s linear; }

@media (max-width: 900px) {
  .current-path, .buoy { grid-template-columns: 1fr; }
  .paper-strip:nth-child(2), .paper-strip:nth-child(3) { transform: rotate(1deg); }
  .scene { padding: 2rem 1.1rem; }
  .sticky-a { left: 1rem; top: 2rem; }
  .sticky-b { right: 1rem; bottom: 2rem; }
  .bubble { right: 1rem; top: 9rem; }
  .lighthouse { height: 520px; }
}
