:root {
  /* Interactions (the heart of the design Interactive elements IntersectionObserver handles scroll-based reveals without scroll event listeners. IntersectionObserver` with `threshold: 0.15` */
  --linen: #FAF4EC;
  --plaster: #F0E6D8;
  --sandstone: #E8D5C0;
  --sidewalk-color: #C4B8A8;
  --brownstone: #5B4A3F;
  --asphalt: #4A3F36;
  --pigeon: #8A7D6F;
  --accent-warm: #D4896A;
  --accent-cool: #7AACA0;
  --lantern: #E8C674;
  --gap: clamp(16px, 2.5vw, 28px);
  --sidewalk: clamp(40px, 6vw, 80px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--linen);
  color: var(--asphalt);
  font-family: "Nunito", sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.72;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: #9b8268;
  filter: url(#paper-grain);
  mix-blend-mode: multiply;
  opacity: 0.02;
  z-index: 20;
}

a {
  color: var(--accent-cool);
  text-decoration: none;
  background-image: linear-gradient(var(--accent-cool), var(--accent-cool));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transition: background-size 250ms ease;
}

a:hover { background-size: 100% 1.5px; }

.paper-filter { position: absolute; }

.sidewalk {
  position: absolute;
  top: 0;
  left: calc(var(--sidewalk) * 0.52);
  width: 42px;
  height: 100%;
  min-height: 3200px;
  z-index: 2;
  pointer-events: none;
}

.sidewalk::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19px;
  border-left: 1.5px dashed var(--sidewalk-color);
}

.sidewalk-icon {
  position: absolute;
  left: 0;
  width: 40px;
  fill: none;
  stroke: var(--sidewalk-color);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: center;
}

