/* Tuli website. The look follows the books: thick black outlines, flat bright colours, rounded Baloo 2 lettering
   (white with a black outline, like the covers), and the pastel panels of the puzzle pages. */

@font-face {
  font-family: "Baloo 2";
  src: url("../fonts/baloo2-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
/* Arial sized to Baloo 2's width and line metrics, for the moment before Baloo 2 has loaded. */
@font-face {
  font-family: "Baloo 2 fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Roboto");
  size-adjust: 95.5%;
  ascent-override: 112.9%;
  descent-override: 54.9%;
  line-gap-override: 0%;
}

:root {
  --ink: #1f1a17;
  --ink-2: #54473f;
  --cream: #fff9ee;
  --white: #fff;
  --sky: #57b4f5;
  --sky-2: #1f7fd6;
  --sun: #ffc83d;
  --grass: #67c04c;
  --grass-2: #4c9f38;
  --tomato: #ec4b33;
  --coral: #f57f91;
  --lilac: #c9a3f3;
  --p-sun: #fff1c4;
  --p-sky: #e1f1fd;
  --p-lilac: #efe5fd;
  --p-mint: #e2f5d9;
  --p-pink: #fde4ea;
  --p-peach: #ffe6d6;
  --line: 3px;
  --r: 26px;
  --shadow: 0 5px 0 var(--ink);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Baloo 2", "Baloo 2 fallback", ui-rounded, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (min-width: 901px) { html { scroll-padding-top: 86px; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.125rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body:has(.book-dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.05; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px #fff; border-radius: 12px; }
/* No transitions until the page has been drawn once, so nothing fades in from unstyled on load. */
.loading *, .loading *::before, .loading *::after { transition: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.outlined { color: #fff; -webkit-text-stroke: var(--stroke, .16em) var(--ink); paint-order: stroke fill; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--sun); border: var(--line) solid var(--ink); border-radius: 999px;
  padding: 8px 18px 6px; font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---- buttons ---------------------------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: .55em 1.35em .4em;
  border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font: 800 1.15rem/1 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--sun { background: var(--sun); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; margin-top: -.12em; }
.soon {
  display: inline-flex; align-items: center; gap: .5em; min-height: 52px; padding: .5em 1.25em .35em;
  border: var(--line) dashed currentColor; border-radius: 999px; font-weight: 700; font-size: 1.05rem; line-height: 1.1;
}
.soon svg { width: 1.15em; height: 1.15em; flex: none; margin-top: -.1em; }

/* ---- header ----------------------------------------------------------------------------------------------- */

.top { position: sticky; top: 0; z-index: 30; background: var(--cream); border-bottom: var(--line) solid var(--ink); }
.top__in { display: flex; align-items: center; gap: 16px; height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo img { width: auto; height: 52px; }
.logo__word { font-size: 1.95rem; font-weight: 800; line-height: 1; letter-spacing: .01em; margin-top: .12em; white-space: nowrap; }
.logo__and { color: var(--sun); font-size: .72em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px 5px; border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav a:hover { background: var(--p-sun); }
.lang { position: relative; }
.lang summary {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  min-height: 44px; padding: 6px 14px 4px 12px; border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--white); font-weight: 700; box-shadow: 0 3px 0 var(--ink);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 20px; height: 20px; margin-top: -2px; }
.lang summary .caret { width: 12px; height: 12px; margin-left: 2px; transition: transform .15s; }
.lang[open] summary .caret { transform: rotate(180deg); }
.lang__code { display: none; text-transform: uppercase; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px; padding: 8px;
  background: var(--white); border: var(--line) solid var(--ink); border-radius: 20px; box-shadow: var(--shadow);
}
.lang a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px 6px; border-radius: 12px; text-decoration: none; font-weight: 700; }
.lang a:hover { background: var(--p-sun); }
.lang a[aria-current="page"] { background: var(--p-sky); }
.lang a small { color: var(--ink-2); font-weight: 600; }

/* ---- hero ------------------------------------------------------------------------------------------------- */

.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--sky); }
.hero__in {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 16px;
  min-height: clamp(560px, 76vh, 720px);
}
.hero__text { align-self: center; padding: 56px 0 150px; }
.pill {
  display: inline-block; background: var(--white); border: var(--line) solid var(--ink); border-radius: 999px;
  padding: 4px 16px 1px; font-weight: 700; font-size: 1rem; transform: rotate(-2deg);
}
.hero__title { font-size: clamp(6rem, 15vw, 11.5rem); line-height: .82; margin: 18px 0 14px -.04em; --stroke: .12em; transform: rotate(-3deg); transform-origin: 0 100%; }
.hero__tagline { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.02; --stroke: .17em; }
.hero__lead { max-width: 33em; margin-top: 18px; font-size: clamp(1.12rem, 1.5vw, 1.3rem); font-weight: 500; line-height: 1.45; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.facts li { background: rgba(255, 255, 255, .92); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 13px 0; font-weight: 700; font-size: .98rem; }
.hero__art { position: relative; min-height: 420px; }
.hero__art img { position: absolute; z-index: 1; bottom: 84px; filter: drop-shadow(0 6px 0 rgba(31, 26, 23, .18)); cursor: pointer; transform-origin: 50% 100%; }
.hero__bilo { right: -2%; width: min(54%, 340px); }
.hero__art .hero__tuli { right: 45%; width: min(45%, 284px); bottom: 80px; animation: hop 1.1s ease-in-out 1.2s; }
.hill { position: absolute; z-index: 1; left: 0; bottom: 0; width: 100%; height: 150px; }
.sun { position: absolute; z-index: 0; top: 34px; right: max(18px, calc((100vw - var(--wrap)) / 2 - 40px)); width: 132px; height: 132px; }
.cloud { position: absolute; z-index: 0; }
.cloud--1 { top: 9%; left: -4%; width: min(34%, 176px); }
.cloud--2 { top: 27%; right: -6%; width: min(26%, 138px); }
.cloud--3 { top: 3%; left: 46%; width: min(20%, 104px); }

@keyframes hop { 0%, 100% { transform: translateY(0) scaleY(1); } 18% { transform: translateY(5px) scaleY(.95); } 50% { transform: translateY(-30px) scaleY(1.03); } 78% { transform: translateY(0) scaleY(.97); } }
/* Tapped characters move (site.js); the little stars and hearts fly from the tap. */
[data-moves] {
  cursor: pointer; transform-origin: 50% 100%; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.spark { position: fixed; z-index: 70; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; pointer-events: none; }
.spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark path { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }

/* ---- sections --------------------------------------------------------------------------------------------- */

.section { position: relative; padding: clamp(64px, 8vw, 104px) 0; scroll-margin-top: 72px; }
.head { max-width: 760px; margin: 0 auto; text-align: center; }
.head h2 { font-size: clamp(2.3rem, 5vw, 3.5rem); }
.head p { margin-top: 12px; font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); }
.head h2::after {
  content: ""; display: block; width: 92px; height: 14px; margin: 10px auto 0;
  background: var(--squiggle, var(--sun));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 14'%3E%3Cpath d='M3 9c8-8 14-8 22 0s14 8 22 0 14-8 22 0 14 8 20 0' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 14'%3E%3Cpath d='M3 9c8-8 14-8 22 0s14 8 22 0 14-8 22 0 14 8 20 0' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* A band of colour with a soft wave along its top edge. */
.band { background: var(--band); }
.band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -38px; height: 40px; background: var(--band);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 40' preserveAspectRatio='none'%3E%3Cpath d='M0 26C53 4 107 4 160 22S267 42 320 22V40H0Z'/%3E%3C/svg%3E") 0 0 / 320px 40px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 40' preserveAspectRatio='none'%3E%3Cpath d='M0 26C53 4 107 4 160 22S267 42 320 22V40H0Z'/%3E%3C/svg%3E") 0 0 / 320px 40px repeat-x;
}

/* ---- featured book ---------------------------------------------------------------------------------------- */

.spot-section { padding-top: clamp(56px, 7vw, 88px); padding-bottom: 0; }
.spot {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 60px);
  background: var(--c); color: var(--on, var(--ink));
  border: var(--line) solid var(--ink); border-radius: 40px; box-shadow: 0 8px 0 var(--ink);
}
.spot--dark { --on: #fff; }
.spot--dark::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .9;
  background:
    radial-gradient(circle at 8% 14%, #fff 0 2px, transparent 3px), radial-gradient(circle at 22% 84%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 47% 9%, #fff 0 2px, transparent 3px), radial-gradient(circle at 64% 90%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 18%, #fff 0 2.5px, transparent 3.5px), radial-gradient(circle at 95% 60%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 37% 52%, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle at 88% 88%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 56% 34%, rgba(255, 255, 255, .8) 0 1.5px, transparent 2.5px), radial-gradient(circle at 4% 62%, #fff 0 1.5px, transparent 2.5px);
}
.spot__moon { position: absolute; z-index: -1; top: 26px; right: 30px; width: 64px; height: 64px; border-radius: 50%; background: #fff3a8; box-shadow: 0 0 0 10px rgba(255, 243, 168, .14), 0 0 0 22px rgba(255, 243, 168, .07); }
.spot__cover { display: block; transform: rotate(-3deg); transition: transform .25s ease; }
.spot__cover:hover { transform: rotate(-1deg) scale(1.02); }
.spot__cover img { width: 100%; border: var(--line) solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 var(--ink); }
.badge {
  display: inline-block; background: var(--sun); color: var(--ink); border: var(--line) solid var(--ink); border-radius: 999px;
  padding: 4px 16px 1px; font-weight: 800; font-size: 1.05rem; transform: rotate(-2deg);
}
.spot__title { font-size: clamp(2.3rem, 4.8vw, 3.7rem); margin: 16px 0 12px; --stroke: .15em; }
.spot__hook { font-size: clamp(1.2rem, 1.9vw, 1.45rem); font-weight: 700; line-height: 1.3; }
.spot__back { margin-top: 12px; font-size: 1.08rem; line-height: 1.5; }
.spot__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }

/* ---- what's inside a Tuli book ---------------------------------------------------------------------------- */

.why__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-top: 44px; }
.why__card { background: var(--bg); border: var(--line) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 22px 26px; }
.why__icon { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 14px; background: var(--white); border: var(--line) solid var(--ink); border-radius: 50%; transform: rotate(-4deg); }
.why__icon svg { width: 54px; height: 54px; overflow: visible; }
.why__card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.why__card p { font-size: 1.04rem; color: var(--ink-2); line-height: 1.45; }

/* ---- the books -------------------------------------------------------------------------------------------- */

.books { --band: var(--p-sun); margin-top: 40px; }
.shelves { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 30px auto 0; }
.no-js .shelves { display: none; }
.shelf {
  min-height: 44px; padding: 6px 18px 3px; border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--white); font-weight: 700; font-size: 1.02rem; cursor: pointer; box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.shelf:hover { background: var(--cream); }
.shelf:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.shelf[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 38px 24px; margin-top: 40px; }
.grid--few { grid-template-columns: repeat(4, minmax(0, 252px)); justify-content: center; gap: 40px 26px; }
.book[hidden] { display: none; }
.book__link { display: block; height: 100%; text-decoration: none; border-radius: 22px; }
.book__cover { position: relative; display: block; }
.book__cover img {
  width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--c);
  border: var(--line) solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.book__link:hover .book__cover img, .book__link:focus-visible .book__cover img { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 12px 0 var(--ink); }
.book__flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.book__flags + .book__title { margin-top: 8px; }
.flag { border: 2px solid var(--ink); border-radius: 999px; padding: 1px 11px 0; font-size: .9rem; font-weight: 800; background: var(--sun); }
.flag--new { background: #c8321f; color: var(--white); }
.flag--soon { background: var(--white); border-style: dashed; }
.book__title { margin-top: 18px; font-size: 1.22rem; line-height: 1.12; }
.book__hook { margin-top: 6px; font-size: .98rem; line-height: 1.38; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- look inside ------------------------------------------------------------------------------------------ */

.inside .head { padding: 0 var(--gutter); }
.strip-wrap { position: relative; margin-top: 40px; }
.strip {
  display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 14px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 34px;
  scroll-padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.leaf { flex: 0 0 auto; width: min(76vw, 350px); margin: 0; scroll-snap-align: start; }
.leaf--spread { width: min(152vw, 700px); }
.leaf__pic { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; overflow: hidden; background: var(--white); border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
.leaf--spread .leaf__pic::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 26px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(31, 26, 23, .16) 45%, rgba(31, 26, 23, .16) 55%, transparent); }
.leaf__pic img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.leaf figcaption { margin-top: 16px; text-align: center; }
.leaf figcaption span { display: inline-block; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 14px 0; font-weight: 800; }
.leaf figcaption .leaf__sound { background: var(--sun); font-size: 1.12rem; transform: rotate(-3deg); }
.strip-nav { display: flex; justify-content: center; gap: 14px; margin-top: 6px; }
.no-js .strip-nav { display: none; }
.round {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: var(--line) solid var(--ink); background: var(--white); box-shadow: 0 4px 0 var(--ink); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s;
}
.round:hover { background: var(--sun); }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.round[aria-disabled="true"] { opacity: .35; cursor: default; background: var(--white); }
.round svg { width: 22px; height: 22px; }

/* ---- the family ------------------------------------------------------------------------------------------- */

.family { --band: var(--p-mint); --squiggle: var(--grass); }
.family__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 96px 20px; margin-top: 120px; }
.member {
  flex: 0 1 200px; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--bg); border: var(--line) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 0 16px 22px;
}
.member img { height: 200px; width: auto; margin-top: -96px; filter: drop-shadow(0 5px 0 rgba(31, 26, 23, .15)); transition: transform .25s ease; }
.member:hover img { transform: translateY(-6px) rotate(-3deg); }
.member h3 { margin-top: 10px; font-size: 1.9rem; --stroke: .16em; }
.member__role { margin-top: 2px; font-size: .95rem; font-weight: 800; color: var(--ink-2); }
.member__bio { margin-top: 8px; font-size: 1rem; line-height: 1.42; }

/* ---- videos ----------------------------------------------------------------------------------------------- */

.watch { --band: var(--p-lilac); --squiggle: var(--lilac); }
.videos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .5fr); align-items: start; gap: 26px; margin-top: 44px; }
.videos--flat { grid-template-columns: 1fr; }
.videos--flat .videos__wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.videos--one { grid-template-columns: minmax(0, 760px); justify-content: center; }
.videos__wide, .videos__tall { display: grid; gap: 26px; }
.videos__tall { align-content: start; }
.videos:not(.videos--flat) .videos__tall { grid-template-rows: auto 1fr; align-self: stretch; }
.vid { overflow: hidden; background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); }
.vid__frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-bottom: var(--line) solid var(--ink); background: var(--ink); overflow: hidden; }
.vid--tall .vid__frame { aspect-ratio: 9 / 16; }
.vid__frame img, .vid__frame iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
button.vid__frame { cursor: pointer; }
.vid__play {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 86px; height: 86px; transform: translate(-50%, -50%);
  background: var(--tomato); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: 0 5px 0 var(--ink); transition: transform .15s ease;
}
button.vid__frame:hover .vid__play { transform: translate(-50%, -50%) scale(1.08); }
.vid__play svg { width: 34px; height: 34px; margin-left: 6px; }
.vid__soon { position: absolute; left: 14px; top: 14px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 13px 0; font-size: .95rem; font-weight: 800; transform: rotate(-3deg); }
.vid__frame--soon img { filter: saturate(.9); }
.vid__text { padding: 14px 20px 18px; }
.vid__kind { font-size: .92rem; font-weight: 800; color: var(--ink-2); }
.vid__title { margin-top: 2px; font-size: 1.3rem; line-height: 1.15; }
.vid__meta { margin-top: 4px; font-size: .95rem; color: var(--ink-2); }
.channel {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 230px; overflow: hidden;
  padding: 22px 22px 24px; background: var(--sky); border: var(--line) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow);
}
.channel img { position: absolute; right: -6px; top: 16px; width: 116px; height: auto; transform: scaleX(-1); filter: drop-shadow(0 4px 0 rgba(31, 26, 23, .18)); }
.channel h3 { position: relative; font-size: 1.7rem; line-height: 1.05; max-width: 70%; --stroke: .16em; }
.channel p { position: relative; font-weight: 700; }
.channel .btn, .channel .soon { position: relative; align-self: flex-start; }
.channel .soon { background: rgba(255, 255, 255, .85); border-color: var(--ink); }
.watch__foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 24px; margin-top: 40px; text-align: center; }
.watch__note { max-width: 46em; font-size: .98rem; color: var(--ink-2); }
.watch__note a { font-weight: 700; color: var(--ink); text-underline-offset: 3px; }

