/* You Choose Adventures.
   A warm paper world with flat, confident colour, big friendly type, and a cast that stands right on the page. */

@font-face { font-family: "Bricolage Grotesque Variable"; src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Anton"; src: url("../fonts/anton-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree Variable"; src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  --paper: #fff6d9;
  --paper-2: #ffeaa8;
  --ink: #1b1712;
  --ink-soft: #5d554a;
  --line: rgba(27, 23, 18, .14);

  --sun: #ffc93c;
  --coral: #f4573d;
  --sky: #4d8ff0;
  --leaf: #39ab6a;
  --berry: #e65f93;
  --plum: #7a5bd0;
  --tangerine: #ff8a2b;
  --lagoon: #25bfb0;

  /* the pastel of each story colour, used behind the place paintings */
  --tone-red: #ffd9cf; --tone-yellow: #ffeaa6; --tone-green: #cfeedb; --tone-blue: #d3e3ff;
  --tone-pink: #ffd6e4; --tone-orange: #ffdcb8; --tone-teal: #c6f0ea;

  --display: "Bricolage Grotesque Variable", "Arial Rounded MT Bold", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --accent: var(--sun);
}

.color-red { --accent: var(--coral); } .color-yellow { --accent: var(--sun); } .color-green { --accent: var(--leaf); }
.color-blue { --accent: var(--sky); } .color-pink { --accent: var(--berry); } .color-orange { --accent: var(--tangerine); } .color-teal { --accent: var(--lagoon); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; font-weight: 450;
  overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--display); font-weight: 750; line-height: 1; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { text-align: center; padding: 2rem; font-family: var(--display); font-size: 1.4rem; }
.view { animation: fade .5s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- shared: buttons, links, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem; background: var(--ink); color: var(--paper);
  border-radius: 999px; padding: 1.05rem 2rem; font-family: var(--display); font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em;
  text-decoration: none; transition: transform .35s var(--spring), background .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 .9rem 0 -.5rem rgba(27, 23, 18, .18); }
.btn:active { transform: translateY(0) scale(.99); }
.btn .arrow { transition: transform .35s var(--spring); }
.btn:hover .arrow { transform: translateY(3px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--sun); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.big { padding: 1.25rem 2.4rem; font-size: 1.2rem; }

.textlink { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--line); transition: text-decoration-color .2s; }
.textlink:hover { text-decoration-color: var(--ink); }
.link { font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--line); padding: .4rem .1rem; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; }
.chips.center { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.2rem; border-radius: 999px; border: 0;
  box-shadow: inset 0 0 0 1.5px var(--ink); background: transparent; font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: background .2s, color .2s, transform .3s var(--spring);
}
.chip:hover { background: rgba(255, 201, 60, .45); transform: translateY(-1px); }
.chip[aria-pressed="true"], .chip.radio:has(input:checked) { background: var(--ink); color: var(--paper); }
.chip.radio { position: relative; }
.chip.radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip.radio:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }

.mood { display: inline-block; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }

.tape {
  display: inline-block; background: var(--sun); color: var(--ink); padding: .28em .9em; border-radius: .4em;
  font-family: var(--display); font-weight: 750; font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: -.02em; transform: rotate(-2deg);
}

/* ---------- pictures: transparent cut-outs, standing right on the page ---------- */
.portrait { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; flex: none; }
.portrait img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 90%; transition: transform .45s var(--spring), filter .3s; filter: drop-shadow(0 .4rem .3rem rgba(27, 23, 18, .12)); }
.portrait .glyph { font-size: clamp(3rem, 12vw, 4.5rem); line-height: 1; }
.portrait.xs { width: 2.6rem; } .portrait.xs .glyph { font-size: 1.7rem; }
.portrait.sm { width: 5rem; }
@keyframes hop {
  0% { transform: none; }
  28% { transform: translateY(-1.1rem) scale(1.08, .96) rotate(-5deg); }
  54% { transform: translateY(0) scale(.97, 1.04) rotate(3deg); }
  80% { transform: translateY(-.55rem) scale(1.06) rotate(-2deg); }
  100% { transform: translateY(-.6rem) scale(1.07) rotate(-3deg); }
}
@keyframes bob { 0%, 100% { transform: translateY(-.4rem) scale(1.05) rotate(-1deg); } 50% { transform: translateY(-.8rem) scale(1.05) rotate(1.5deg); } }

