:root {
  --page: #F6F1E7;
  --cream: #FFF6E5;
  --ink: #0B3A21;
  --ink-deep: #062414;
  --spine: #0D3F24;
  --night: #0F1B29;
  --mint: #86C383;
  --purple: #7A4FD0;
  --red: #E0472F;
  --lemon: #E8B83A;
  --text: #13261B;
  --muted: #3E5446;
  --line: 3px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --edge: 0px;
  --max: 1240px;
  --bar: 72px;
  --frame: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 14px); }
body {
  margin: 0;
  background-color: var(--page);
  background-image: radial-gradient(rgba(11, 58, 33, 0.13) 1.4px, transparent 1.6px); /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
  background-size: 26px 26px;
  color: var(--text);
  font: 700 18px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-left: var(--edge);
}
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--mint); color: var(--ink-deep); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* puffy brand headline: cream fill, thick ink stroke, hard ink drop (as in the reels' subtitles) */
.puffy {
  font-family: var(--head); font-weight: 700; color: var(--cream);
  -webkit-text-stroke: 0.11em var(--ink); paint-order: stroke fill;
  text-shadow: 0 0.07em 0 var(--ink-deep); /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
  letter-spacing: 0.005em; line-height: 1.02; margin: 0;
  text-wrap: balance;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--spine); --f: var(--cream);
  appearance: none; border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--b); color: var(--f);
  font: 900 18px/1 var(--body); letter-spacing: 0.01em;
  padding: 16px 26px; min-height: 54px; cursor: pointer;
  box-shadow: 0 5px 0 var(--ink-deep); /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), background-color 160ms ease; /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink-deep); } /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #145a33; } .btn-cream:hover { background: #fff; } }
.btn-small { font-size: 15px; padding: 10px 18px; min-height: 42px; box-shadow: 0 3px 0 var(--ink-deep); } /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
.btn-small:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-deep); } /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
.btn-cream { --b: var(--cream); --f: var(--ink); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 12px var(--frame); background: var(--page);
  box-shadow: 0 1px 0 rgba(11, 58, 33, 0.12); /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 26px/1 var(--head); color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.bar nav { display: flex; gap: 24px; margin-left: auto; }
.bar nav a { text-decoration: none; font-weight: 800; color: var(--ink); padding: 6px 2px; }
@media (hover: hover) { .bar nav a:hover { text-decoration: underline; } }

/* ---------- hero ---------- */
main { overflow-x: clip; }
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) 0;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px;
  align-items: end;
}
.hero h1 { grid-column: 1 / -1; font-size: clamp(30px, 5.6vw, 84px); }
.hero-copy { grid-column: 1 / 5; align-self: center; padding-bottom: 0; }
.lede { font-size: clamp(18px, 1.5vw, 21px); font-weight: 700; color: var(--text); max-width: 34ch; margin: 0; }

/* ---------- the shelf: Blender-rendered books (blender/books.py), one sprite strip per book ---------- */
.shelf-wrap { grid-column: 5 / 13; position: relative; justify-self: end; width: min(100% + min(var(--gutter), 40px), (100vh - 440px) * 1.463); margin-right: calc(-1 * min(var(--gutter), 40px)); margin-bottom: 30px; }
.shelf { position: relative; width: 100%; }
.shelf-board { position: absolute; display: block; pointer-events: none; }
.book {
  position: absolute; display: block; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; border-radius: 10px;
}
.book.up { z-index: 20 !important; }   /* safe: every layer is pre-cut where its neighbours hide it */
.book.up .sprite { pointer-events: none; }
.book[aria-selected='true'] .tag { background: var(--spine); color: var(--cream); }
.sprite {
  position: absolute; display: block; pointer-events: none;
  background-repeat: no-repeat; background-size: calc(var(--n) * 100%) 100%; background-position: 0 0;
}
.tag {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); white-space: nowrap;
  background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px;
  font: 900 15px/1 var(--body); padding: 6px 8px; font-variant-numeric: tabular-nums; pointer-events: none;
}
.tag-deal { background: var(--spine); color: var(--cream); }
.tag-deal s { opacity: 0.7; font-weight: 700; }
.book:focus-visible { outline-offset: 6px; }
/* "you can open these" hint: hand-drawn arrow up to the Tolerance Reset + a line of text */
.shelf-hint {
  position: absolute; left: calc(var(--x) - 8px); bottom: 2px; margin: 0;
  display: flex; align-items: flex-end; gap: 6px; white-space: nowrap;
  font: 700 18px/1.1 var(--head); color: var(--ink); z-index: 30; pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}
