:root {
  --ink: #352A36;
  --chalk: #9CCCDC;
  --peach: #F6B8A8;
  --butter: #FFF3D8;
  --cream: #FFF9EC;
  --berry: #9E5570;
  --sage: #BFD8A8;
  --geo: "League Spartan", "Poppins", "Futura", "Avenir Next", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--butter);
  font-family: var(--serif);
  overflow-x: hidden;
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .22;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(53,42,54,.13) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(158,85,112,.13) 0 1px, transparent 1px),
    linear-gradient(110deg, rgba(255,249,236,.5), rgba(246,184,168,.08));
  background-size: 38px 38px, 29px 29px, 100% 100%;
  mix-blend-mode: multiply;
}

.cursor-ripple {
  position: fixed;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--chalk);
  border-radius: 50%;
  pointer-events: none;
  z-index: 30;
  opacity: .75;
  transform: translate3d(-100px, -100px, 0) scale(1);
  transition: width .25s ease, height .25s ease, opacity .25s ease;
}

.scroll-meter {
  position: fixed;
  left: 22px;
  top: 22px;
  bottom: 22px;
  width: 5px;
  border-radius: 99px;
  background: rgba(53,42,54,.12);
  z-index: 25;
}

.scroll-meter span {
  display: block;
  width: 100%;
  height: 0;
  border-radius: inherit;
  background: linear-gradient(var(--chalk), var(--berry), var(--peach));
}

.story-map { position: relative; }

.chapter {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 7vw;
  isolation: isolate;
}

.hero {
  background:
    radial-gradient(circle at 18% 72%, rgba(156,204,220,.45), transparent 18rem),
    linear-gradient(135deg, var(--butter), var(--cream) 58%, #fbe6c9);
}

.poster-stack {
  position: relative;
  width: min(1120px, 88vw);
  min-height: 52vh;
  display: grid;
  place-items: center;
  border: 2px solid rgba(53,42,54,.08);
  background: rgba(255,249,236,.45);
  box-shadow: 18px 18px 0 rgba(246,184,168,.38), -14px -14px 0 rgba(156,204,220,.3);
  transform: rotate(-1.2deg);
}

.wordmark {
  margin: 0;
  font-family: var(--geo);
  font-size: clamp(4rem, 14vw, 12rem);
  line-height: .78;
  letter-spacing: -.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 5px 5px 0 var(--peach), -4px -4px 0 var(--chalk);
  animation: pasteIn 1s cubic-bezier(.2,.8,.2,1) both;
}

.tagline {
  position: absolute;
  left: 8%;
  bottom: 9%;
  max-width: 520px;
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  color: var(--berry);
}

.graffiti {
  font-family: var(--hand);
  color: var(--berry);
  font-size: clamp(1.05rem, 1.8vw, 1.65rem);
  letter-spacing: .03em;
  transform: rotate(-5deg);
}

.top-left { position: absolute; top: 9%; left: 7%; }
.right-note { position: absolute; right: 5%; bottom: 16%; color: var(--chalk); transform: rotate(7deg); }

.footstep-ripple, .plaza-rings span {
  position: absolute;
  border: 3px solid var(--chalk);
  border-radius: 50%;
  opacity: .58;
}

.footstep-ripple {
  width: 32vw;
  height: 32vw;
  left: -8vw;
  bottom: -8vw;
  animation: ripple 3.8s ease-out infinite;
}

.sticker {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 50%;
  font-family: var(--geo);
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  background: var(--sage);
  box-shadow: 0 12px 0 rgba(53,42,54,.15);
}
.sticker-one { width: 120px; height: 120px; right: 11vw; top: 16vh; transform: rotate(12deg); }
.sticker-two { width: 142px; height: 142px; left: 12vw; bottom: 12vh; background: var(--chalk); transform: rotate(-16deg); }

.curb {
  background:
    linear-gradient(90deg, rgba(53,42,54,.06) 1px, transparent 1px),
    linear-gradient(180deg, var(--cream), var(--butter) 50%, #f1d5b9 51%, var(--peach));
  background-size: 92px 100%, 100% 100%;
  align-items: start;
  justify-items: start;
}

.chapter-copy {
  max-width: 640px;
  z-index: 3;
}

.route-label {
  display: inline-block;
  font-family: var(--geo);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--berry);
  background: rgba(255,249,236,.72);
  padding: .55rem .8rem .35rem;
  box-shadow: 6px 6px 0 rgba(156,204,220,.45);
}

h2 {
  margin: 1.1rem 0 .8rem;
  font-family: var(--geo);
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: .82;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.chapter-copy p, .plaza-content p {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.35;
  color: rgba(53,42,54,.82);
}

.route-svg {
  position: absolute;
  inset: 8vh 2vw 0;
  width: 96vw;
  height: 86vh;
  z-index: 1;
}

#mainRoute, .route-shadow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#mainRoute {
  stroke: var(--chalk);
  stroke-width: 18;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 9px 0 rgba(53,42,54,.12));
}