/* ---------- setup ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 46rem; margin: 0 auto; padding: 1.3rem 1.25rem .5rem; position: relative; z-index: 2; }
.dots { display: inline-flex; gap: .45rem; }
.dot { width: .75rem; height: .75rem; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink); transition: background .3s, transform .3s var(--spring); }
.dot.on { background: var(--ink); transform: scale(1.05); }
.setup { position: relative; min-height: 100vh; overflow: hidden; }
.setup::before { content: ""; position: fixed; z-index: 0; right: -16vmax; top: -16vmax; width: 44vmax; aspect-ratio: 1; border-radius: 50%; background: var(--sun); pointer-events: none; animation: breathe 10s ease-in-out infinite; }
.setup.plain::before { display: none; }
.panel { position: relative; z-index: 1; max-width: 50rem; margin: 0 auto; padding: 1rem 1.25rem 5rem; outline: none; }
.for-story { text-align: center; margin: 0 0 .8rem; font-weight: 650; color: var(--ink-soft); font-size: .95rem; }
.step-title { font-size: clamp(2.2rem, 6.4vw, 3.8rem); text-align: center; margin-bottom: 1.8rem; letter-spacing: -.045em; font-weight: 800; }
.lead { display: block; text-align: center; color: var(--ink-soft); font-weight: 550; margin: 0 0 1.2rem; }
.big-input {
  display: block; width: 100%; max-width: 26rem; margin: 0 auto 1.6rem; border: 0; background: #fffdf8; border-radius: 1.3rem;
  padding: 1.1rem 1.4rem; font-family: var(--display); font-weight: 650; font-size: 1.8rem; text-align: center; letter-spacing: -.03em;
  box-shadow: inset 0 0 0 2px var(--ink); transition: box-shadow .2s;
}
.big-input::placeholder { color: #a0978a; font-weight: 500; }
.big-input:focus { outline: none; box-shadow: inset 0 0 0 4px var(--ink); }
.pick2 { border: 0; padding: 0; margin: 1.5rem 0 0; }
.pick2 legend { width: 100%; text-align: center; font-family: var(--display); font-weight: 650; font-size: 1.3rem; padding: 0; letter-spacing: -.02em; }
.pick2 .chip { font-size: 1.25rem; padding: .7rem 2.1rem; }
.pick2.tones .chip { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem 1.4rem .55rem .6rem; font-size: 1.1rem; }
.swatch { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.tone-light { --sw: #f2d0b5; } .tone-medium { --sw: #c48c5e; } .tone-dark { --sw: #6a4026; }

.picks { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr)); gap: 1.8rem .8rem; }
.pick { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 100%; padding: .3rem .2rem .6rem; text-align: center; border-radius: 1.2rem; }
.pick .portrait { width: min(100%, 9.5rem); }
@media (min-width: 62rem) { .picks { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); } .pick .portrait { width: min(100%, 11rem); } .panel { max-width: 62rem; } }
.pick-title { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.12rem; line-height: 1.15; letter-spacing: -.02em; padding: 0 .4rem; border-radius: .45rem; transition: background .25s; }
.pick-blurb { display: block; font-size: .86rem; line-height: 1.3; color: var(--ink-soft); font-weight: 500; }
.pick:hover .portrait img, .pick:focus-visible .portrait img { animation: hop .8s var(--spring) forwards; filter: drop-shadow(0 .9rem .5rem rgba(27, 23, 18, .16)); }
.pick:hover .pick-title { background: rgba(255, 201, 60, .6); }
.pick[aria-pressed="true"] .pick-title { background: var(--sun); }
.pick[aria-pressed="true"] .portrait img { animation: bob 2.6s ease-in-out infinite; }
.next { text-align: center; margin: 2rem 0 0; }
.hint { text-align: center; color: var(--coral); font-weight: 700; }

/* ---------- the sliders that start every story ---------- */
.dials { display: grid; gap: 1.1rem; max-width: 34rem; margin: 0 auto; }
.dial { background: #fffdf8; border-radius: 1.7rem; padding: 1.1rem 1.4rem 1.2rem; box-shadow: inset 0 0 0 2px var(--ink); }
.dial-yellow { --dial: var(--sun); } .dial-orange { --dial: var(--tangerine); } .dial-teal { --dial: var(--lagoon); }
.dial label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dial-name { font-family: var(--display); font-weight: 720; font-size: 1.4rem; letter-spacing: -.03em; }
.dial-now { font-weight: 700; font-size: .95rem; background: var(--dial); padding: .15rem .85rem; border-radius: 999px; }
.dial input[type="range"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 2.8rem; margin: .3rem 0 0; background: transparent; cursor: pointer; }
.dial input[type="range"]::-webkit-slider-runnable-track { height: 1.1rem; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--ink); background: linear-gradient(to right, var(--dial) 0 var(--fill, 50%), #fff var(--fill, 50%) 100%); }
.dial input[type="range"]::-moz-range-track { height: 1.1rem; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--ink); background: #fff; }
.dial input[type="range"]::-moz-range-progress { height: 1.1rem; border-radius: 999px; background: var(--dial); }
.dial input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 2.5rem; height: 2.5rem; margin-top: -.7rem; border-radius: 50%; background: var(--ink); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--ink); transition: transform .3s var(--spring); }
.dial input[type="range"]::-moz-range-thumb { width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--ink); }
.dial input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.12); }
.dial input[type="range"]:focus-visible { outline: none; }
.dial input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }
.dial input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }
.dial-ends { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; color: var(--ink-soft); font-weight: 550; }
.fineprint { text-align: center; color: var(--ink-soft); font-size: .92rem; max-width: 26rem; margin: 1.4rem auto 0; font-weight: 500; }

