/* ==========================================================
   Burford Parker — site styles
   Palette taken from the character artwork and book covers.
   ========================================================== */

:root {
  /* paper & ink */
  --cream: #fbf3e4;
  --paper: #fffdf7;
  --ink: #1d3b2f;          /* deep green from the social card title */
  --ink-soft: #5b4f45;     /* warm brown body text */
  --line: #e8dcc6;

  /* character colours */
  --slime: #b8e36a;        /* the green slime */
  --slime-deep: #7fb52f;
  --sky: #5cc8f2;          /* the blue slime */
  --sky-deep: #1f8fc0;
  --purple: #93589f;       /* her T-shirt */
  --purple-soft: #efe3f2;
  --sun: #f4d23a;          /* the cover yellow */
  --sun-soft: #fdf3c4;
  --tie-red: #d9524e;      /* his school tie */
  --navy: #22406e;
  --teal: #b4e0de;         /* portrait background */
  --palace: #8fd0f2;       /* palace-tour blue */
  --palace-pink: #e0457b;

  --radius: 22px;
  --shadow: 0 1px 0 rgba(29,59,47,.06), 0 14px 34px -18px rgba(29,59,47,.35);
  --wrap: 1160px;

  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-soft);
  font: 400 1.075rem/1.65 var(--f-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--slime-deep); }
a:hover { text-decoration-color: var(--tie-red); }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--ink);
  line-height: 1.08;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 650; }
h3 { font-size: 1.45rem; font-weight: 650; }
p { margin: 0 0 1.1em; max-width: 62ch; text-wrap: pretty; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* handwriting annotations */
.hand { font-family: var(--f-hand); font-size: 1.6rem; line-height: 1.1; color: var(--tie-red); font-weight: 700; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font: 800 .78rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: currentColor; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--teal); }
.brand span { font: 700 1.35rem/1 var(--f-display); color: var(--ink); font-variation-settings: "SOFT" 100, "WONK" 1; }
.brand small { display: block; font: 700 .66rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 9px 14px; border-radius: 999px;
  font-weight: 800; font-size: .95rem; text-decoration: none; color: var(--ink);
  transition: background .15s, transform .15s;
}
.nav-links a:hover { background: var(--sun-soft); transform: rotate(-2deg); }
.nav-links a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ink); color: var(--cream); border: 0; border-radius: 999px;
    padding: 10px 16px; font: 800 .9rem var(--f-body); cursor: pointer;
  }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 74px;
    flex-direction: column; gap: 2px; padding: 12px 20px 22px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 1.05rem; }
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--cream);
  display: inline-flex; align-items: center; gap: .55em;
  background: var(--bg); color: var(--fg);
  font: 800 1rem/1 var(--f-body); text-decoration: none;
  padding: 15px 24px; border-radius: 999px; border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.slime { --bg: var(--slime); --fg: var(--ink); }
.btn.sky { --bg: var(--sky); --fg: var(--ink); }
.btn.ghost { --bg: var(--paper); --fg: var(--ink); }
.btn.sun { --bg: var(--sun); --fg: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 56px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--purple); }
.hero .lede { font-size: 1.22rem; max-width: 34ch; }
.hero-art { position: relative; }
.hero-art img { width: 100%; filter: drop-shadow(0 20px 30px rgba(29,59,47,.18)); }
.hero-art .hand { position: absolute; }
.hero-art .note-1 { top: 2%; left: -2%; transform: rotate(-8deg); color: var(--sky-deep); }
.hero-art .note-2 { bottom: 8%; right: -1%; transform: rotate(6deg); color: var(--slime-deep); }

@media (max-width: 880px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-art { order: -1; max-width: 480px; margin-inline: auto; }
}

/* grown-up / kid switch */
.mode-switch {
  display: inline-flex; align-items: center; gap: 12px; margin: 6px 0 26px;
  background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 16px;
  font-weight: 800; color: var(--ink); font-size: .92rem;
}
.mode-switch button {
  position: relative; width: 62px; height: 34px; border-radius: 999px; border: 2.5px solid var(--ink);
  background: var(--line); cursor: pointer; transition: background .2s;
}
.mode-switch button::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%;
  background: var(--ink); transition: transform .25s cubic-bezier(.5,1.8,.5,1);
}
.mode-switch button[aria-checked="true"] { background: var(--slime); }
.mode-switch button[aria-checked="true"]::after { transform: translateX(28px); background: var(--purple); }
.mode-copy { min-height: 3.4em; }
.mode-copy [data-mode="kid"] { display: none; }
body.kid-mode .mode-copy [data-mode="grownup"] { display: none; }
body.kid-mode .mode-copy [data-mode="kid"] { display: block; }
body.kid-mode .hero h1 { transform: rotate(-1.2deg); }
.hero h1 { transition: transform .3s; transform-origin: left center; }

/* ---------- drips (slime dividers) ---------- */
.drip { display: block; width: 100%; height: 70px; margin-bottom: -1px; }
.drip path { fill: currentColor; }
.drip.flip { transform: scaleY(-1); margin: -1px 0 0; }