.route-shadow {
  stroke: var(--berry);
  stroke-width: 5;
  stroke-dasharray: 18 22;
  opacity: .75;
}

.curb-card {
  position: absolute;
  z-index: 2;
  width: 150px;
  min-height: 132px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
  border: 2px solid rgba(53,42,54,.16);
  transform: rotate(var(--tilt));
  box-shadow: 10px 10px 0 rgba(191,216,168,.65);
}
.curb-card b { font-family: var(--geo); font-size: 4rem; line-height: .8; color: var(--berry); }
.curb-card span { font-family: var(--hand); font-size: 1.35rem; }
.card-a { --tilt: 7deg; right: 18vw; top: 20vh; }
.card-b { --tilt: -9deg; left: 32vw; bottom: 18vh; }
.card-c { --tilt: 5deg; right: 8vw; bottom: 10vh; }
.curb-note { position: absolute; left: 12vw; bottom: 12vh; z-index: 4; }

.field {
  background:
    radial-gradient(circle at 50% 50%, rgba(191,216,168,.8), transparent 28rem),
    radial-gradient(circle at 80% 18%, rgba(246,184,168,.55), transparent 20rem),
    var(--butter);
}

.centered { text-align: center; max-width: 780px; align-self: start; margin-top: 4vh; }

.node-field {
  position: absolute;
  inset: 28vh 8vw 10vh;
  z-index: 2;
}

.node-field::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  background:
    linear-gradient(32deg, transparent 47%, var(--berry) 48% 49%, transparent 50%),
    linear-gradient(143deg, transparent 48%, var(--chalk) 49% 50%, transparent 51%),
    radial-gradient(circle, rgba(53,42,54,.12) 0 2px, transparent 2px);
  background-size: 100% 100%, 100% 100%, 34px 34px;
  opacity: .62;
}

.story-node {
  position: absolute;
  border: 0;
  cursor: pointer;
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 0 rgba(53,42,54,.13);
  transition: transform .28s ease, box-shadow .28s ease;
}
.story-node:hover, .story-node.active { transform: translateY(-8px) scale(1.08) rotate(0deg); box-shadow: 0 20px 0 rgba(53,42,54,.11); }
.petal { left: 8%; top: 28%; width: 112px; height: 72px; border-radius: 64% 36% 62% 38%; background: var(--peach); transform: rotate(-18deg); }
.cap { left: 33%; top: 8%; width: 86px; height: 86px; border-radius: 50%; background: var(--chalk); transform: rotate(8deg); }
.ticket { left: 52%; top: 40%; width: 132px; height: 82px; border-radius: 10px; background: var(--cream); border: 3px dashed var(--berry); transform: rotate(-7deg); }
.light { right: 13%; top: 19%; width: 98px; height: 98px; border-radius: 50%; background: #FFF3D8; border: 8px solid var(--chalk); transform: rotate(13deg); }
.button { left: 22%; bottom: 6%; width: 96px; height: 96px; border-radius: 50%; background: var(--sage); transform: rotate(18deg); }
.berry { right: 24%; bottom: 10%; width: 120px; height: 76px; border-radius: 50%; background: var(--berry); color: var(--cream); transform: rotate(-13deg); }

.memory-card {
  position: absolute;
  right: 8vw;
  bottom: 7vh;
  z-index: 4;
  max-width: 360px;
  padding: 1.4rem 1.5rem;
  background: rgba(255,249,236,.88);
  color: var(--berry);
  font-family: var(--hand);
  font-size: 1.55rem;
  box-shadow: 12px 12px 0 rgba(156,204,220,.45);
  transform: rotate(2deg);
}

.retro-sun {
  position: absolute;
  left: 6vw;
  bottom: -7vw;
  width: 32vw;
  height: 32vw;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(246,184,168,.55) 0 14px, rgba(255,249,236,.3) 14px 28px);
}

.mural {
  background:
    linear-gradient(120deg, rgba(156,204,220,.5), transparent 38%),
    linear-gradient(255deg, rgba(158,85,112,.2), transparent 42%),
    var(--cream);
}

.mural-grid {
  position: absolute;
  inset: 7vh 5vw;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 1rem;
}

.witness-panel {
  margin: 0;
  padding: clamp(1.2rem, 2vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid rgba(53,42,54,.12);
  box-shadow: 16px 16px 0 rgba(53,42,54,.12);
  transform: rotate(var(--tilt));
}
.witness-panel span { font-family: var(--geo); font-size: clamp(3rem, 7vw, 7rem); font-weight: 900; line-height: .75; color: rgba(53,42,54,.25); }
.witness-panel p { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.85rem); line-height: 1.18; margin: 0; }
.panel-one { --tilt: -3deg; grid-column: 1 / 4; grid-row: 1 / 4; background: var(--peach); }
.panel-two { --tilt: 2deg; grid-column: 4 / 7; grid-row: 1 / 3; background: var(--chalk); }
.panel-three { --tilt: -1deg; grid-column: 3 / 6; grid-row: 3 / 6; background: var(--sage); }
.panel-four { --tilt: 4deg; grid-column: 1 / 3; grid-row: 4 / 6; background: var(--butter); }
.mural-copy { position: relative; z-index: 4; justify-self: end; align-self: end; background: rgba(255,249,236,.82); padding: 1.6rem; box-shadow: -12px 12px 0 rgba(158,85,112,.18); }