.pigeon-side { top: calc(100vh - 74px); fill: #F0E6D8; transition: transform 200ms ease; }
.pigeon-side.startled { transform: translateX(-8px) rotate(-5deg); }
.hydrant { top: 132vh; stroke: var(--accent-warm); }
.bike-side { top: 245vh; stroke: var(--accent-cool); width: 48px; left: -4px; }

.street-sign {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 15;
  width: 138px;
  height: 76px;
  background: none;
  color: var(--brownstone);
  transform-origin: 32px 14px;
  transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.street-sign:hover { transform: rotate(2deg); background-size: 0 0; }

.sign-post {
  position: absolute;
  left: 25px;
  top: 20px;
  width: 4px;
  height: 56px;
  background: var(--sidewalk-color);
  border-radius: 12px;
  transform: rotate(-1deg);
}

.sign-board {
  position: absolute;
  left: 0;
  top: 4px;
  padding: 4px 16px 5px;
  background: var(--plaster);
  border: 2px solid var(--sidewalk-color);
  border-radius: 10px 12px 9px 13px;
  font-family: "Baloo 2", cursive;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  box-shadow: 3px 4px 0 rgba(196, 184, 168, 0.28);
}

.arrival-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 8vh var(--gap) 10vh calc(var(--sidewalk) + 34px);
}

.arrival-copy { text-align: center; transform: translateY(-2vh); }

.draw-title {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
  color: var(--brownstone);
  letter-spacing: 0.02em;
}

.draw-title span {
  display: inline-block;
  clip-path: inset(0 100% 0 0 round 12px);
  animation: writeLetter 700ms ease forwards;
  animation-delay: calc(var(--i) * 110ms);
}

.tagline {
  margin: 0.65rem 0 1.2rem;
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
  color: var(--pigeon);
  opacity: 0;
  animation: scribbleIn 700ms ease 1.2s forwards;
}

.down-arrow {
  width: 58px;
  height: 72px;
  fill: none;
  stroke: var(--accent-warm);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: arrowPulse 2s ease-in-out infinite;
}

.neighborhood {
  position: relative;
  min-height: 160vh;
  padding: 7vh clamp(18px, 4vw, 54px) 12vh calc(var(--sidewalk) + clamp(34px, 5vw, 72px));
  column-count: 3;
  column-gap: var(--gap);
}

.route-map {
  position: absolute;
  inset: 0 clamp(18px, 4vw, 54px) 0 calc(var(--sidewalk) + clamp(34px, 5vw, 72px));
  width: calc(100% - var(--sidewalk) - clamp(52px, 9vw, 126px));
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

#routePath {
  fill: none;
  stroke: var(--sidewalk-color);
  stroke-width: 1.5;
  stroke-dasharray: 6 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lot {
  position: relative;
  z-index: 3;
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--gap);
  padding: clamp(18px, 3vw, 30px);
  background: var(--plaster);
  border-radius: 22px 18px 24px 19px;
  color: var(--asphalt);
  break-inside: avoid;
  box-shadow: 0 0 0 1px rgba(196, 184, 168, 0.22), 5px 6px 0 rgba(232, 213, 192, 0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease-out, transform 400ms ease-out, outline-color 400ms ease;
  overflow: hidden;
}

.lot:nth-child(3n) { margin-bottom: 12px; }
.lot:nth-child(4n) { margin-bottom: 24px; background: var(--sandstone); }
.lot:nth-child(5n) { border-radius: 18px 25px 19px 21px; }
.lot.is-visible { opacity: 1; transform: translateY(0); transition-delay: var(--delay, 0ms); }

.lot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid transparent;
  border-radius: inherit;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 400ms ease, border-color 200ms ease;
  pointer-events: none;
}

.lot:hover::after, .lot.tapped::after {
  border-color: var(--sidewalk-color);
  clip-path: inset(0 0 0 0);
}

.storefront { min-height: 140px; }
.brownstone-lot { min-height: 270px; }
.tower { min-height: 430px; }
.intro-lot { min-height: 510px; }
.sketch-lot { background: #F5EDE3; }
.final-note { background: #F5EDE3; }

h2, h3 {
  font-family: "Baloo 2", cursive;
  font-weight: 600;
  color: var(--brownstone);
  letter-spacing: 0.02em;
  line-height: 1.02;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
}

p { max-width: 38ch; margin: 0 0 0.85rem; }
.lot p:last-child { margin-bottom: 0; }

.annotation {
  font-family: "Caveat", cursive;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--pigeon);
  transform: rotate(-1.2deg);
}

.mono-label {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.08rem 0.42rem;
  border-radius: 7px;
  background: #F5EDE3;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  color: #A09385;
  line-height: 1.4;
}

.building {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 82px;
  height: 110px;
  opacity: 0.92;
  pointer-events: none;
}

.building::before {
  content: "";
  position: absolute;
  inset: 18px 12px 0;
  background: #E8D5C0;
  border: 1.7px solid var(--sidewalk-color);
  border-radius: 10px 12px 5px 6px;
}

.building span {
  position: absolute;
  width: 12px;
  height: 13px;
  border: 1.4px solid var(--sidewalk-color);
  border-radius: 4px 3px 5px 3px;
  background: var(--linen);
  transition: background 300ms ease;
}

.building .lit, .lot:hover .building span:first-child, .lot.tapped .building span:first-child { background: var(--lantern); }
.brownstone span:nth-child(1) { left: 25px; top: 31px; }
.brownstone span:nth-child(2) { left: 46px; top: 32px; }
.brownstone span:nth-child(3) { left: 25px; top: 55px; }
.brownstone span:nth-child(4) { left: 47px; top: 57px; }
.brownstone span:nth-child(5) { left: 25px; top: 80px; }
.brownstone span:nth-child(6) { left: 47px; top: 80px; }
.brownstone::after { content: ""; position: absolute; left: 33px; bottom: 0; width: 18px; height: 26px; border-radius: 11px 11px 0 0; border: 1.5px solid var(--sidewalk-color); background: var(--accent-warm); opacity: 0.75; }

.corner-shop { width: 94px; height: 85px; }
.corner-shop::before { inset: 24px 8px 0; }
.corner-shop::after { content:""; position:absolute; left:10px; top:19px; width:74px; height:12px; border-radius:8px; background: repeating-linear-gradient(90deg, var(--accent-warm) 0 10px, #F0E6D8 10px 20px); border:1px solid var(--sidewalk-color); }
.corner-shop span:nth-child(1){left:21px;top:43px;width:20px;height:18px}.corner-shop span:nth-child(2){left:51px;top:43px;width:20px;height:18px}.corner-shop span:nth-child(3){left:25px;top:67px}.corner-shop span:nth-child(4){left:55px;top:67px}

.row-house::after { content:""; position:absolute; left:48px; top:30px; width:20px; height:52px; border-left:1.4px solid var(--pigeon); border-right:1.4px solid var(--pigeon); transform: skewY(-12deg); }
.row-house span:nth-child(1){left:25px;top:31px}.row-house span:nth-child(2){left:47px;top:44px}.row-house span:nth-child(3){left:25px;top:57px}.row-house span:nth-child(4){left:48px;top:70px}.row-house span:nth-child(5){left:26px;top:83px}

.community { width: 118px; height: 78px; }
.community::before { inset: 26px 8px 0; }
.community::after { content:"commons"; position:absolute; left:19px; top:19px; font-family:"Caveat", cursive; color:var(--accent-warm); font-size:.88rem; transform:rotate(-2deg); }
.community span:nth-child(1){left:23px;top:43px}.community span:nth-child(2){left:46px;top:43px}.community span:nth-child(3){left:69px;top:43px}.community span:nth-child(4){left:92px;top:43px}

.large-sketch, .doodle, .coffee-doodle svg {
  fill: none;
  stroke: var(--sidewalk-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.large-sketch { width: min(100%, 240px); margin: 1.1rem auto 0; display: block; }
.large-sketch .window-dot { fill: var(--lantern); stroke: none; opacity: 0.85; }
.doodle { position: absolute; width: 46px; height: 46px; right: 18px; bottom: 18px; }
.postbox { stroke: var(--accent-warm); fill: rgba(212, 137, 106, 0.08); }
.tree { stroke: var(--accent-cool); }
.bicycle { width: 74px; height: 50px; stroke: var(--accent-cool); }
.coffee-doodle { margin-top: 1rem; width: 66px; }
.coffee-doodle .steam { opacity: 0.55; animation: steamFloat 2.4s ease-in-out infinite; }
.coffee-doodle .s2 { animation-delay: .35s; }
.coffee-doodle .s3 { animation-delay: .7s; }

.rooftop {
  position: relative;
  min-height: 38vh;
  padding: 9vh var(--gap) 2rem calc(var(--sidewalk) + 34px);
  overflow: hidden;
}

.stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sidewalk-color);
  opacity: 0;
  animation: starFade 900ms ease forwards;
}
.stars span:nth-child(1){left:22%;top:18%;animation-delay:100ms}.stars span:nth-child(2){left:39%;top:30%;animation-delay:320ms}.stars span:nth-child(3){left:54%;top:13%;animation-delay:540ms}.stars span:nth-child(4){left:69%;top:27%;animation-delay:760ms}.stars span:nth-child(5){left:82%;top:17%;animation-delay:980ms}.stars span:nth-child(6){left:15%;top:35%;animation-delay:1200ms}

.skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-left: calc(var(--sidewalk) + 20px);
}
.skyline span { display: block; flex: 1; max-width: 210px; border: 1.5px solid var(--sidewalk-color); border-bottom: 0; border-radius: 16px 16px 0 0; background: var(--sandstone); }
.skyline .b1{height:78px}.skyline .b2{height:128px;background:#D4C4AE}.skyline .b3{height:96px;background:#F0E6D8}.skyline .b4{height:154px}.skyline .b5{height:112px;background:#D4C4AE}.skyline .b6{height:88px;background:#F0E6D8}
.rooftop .annotation { position: relative; z-index: 2; margin: 0 auto; text-align: center; }

@keyframes writeLetter { to { clip-path: inset(0 0 0 0 round 12px); } }
@keyframes scribbleIn { from { opacity: 0; transform: translateY(4px) rotate(-1deg); } to { opacity: 1; transform: translateY(0) rotate(-1deg); } }
@keyframes arrowPulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes steamFloat { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-2px); opacity: .7; } }
@keyframes starFade { to { opacity: 1; } }

@media (max-width: 959px) {
  :root { --sidewalk: 24px; }
  .neighborhood { column-count: 2; padding-left: 58px; }
  .arrival-screen, .rooftop { padding-left: 58px; }
  .route-map { inset-left: 58px; width: calc(100% - 92px); }
  .sidewalk { left: 12px; }
  .pigeon-side { top: auto; bottom: 170px; }
}

@media (max-width: 599px) {
  .street-sign { transform: scale(.88); transform-origin: left top; }
  .arrival-screen, .neighborhood, .rooftop { padding-left: 46px; padding-right: 16px; }
  .neighborhood { column-count: 1; }
  .route-map { left: 46px; right: 16px; width: calc(100% - 62px); }
  .building { transform: scale(.6); transform-origin: right bottom; }
  .tower, .intro-lot { min-height: 340px; }
  .brownstone-lot { min-height: 230px; }
  .lot { margin-bottom: 16px; }
}