.hint-arrow { flex: none; margin-bottom: 4px; transform: translateY(-40px); margin-right: -4px; animation: bob 1.6s var(--ease-in-out) infinite; }
@keyframes bob { 50% { translate: 0 -5px; } }
.hint-touch { display: none; }
@media (min-width: 701px) {
  /* desktop: text sits to the left of the shelf, the arrow climbs up-right into the bottom of the Reset */
  .shelf-hint { left: auto; right: calc(100% - var(--x) - 14px); flex-direction: row-reverse; bottom: 26px; }
  .hint-arrow { transform: translateY(-14px) scaleX(-1); margin: 0 0 0 -2px; }
}
@media (hover: none) { .hint-touch { display: inline; } .hint-mouse { display: none; } }
.shelf-wrap { padding-bottom: 40px; }
.shelf .book { animation: settle 560ms var(--ease-out) backwards; }
.shelf > :nth-child(3) { animation-delay: 50ms; } .shelf > :nth-child(4) { animation-delay: 100ms; }
.shelf > :nth-child(5) { animation-delay: 150ms; } .shelf > :nth-child(6) { animation-delay: 200ms; }
.shelf > :nth-child(7) { animation-delay: 250ms; }
@keyframes settle { from { transform: translateY(-24px); opacity: 0; } }
.leafy { position: absolute; right: var(--gutter); bottom: 0; width: clamp(150px, 15vw, 220px); height: auto; pointer-events: none; }
.bundle-art img { transition: transform 700ms var(--ease-out); }
.bundle-art.stacked img { transform: rotate(0deg) translateX(var(--sx, 0)); }
.bundle-art.stacked img:nth-child(1) { --sx: 80%; } .bundle-art.stacked img:nth-child(2) { --sx: 40%; }
.bundle-art.stacked img:nth-child(4) { --sx: -40%; } .bundle-art.stacked img:nth-child(5) { --sx: -80%; }

