/* FunWords: warm, playful, easy to read. Fredoka for headings (as on the covers), Atkinson Hyperlegible for text. */
@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/fredoka-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/fredoka-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #1d2433; --text: #1d2433; --subtle: #5b6475; --line: #eadfce; --bg: #fffaf3; --card: #ffffff; --soft: #fff1dd;
  --red: #d94841; --green: #2f9e5b; --orange: #f28c28; --purple: #6c4bb6; --blue: #2b6cb0; --yellow: #ffd23f;
  --link: #b8322b; --radius: 16px; --shadow: 0 6px 24px rgba(60, 40, 10, .10), 0 1px 3px rgba(60, 40, 10, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.65 'Atkinson', system-ui, -apple-system, 'Segoe UI', sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, .brand { font-family: 'Fredoka', 'Atkinson', system-ui, sans-serif; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 14px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 48px 0 14px; }
h3 { font-size: 1.25rem; margin: 22px 0 8px; }
p, ul { margin: 0 0 14px; }
ul { padding-left: 1.2em; }
li { margin-bottom: 6px; }
.lead { font-size: 1.2rem; color: #333a48; }
.meta { color: var(--subtle); font-size: .95rem; }
code { background: var(--soft); padding: .1em .35em; border-radius: 4px; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 250, 243, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 1.55rem; }
.brand .tiles { display: flex; gap: 3px; }
.brand .tiles b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; font-size: 1.05rem; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.brand .tiles b:nth-child(1) { background: var(--red); transform: rotate(-6deg); }
.brand .tiles b:nth-child(2) { background: var(--green); transform: rotate(4deg); }
.brand .tiles b:nth-child(3) { background: var(--orange); transform: rotate(-3deg); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { background: var(--soft); }
.site-nav a.cta { background: var(--red); color: #fff; }
.site-nav a.cta:hover { background: #c13b35; }
@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header .inner { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 14px; }
  .site-nav { margin-left: 0; flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .site-nav a { padding: 6px 10px; font-size: .95rem; white-space: nowrap; }
  main { padding: 20px 14px; }
}
.site-footer { margin-top: 70px; background: #23293a; color: #d9dce4; }
.site-footer .inner { max-width: 1180px; margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; }
.site-footer h3 { color: #fff; margin-top: 0; font-size: 1.1rem; }
.site-footer a { color: #ffd9a8; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .small { grid-column: 1 / -1; font-size: .9rem; color: #a8adbb; border-top: 1px solid #3a4154; padding-top: 18px; }

/* Layout */
main { max-width: 1180px; margin: 0 auto; padding: 34px 20px 20px; }
main.narrow, .narrow { max-width: 780px; }
.crumbs { font-size: .95rem; color: var(--subtle); margin-bottom: 10px; }
.crumbs a { color: var(--subtle); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: var(--red); color: #fff !important; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 1.05rem; box-shadow: 0 3px 0 #9e2f29; transition: transform .08s; margin: 4px 8px 4px 0; }
.btn:hover { transform: translateY(-1px); }
.btn.green { background: var(--green); box-shadow: 0 3px 0 #1f7442; }
.btn.alt, .btn.ghost { background: #fff; color: var(--ink) !important; box-shadow: inset 0 0 0 2px var(--ink); }
.btn.amazon { background: #ffd23f; color: #1d2433 !important; box-shadow: 0 3px 0 #d4a90f; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 26px 0 10px; }
.hero .stack { position: relative; height: 430px; }
.hero .stack img { position: absolute; width: 56%; border-radius: 10px; box-shadow: var(--shadow); }
.hero .stack img:nth-child(1) { left: 0; top: 40px; transform: rotate(-7deg); }
.hero .stack img:nth-child(2) { left: 22%; top: 0; transform: rotate(2deg); z-index: 2; }
.hero .stack img:nth-child(3) { right: 0; top: 60px; transform: rotate(8deg); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero .stack { height: 330px; } }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.badges li { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .95rem; margin: 0; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.product-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(60, 40, 10, .16); }
.product-card .pic { background: var(--soft); padding: 14px 14px 0; }
.product-card .pic img { display: block; border-radius: 6px 6px 0 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.product-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card .title { font-family: 'Fredoka'; font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.product-card .sub { color: var(--subtle); font-size: .9rem; }
.product-card .row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
.price { font-family: 'Fredoka'; font-weight: 700; font-size: 1.25rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: #7a4a0f; text-transform: uppercase; letter-spacing: .04em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 24px; }
.filters button { font: inherit; font-weight: 700; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Product page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }
.gallery .main { background: var(--soft); border-radius: var(--radius); padding: 22px; text-align: center; }
.gallery .main img { max-height: 620px; border-radius: 6px; box-shadow: var(--shadow); }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery .thumbs button { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 4px; cursor: pointer; width: 84px; }
.gallery .thumbs button[aria-current="true"] { border-color: var(--red); }
.buybox { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin: 18px 0; }
.buybox .price { font-size: 2rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.facts li { background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 0; font-weight: 700; }
.facts li span { display: block; font-weight: 400; color: var(--subtle); font-size: .9rem; }
.check { background: #eaf7ef; border-left: 5px solid var(--green); border-radius: 10px; padding: 12px 16px; }
.description ul { padding-left: 1.3em; }

/* Sections and cards */
.band { background: var(--soft); border-radius: 24px; padding: 30px 32px; margin: 40px 0; }
.band.dark { background: #23293a; color: #fff; }
.band.dark a { color: #ffd9a8; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature .icon { font-size: 2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
details { background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
summary { font-weight: 700; cursor: pointer; }

/* Pages from the puzzle generators (free printables, theme pages, tools) */
main .sheet, main .ws { margin-left: auto; margin-right: auto; }
.page { max-width: 100%; }
@media print { .site-header, .site-footer, .noprint { display: none !important; } body { background: #fff; } main { padding: 0; } }