/* ---------- sections ---------- */
section { position: relative; }
.band { padding: 80px 0; }
.band.tight { padding: 56px 0; }
.band-slime { background: var(--slime); color: var(--ink); }
.band-sky { background: var(--sky); color: var(--ink); }
.band-paper { background: var(--paper); }
.band-ink { background: var(--ink); color: #e9f0e6; }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-sun { background: var(--sun-soft); }
.section-head { margin-bottom: 40px; max-width: 760px; }
.section-head p { font-size: 1.15rem; }

/* ---------- concept strip ---------- */
.then-now { display: grid; grid-template-columns: 1fr auto 1fr; gap: 26px; align-items: stretch; }
.then-now .card { background: var(--paper); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.then-now .card h3 { display: flex; align-items: center; gap: 10px; }
.then-now ul { margin: 0; padding-left: 1.1em; }
.then-now li { margin: .35em 0; }
.then-now .arrow { align-self: center; font: 700 2.8rem/1 var(--f-hand); color: var(--ink); text-align: center; }
.card.grownup { border-top: 8px solid var(--navy); }
.card.kid { border-top: 8px solid var(--tie-red); transform: rotate(.6deg); }
@media (max-width: 800px) { .then-now { grid-template-columns: 1fr; } .then-now .arrow .a { display: inline-block; transform: rotate(90deg); } }

/* ---------- book cards ---------- */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 30px; }
.book-card {
  --accent: var(--sky);
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius); padding: 22px 22px 26px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform .25s cubic-bezier(.3,1.5,.6,1);
}
.book-card:nth-child(3n+1) { transform: rotate(-1deg); }
.book-card:nth-child(3n+2) { transform: rotate(.8deg); }
.book-card:hover { transform: rotate(0) translateY(-6px); }
.book-card .cover {
  position: relative; border-radius: 6px 14px 14px 6px; overflow: hidden; margin-bottom: 20px;
  box-shadow: -6px 0 0 -2px rgba(0,0,0,.08) inset, 0 12px 26px -12px rgba(0,0,0,.45);
  aspect-ratio: 539 / 700; background: var(--accent);
}
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card::before { /* tape */
  content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 26px;
  background: color-mix(in srgb, var(--accent) 70%, white); opacity: .85;
  transform: translateX(-50%) rotate(-4deg); border-radius: 3px; z-index: 2;
}
.book-card h3 { margin-bottom: .2em; }
.book-card .sub { font-family: var(--f-hand); font-size: 1.45rem; color: var(--purple); margin-bottom: .6em; line-height: 1; }
.book-card p { font-size: .98rem; margin-bottom: 1em; }
.book-card .more { margin-top: auto; font-weight: 800; color: var(--ink); }
.book-card .more::after { content: " →"; transition: margin .2s; }
.book-card:hover .more::after { margin-left: 6px; }
.tag {
  display: inline-block; font: 800 .7rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink); color: var(--cream); padding: 6px 10px; border-radius: 999px; margin-bottom: 12px;
}
.tag.alt { background: var(--sun); color: var(--ink); }

.book-card.coming {
  border: 3px dashed color-mix(in srgb, var(--ink) 30%, transparent); background: transparent; box-shadow: none;
  align-items: center; justify-content: center; text-align: center; min-height: 420px;
}
.book-card.coming::before { display: none; }
.book-card.coming .q { font: 700 6rem/1 var(--f-display); color: var(--purple); opacity: .8; }