/* ---- footer ----------------------------------------------------------------------------------------------- */

.foot { position: relative; margin-top: 150px; background: var(--ink); color: var(--cream); }
.walkers { position: absolute; left: 0; right: 0; bottom: 100%; height: 150px; overflow: hidden; pointer-events: none; }
.walkers__grass { position: absolute; left: 0; bottom: -2px; width: 100%; height: 56px; }
.walker {
  position: absolute; bottom: 26px; left: 0; height: var(--h); width: calc(var(--h) * var(--ratio));
  background-position: 0 0; background-size: calc(var(--h) * var(--ratio) * 6) 100%; background-repeat: no-repeat;
  animation: cycle .75s steps(6) infinite, across var(--t, 30s) linear infinite;
  animation-delay: 0s, var(--d, 0s);
}
.walker--tuli { --h: 96px; --t: 34s; --d: -3s; }
.walker--bilo { --h: 110px; --t: 34s; --d: 0s; bottom: 22px; }
.walkers--still .walker, .walkers--away .walker { animation-play-state: paused; }
.walker[data-moves] { pointer-events: auto; }
.still {
  position: absolute; right: max(12px, calc((100vw - var(--wrap)) / 2 + var(--gutter))); bottom: 60px; z-index: 2;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; pointer-events: auto; cursor: pointer;
  color: var(--ink); background: var(--white); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink);
}
.still svg { width: 16px; height: 16px; }
.still .still__play, .still[aria-pressed="true"] .still__pause { display: none; }
.still[aria-pressed="true"] .still__play { display: inline; }
@keyframes cycle { to { background-position-x: calc(var(--h) * var(--ratio) * -6); } }
@keyframes across { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 40px)); } }
.foot__in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px 40px; padding-top: 44px; padding-bottom: 40px; }
.foot .logo__word { font-size: 2.6rem; color: var(--sun); -webkit-text-stroke: 0; }
.foot .logo__and { color: var(--cream); }
.foot .logo__bilo { color: var(--lilac); }
.foot__line { margin-top: 10px; max-width: 30em; color: #f3e8d6; }
.foot h2 { font-size: 1rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sun); }
.foot__langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.foot__langs a { padding: 4px 13px 2px; border: 2px solid #f3e8d6; border-radius: 999px; text-decoration: none; font-weight: 700; }
.foot__langs a:hover { background: var(--cream); color: var(--ink); }
.foot__langs a[aria-current="page"] { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.foot__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 22px; font-weight: 700; }
.foot__legal a { text-underline-offset: 3px; }
.foot__copy { grid-column: 1 / -1; padding-top: 22px; border-top: 2px solid rgba(243, 232, 214, .2); color: #d9ccb8; font-size: .95rem; }

/* ---- book details: in the window, or in place when JavaScript is off ---- */

.book-detail[hidden] { display: none; }
.no-js .book-detail:target {
  display: block; margin-top: 40px; overflow: hidden; scroll-margin-top: 20px;
  background: var(--cream); border: var(--line) solid var(--ink); border-radius: 32px; box-shadow: 0 8px 0 var(--ink);
}
.detail__back { display: none; margin-top: 18px; font-weight: 700; }
.no-js .detail__back { display: block; }

/* ---- book dialog ------------------------------------------------------------------------------------------ */

.book-dialog {
  width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; overflow: auto;
  background: var(--cream); color: var(--ink); border: var(--line) solid var(--ink); border-radius: 32px; box-shadow: 0 10px 0 var(--ink);
  overscroll-behavior: contain;
}
.book-dialog::backdrop { background: rgba(31, 26, 23, .58); backdrop-filter: blur(3px); }
.book-dialog[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.dlg__close {
  position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px;
  background: var(--white); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); cursor: pointer;
}
.dlg__close svg { width: 20px; height: 20px; }
.dlg { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.dlg__art { display: grid; place-items: start center; padding: 36px; background: var(--c); border-right: var(--line) solid var(--ink); }
.dlg__art img { position: sticky; top: 36px; width: 100%; max-width: 420px; border: var(--line) solid var(--ink); border-radius: 20px; box-shadow: 0 7px 0 var(--ink); transform: rotate(-2deg); }
.dlg__text { padding: 34px 36px 36px; }
.dlg__meta { display: flex; flex-wrap: wrap; gap: 6px; padding-right: 48px; }
.dlg__meta li { border: 2px solid var(--ink); border-radius: 999px; padding: 1px 11px 0; font-size: .92rem; font-weight: 700; background: var(--white); }
.dlg__title { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.05; }
.dlg__hook { margin-top: 10px; font-size: 1.2rem; font-weight: 700; line-height: 1.32; }
.dlg__back { margin-top: 12px; line-height: 1.52; }
.dlg h4 { margin-top: 22px; font-size: 1.2rem; }
.dlg__points { margin-top: 8px; display: grid; gap: 8px; }
.dlg__points li { position: relative; padding-left: 30px; line-height: 1.42; font-size: 1.02rem; }
.dlg__points li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); }
.dlg__buy { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.dlg__formats { margin-top: 12px; font-size: .95rem; color: var(--ink-2); }
.dlg__also { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 2px dashed rgba(31, 26, 23, .25); font-weight: 700; }
.dlg__also a { padding: 2px 12px 0; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; background: var(--white); }
.dlg__also a:hover { background: var(--p-sun); }

.book-dialog--zoom { width: auto; max-width: calc(100vw - 32px); background: var(--white); }
.zoom { display: flex; }
.zoom img { display: block; width: auto; max-width: min(900px, calc(100vw - 38px)); height: auto; max-height: calc(100dvh - 46px); }
.zoom--spread img { max-width: min(900px, calc(50vw - 20px)); max-height: calc(100dvh - 46px); }
.zoom img + img { border-left: 2px solid rgba(31, 26, 23, .2); }
a.leaf__pic { cursor: zoom-in; }

/* ---- language hint ---------------------------------------------------------------------------------------- */

.suggest {
  position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 24px);
  padding: 10px 10px 10px 20px; background: var(--white); border: var(--line) solid var(--ink); border-radius: 999px; box-shadow: var(--shadow);
  animation: rise .3s ease-out;
}
.suggest p { font-weight: 700; line-height: 1.2; }
.suggest a { flex: none; padding: 6px 14px 4px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; font-weight: 800; text-decoration: none; }
.suggest button { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); cursor: pointer; }
.suggest button svg { width: 14px; height: 14px; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 20px); } }

