/* Lucy's Books. Colours come from the pictures: the sky on the covers, the green
   front door, the twins' stripes and their yellow wellies. */
:root {
  --sky: #CFEBFB;
  --sky-pale: #EEF8FE;
  --chalk: #FFFDF7;
  --ink: #1B2559;
  --green: #2F9E44;
  --green-deep: #1F7030;
  --red: #E4443A;
  --yellow: #FFC61A;
  --night: #131B47;
  --display: "Grandstander", "Comic Sans MS", "Chalkboard SE", sans-serif;
  --body: "Andika", "Trebuchet MS", "Segoe UI", sans-serif;
  --line: 3px solid var(--ink);
  --drop: 5px 5px 0 var(--ink);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sky-pale);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--yellow); }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); padding: .6rem 1rem; z-index: 10; font-weight: 700; }
.skip:focus { left: 0; }
.lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.5; }
.hidden { display: none !important; }

/* Buttons: flat stickers with a hard shadow, like cut-out paper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.15;
  text-decoration: none; text-align: center; cursor: pointer;
  color: var(--ink); background: var(--chalk);
  border: var(--line); border-radius: 999px; padding: .8rem 1.5rem;
  box-shadow: var(--drop);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }
.btn-buy { background: var(--yellow); }
.btn-big { font-size: 1.35rem; padding: 1rem 1.9rem; }
.btn-small { font-size: 1rem; padding: .5rem 1.1rem; box-shadow: 3px 3px 0 var(--ink); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--chalk); }
.btn small { font-family: var(--body); font-weight: 700; font-size: .85em; }
.text-link { font-weight: 700; text-underline-offset: .2em; text-decoration-thickness: 2px; }
.text-link:hover { text-decoration-thickness: 4px; }

/* Header */
.site-head { background: var(--sky); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.brand svg { width: 34px; height: 44px; flex: none; }
.site-nav { display: flex; align-items: center; gap: .3rem 1.4rem; flex-wrap: wrap; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.site-nav a { text-decoration: none; padding: .35rem 0; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Seasonal strip above the hero */
.strip { background: var(--night); color: var(--chalk); text-align: center; font-weight: 700; font-size: 1rem; }
.strip a { display: block; padding: .55rem 1rem; text-decoration: none; }
.strip a span { text-decoration: underline; text-underline-offset: .2em; }

/* Hero: the house wall and the green door */
.hero { background: var(--sky); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: end; padding-top: clamp(1.5rem, 4vw, 3.5rem); }
.hero-text { padding-bottom: clamp(2rem, 6vw, 5rem); }
.hero-text h1 { margin-bottom: 1.1rem; }
.hero-text .lede { margin-bottom: 1.8rem; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; align-items: center; }
.house { position: relative; background: #FFF4D6; border: var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; padding: clamp(1.2rem, 3vw, 2.4rem) clamp(1.2rem, 3vw, 2.4rem) 0; max-width: 470px; justify-self: center; width: 100%; }
.house-number { position: absolute; top: .8rem; right: 1rem; font-family: var(--display); font-weight: 800; font-size: .95rem; background: var(--chalk); border: 2px solid var(--ink); border-radius: 8px; padding: .1rem .6rem; }
.doorway { position: relative; aspect-ratio: 5 / 7; border: var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--ink); perspective: 1400px; margin-top: 1.6rem; }
.doorway > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 8px 8px 0 0; }
.door {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; cursor: pointer;
  background: var(--green); border: 0; border-radius: 8px 8px 0 0;
  transform-origin: left center; transform: rotateY(85deg);
  transition: transform 1.1s cubic-bezier(.3, .9, .3, 1);
  box-shadow: inset 0 0 0 10px #38B250, inset 0 0 0 13px var(--green-deep);
}
.door.shut { transform: rotateY(0deg); }
.door i { position: absolute; border: 3px solid var(--green-deep); border-radius: 6px; background: #37AC4D; }
.door i:nth-child(1) { left: 14%; top: 9%; width: 30%; height: 34%; }
.door i:nth-child(2) { right: 14%; top: 9%; width: 30%; height: 34%; }
.door i:nth-child(3) { left: 14%; top: 60%; width: 30%; height: 30%; }
.door i:nth-child(4) { right: 14%; top: 60%; width: 30%; height: 30%; }
.door b { position: absolute; left: 32%; right: 32%; top: 48.5%; height: 5.5%; background: var(--yellow); border: 3px solid var(--ink); border-radius: 6px; }
.door em { position: absolute; right: 7%; top: 49%; width: 9%; aspect-ratio: 1; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; }
.door-hint { text-align: center; font-family: var(--display); font-weight: 700; font-size: 1rem; margin: 0; padding: .5rem 0; max-width: none; background: #B9B4A5; border: var(--line); border-bottom: 0; margin-inline: -1rem; border-radius: 8px 8px 0 0; }

/* Ground strips */
.hedge { height: 34px; background:
  radial-gradient(circle at 20px 34px, var(--green) 26px, transparent 27px) 0 0 / 40px 34px repeat-x,
  var(--sky); }
.hedge.on-pale { background-color: var(--sky-pale); }
.grass { background: var(--green); color: var(--chalk); }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-head { margin-bottom: clamp(1.6rem, 4vw, 3rem); }
.section-head p { margin-top: .9rem; }
.band-chalk { background: var(--chalk); }
.band-sky { background: var(--sky); }

/* Books on the lane */
.lane { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.6rem 2rem; list-style: none; padding: 0; margin: 0; }
.lane li { display: flex; flex-direction: column; }
.book {
  display: block; position: relative; border: var(--line); border-radius: 4px 10px 10px 4px;
  box-shadow: 8px 8px 0 var(--bk, var(--ink)); background: var(--chalk);
  transition: transform .18s ease;
}
.book img { border-radius: 2px 7px 7px 2px; width: 100%; aspect-ratio: 1; }
.book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5%; background: linear-gradient(90deg, rgba(27, 37, 89, .28), rgba(27, 37, 89, 0) 70%, rgba(255, 255, 255, .25)); z-index: 1; border-radius: 2px 0 0 2px; }
a.book:hover { transform: rotate(-2deg) translateY(-6px); }
.lane .num { font-family: var(--display); font-weight: 800; font-size: .95rem; margin: 1.5rem 0 .3rem; color: var(--bk-deep); }
.lane h3 { margin-bottom: .5rem; }
.lane h3 a { text-decoration: none; }
.lane h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .15em; }
.lane p { font-size: 1.02rem; line-height: 1.5; margin-bottom: 1.1rem; }
.lane .buy { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.price { font-weight: 700; font-size: 1rem; }

/* Seasonal feature: Christmas Eve night */
.night {
  background-color: var(--night); color: var(--chalk);
  background-image:
    radial-gradient(circle, #fff 1.6px, transparent 2.2px), radial-gradient(circle, #fff 1.1px, transparent 1.7px), radial-gradient(circle, rgba(255, 255, 255, .7) 2.4px, transparent 3px);
  background-size: 190px 170px, 130px 150px, 310px 290px;
  background-position: 20px 30px, 80px 110px, 150px 60px;
}
.feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feature .book { --bk: var(--red); transform: rotate(-3deg); }
.feature h2 { margin-bottom: 1rem; }
.feature .whisper { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.3vw, 1.75rem); line-height: 1.3; color: var(--yellow); margin-bottom: 1.2rem; max-width: 26ch; }
.feature .hero-actions { margin-top: 1.6rem; }
.feature .btn { box-shadow: 5px 5px 0 #000; border-color: #000; }
.feature .btn:hover { box-shadow: 3px 3px 0 #000; }
.snaps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: clamp(2rem, 4vw, 3rem); }
.snaps img { border-radius: 14px; border: 3px solid var(--chalk); width: 100%; }

/* Shout along: the refrains set big */
.shout { background: var(--bk, var(--red)); color: #fff; transition: background-color .35s ease; }
.shout-tabs { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: clamp(1.6rem, 4vw, 2.8rem); }
.shout blockquote { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 6.2vw, 5.2rem); line-height: 1.02; letter-spacing: -0.015em; max-width: 17ch; text-wrap: balance; min-height: 4.2em; }
.shout-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: clamp(1.6rem, 4vw, 2.6rem); }
.shout-foot p { margin: 0; font-weight: 700; }

/* Why they read aloud well */
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.why-pic { border: var(--line); border-radius: 22px; box-shadow: var(--drop); transform: rotate(-1.5deg); }
.why dl { margin: 1.8rem 0 0; }
.why dt { font-family: var(--display); font-weight: 800; font-size: 1.4rem; margin-top: 1.3rem; }
.why dd { margin: .15rem 0 0; max-width: 46ch; }

/* Who lives on Pickle Lane */
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 2rem 1.4rem; list-style: none; padding: 0; margin: 0; }
.cast li { text-align: center; }
.cast img { width: 132px; height: 132px; border-radius: 50%; border: var(--line); margin: 0 auto .7rem; background: var(--sky); }
.cast strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1.15; }
.cast span { display: block; font-size: .98rem; line-height: 1.4; margin-top: .25rem; }

/* Activity tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; list-style: none; padding: 0; margin: 0 0 2.2rem; }
.tile { display: block; text-decoration: none; background: var(--chalk); border: var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--drop); transition: transform .12s ease, box-shadow .12s ease; height: 100%; }
.tile:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: var(--line); }
.tile div { padding: 1rem 1.2rem 1.2rem; }
.tile h3 { margin-bottom: .3rem; }
.tile p { margin: 0; font-size: 1rem; line-height: 1.45; }

/* About */
.about { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.about img { border-radius: 50%; border: var(--line); }
.about h2 { margin-bottom: 1rem; }
.about .links { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin: 0; }

/* Footer */
.site-foot { background: var(--green); color: #fff; padding-block: 2.4rem 2.8rem; font-size: 1rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.site-foot h2 { font-size: 1.25rem; margin-bottom: .6rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .35rem; }
.site-foot a { text-underline-offset: .2em; }
.site-foot .small { grid-column: 1 / -1; font-size: .88rem; margin: 0; max-width: none; opacity: .95; }

/* Book page */
.crumb { font-weight: 700; font-size: 1rem; padding-top: 1.4rem; margin: 0; }
.book-top { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem); }
.book-top .book { box-shadow: 12px 12px 0 var(--bk); transform: rotate(-2deg); margin: 1rem 1rem 1.5rem .5rem; }
.book-top h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); margin-bottom: .7rem; }
.book-top .sub { font-weight: 700; color: var(--bk-deep); margin-bottom: 1.2rem; }
.buybox { margin: 1.8rem 0 1.4rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.buybox .also { display: flex; flex-wrap: wrap; gap: .8rem 1rem; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem .6rem; }
.facts li { background: var(--bk-tint); border: 2px solid var(--ink); border-radius: 999px; padding: .15rem .9rem; font-weight: 700; font-size: .98rem; }
.refrain { background: var(--bk); color: #fff; }
.refrain p.how { font-weight: 700; margin: 0 0 .8rem; }
.refrain blockquote { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 5vw, 4rem); line-height: 1.05; max-width: 26ch; text-wrap: balance; }
.inside { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.inside button { padding: 0; border: var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #fff; box-shadow: var(--drop); }
.inside img { width: 100%; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 3rem; margin: 0; }
.points dt { font-family: var(--display); font-weight: 800; font-size: 1.4rem; }
.points dd { margin: .2rem 0 0; }
.points > div { border-top: 4px solid var(--bk); padding-top: .8rem; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.gallery img { border-radius: 16px; border: var(--line); width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; justify-content: space-between; }
.cta-row h2 { max-width: 16ch; }
dialog.zoom { border: var(--line); border-radius: 14px; padding: 0; max-width: min(94vw, 900px); background: #fff; }
dialog.zoom::backdrop { background: rgba(19, 27, 71, .8); }
dialog.zoom img { width: 100%; }
dialog.zoom form { position: absolute; top: .6rem; right: .6rem; }

/* Activities */
.game { background: var(--chalk); border: var(--line); border-radius: 24px; padding: clamp(1.1rem, 3vw, 2.2rem); box-shadow: var(--drop); }
.game + .game { margin-top: 2.6rem; }
.game h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: .4rem; }
.game-bar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin: 1rem 0 1.3rem; }
.game-bar .status { font-weight: 700; margin: 0 0 0 auto; }
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; max-width: 620px; margin-inline: auto; }
.card { aspect-ratio: 1; padding: 0; border: var(--line); border-radius: 14px; cursor: pointer; position: relative; background: var(--green); overflow: hidden;
  background-image: linear-gradient(var(--green-deep), var(--green-deep)), linear-gradient(var(--green-deep), var(--green-deep)); background-size: 30% 34%, 30% 34%; background-position: 14% 22%, 86% 22%; background-repeat: no-repeat; }
.card::after { content: ""; position: absolute; right: 12%; top: 62%; width: 12%; aspect-ratio: 1; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s ease; z-index: 1; }
.card.up img { opacity: 1; }
.card.done { border-color: var(--green); box-shadow: 0 0 0 4px var(--yellow); }
.puzzle { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin-inline: auto; border: var(--line); border-radius: 10px; overflow: hidden; background: var(--ink); display: grid; gap: 2px; }
.piece { padding: 0; border: 0; cursor: pointer; background-repeat: no-repeat; }
.piece.picked { outline: 5px solid var(--yellow); outline-offset: -5px; z-index: 1; }
.puzzle.solved { gap: 0; }
.pick-pics { display: flex; gap: .6rem; flex-wrap: wrap; }
.pick-pics button { padding: 0; width: 64px; height: 64px; border: var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: none; }
.pick-pics button[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--yellow); }
.rhyme { max-width: 720px; margin-inline: auto; text-align: center; }
.rhyme .lines { font-family: var(--display); font-weight: 700; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.3; margin: 0 auto 1.4rem; max-width: 26ch; min-height: 5.2em; }
.rhyme .gap { display: inline-block; min-width: 4.5ch; border-bottom: 4px solid var(--ink); color: var(--green-deep); }
.rhyme .choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.rhyme .choices .btn { min-width: 8rem; font-size: 1.35rem; }
.rhyme .choices .btn.wrong { background: #E6E3DA; text-decoration: line-through; box-shadow: none; transform: translate(5px, 5px); cursor: default; }
.rhyme .choices .btn.right { background: var(--green); color: #fff; }
.rhyme .after { min-height: 5.5rem; margin-top: 1.4rem; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.rhyme .after p { margin: 0; max-width: none; font-weight: 700; }
.win { font-family: var(--display); font-weight: 800; font-size: 1.4rem; text-align: center; margin: 1.2rem auto 0; max-width: none; }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.sheets a { text-decoration: none; display: block; }
.sheets img { border: var(--line); border-radius: 8px; box-shadow: var(--drop); background: #fff; width: 100%; transition: transform .15s ease; }
.sheets a:hover img { transform: rotate(-2deg); }
.sheets strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.2; margin-top: 1rem; }
.sheets span { display: block; font-size: .95rem; }
.jump { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.plain h2 { font-size: 1.6rem; margin: 2rem 0 .6rem; }
.plain h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }

@media (max-width: 980px) {
  .lane { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .site-foot .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 1.06rem; }
  .hero .wrap, .feature, .why, .book-top, .about { grid-template-columns: 1fr; }
  .hero-text { padding-bottom: 0; }
  .house { max-width: 330px; }
  .feature .book { max-width: 300px; margin-inline: auto; }
  .tiles { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
  .about img { width: 150px; }
  .book-top .book { max-width: 360px; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .brand { font-size: 1.35rem; }
  .site-nav { gap: .2rem 1.1rem; font-size: 1.02rem; }
  .game-bar .status { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .lane { grid-template-columns: 1fr; }
  .lane li { max-width: 360px; }
  .inside { grid-template-columns: 1fr; }
  .snaps { gap: .5rem; }
  .memory { gap: .45rem; }
  .cast { grid-template-columns: repeat(2, 1fr); }
  .cast img { width: 112px; height: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-head, .site-foot, .strip { display: none; }
}