/* ---------- book detail ---------- */
.book-hero { padding: 50px 0 70px; }
.book-hero-grid { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 60px; align-items: start; }
.book-cover-lg {
  position: sticky; top: 100px;
  border-radius: 8px 18px 18px 8px; overflow: hidden; transform: rotate(-1.5deg);
  box-shadow: -10px 0 0 -4px rgba(0,0,0,.1) inset, 0 30px 50px -24px rgba(0,0,0,.55);
}
.book-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin-bottom: .1em; }
.book-hero .sub { font: 700 2rem/1.1 var(--f-hand); color: var(--purple); margin-bottom: 26px; }
.book-hero .pitch { font-size: 1.2rem; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 30px 0; padding: 0; list-style: none; }
.facts li { background: var(--paper); border-radius: 14px; padding: 14px 16px; border: 2px solid var(--line); }
.facts b { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--purple); margin-bottom: 4px; }
.facts span { font-weight: 700; color: var(--ink); }
.themes { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 0 0 30px; }
.themes li { background: var(--accent, var(--sky)); color: var(--ink); font-weight: 800; padding: 8px 14px; border-radius: 999px; font-size: .92rem; }
.themes li:nth-child(even) { background: var(--sun); }
.buy-box { background: var(--ink); color: #e9f0e6; border-radius: var(--radius); padding: 28px; margin-top: 34px; }
.buy-box h2 { color: #fff; font-size: 1.6rem; }
.buy-box .btn { box-shadow: 4px 4px 0 #0c1f18; border-color: #0c1f18; }
.buy-box small { display: block; margin-top: 14px; opacity: .75; }
@media (max-width: 820px) {
  .book-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .book-cover-lg { position: relative; top: 0; max-width: 340px; margin-inline: auto; }
}

/* ---------- notebook rules ---------- */
.notebook {
  position: relative; background: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 58px, rgba(217,82,78,.55) 58px, rgba(217,82,78,.55) 60px, transparent 60px),
    repeating-linear-gradient(transparent 0 39px, #cfe3f0 39px 41px);
  border-radius: 8px; padding: 34px 30px 30px 84px; box-shadow: var(--shadow);
  transform: rotate(-.8deg);
}
.notebook::before, .notebook::after { /* punched holes */
  content: ""; position: absolute; left: 22px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--cream); box-shadow: inset 0 2px 3px rgba(0,0,0,.15);
}
.notebook::before { top: 26%; } .notebook::after { bottom: 26%; }
.notebook h3 { font-family: var(--f-hand); font-size: 2.3rem; color: var(--navy); line-height: 40px; margin: 0 0 0; }
.notebook ol { margin: 0; padding-left: 1.2em; font: 600 1.6rem/40px var(--f-hand); color: var(--ink); }
.notebook li::marker { color: var(--tie-red); font-weight: 700; }
.notebook .crossed { text-decoration: line-through; text-decoration-color: var(--tie-red); text-decoration-thickness: 3px; opacity: .65; }

/* ---------- split / media blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev > :first-child { order: 2; }
.blob-frame { position: relative; }
.blob-frame img { position: relative; z-index: 1; border-radius: 30px; mix-blend-mode: multiply; }
.blob-frame::before {
  content: ""; position: absolute; inset: 4% 2% 2% 4%; border-radius: 44% 56% 52% 48% / 52% 44% 56% 48%;
  background: var(--accent, var(--teal)); z-index: 0;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 32px; } .split.rev > :first-child { order: 0; } }

/* ---------- quote / big statement ---------- */
.statement { text-align: center; padding: 100px 0; }
.statement blockquote { margin: 0 auto; max-width: 900px; }
.statement p { font: 650 clamp(1.9rem, 4.4vw, 3.3rem)/1.15 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--ink); max-width: none; }
.statement p em { color: var(--purple); }
.statement .hand { font-size: 1.8rem; }

/* ---------- character strip ---------- */
.characters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.char { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.char img { aspect-ratio: 1; object-fit: cover; width: 100%; background: #fff; }
.char div { padding: 18px 22px 22px; }
.char h3 { font-size: 1.2rem; margin-bottom: .2em; }
.char p { font-size: .95rem; margin: 0; }
@media (max-width: 820px) { .characters { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* ---------- news ---------- */
.news-list { display: grid; gap: 26px; }
.post { background: var(--paper); border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow); border-left: 8px solid var(--accent, var(--slime)); }
.post time { font: 800 .78rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }
.post h2 { font-size: 1.7rem; margin: 10px 0 12px; }
.post p:last-child { margin-bottom: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; background: var(--paper); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form label { font-weight: 800; color: var(--ink); display: grid; gap: 6px; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: inherit; color: var(--ink); background: var(--cream);
  border: 2.5px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--sky-deep); background: #fff; }
.form textarea { min-height: 160px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form small { color: var(--ink-soft); font-weight: 400; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } .form { padding: 22px; } }
.contact-cards { display: grid; gap: 16px; }
.contact-cards .card { background: var(--paper); border-radius: 18px; padding: 20px 22px; border: 2px solid var(--line); }
.contact-cards h3 { font-size: 1.15rem; margin-bottom: .2em; }
.contact-cards p { margin: 0; font-size: .97rem; }

/* newsletter-ish callout */
.callout {
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
  background: var(--purple); color: #fff; border-radius: 28px; padding: 30px 36px;
}
.callout h2 { color: #fff; font-size: 1.8rem; margin: 0 0 .2em; }
.callout p { margin: 0; color: #f3e7f5; }
.callout img { width: 120px; border-radius: 50%; border: 4px solid #fff; background: var(--teal); }
@media (max-width: 760px) { .callout { grid-template-columns: 1fr; text-align: center; } .callout img { margin-inline: auto; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cfdccf; padding: 0 0 36px; margin-top: 0; }
.footer-drip { margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 30px; }
.site-footer h3 { color: #fff; font-size: 1.15rem; }
.site-footer a { color: #fff; text-decoration-color: var(--slime); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .motto { font: 700 1.9rem/1.1 var(--f-hand); color: var(--slime); max-width: 20ch; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- page header (inner pages) ---------- */
.page-head { padding: 60px 0 40px; position: relative; }
.page-head h1 { max-width: 16ch; }
.page-head p { font-size: 1.2rem; }
.scribble { display: inline-block; font: 700 2.2rem/1 var(--f-hand); color: var(--tie-red); transform: rotate(-6deg); margin-left: 10px; vertical-align: top; }

/* prose */
.prose { max-width: 70ch; }
.prose p { max-width: none; }
.prose h2 { margin-top: 1.4em; font-size: 2rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print { .site-header, .site-footer, .drip, .mode-switch { display: none; } body { background: #fff; } }