/* ---------- reading ---------- */
.reader { position: relative; min-height: 100vh; }
.page { position: relative; z-index: 1; max-width: 42rem; margin: 0 auto; padding: 1.5rem 1.25rem 6rem; outline: none; }
.cast-strip { display: flex; gap: .4rem; margin-bottom: 1.2rem; }
.cast-strip .portrait { width: 5rem; margin-right: -.5rem; }
.story-title { font-size: clamp(2.3rem, 6.6vw, 3.8rem); margin-bottom: 1.8rem; letter-spacing: -.05em; font-weight: 800; }
.text { font-size: clamp(1.25rem, 2.9vw, 1.5rem); line-height: 1.68; font-weight: 450; }
.text p { margin: 0 0 1.25rem; }
.ask { margin: 2.6rem 0 1rem; font-family: var(--display); font-weight: 720; font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-soft); display: flex; align-items: center; gap: .9rem; }
.ask::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.choice {
  display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1rem 1.4rem 1rem 1rem; border-radius: 1.7rem; background: #fffdf8;
  box-shadow: inset 0 0 0 2px var(--ink); font-size: clamp(1.08rem, 2.5vw, 1.25rem); font-weight: 600; line-height: 1.35;
  transition: transform .35s var(--spring), background .25s, box-shadow .25s;
}
.choice:hover { background: var(--accent); transform: translateX(6px); box-shadow: inset 0 0 0 2px var(--ink), -6px 6px 0 -2px rgba(27, 23, 18, .15); }
.num { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); font-family: var(--display); font-weight: 750; transition: background .25s; }
.choice:hover .num { background: #fffdf8; }

.thinking { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin: 2.8rem 0 1rem; font-family: var(--display); font-weight: 650; font-size: 1.25rem; }
.thinking p { margin: 0; }
.bounce { width: 3.4rem; height: 3.4rem; background: var(--accent); border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; animation: squish 1s ease-in-out infinite; }
@keyframes squish { 0%, 100% { transform: translateY(0) scale(1, 1) rotate(0); } 50% { transform: translateY(-1rem) scale(.92, 1.08) rotate(12deg); } }
.oops { text-align: center; margin-top: 2rem; }
.oops p { font-family: var(--display); font-weight: 650; font-size: 1.25rem; }
.the-end { text-align: center; margin-top: 2.8rem; }
.end-mark { margin: 0; }
.keepsakes { max-width: 30rem; margin: 1.4rem auto 0; font-weight: 550; }
.end-links { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin: 1.8rem 0 0; }

.byline { font-weight: 550; color: var(--ink-soft); margin: -.9rem 0 2rem; }
.book-page { margin-bottom: 1.6rem; }
.book-page .chose { font-family: var(--display); font-weight: 650; font-size: 1.05rem; padding: .55rem .95rem; border-left: 6px solid var(--accent); background: #fffdf8; border-radius: 0 .8rem .8rem 0; }
.book .end-mark { text-align: center; margin-top: 2.5rem; }
.dial-line { margin-top: -1.2rem; }

.prose { max-width: 40rem; margin: 0 auto; padding: 1rem 1.25rem 4rem; font-size: 1.15rem; line-height: 1.7; }
.prose h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); margin: 1.5rem 0 1.2rem; letter-spacing: -.045em; }
.prose h2 { font-size: 1.55rem; margin: 2.2rem 0 .3rem; letter-spacing: -.03em; }
.prose p, .prose li { margin: .5rem 0; }