/* ---------- open book (spread) ---------- */
.spreads { grid-column: 1 / -1; }
.spread[hidden] { display: none; }
.spread {
  display: grid; grid-template-columns: minmax(200px, 3fr) 9fr;
  border: var(--line) solid var(--ink); border-radius: 18px; overflow: hidden;
  background: var(--cream); box-shadow: 0 10px 0 var(--spine), 0 10px 0 var(--line) var(--ink); /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
  margin-bottom: 16px;
}
.spread:not([hidden]) { animation: open 280ms var(--ease-out); }
@keyframes open { from { opacity: 0; transform: translateY(10px); } }
.spread { min-height: calc(100svh - var(--bar) - 30px); }
.cover { margin: 0; border-right: var(--line) solid var(--ink); background: var(--night); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.page { padding: clamp(22px, 2.4vw, 34px) clamp(22px, 3vw, 44px); position: relative; display: flex; flex-direction: column; justify-content: center; }
.page::before { /* the gutter shading of an open book */
  content: ''; position: absolute; inset: 0 auto 0 0; width: 28px;
  background: rgba(11, 58, 33, 0.07); width: 14px;
  pointer-events: none;
}
.page h3 { font-size: clamp(26px, 2.6vw, 38px); }
.promise { font-size: clamp(17px, 1.3vw, 19px); margin: 10px 0 0; max-width: 62ch; }
.page h4 { font: 700 18px/1 var(--head); color: var(--ink); margin: 20px 0 10px; }
.inside { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; font-size: 16px; line-height: 1.45; }
.inside li { position: relative; padding-left: 26px; font-weight: 600; }
.inside li::before {
  content: ''; position: absolute; left: 0; top: 0.42em; width: 14px; height: 14px; border-radius: 50%;
  background: var(--mint); border: 2px solid var(--ink);
}
.inside b { font-weight: 900; color: var(--ink); }
.fmt { margin: 10px 0 0; font-weight: 800; color: var(--muted); font-size: 15px; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 18px; }
.alt { font-weight: 800; color: var(--ink); }
.early { margin: 16px 0 0; font-weight: 800; font-size: 16px; color: var(--muted); }
.bundle .early { color: var(--cream); opacity: 0.85; }
.hero-buy { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

/* ---------- bundle ---------- */
.bundle {
  margin-top: clamp(96px, 12vw, 180px); background: var(--spine); color: var(--cream);
  min-height: calc(100svh - var(--bar) - 14px); padding: clamp(28px, 4vh, 56px) var(--frame);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center;
}
.bundle > * { min-width: 0; }
.bundle-art { grid-column: 1 / 7; position: relative; height: clamp(260px, min(34vw, 52svh), 470px); max-width: 620px; justify-self: start; width: 100%; }
.bundle-art img {
  position: absolute; bottom: 0; width: 38%; border: var(--line) solid var(--ink); border-radius: 10px;
  box-shadow: 0 8px 0 var(--ink-deep); transform-origin: 50% 110%; /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
}
.bundle-art img:nth-child(1) { left: 0%; transform: rotate(-14deg); }
.bundle-art img:nth-child(2) { left: 15%; transform: rotate(-7deg); }
.bundle-art img:nth-child(3) { left: 30%; transform: rotate(0deg); }
.bundle-art img:nth-child(4) { left: 45%; transform: rotate(7deg); }
.bundle-art img:nth-child(5) { left: 60%; transform: rotate(14deg); }
.bundle-copy { grid-column: 8 / 13; }
.bundle h2 { font-size: clamp(34px, 4vw, 58px); }
.bundle p { margin: 16px 0 0; font-size: 19px; max-width: 38ch; }
.bundle-list { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; font-variant-numeric: tabular-nums; max-width: 420px; }
.bundle-list li { display: flex; justify-content: space-between; gap: 16px; font-weight: 800; }
.bundle-list .total { margin-top: 8px; padding-top: 12px; border-top: 3px dotted rgba(255, 246, 229, 0.55); font-size: 22px; font-weight: 900; }
.bundle-list s { opacity: 0.7; font-weight: 700; margin-right: 6px; }

/* ---------- index ---------- */
.index { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 12vw, 180px) var(--gutter); position: relative; }
.index > :not(.leafy) { margin-right: clamp(0px, 18vw, 250px); }
.index h2 { font-size: clamp(40px, 5vw, 72px); }
.index-note { margin: 18px 0 0; font-size: 20px; max-width: 46ch; }
.entries { margin: 44px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 34px 64px; }
.entries div { display: grid; grid-template-columns: 9.5em 1fr; gap: 18px; align-items: baseline; }
.entries dt { font: 700 22px/1.2 var(--head); color: var(--ink); }
.entries dd { margin: 0; font-weight: 600; }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--cream); padding: clamp(64px, 8vw, 110px) var(--frame) 40px; }
.foot-mark { font-size: clamp(88px, 22vw, 330px); line-height: 0.9; text-shadow: 0 0.05em 0 #000; -webkit-text-stroke-width: 0.07em; color: var(--mint); } /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
.foot-line { font: 700 clamp(22px, 2.4vw, 32px)/1.2 var(--head); margin: 18px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 32px; }
.foot-links a { font-weight: 800; font-size: 18px; }
.foot-small { margin: 48px 0 0; font-size: 15px; opacity: 0.8; font-weight: 600; }

/* ---------- apology dialog ---------- */
.sorry {
  width: min(560px, calc(100vw - 32px)); padding: 0; border: var(--line) solid var(--ink); border-radius: 22px;
  background: var(--cream); color: var(--text); overflow: visible;
  box-shadow: 0 10px 0 var(--ink-deep), 0 30px 60px rgba(6, 36, 20, 0.35); /* taste-skill-ignore: WeedL cel style (hard ink drop, notebook dots, spine stitches) */
  opacity: 1; transform: none;
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out), overlay 260ms allow-discrete, display 260ms allow-discrete;
}
.sorry::backdrop { background: rgba(15, 27, 41, 0.62); transition: background-color 220ms ease, overlay 260ms allow-discrete, display 260ms allow-discrete; }
@starting-style {
  .sorry[open] { opacity: 0; transform: translateY(14px) scale(0.97); }
  .sorry[open]::backdrop { background: rgba(15, 27, 41, 0); }
}
.sorry:not([open]) { opacity: 0; transform: translateY(8px) scale(0.98); }
.sorry-doc { position: absolute; left: -96px; bottom: -6px; width: 150px; height: auto; pointer-events: none; }
.sorry-body { padding: 34px 34px 30px 76px; }
.sorry h2 { font-size: 32px; padding-right: 30px; }
.ask { margin: 16px 0 0; }
.lead { margin-top: 22px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.lead input {
  min-width: 0; border: var(--line) solid var(--ink); border-radius: 999px; background: #fff;
  font: 700 18px/1 var(--body); color: var(--text); padding: 0 20px; min-height: 54px;
}
.lead input::placeholder { color: #6B7F72; }
.lead input:focus-visible { outline-offset: 2px; }
.lead input[aria-invalid='true'] { border-color: var(--red); }
.lead .btn[disabled] { opacity: 0.7; cursor: progress; }
.hint { grid-column: 1 / -1; margin: 4px 0 0 6px; font-size: 15px; color: var(--muted); }
.hint.err { color: #B4301C; }
.done { margin: 18px 0 0; font: 700 22px/1.3 var(--head); color: var(--ink); }
.sorry-x { position: absolute; top: 12px; right: 12px; margin: 0; }
.sorry-x button {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  display: grid; place-items: center;
}
@media (hover: hover) { .sorry-x button:hover { background: rgba(11, 58, 33, 0.1); } }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .inside { grid-template-columns: 1fr; }
  .hero-copy { grid-column: 1 / -1; padding-bottom: 0; }
  .shelf-wrap { grid-column: 1 / -1; justify-self: center; width: min(100%, 760px); margin: 0 0 24px; }
  .bundle-art { grid-column: 1 / -1; justify-self: center; max-width: 520px; }
  .bundle-copy { grid-column: 1 / -1; margin-top: 24px; }
  .bundle-art { height: clamp(200px, 30svh, 320px); }
  .entries { grid-template-columns: 1fr; }
}

/* ---------- phone ---------- */
@media (max-width: 700px) {
  /* first screen from Instagram: headline, the shelf with prices, then the buy button, then the explanation */
  .hero { row-gap: 14px; }
  .hero h1 { order: 1; }
  .shelf-wrap { order: 2; margin: 0 0 26px !important; width: calc(100% + 2 * var(--gutter)) !important; justify-self: center; }
  .hero-copy .early { order: -1; margin: 0 0 14px; }
  .shelf-wrap { padding-bottom: 34px; }
  .shelf-hint { font-size: 16px; }
  .hint-arrow { width: 34px; height: 46px; margin-bottom: 2px; transform: translateY(-22px); }
  .hero-copy { order: 3; display: flex; flex-direction: column; }
  .hero-buy { order: -1; margin: 0 0 16px !important; }
  .hero-buy .alt { font-size: 16px; }
  .early { margin-top: 2px; }
  .lede { font-size: 16px !important; margin-top: 6px !important; }
  .spreads { order: 4; }
  /* compact product page: fits one Instagram-browser screen */
  .page { padding: 14px 16px 16px !important; }
  .page h3 { font-size: 22px !important; }
  .promise { font-size: 15px !important; line-height: 1.4; margin-top: 6px !important; }
  .buy-row { margin-top: 12px !important; gap: 8px 16px !important; }
  .page h4 { margin: 12px 0 6px !important; font-size: 16px; }
  .inside { font-size: 14px !important; line-height: 1.36 !important; gap: 5px !important; }
  .inside li { padding-left: 22px; }
  .inside li::before { width: 11px; height: 11px; top: 0.38em; }
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .bar { gap: 12px; padding: 10px var(--frame); }
  .bar nav { display: none; }
  .bar .btn-small { margin-left: auto; font-size: 14px; padding: 9px 14px; }
  .brand { font-size: 22px; } .brand img { width: 34px; height: 34px; }
  .hero { row-gap: 22px; padding-top: 26px; }
  .hero-copy { padding-bottom: 0; }
  .hero h1 br { display: none; }
  .hero h1 { font-size: clamp(26px, 7.3vw, 36px); }
  .lede { margin-top: 16px; font-size: 18px; }
  .hero-buy { margin-top: 22px; }
  .hero-buy .btn { width: 100%; }
  .shelf-wrap { width: 100%; margin-bottom: 18px; }
  .tag { font-size: 10px; padding: 3px 3px; border-width: 2px; border-radius: 6px; transform: translate(-50%, 3px); letter-spacing: -0.02em; }
  .tag-deal s { display: none; }
  .index > :not(.leafy) { margin-right: 0; }
  .leafy { display: none; }
  .spread { grid-template-columns: 1fr; border-radius: 16px; }
  .cover { display: none; }
  .page .fmt { display: none; }
  .page h4 { margin: 16px 0 8px; }
  .cover img { object-position: 50% 62%; }
  .page { padding: 18px 18px 22px; }
  .page h3 { font-size: 25px; }
  .promise { font-size: 16px; }
  .inside { grid-template-columns: 1fr; gap: 6px; font-size: 14.5px; line-height: 1.4; }
  .page::before { display: none; }
  .buy-row .btn, .hero-buy .btn { width: 100%; font-size: 16px; padding: 14px 16px; white-space: nowrap; }
  :root { --bar: 62px; }
  .bundle { padding-top: 18px; padding-bottom: 16px; }
  .bundle-art { height: clamp(130px, 20svh, 180px); }
  .bundle-art img { width: auto; height: 92%; }
  .bundle-art img:nth-child(1) { left: 2%; } .bundle-art img:nth-child(2) { left: 19%; } .bundle-art img:nth-child(3) { left: 36%; }
  .bundle-art img:nth-child(4) { left: 53%; } .bundle-art img:nth-child(5) { left: 70%; }
  .bundle h2 { font-size: 26px; }
  .bundle p { font-size: 15px; margin-top: 8px; line-height: 1.4; }
  .bundle-list { margin: 10px 0 14px; gap: 2px; font-size: 14px; }
  .bundle-list .total { font-size: 18px; margin-top: 4px; padding-top: 8px; }
  .bundle .early { margin-top: 10px; font-size: 14px; }
  .bundle-copy .btn { width: 100%; }
  .entries div { grid-template-columns: 1fr; gap: 4px; }
  .sorry { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .sorry-doc { left: 20px; right: auto; top: -172px; bottom: auto; width: 80px; }
  .sorry-body { padding: 30px 20px calc(24px + env(safe-area-inset-bottom)); }
  .sorry h2 { font-size: 27px; padding-right: 40px; }
  .lead { grid-template-columns: 1fr; }
  .lead .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hint-arrow { animation: none; }
  html { scroll-behavior: auto; }
  .book, .slipcase, .btn, .sorry, .sorry::backdrop { transition: none; }
  .spread:not([hidden]), .shelf .book { animation: none; }
  .bundle-art img { transition: none; }
}
