/* Thinkerbloom Books - site styles. No external fonts, no frameworks. Mobile first. */
:root {
  color-scheme: light;
  --ink: #241f3d;
  --ink-soft: #4a4566;
  --paper: #fffaf1;
  --card: #ffffff;
  --line: #ece4d6;
  --pip: #8a55b8;
  --pip-dark: #5e3592;
  --pip-light: #efe4f7;
  --sun: #ffc83d;
  --sun-light: #fff3cf;
  --coral: #ff7a59;
  --coral-light: #ffe6dd;
  --sea: #13938d;
  --sea-light: #d9f3f0;
  --leaf: #3f9b4b;
  --leaf-light: #e1f4e1;
  --plum: #3b2a6b;
  --plum-light: #ebe6f7;
  --night: #2b2350;
  --amazon: #ffb000;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(36, 31, 61, .06), 0 10px 24px -12px rgba(36, 31, 61, .25);
  --font-head: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step: 1rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.big-text { font-size: 118.75%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
}
body.large-type { font-size: 1.25rem; line-height: 1.65; }
img { max-width: 100%; height: auto; }
a { color: var(--pip-dark); text-underline-offset: .18em; }
a:hover { color: var(--pip); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.eyebrow { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pip-dark); margin: 0 0 .4em; }
.lead { font-size: 1.15em; color: var(--ink-soft); }
.note { background: var(--sun-light); border-left: 5px solid var(--sun); padding: .7em 1em; border-radius: 10px; font-size: .95em; }
.placeholder { background: var(--coral-light); border: 2px dashed var(--coral); padding: .8em 1em; border-radius: 12px; font-weight: 700; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 250, 241, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-size: 1.35rem; font-weight: 800; margin-right: auto; }
.logo b { color: var(--pip); font-weight: 900; }
.logo small { font-size: .62em; font-weight: 700; color: var(--ink-soft); margin-left: 4px; letter-spacing: .04em; }
.logo img { width: 44px; height: auto; }
.nav-toggle, .text-size { font: inherit; font-weight: 700; border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 44px; }
.text-size { padding: 6px 12px; font-family: var(--font-head); }
.text-size span:first-child { font-size: 1.25em; }
.text-size[aria-pressed="true"] { background: var(--ink); color: #fff; }
.site-nav { width: 100%; display: none; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 4px 0 12px; display: grid; gap: 2px; }
.site-nav a { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--pip-light); color: var(--pip-dark); }
.no-js .site-nav { display: block; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav ul { display: flex; padding: 0; gap: 4px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 999px; font-family: var(--font-head); font-weight: 800; font-size: 1.02rem; text-decoration: none; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; cursor: pointer; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--pip); color: #fff; }
.btn-primary:hover { color: #fff; background: var(--pip-dark); }
.btn-secondary { background: #fff; color: var(--ink); }
.btn-secondary:hover { color: var(--ink); background: var(--sun-light); }
.btn-amazon { background: var(--amazon); color: var(--ink); }
.btn-amazon:hover { color: var(--ink); background: #ffc433; }
.btn-ghost { background: #fff; color: var(--ink); border-style: dashed; box-shadow: none; }
.btn-ghost:hover { box-shadow: none; background: var(--pip-light); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 6px 16px; font-size: .95rem; box-shadow: 0 3px 0 var(--ink); }
.btn-lg { min-height: 56px; padding: 12px 28px; font-size: 1.15rem; }

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 85% 10%, #ffe28a 0, var(--sun) 35%, #ffb547 100%); padding: 40px 0 90px; }
.hero-inner { position: relative; display: grid; gap: 24px; align-items: center; }
.hero h1 { color: var(--ink); }
.hero .hl { color: var(--pip-dark); background: linear-gradient(transparent 62%, rgba(255, 255, 255, .7) 62%); }
.hero .lead { color: var(--ink); max-width: 36em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-pip { position: relative; justify-self: center; width: min(78vw, 360px); }
.hero-pip img { width: 100%; filter: drop-shadow(0 18px 18px rgba(36, 31, 61, .25)); animation: bob 4.5s ease-in-out infinite; }
.speech { position: absolute; top: -6px; left: -8px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 8px 14px; font-family: var(--font-head); font-weight: 800; line-height: 1.25; box-shadow: 0 4px 0 var(--ink); transform: rotate(-4deg); z-index: 1; }
.speech::after { content: ""; position: absolute; right: 22px; bottom: -14px; border: 8px solid transparent; border-top-color: var(--ink); }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; fill: var(--paper); }
.bubbles i { position: absolute; bottom: -40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .7); animation: rise 12s linear infinite; }
.bubbles i:nth-child(1) { left: 8%; width: 26px; height: 26px; animation-delay: 0s; }
.bubbles i:nth-child(2) { left: 22%; width: 14px; height: 14px; animation-delay: 3s; animation-duration: 9s; }
.bubbles i:nth-child(3) { left: 48%; width: 34px; height: 34px; animation-delay: 6s; animation-duration: 15s; }
.bubbles i:nth-child(4) { left: 63%; width: 18px; height: 18px; animation-delay: 1.5s; }
.bubbles i:nth-child(5) { left: 78%; width: 22px; height: 22px; animation-delay: 4.5s; animation-duration: 10s; }
.bubbles i:nth-child(6) { left: 90%; width: 12px; height: 12px; animation-delay: 7s; }
.bubbles i:nth-child(7) { left: 35%; width: 10px; height: 10px; animation-delay: 9s; animation-duration: 8s; }
@keyframes rise { to { transform: translateY(-620px) translateX(20px); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@media (min-width: 860px) {
  .hero { padding: 64px 0 110px; }
  .hero-inner { grid-template-columns: 1.25fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-pip img, .bubbles i { animation: none; }
  .bubbles { display: none; }
  .btn { transition: none; }
}

.hero-small { padding: 28px 0 24px; border-bottom: 1px solid var(--line); }
.hero-small-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-small h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.hero-small .lead { max-width: 40em; margin: 0; }
.hero-small-pip { width: 92px; flex: none; }
@media (min-width: 700px) { .hero-small-pip { width: 150px; } }
.accent-sun.hero-small { background: var(--sun-light); }
.accent-coral.hero-small { background: var(--coral-light); }
.accent-sea.hero-small { background: var(--sea-light); }
.accent-leaf.hero-small { background: var(--leaf-light); }
.accent-plum.hero-small { background: var(--plum-light); }

/* sections */
.section { padding: 36px 0; }
.section-tint { background: #fff4e3; }
.section-title { text-align: left; }
.section-title.small { font-size: 1.45rem; margin-top: .6em; }
.section-intro { color: var(--ink-soft); margin-top: -.2em; }
.more { margin-top: 20px; text-align: center; }

/* breadcrumbs */
.crumbs ol { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #b3a99a; }

/* age tiles */
.age-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
@media (min-width: 760px) { .age-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.age-tile { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 18px 10px 16px; border-radius: var(--radius); border: 3px solid var(--ink); background: #fff; text-decoration: none; color: var(--ink); box-shadow: 0 5px 0 var(--ink); transition: transform .12s ease; }
.age-tile:hover { transform: translateY(-3px) rotate(-1deg); color: var(--ink); }
.age-tile img { width: 76px; }
.age-tile-name { font-family: var(--font-head); font-weight: 900; font-size: 1.25rem; }
.age-tile-count { font-size: .9rem; color: var(--ink-soft); }
.age-tile.accent-coral { background: var(--coral-light); }
.age-tile.accent-sun { background: var(--sun-light); }
.age-tile.accent-sea { background: var(--sea-light); }
.age-tile.accent-plum { background: var(--plum-light); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.chip-link, .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font: inherit; font-weight: 700; cursor: pointer; }
.chip-link span { background: var(--pip-light); border-radius: 999px; padding: 0 8px; font-size: .85em; }
.chip-link:hover, .chip:hover { background: var(--pip-light); color: var(--ink); }
.chip-link.is-on, .chip.is-on { background: var(--ink); color: #fff; }
.filter-count { color: var(--ink-soft); font-size: .95rem; min-height: 1.5em; }

/* book cards */
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1040px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.card-cover { display: block; background: #f3ede3; padding: 14px 14px 0; }
.card-cover img, .cover-missing { display: block; width: 100%; aspect-ratio: 8.5 / 11; object-fit: cover; border-radius: 4px 8px 8px 4px; box-shadow: 4px 6px 14px -6px rgba(0, 0, 0, .45); transition: transform .2s ease; }
.card:hover .card-cover img { transform: translateY(-4px) rotate(-1deg); }
.cover-missing { display: grid; place-items: center; background: var(--pip-light); color: var(--pip-dark); font-weight: 700; }
.card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 1.02rem; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--pip-dark); text-decoration: underline; }
.card-pitch { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.card-actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.link-more { font-weight: 700; font-size: .95rem; }
@media (max-width: 420px) { .card-body { padding: 10px 10px 14px; } .card-actions .btn { width: 100%; } }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { font-size: .78rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #f2eee7; color: var(--ink); white-space: nowrap; }
.badge-age { background: var(--sea-light); color: #0b5f5b; }
.badge-lp { background: var(--plum); color: #fff; }
.badge-series { background: var(--pip-light); color: var(--pip-dark); white-space: normal; }
.status { align-self: flex-start; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.status-live { background: var(--leaf-light); color: #1f6a2a; }
.status-soon { background: var(--sun-light); color: #7a5200; }
.status-draft { background: #eee; color: #555; }
.large-type .card-title { font-size: 1.15rem; }
.large-type .card-pitch { font-size: 1.02rem; }

/* series */
.series-grid { display: grid; gap: 16px; }
@media (min-width: 800px) { .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
.series-card { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius); border: 3px solid var(--ink); background: #fff; box-shadow: 0 5px 0 var(--ink); text-decoration: none; color: var(--ink); }
.series-card:hover { color: var(--ink); transform: translateY(-2px); }
.series-card h3 { margin: 0 0 4px; font-size: 1.2rem; }
.series-card p { margin: 0 0 6px; font-size: .95rem; color: var(--ink-soft); }
.series-covers { position: relative; height: 150px; }
.series-cover { position: absolute; width: 100px; border-radius: 3px 6px 6px 3px; box-shadow: 3px 5px 10px -4px rgba(0, 0, 0, .5); }
.series-cover:nth-child(1) { left: 0; top: 0; z-index: 3; }
.series-cover:nth-child(2) { left: 14px; top: 6px; z-index: 2; transform: rotate(6deg); }
.series-cover:nth-child(3) { left: 26px; top: 10px; z-index: 1; transform: rotate(11deg); }
.series-count { font-size: .85rem; font-weight: 800; color: var(--pip-dark); }
.series-card.accent-sun { background: var(--sun-light); }
.series-card.accent-coral { background: var(--coral-light); }
.series-card.accent-sea { background: var(--sea-light); }
.series-card.accent-plum { background: var(--plum-light); }
.series-card.accent-leaf { background: var(--leaf-light); }
.series-list { list-style: none; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.series-num { display: inline-block; font-family: var(--font-head); font-weight: 900; margin-bottom: 6px; background: var(--ink); color: #fff; padding: 2px 10px; border-radius: 999px; }

/* home bits */
.section-promise { background: var(--night); color: #fff; }
.promise-grid { display: grid; gap: 18px; }
@media (min-width: 800px) { .promise-grid { grid-template-columns: repeat(3, 1fr); } }
.promise { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15); border-radius: var(--radius); padding: 20px; }
.promise h3 { color: var(--sun); }
.promise p { color: #e6e2f5; margin: 0; }
.promise-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 900; font-family: var(--font-head); margin-bottom: 10px; }
.printable { display: grid; gap: 20px; align-items: center; background: #fff; border: 3px dashed var(--pip); border-radius: 24px; padding: 22px; }
.printable img { width: 150px; justify-self: center; }
@media (min-width: 760px) { .printable { grid-template-columns: 200px 1fr; padding: 30px; } .printable img { width: 200px; } }

/* book page */
.book-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 760px) { .book-layout { grid-template-columns: minmax(240px, 380px) 1fr; gap: 40px; } }
.book-cover-wrap { background: linear-gradient(160deg, #f7efe2, #efe4d2); border-radius: 24px; padding: 22px; }
.book-cover { display: block; width: 100%; border-radius: 4px 10px 10px 4px; box-shadow: 8px 12px 24px -10px rgba(0, 0, 0, .55); }
.book-title { font-size: clamp(1.8rem, 4.6vw, 2.7rem); margin-top: 8px; }
.book-subtitle { font-size: 1.12em; color: var(--ink-soft); }
.book-pitch { font-size: 1.1em; font-weight: 600; margin-top: 14px; }
.book-actions { margin: 18px 0; }
.look-inside { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.look-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: center; font: inherit; color: var(--ink-soft); }
.look-thumb img { display: block; width: 100%; border-radius: 6px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.look-thumb span { font-size: .85rem; }
.look-placeholder { aspect-ratio: 8.5 / 11; display: grid; place-items: center; text-align: center; border: 2px dashed #cfc3ad; border-radius: 10px; color: var(--ink-soft); font-weight: 700; background: repeating-linear-gradient(45deg, #fff, #fff 12px, #faf5ec 12px, #faf5ec 24px); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 820px); }
.lightbox::backdrop { background: rgba(20, 16, 40, .8); }
.lightbox img { display: block; width: 100%; max-height: 90vh; object-fit: contain; background: #fff; border-radius: 8px; }
.lightbox-close { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-size: 1.6rem; cursor: pointer; }
.book-details { display: grid; gap: 28px; }
@media (min-width: 900px) { .book-details { grid-template-columns: 1.6fr 1fr; } }
.book-desc ul { padding-left: 1.2em; }
.book-desc li { margin-bottom: .35em; }
.book-facts dl { margin: 0; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.book-facts dl div { display: grid; grid-template-columns: 9em 1fr; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.book-facts dl div:last-child { border-bottom: 0; }
.book-facts dt { font-weight: 800; }
.book-facts dd { margin: 0; }

/* prose pages */
.prose { max-width: 900px; }
.prose h2 { margin-top: 1.2em; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 1.8em; margin-bottom: .55em; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--leaf); font-weight: 900; }
.about-grid { display: grid; gap: 24px; }
@media (min-width: 820px) { .about-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.pip-figure { margin: 0; background: var(--pip-light); border-radius: 24px; padding: 22px; text-align: center; }
.pip-figure img { width: 200px; }
.pip-figure figcaption { text-align: left; }
.contact-card { display: grid; gap: 18px; align-items: center; background: #fff; border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.contact-card .btn { word-break: break-all; }
@media (min-width: 700px) { .contact-card { grid-template-columns: 140px 1fr; } }
.imprint div { display: grid; grid-template-columns: 11em 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.imprint dt { font-weight: 800; }
.imprint dd { margin: 0; }
.empty { text-align: center; padding: 40px 0; }

/* footer */
.site-footer { background: var(--night); color: #ddd8f0; padding: 36px 0 20px; margin-top: 30px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 22px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 900; font-size: 1.3rem; color: #fff; }
.footer-h { font-size: 1rem; color: var(--sun); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fine-row { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 20px; padding-top: 14px; }
.fine { font-size: .85rem; color: #bdb6d8; margin: 0 0 .4em; }

@media print {
  .site-header, .site-footer, .hero .bubbles, .btn { display: none !important; }
}
@media (max-width: 460px) {
  .logo { font-size: 1.15rem; }
  .logo small { display: none; }
  .logo img { width: 36px; }
  .nav-toggle, .text-size { padding: 4px 12px; }
}