/* ---------- phones ---------- */
@media (max-width: 46rem), (max-aspect-ratio: 1/1) {
  .site-header nav .nav-link { display: none; }
  .title { font-size: clamp(3.3rem, 14vw, 9rem); margin-top: clamp(5.2rem, 14vh, 8rem); }
  .sun { top: 66%; width: min(118vw, 84vh); }
  
  .cta { margin-top: 1.4rem; }
  /* a smaller lineup: two big heroes and two pets, filling the lower half */
  .moon, .a3, .a6, .a7, .a8, .down { display: none; }
  .a1 { --h: min(39vh, 66vw); left: -12%; } .a4 { --h: min(39vh, 66vw); right: -12%; }
  .a2 { --h: min(15vh, 26vw); left: 27%; } .a5 { --h: min(15vh, 26vw); right: 27%; }
  .site-header { padding-top: 1rem; }
  .pill { padding-right: .8rem; } .pill span:last-child { max-width: 6.5rem; }
  .tile { aspect-ratio: auto; min-height: 16rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
}
@media (max-height: 720px) and (min-width: 46rem) {      /* short landscape screens */
  .title { margin-top: clamp(4.4rem, 12vh, 6rem); }
  .down { display: none; }
  .sub { margin-top: 1.2rem; }
}
@media (hover: none) { .actor img { cursor: default; } }

@media print {
  body { background: #fff; font-size: 12pt; }
  .topbar, .cast-strip, .site-footer { display: none !important; }
  .page { max-width: none; padding: 0; }
  .book-page, .book-page p { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .actor { transform: none; }
  .title .squiggle path { stroke-dashoffset: 0; }
}

/* ---------- story pages: the kid stays big, the pet and the item are half size ---------- */
.cast-strip { align-items: flex-end; }
.cast-strip .portrait.half { width: 2.5rem; margin-right: -.2rem; }

/* ---------- build your own: places and troubles ---------- */
.places { list-style: none; margin: 1.4rem 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.place-card { display: flex; flex-direction: column; width: 100%; height: 100%; padding: .8rem .8rem 1rem; border-radius: 1.6rem; text-align: left; background: #fffdf8; box-shadow: inset 0 0 0 2px var(--ink); transition: transform .4s var(--spring), background .25s; }
.place-card:hover, .place-card:focus-visible { transform: translateY(-5px) rotate(-.6deg); background: #fff3c6; }
.place-art { display: block; aspect-ratio: 3 / 2; margin-bottom: .5rem; }
.place-art img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--spring); filter: drop-shadow(0 .6rem .5rem rgba(27, 23, 18, .15)); }
.place-card:hover .place-art img { transform: scale(1.06) rotate(-1deg); }
.place-name { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; line-height: 1.1; }
.place-desc { display: block; margin-top: .25rem; font-size: .88rem; line-height: 1.3; color: var(--ink-soft); font-weight: 550; }
.troubles { list-style: none; margin: 1.4rem 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.trouble-card { display: flex; flex-direction: column; gap: .3rem; width: 100%; height: 100%; padding: 1.2rem 1.3rem 1.3rem; border-radius: 1.6rem; text-align: left; background: var(--p-peach, #f9d3c0); transition: transform .4s var(--spring), box-shadow .3s; }
.trouble-card.mood-funny { background: var(--p-butter, #f8e08e); } .trouble-card.mood-wondrous { background: var(--p-lilac, #dcd8f7); } .trouble-card.mood-brave { background: var(--p-sky, #cfe5f8); }
.trouble-card:hover, .trouble-card:focus-visible { transform: translateY(-5px) rotate(.6deg); box-shadow: 0 1.2rem 1.2rem -1rem rgba(27, 23, 18, .45); }
.trouble-mood { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.trouble-title { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.035em; line-height: 1.05; }
.trouble-blurb { font-size: .95rem; font-weight: 550; line-height: 1.35; }
.shelf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.shelf-tools .own { box-shadow: inset 0 0 0 2px var(--ink); }
