/* A single painted scene. Only the three HTML story presentations occupy its clearings. */
:root{color-scheme:light;--ink:#3e2817;--cream:#fff1d2;--green:#3d5420;font:100% Georgia,'Times New Roman',serif;scroll-behavior:smooth;scroll-padding-top:20px}
*{box-sizing:border-box}body{margin:0;background:#fbefd6;color:var(--ink)}img{display:block;max-width:100%}a{color:inherit;text-underline-offset:.2em}button,input{font:inherit;color:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button,input{min-width:0}[hidden]{display:none!important}
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #17669d;outline-offset:4px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.icon-definitions{position:absolute;width:0;height:0;overflow:hidden}.icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon.small{width:18px;height:18px}
.skip-link{position:fixed;z-index:100;top:10px;left:10px;padding:14px;background:var(--cream);transform:translateY(-200%)}.skip-link:focus{transform:none}.storybook{max-width:1700px;margin:auto;position:relative;isolation:isolate}
.woodland-scene{position:relative;aspect-ratio:1035/1520;display:grid;grid-template-rows:34% 54% 12%;isolation:isolate;container-type:inline-size}
.scene-art{position:absolute;inset:0;z-index:-1;pointer-events:none;mask-image:linear-gradient(to right,transparent,#000 3%,#000 97%,transparent);}
.scene-art img{width:100%;height:100%;object-fit:contain}.scene-art:after{content:'';position:absolute;inset:95% 0 0;background:linear-gradient(transparent,#fbefd6)}
.hero{text-align:center;padding-top:2.7%;align-self:start}.hero h1{margin:0 auto;width:52%;max-width:700px;line-height:0}.brand-logo{width:100%;height:auto}
.story-trail{min-width:0;min-height:0}.trail-stories{height:100%;display:grid;grid-template-rows:repeat(3,minmax(0,1fr))}.trail-stop{display:flex;align-items:center;justify-content:center;min-width:0}.story-feature{width:66%;max-width:750px;display:grid;grid-template-columns:1fr 1fr;gap:2.5%;align-items:center;padding:clamp(9px,1.3cqw,18px);border:1px solid #cfad6b;border-radius:clamp(15px,2.8cqw,40px);background:linear-gradient(110deg,#fff1d9ed,#fff4d9e8);box-shadow:inset 0 0 0 3px #fff9e5c9,0 4px 7px #6a43142a}
.story-thumbnail{display:block;border:2px solid #fff8dd;border-radius:clamp(9px,1.5cqw,20px);overflow:hidden;box-shadow:0 0 0 1px #c4974c,0 2px 4px #6a431422;background:#e8d9b9}.story-thumbnail img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}.story-info{min-width:0;text-align:center;padding:0 2%}.story-info h3{font-size:clamp(1.15rem,3.1cqw,2rem);line-height:1.06;margin:0 0 .7em;text-wrap:balance;overflow-wrap:anywhere}.trail-stop:nth-child(even) .story-thumbnail{order:2}.trail-stop:nth-child(even) .story-info{order:1}
.story-actions{display:flex;gap:clamp(6px,1.2cqw,18px);justify-content:center}.story-action{display:flex;align-items:center;justify-content:center;gap:.5em;flex:1;min-height:44px;padding:.55em .65em;border:1px solid #cba368;border-radius:10px;background:linear-gradient(#fffcf2,#f8e5c2);box-shadow:0 2px 2px #a6743f80,inset 0 0 0 2px #fff9e6;text-decoration:none;font-weight:600;font-size:1rem;white-space:nowrap}.story-action:hover{background:#fff7e5;border-color:#62743a}.pdf-action .icon{color:var(--green)}
.all-stories{padding:0 7% 20px;position:relative;container-type:inline-size}.decorated-heading{display:flex;align-items:center;justify-content:center;gap:24px;font-size:clamp(2rem,4.8vw,2.5rem);font-weight:500;line-height:1.1;margin:0 0 .3em}.decorated-heading svg{width:65px;height:40px}.decorated-heading svg:last-child{transform:scaleX(-1)}.search-form{display:flex;align-items:center;gap:12px;min-height:44px;border:1px solid #b5ac8d;border-radius:40px;padding:0 16px;background:#fffcf4dd;box-shadow:inset 0 1px 3px #6b613021}.library-search{max-width:760px;width:68%;margin:0 auto}.search-form input{width:100%;flex:1;border:0;background:transparent;min-height:44px;padding:8px 0;font-size:1.1rem}.search-form input:focus{outline:0}.search-form:focus-within{outline:3px solid #17669d;outline-offset:3px}.search-form input::-webkit-search-cancel-button{display:none}.search-submit,.clear-search{background:none;border:0;display:grid;place-items:center;min-height:44px;min-width:32px}.results-count{font: .82rem/1.4 system-ui,sans-serif;text-align:center;color:#645b43;min-height:1.2em;margin:12px 0 20px}
.story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;max-width:948px;margin-inline:auto;align-items:stretch}.library-card{display:grid;width:100%;max-width:300px;justify-self:center;grid-template-rows:auto 1fr auto;min-width:0;text-align:center}.library-card h3{font-size:clamp(1.1rem,2.25cqw,1.25rem);line-height:1.08;margin:16px 0 20px;text-wrap:balance;overflow-wrap:anywhere}.library-card .story-actions{padding:0 3%}.library-card .story-action{font-size:1rem}.library-card .story-thumbnail{border-radius:12px}.empty-state,.load-error{text-align:center;padding:30px 12px}.empty-state>.icon{margin:auto}.primary-button{background:var(--green);color:#fff9e5;border:0;border-radius:25px;padding:14px 22px;min-height:44px}.loading-message{text-align:center;align-self:center;padding:20px}
.site-footer{position:relative;isolation:isolate;padding:32px 10% 52px;text-align:center;min-height:200px}.footer-top{display:flex;align-items:center;justify-content:center;gap:40px;position:relative;z-index:1}.footer-brand{width:clamp(170px,26%,320px)}.footer-brand img{width:100%;height:auto}.site-footer nav{display:flex;align-items:center;gap:30px;border-left:1px solid #8d6e41;padding-left:35px}.site-footer nav a{display:inline-flex;align-items:center;min-height:44px;font-size:1.15rem;text-decoration:none}.site-footer nav a:hover{text-decoration:underline}.copyright{font-size:.9rem;margin:12px 0 0}.footer-corner,.footer-ground{position:absolute;pointer-events:none;z-index:-1;mask-image:linear-gradient(transparent,#000 30%)}.footer-corner{bottom:0;width:23%;height:auto}.footer-corner-left{left:0}.footer-corner-right{right:0}.footer-ground{bottom:0;left:0;width:100%;height:auto;mask-image:linear-gradient(to right,transparent,#000 4%,#000 96%,transparent)}
.footer-ground{mask-image:linear-gradient(transparent,#000 55%);}
@media(min-width:1030px){.hero{padding-top:4%}}
@media(width > 700px){.trail-stop:nth-child(3) .story-feature{transform:translateY(-9%)}}
@media(max-width:1000px) and (width > 700px){.story-feature{width:70%;gap:2%;padding:1.3%}.story-action{padding:.45em .35em}.story-actions{gap:7px}}
/* Match the mobile artwork at the same breakpoint as index.html's picture source.
   Keep the approved phone composition and a single-column collection. */
@media(max-width:700px){
 .woodland-scene{aspect-ratio:1/3.6;grid-template-rows:26% 60% 14%}.scene-art img{object-fit:cover}.hero{padding-top:1%}.hero h1{width:86%}.story-feature{width:58%;grid-template-columns:1fr;gap:8px;padding:9px;border-radius:18px}.trail-stop:nth-child(even) .story-thumbnail,.trail-stop:nth-child(even) .story-info{order:initial}.story-info{padding:0}.story-info h3{font-size:clamp(1.1rem,5cqw,1.9rem);line-height:1.08;margin:3px 0 10px}.story-action{font-size:1rem;padding:8px 6px;gap:5px;border-radius:8px}.story-action .icon{width:22px;height:22px}.story-actions{gap:8px}.story-thumbnail{border-radius:11px}.all-stories{padding:0 6% 8px}.decorated-heading{font-size:2.3rem;gap:14px}.decorated-heading svg{width:40px;height:30px}.library-search{width:100%}.story-grid{grid-template-columns:1fr;gap:26px 18px}.library-card{width:min(75%,300px)}.library-card h3{font-size:1.1rem;margin:12px 0 16px}.library-card .story-actions{padding:0;gap:6px;flex-wrap:wrap}.library-card .story-action{flex-basis:auto;font-size:1rem;padding:8px 5px;gap:5px}.library-card .icon{width:18px;height:18px}.site-footer{padding:24px 6% 60px;min-height:190px}.footer-top{gap:20px}.footer-brand{width:44%}.site-footer nav{gap:13px;padding-left:16px}.site-footer nav a{font-size:1rem}.copyright{margin-top:8px}.footer-corner{width:32%}
 .trail-stop:nth-child(3) .story-feature{transform:translateY(-5%)}.story-feature .story-thumbnail{width:min(100%,230px);justify-self:center}
}
@media(max-width:420px){.library-card{width:min(75%,225px);justify-self:center}.library-card .story-action{font-size:1rem}.story-feature{width:61%}.site-footer nav{gap:10px;padding-left:12px}.footer-top{gap:12px}.story-feature .story-thumbnail{width:min(100%,190px)}}
@media(prefers-reduced-motion:reduce){:root{scroll-behavior:auto}}

/* Layer illustrated planting beds behind the cards, inside each bend. */
.trail-stop { position: relative; isolation: isolate; }
.trail-stop::before, .trail-stop::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 41%;
  height: 82%;
  pointer-events: none;
  background:
    url("../images/footer-ferns.webp") no-repeat left bottom / 100% auto,
    url("../images/footer-flowers.webp") no-repeat right top / 86% auto;
  mask-image: linear-gradient(transparent, #000 10% 91%, transparent);
}
.trail-stop::before { left: 12%; top: 9%; }
.trail-stop::after { right: 11%; top: 7%; transform: scaleX(-1); }
.trail-stop:nth-child(even)::before { left: 10%; transform: scaleX(-1); }
.trail-stop:nth-child(even)::after { right: 13%; transform: none; }
.trail-stop:nth-child(3)::before { top: 4%; height: 74%; }
.trail-stop:nth-child(3)::after { top: 5%; height: 70%; }

@media (width > 700px) {
  .trail-stop:first-child {
    background: url("../images/footer-ferns.webp") no-repeat center 12% / 42% auto;
  }
  .trail-stop:nth-child(3) {
    background: url("../images/footer-ferns.webp") no-repeat 42% 88% / 39% auto;
  }
}

@media (max-width: 700px) {
  .trail-stop::before, .trail-stop::after {
    width: 42%;
    height: 82%;
    background:
      url("../images/footer-ferns.webp") no-repeat left bottom / 100% auto,
      url("../images/footer-flowers.webp") no-repeat right center / 100% auto,
      url("../images/footer-ferns.webp") no-repeat left top / 90% auto;
  }
  .trail-stop::before, .trail-stop:nth-child(even)::before { left: 7%; }
  .trail-stop::after, .trail-stop:nth-child(even)::after { right: 7%; }
  .site-footer { min-height: 0; padding-top: 12px; padding-bottom: clamp(36px, 10vw, 55px); }
  .site-footer .copyright { margin-top: calc(8px + 1lh); }
}

/* Size the branding separately from the continuous woodland illustration. */
.hero { padding-top: 9.6cqw; }
.hero h1 { width: 39%; max-width: 525px; }
.hero-tagline {
  /* Account for transparent padding in both PNGs to reach 80% visible width. */
  width: 81.55%;
  height: auto;
  margin: -2% auto 0;
}
.library-card { grid-template-rows: auto auto; row-gap: 10px; }

@media (width > 700px) {
  .trail-stop .story-feature {
    width: 52%;
    max-width: 560px;
    grid-template-columns: minmax(0, 2.2fr) minmax(106px, 1fr);
  }
  .trail-stop:nth-child(even) .story-feature {
    grid-template-columns: minmax(106px, 1fr) minmax(0, 2.2fr);
  }
  .story-feature .story-actions {
    flex-direction: column;
    gap: clamp(8px, 1cqw, 16px);
  }
}

@media (max-width: 700px) {
  .hero { padding-top: 13cqw; }
  .hero h1 { width: 64.5%; max-width: none; }
}

.floating-library{position:fixed;z-index:40;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#fff8e9eb;color:#405626;box-shadow:0 2px 8px #30271133;border:1px solid #bda36a;text-decoration:none;}
.spotify-icon{display:inline-block;width:24px;height:24px;object-fit:contain;flex-shrink:0;}
.spotify-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;}
