/* Layout concept: a coloring-book sheet. Ink outlines, flat crayon-swatch fills,
   covers stacked like books on a table, on the brand's logo burgundy. */
:root {
  /* Brand look: burgundy from the logo circle, one theme for everyone */
  --paper: #6F4249;
  --paper-2: #5F363D;
  --card: #7C4D55;
  --ink: #FBF0E4;
  --ink-soft: #EBD6CB;
  --hair: rgba(251, 240, 228, .2);
  --rose: #4E2B31;
  --sky: #8A5862;
  --butter: #9C7438;
  --sage: #56603F;
  --lilac: #4E2B31;
  --on-ink: #5F363D;
  --line: 2px;
  --shadow: 4px 4px 0 #3A1F24;
  --soft-shadow: 0 16px 34px -14px rgba(30, 10, 14, .6);
  --radius: 18px;
  --f-display: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-hand: "Gochi Hand", "Comic Sans MS", cursive;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.65;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.005em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 500; }
h3 { font-size: 1.3rem; font-weight: 500; }
p { margin: 0; }
:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 84px; }
.sr { 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: var(--on-ink); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

.wrap {
  width: 100%; max-width: 1160px; margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.eyebrow { font-family: var(--f-hand); font-size: 1.35rem; color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; text-decoration: none; letter-spacing: .01em;
  padding: .78em 1.45em; border-radius: 999px; border: var(--line) solid var(--ink);
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; white-space: nowrap;
}
.btn-ink { background: var(--ink); color: var(--on-ink); box-shadow: 3px 3px 0 var(--rose); }
.btn-line { background: transparent; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn:hover { transform: translate(-2px, -2px); }
.btn-ink:hover { box-shadow: 5px 5px 0 var(--rose); }
.btn-line:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn-sm { font-size: .95rem; padding: .48em 1.05em; }

/* Seasonal bar */
.season { display: block; background: #6B1119; color: #FFF3E4; text-decoration: none; font-weight: 600; font-size: .95rem; }
.season-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding-block: 9px; text-align: center; }
.season-star { color: #F2C14E; }
.season:hover .season-row { text-decoration: underline; text-underline-offset: 3px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--paper); z-index: 30; }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); border-bottom: 1.5px solid var(--hair); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand img { width: clamp(160px, 22vw, 230px); }
.brand { flex-shrink: 1; min-width: 0; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-weight: 600; }
.nav a:not(.btn) { text-decoration: none; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--ink); opacity: .5; transform: scaleX(0); transition: transform .2s; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-xmas::before { content: "✦ "; color: #C8423A; }
@media (max-width: 760px) { .nav-more { display: none; } }
@media (max-width: 520px) { .nav-xmas { display: none; } }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.note { font-family: var(--f-hand); font-size: 1.35rem; color: var(--ink-soft); transform: rotate(-1.5deg); transform-origin: left; }
.hl { background: linear-gradient(transparent 60%, var(--butter) 60%, var(--butter) 92%, transparent 92%); padding-inline: .08em; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 6px; }
.hero-art { position: relative; aspect-ratio: 1 / .92; max-width: 100%; }
.stack { position: absolute; width: 58%; border-radius: 8px; box-shadow: var(--soft-shadow), 0 0 0 1px var(--hair); background: var(--paper-2); }
.s1 { left: 0; top: 10%; transform: rotate(-9deg); }
.s2 { right: 0; top: 2%; transform: rotate(7deg); }
.s3 { left: 20%; top: 22%; width: 62%; transform: rotate(-1.5deg); z-index: 2; }
.mascot { position: absolute; width: 30%; right: -2%; bottom: -4%; z-index: 3; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)); }
@media (prefers-reduced-motion: no-preference) {
  .stack { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
  .hero-art:hover .s1 { transform: rotate(-13deg) translate(-8px, 4px); }
  .hero-art:hover .s2 { transform: rotate(11deg) translate(8px, -2px); }
}

/* Promise strip */
.promise { background: var(--paper-2); border-block: 1px solid var(--hair); }
.promise-list { list-style: none; margin-block: 0; padding-block: clamp(28px, 4vw, 44px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.promise-list li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.p-icon { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--ink); }
.p-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i-rose { background: var(--rose); } .i-sky { background: var(--sky); } .i-butter { background: var(--butter); } .i-sage { background: var(--sage); }
.p-title { font-family: var(--f-display); font-weight: 500; font-size: 1.08rem; line-height: 1.2; }
.p-text { font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }

/* Free pages */
.free { padding-block: clamp(56px, 8vw, 104px); }
.free-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.free-card > * { min-width: 0; }
.free-art { position: relative; background: var(--sky); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: clamp(16px, 3vw, 32px); box-shadow: var(--shadow); }
.free-art img { border-radius: 8px; }
.tag { position: absolute; top: -16px; left: 22px; background: var(--butter); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 14px; font-family: var(--f-hand); font-size: 1.2rem; transform: rotate(-3deg); }
.free-form { display: grid; gap: 16px; }
.free-form > p { color: var(--ink-soft); max-width: 34em; }
form[data-ml] { display: grid; gap: 14px; padding-top: 4px; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row input {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--card); border: var(--line) solid var(--ink); border-radius: 999px; padding: .72em 1.2em;
}
.field-row input::placeholder { color: var(--ink-soft); opacity: .7; }
.field-row input:focus { outline: none; box-shadow: 0 0 0 4px var(--rose); }
.field-row input[aria-invalid="true"] { box-shadow: 0 0 0 4px var(--rose); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.msg { min-height: 1.4em; font-weight: 700; font-size: .95rem; }
.done { background: var(--sage); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 6px; }
.done-title { font-family: var(--f-display); font-weight: 500; font-size: 1.5rem; }
button[disabled] { opacity: .6; cursor: progress; }

/* Books */
.books { padding-block: clamp(64px, 9vw, 112px); background: var(--paper-2); border-block: 1px solid var(--hair); }
.sec-head { display: grid; gap: 8px; justify-items: center; text-align: center; margin-bottom: 30px; }
.sec-head p:not(.eyebrow) { color: var(--ink-soft); max-width: 40em; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: clamp(32px, 5vw, 48px); }
.chip {
  font: 600 .93rem var(--f-body); color: var(--ink-soft); background: transparent;
  border: 1.5px solid var(--hair); border-radius: 999px; padding: .42em 1.05em;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip .n { font-variant-numeric: tabular-nums; opacity: .55; font-weight: 600; font-size: .85em; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: clamp(30px, 4vw, 44px) clamp(18px, 2.6vw, 30px); }
.card a { display: grid; gap: 6px; text-decoration: none; position: relative; }
.card .cover { border-radius: 6px; overflow: hidden; background: var(--card); box-shadow: var(--soft-shadow), 0 0 0 1px var(--hair); transition: transform .25s ease, box-shadow .25s ease; aspect-ratio: 640 / 662; margin-bottom: 8px; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card a:hover .cover { transform: translateY(-5px) rotate(-.6deg); box-shadow: 0 22px 36px -16px rgba(0,0,0,.45), 0 0 0 1px var(--hair); }
.card .t { font-family: var(--f-display); font-weight: 500; font-size: 1.06rem; line-height: 1.25; }
.card .meta { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.card a:hover .meta { color: var(--ink); }
.card.soon .cover img { filter: saturate(.45) brightness(.98); opacity: .8; }
.card.soon .cover { box-shadow: 0 0 0 1px var(--hair); }
.ribbon { position: absolute; top: 12px; left: -6px; background: var(--butter); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 10px; font-family: var(--f-hand); font-size: 1.05rem; transform: rotate(-4deg); box-shadow: 2px 2px 0 var(--ink); }
.books-foot { margin-top: 52px; display: flex; justify-content: center; }

/* About */
.about { padding-block: clamp(56px, 8vw, 104px); }
.about-grid { display: grid; grid-template-columns: minmax(160px, 300px) 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.about-grid > div { display: grid; gap: 14px; max-width: 38em; min-width: 0; }
.about-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--rose); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: var(--shadow); padding: 8%; }
.about-grid p { color: var(--ink-soft); }
.link { font-weight: 500; font-family: var(--f-display); font-size: 1.1rem; text-decoration-thickness: 2px; text-decoration-color: var(--ink-soft); text-underline-offset: 5px; }

/* Social */
.social { background: var(--lilac); border-top: 1px solid var(--hair); }
.social-inner { padding-block: clamp(48px, 7vw, 80px); display: grid; gap: 12px; justify-items: center; text-align: center; }
.social-inner > p { color: var(--ink); opacity: .8; }
.social-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.soc { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 500; font-size: 1.08rem; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 999px; padding: .58em 1.3em .58em 1em; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.soc:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.soc svg { width: 22px; height: 22px; fill: var(--ink); }

/* Footer */
.site-foot { background: var(--ink); color: var(--on-ink); }
.foot-grid { padding-block: 40px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.foot-logo { width: 210px; }
.brand img { filter: invert(1) sepia(.1); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-weight: 600; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.fine { font-size: .88rem; opacity: .75; }

/* Responsive */
@media (max-width: 900px) {
  .promise-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .free-card { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; width: 100%; justify-self: center; }
  .about-grid { grid-template-columns: 1fr; justify-items: start; }
  .about-grid img { width: 180px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .promise-list { grid-template-columns: 1fr; gap: 18px; }
  .btn { white-space: normal; }
  .nav .btn { white-space: nowrap; }
  .brand img { width: 150px; }
  .nav { gap: 14px; }
  .cta-row .btn { flex: 1 1 100%; }
  .season-row { font-size: .88rem; }
}