/* ---- legal pages ------------------------------------------------------------------------------------------ */

.legal { max-width: 760px; margin: 0 auto; padding: 56px var(--gutter) 40px; }
.legal h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); }
.legal h2 { margin-top: 34px; font-size: 1.5rem; }
.legal p, .legal ul { margin-top: 10px; line-height: 1.55; }
.legal ul { list-style: disc; padding-left: 1.3em; }
.legal address { margin-top: 10px; font-style: normal; line-height: 1.5; }
.legal .lang-switch { display: flex; gap: 8px; margin-top: 16px; }
.legal .lang-switch a { padding: 3px 14px 1px; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 700; background: var(--white); }
.legal section + section { margin-top: 56px; padding-top: 40px; border-top: var(--line) dashed rgba(31, 26, 23, .25); }
.todo { background: #ffe1d9; border-radius: 6px; padding: 0 5px; }

/* ---- smaller screens -------------------------------------------------------------------------------------- */

@media (max-width: 1060px) {
  .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .grid--few { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
}
@media (max-width: 900px) {
  .top { position: relative; }
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero__in { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { padding: 40px 0 0; }
  .hero__art { min-height: max(330px, calc(min(38.6vw, 230px) * 1.33 + 100px)); margin-top: 6px; }
  .hero__art img { bottom: 64px; }
  .hero__bilo { right: auto; left: 48%; width: min(42%, 230px); }
  .hero__art .hero__tuli { right: 51%; width: min(36%, 200px); bottom: 60px; }
  .hill { height: 120px; }
  .sun { width: 96px; height: 96px; top: 20px; right: 16px; }
  .cloud--1 { top: 0; left: auto; right: 6%; width: 120px; }
  .cloud--2, .cloud--3 { display: none; }
  .spot__moon { display: none; }
  .spot { grid-template-columns: 1fr; text-align: left; }
  .spot__cover { max-width: 420px; }
  .dlg { grid-template-columns: 1fr; }
  .dlg__art { padding: 28px 28px 30px; border-right: 0; border-bottom: var(--line) solid var(--ink); }
  .dlg__art img { max-width: 300px; }
  .dlg__text { padding: 26px 22px 28px; }
  .videos { grid-template-columns: 1fr; }
  .videos__tall { grid-template-columns: repeat(auto-fit, minmax(0, 300px)); justify-content: center; }
  .foot__in { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1.06rem; }
  .why__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
  .book__title { font-size: 1.08rem; margin-top: 14px; }
  .book__hook { font-size: .92rem; -webkit-line-clamp: 3; }
  .flag { font-size: .8rem; }
  .shelves { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; scrollbar-width: none; }
  .shelves::-webkit-scrollbar { display: none; }
  .shelf { flex: none; }
  .member { flex-basis: calc(50% - 8px); padding: 0 12px 18px; }
  .member img { height: 150px; margin-top: -72px; }
  .member h3 { font-size: 1.6rem; }
  .member__bio { font-size: .95rem; }
  .family__grid { margin-top: 90px; gap: 84px 16px; }
  .btn { font-size: 1.08rem; min-height: 50px; padding-inline: 1.15em; }
  .book-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 26px; }
  .suggest { border-radius: 22px; flex-wrap: wrap; justify-content: center; text-align: center; padding: 12px 14px; }
}

@media (max-width: 480px) {
  .top__in { gap: 10px; }
  .logo { gap: 6px; }
  .logo img { height: 42px; }
  .logo__word { font-size: 1.5rem; }
  .lang summary { gap: 6px; padding: 6px 12px 4px 10px; }
  .lang__name { display: none; }
  .lang__code { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .walker--tuli { transform: translateX(8vw); }
  .walker--bilo { transform: translateX(calc(8vw + 110px)); }
}
