/* Benches, with warmth — v0.01
   Palette:
   sky        #BDE8F7
   horizon    #EAF9FF
   grass      #8FD173
   grass-deep #6DBB58
   path       #F2DFB8
   wood       #C98A4B
   ink        #274253
   poppy      #FF6B5E
*/

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

:root {
  --sky: #BDE8F7;
  --horizon: #EAF9FF;
  --grass: #8FD173;
  --grass-deep: #6DBB58;
  --path: #F2DFB8;
  --wood: #C98A4B;
  --ink: #274253;
  --poppy: #FF6B5E;
  --walker-x: 24vw;
  --ground-h: 26vh;
}

html { scroll-behavior: auto; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
  background: var(--sky);
  overflow-x: hidden;
}

/* ---------- sky (fixed, never moves horizontally) ---------- */
.sky {
  position: fixed; inset: 0;
  background: linear-gradient(to bottom, #A5DFF4 0%, var(--sky) 40%, var(--horizon) 78%, #F6FBEF 100%);
  z-index: 0;
}
.sun {
  position: absolute; top: 7vh; left: 8vw;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle, #FFE49A 0%, #FFD66B 60%, rgba(255,214,107,0) 72%);
  box-shadow: 0 0 80px 30px rgba(255, 224, 138, 0.55);
}
.cloud {
  position: absolute;
  width: 180px; height: 54px;
  background: #fff; border-radius: 60px;
  opacity: 0.92;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after {
  content: ""; position: absolute; background: #fff; border-radius: 50%;
}
.cloud::before { width: 74px; height: 74px; top: -32px; left: 28px; }
.cloud::after  { width: 52px; height: 52px; top: -20px; right: 34px; }
.c1 { top: 9vh;  animation-duration: 95s;  transform: scale(1);    }
.c2 { top: 22vh; animation-duration: 140s; transform: scale(0.65); opacity: 0.8; animation-delay: -60s; }
.c3 { top: 5vh;  animation-duration: 120s; transform: scale(0.85); animation-delay: -30s; }
.c4 { top: 30vh; animation-duration: 170s; transform: scale(0.5);  opacity: 0.65; animation-delay: -100s; }
.c5 { top: 16vh; animation-duration: 110s; transform: scale(0.75); animation-delay: -85s; }
@keyframes drift {
  from { left: -260px; }
  to   { left: 110vw; }
}
.sunset {
  position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(to bottom, rgba(255,159,104,0.55), rgba(255,196,150,0.25) 55%, rgba(255,214,107,0) 90%);
  transition: opacity 0.4s linear;
  pointer-events: none;
}

/* ---------- viewport + parallax layers ---------- */
.viewport {
  position: fixed; inset: 0;
  overflow: hidden;
  z-index: 1;
}
.layer { position: absolute; inset: 0; will-change: transform; }
.layer .sprite { position: absolute; bottom: 0; }
.far { z-index: 1; }
.mid { z-index: 2; }

.world {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 20200px;
  z-index: 3;
  will-change: transform;
}
.ground {
  position: absolute; left: -100vw; right: -100vw; bottom: 0;
  height: var(--ground-h);
  background: linear-gradient(to bottom, var(--grass) 0%, var(--grass-deep) 100%);
  border-top: 4px solid #7EC463;
}
.path {
  position: absolute; left: -100vw; right: -100vw; bottom: calc(var(--ground-h) * 0.28);
  height: calc(var(--ground-h) * 0.34);
  background: linear-gradient(to bottom, #F7E7C6, var(--path));
  box-shadow: inset 0 4px 0 rgba(255,255,255,0.5), inset 0 -4px 0 rgba(0,0,0,0.05);
}

/* ---------- hero ---------- */
.hero-sign {
  position: absolute;
  left: var(--x);
  bottom: calc(var(--ground-h) + 6vh);
  width: min(560px, 84vw);
  text-align: left;
}
.eyebrow {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.12em;
  color: #4c7d5e;
  margin-bottom: 6px;
}
.hero-sign h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(64px, 11vw, 132px);
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.thesis {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: clamp(22px, 3.2vw, 36px);
  color: var(--ink);
  margin-top: 8px;
}
.hint {
  margin-top: 26px;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 700;
  color: #4c7d5e;
}
.hint-arrow { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

/* ---------- stops, benches, cards ---------- */
.stop { position: absolute; left: var(--x); bottom: 0; }

.bench-svg {
  position: absolute;
  left: 55px;
  bottom: calc(var(--ground-h) * 0.62);
  width: 190px; height: auto;
  filter: drop-shadow(0 6px 4px rgba(52, 84, 46, 0.25));
}

.card {
  position: absolute;
  left: -250px;
  bottom: calc(var(--ground-h) * 0.62 + 130px);
  width: min(500px, 86vw);
  background: #FFFDF7;
  border-radius: 22px;
  padding: 26px 30px;
  box-shadow: 0 14px 40px rgba(39, 66, 83, 0.16), 0 3px 8px rgba(39, 66, 83, 0.08);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stop.near .card { opacity: 1; transform: translateY(0); }
.card-wide { width: min(560px, 88vw); left: -280px; }

.plaque {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a5b34;
  background: linear-gradient(to bottom, #EFD9A9, #E3C489);
  border: 1px solid #D2AF6E;
  border-radius: 6px;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.card h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 3vw, 30px);
  margin-bottom: 10px;
  color: var(--ink);
}
.card p { font-size: 16.5px; line-height: 1.55; margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card strong { color: #b6483e; }
.card a { color: #2a7f62; }

.tools { list-style: none; }
.tools li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; font-size: 15.5px; line-height: 1.5; }
.tool-emoji { font-size: 22px; line-height: 1.3; flex: 0 0 auto; }

.count { list-style: none; margin-bottom: 12px; }
.count li { font-size: 15.5px; line-height: 1.5; margin-bottom: 8px; padding-left: 18px; position: relative; }
.count li::before { content: "🪑"; position: absolute; left: -6px; font-size: 11px; top: 3px; }
.big-number {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 4.5vw, 44px);
  color: #2a7f62;
  margin: 6px 0 2px;
}

.costs { list-style: none; margin-bottom: 12px; }
.costs li {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 15.5px; padding: 7px 0;
  border-bottom: 1.5px dashed #E5D9BC;
}
.costs li strong { font-family: 'Fredoka', sans-serif; color: #2a7f62; white-space: nowrap; }

/* ---------- end card ---------- */
.end-stop .card-end {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  width: min(540px, 88vw);
  left: -270px;
  bottom: calc(var(--ground-h) * 0.5);
  text-align: center;
  padding-bottom: 30px;
}
.end-stop.near .card-end { opacity: 1; transform: translateY(0); }
.postcard {
  width: 100%; border-radius: 14px; margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(39,66,83,0.18);
}
.cta {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: #fff !important;
  background: var(--poppy);
  border-radius: 999px;
  padding: 14px 36px;
  text-decoration: none;
  margin: 12px 0 18px;
  box-shadow: 0 8px 20px rgba(255, 107, 94, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 26px rgba(255, 107, 94, 0.5); }
.sources { font-size: 12px; line-height: 1.7; color: #6b7f8c; }
.sources a { color: #5a8f7b; }
.footer-line { font-size: 12.5px; color: #6b7f8c; margin-top: 10px; }
.footer-line a { color: #5a8f7b; }

/* ---------- scenery sprites ---------- */
.sprite { position: absolute; bottom: 0; pointer-events: none; }
.wm-blades { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.water {
  height: 30px;
  background: linear-gradient(to bottom, #8FCBE8, #6FB5DC);
  border-radius: 10px 10px 0 0;
  opacity: 0.7;
}
.pigeon {
  position: absolute; left: 150px; bottom: calc(var(--ground-h) * 0.64);
  animation: hop 2.8s ease-in-out infinite;
}
@keyframes hop {
  0%, 82%, 100% { transform: translateY(0); }
  88% { transform: translateY(-7px); }
  94% { transform: translateY(0); }
}
.chalk-note {
  position: absolute;
  left: 265px;
  bottom: calc(var(--ground-h) * 0.40);
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.95);
  transform: rotate(-4deg) skewX(-6deg);
  text-shadow: 0 1px 0 rgba(0,0,0,0.06);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ---------- walker ---------- */
.walker {
  position: fixed;
  left: var(--walker-x);
  bottom: calc(var(--ground-h) * 0.32);
  z-index: 5;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 4px 3px rgba(52, 84, 46, 0.3));
}
.walker.face-left { transform: scaleX(-1); }
.w-leg-back, .w-leg-front, .w-arm-back, .w-arm-front {
  animation-play-state: paused;
}
.walker.walking .w-leg-back  { animation: legswing 0.55s ease-in-out infinite running; transform-origin: 35px 82px; }
.walker.walking .w-leg-front { animation: legswing 0.55s ease-in-out infinite reverse running; transform-origin: 42px 82px; }
.walker.walking .w-arm-back  { animation: armswing 0.55s ease-in-out infinite reverse running; transform-origin: 30px 52px; }
.walker.walking .w-arm-front { animation: armswing 0.55s ease-in-out infinite running; transform-origin: 48px 52px; }
@keyframes legswing {
  0%, 100% { transform: rotate(24deg); }
  50% { transform: rotate(-24deg); }
}
@keyframes armswing {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(-18deg); }
}

/* ---------- hud ---------- */
.hud {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 16px;
  z-index: 6;
  background: rgba(255, 253, 247, 0.9);
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 0 4px 14px rgba(39, 66, 83, 0.14);
  display: flex; align-items: center; gap: 10px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.hud-benches { letter-spacing: 2px; font-size: 13px; }
.hud-benches .done { opacity: 1; }
.hud-benches .todo { opacity: 0.25; }

/* ---------- skip link / flat mode ---------- */
.skip-link {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 20;
  font-size: 12.5px; font-weight: 700;
  color: #38684f;
  background: rgba(255, 253, 247, 0.85);
  padding: 5px 14px; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(39, 66, 83, 0.1);
}
.skip-link:hover, .skip-link:focus { text-decoration: underline; }
a:focus-visible, .cta:focus-visible, .skip-link:focus-visible {
  outline: 3px solid var(--poppy); outline-offset: 2px;
}

body.flat { background: linear-gradient(to bottom, var(--sky), #F6FBEF); }
body.flat .viewport { position: static; height: auto; overflow: visible; }
body.flat .layer, body.flat .walker, body.flat .hud,
body.flat .ground, body.flat .path, body.flat .hint { display: none; }
body.flat .world { position: static; width: auto !important; transform: none !important; height: auto; }
body.flat .hero-sign { position: static; margin: 90px auto 30px; width: min(600px, 90vw); }
body.flat .stop { position: static; }
body.flat .card, body.flat .card-end {
  position: static; opacity: 1; transform: none;
  margin: 26px auto; width: min(600px, 90vw);
}
body.flat .bench-svg, body.flat .chalk-note, body.flat .pigeon, body.flat .sunset { display: none; }
body.flat #spacer { display: none; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  :root { --walker-x: 10vw; --ground-h: 22vh; }
  .card, .card-wide, .end-stop .card-end {
    width: 88vw; padding: 20px 20px;
    bottom: calc(var(--ground-h) * 0.62 + 108px);
    max-height: calc(100vh - var(--ground-h) - 150px);
    overflow-y: auto;
  }
  .card p, .tools li, .count li, .costs li { font-size: 14.5px; }
  .bench-svg { width: 140px; left: 30px; }
  .hud { font-size: 12px; padding: 6px 14px; white-space: nowrap; }
  .hud-benches { display: none; }
  .hero-sign { bottom: calc(var(--ground-h) + 10vh); }
  .walker svg { width: 78px; height: 127px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cloud, .hint-arrow, .wm-blades, .pigeon { animation: none !important; }
  .walker.walking .w-leg-back, .walker.walking .w-leg-front,
  .walker.walking .w-arm-back, .walker.walking .w-arm-front { animation: none !important; }
  .card, .end-stop .card-end { transition: opacity 0.2s linear; transform: none; }
}