.plaza {
  min-height: 112vh;
  background:
    radial-gradient(circle at center, var(--cream) 0 18%, var(--butter) 18% 34%, rgba(156,204,220,.38) 34% 35%, transparent 35%),
    linear-gradient(180deg, var(--butter), var(--sage));
}

.plaza-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.plaza-rings span { animation: plazaPulse 5s ease-in-out infinite; }
.plaza-rings span:nth-child(1) { width: 28vw; height: 28vw; animation-delay: 0s; }
.plaza-rings span:nth-child(2) { width: 44vw; height: 44vw; animation-delay: .6s; border-color: var(--peach); }
.plaza-rings span:nth-child(3) { width: 62vw; height: 62vw; animation-delay: 1.2s; border-color: var(--berry); }
.plaza-rings span:nth-child(4) { width: 82vw; height: 82vw; animation-delay: 1.8s; border-color: var(--chalk); }

.plaza-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
  text-align: center;
  padding: 3rem;
  background: rgba(255,249,236,.78);
  border-radius: 50% 44% 52% 46%;
  box-shadow: 0 0 0 14px rgba(246,184,168,.25), 0 26px 0 rgba(53,42,54,.1);
}

.plaza-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 1rem 1.4rem .75rem;
  background: var(--berry);
  color: var(--cream);
  text-decoration: none;
  font-family: var(--geo);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  box-shadow: 8px 8px 0 var(--chalk);
  transition: transform .25s ease;
}
.plaza-link:hover { transform: translate(-3px, -3px); }
.plaza-note { position: absolute; right: 10vw; bottom: 13vh; }

.scene-dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: grid;
  gap: .85rem;
}
.scene-dots a {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--ink);
  position: relative;
  box-shadow: 3px 3px 0 rgba(53,42,54,.18);
}
.scene-dots a.active { background: var(--berry); border-color: var(--berry); }
.scene-dots span { position: absolute; right: 26px; top: -4px; opacity: 0; font-family: var(--hand); color: var(--berry); white-space: nowrap; transition: opacity .2s; }
.scene-dots a:hover span, .scene-dots a.active span { opacity: 1; }

.is-visible .chapter-copy, .is-visible .witness-panel, .is-visible .story-node, .is-visible .curb-card { animation: floatIn .8s cubic-bezier(.2,.8,.2,1) both; }
.is-visible .story-node:nth-child(2), .is-visible .witness-panel:nth-child(2) { animation-delay: .08s; }
.is-visible .story-node:nth-child(3), .is-visible .witness-panel:nth-child(3) { animation-delay: .16s; }
.is-visible .story-node:nth-child(4), .is-visible .witness-panel:nth-child(4) { animation-delay: .24s; }

@keyframes pasteIn { from { opacity: 0; transform: translateY(-42px) rotate(-3deg) scale(1.08); } to { opacity: 1; transform: translateY(0) rotate(0) scale(1); } }
@keyframes ripple { 0% { transform: scale(.25); opacity: .7; } 80%, 100% { transform: scale(1.45); opacity: 0; } }
@keyframes plazaPulse { 0%, 100% { transform: scale(.98); opacity: .35; } 50% { transform: scale(1.04); opacity: .65; } }
@keyframes floatIn { from { opacity: 0; transform: translateY(42px) rotate(var(--tilt, 0deg)); } to { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)); } }

@media (max-width: 760px) {
  .chapter { padding: 6rem 2rem; }
  .poster-stack { width: 82vw; min-height: 58vh; }
  .wordmark { font-size: 22vw; writing-mode: vertical-rl; letter-spacing: -.12em; }
  .tagline { left: 7%; right: 7%; bottom: 5%; }
  .sticker { transform: scale(.78); }
  .route-svg { inset: 20vh -18vw 0; width: 135vw; }
  .curb-card { width: 118px; min-height: 104px; }
  .curb-card b { font-size: 3rem; }
  .node-field { inset: 34vh 2vw 13vh; }
  .memory-card { left: 2rem; right: 2rem; bottom: 4vh; }
  .mural-grid { inset: 18vh 1rem 5vh; display: block; }
  .witness-panel { margin-bottom: 1rem; min-height: 20vh; }
  .mural-copy { align-self: start; }
  .scene-dots { display: none; }
  .scroll-meter { left: 10px; }
}
