/* Self-hosted fonts (from fontsource; OFL licensed) */
@font-face { font-family: "Lobster"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/lobster-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/nunito-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/fraunces-latin-soft-normal.woff2") format("woff2-variations"); }

/* Lenni Bear — site styles. Warm storybook palette drawn from the book covers. */
:root {
  --cream: #FFF8EC;
  --paper: #FFFFFF;
  --ink: #2B2A33;
  --ink-soft: #5B5A66;
  --navy: #1F2C4D;
  --navy-deep: #15203B;
  --sun: #F2B33D;
  --sun-deep: #D6951A;
  --sky: #E3EFF7;
  --leaf: #7FA86B;
  --berry: #E0714E;
  --line: #EADFCB;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(43, 42, 51, .10);
  --shadow-sm: 0 4px 14px rgba(43, 42, 51, .08);
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fraunces", Georgia, serif;
  --font-brand: "Lobster", "Fraunces", cursive;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--sun-deep); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.small { font-size: .9rem; }
.muted { color: var(--ink-soft); }
.lede { font-size: 1.15rem; color: var(--ink-soft); }
.eyebrow { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--berry); margin-bottom: .6em; }
.eyebrow-light { color: var(--sun); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sun); color: var(--ink); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.rounded { border-radius: var(--radius); box-shadow: var(--shadow); }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; line-height: 1.2; cursor: pointer; font-family: var(--font-body); font-size: 1rem;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #F7C25A; color: var(--ink); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--navy); border-color: rgba(31,44,77,.25); backdrop-filter: blur(4px); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.btn-row.center { justify-content: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,248,236,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { font-family: var(--font-brand); font-size: 1.85rem; color: var(--ink); text-decoration: none; line-height: 1; }
.brand:hover { color: var(--sun-deep); }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { text-decoration: none; font-weight: 700; color: var(--ink); font-size: .98rem; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--sun-deep); }
.site-nav .btn { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; height: 3px; background: var(--ink); margin: 6px 0; border-radius: 3px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem 1.25rem 1.25rem; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 1rem; text-align: center; border-bottom: 0; }
}

/* Hero */
.hero { position: relative; isolation: isolate; display: grid; align-items: end; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 48% 58% at 50% 42%, rgba(255,248,236,.88) 0%, rgba(255,248,236,.7) 50%, rgba(255,248,236,0) 100%),
  linear-gradient(180deg, rgba(255,248,236,.15) 0%, rgba(255,248,236,0) 40%, rgba(255,248,236,.35) 100%); }
.hero-inner { padding: 4.5rem 0 0; max-width: 860px; display: flex; flex-direction: column; align-items: center; }
.hero-eyebrow { color: var(--navy); opacity: .8; }
.hero-title { font-size: clamp(2.2rem, 6.5vw, 4.6rem); margin-bottom: .45em; line-height: 1.05; }
.hero-line { display: block; }
.rotator { color: var(--berry); display: inline-block; transition: opacity .35s ease, transform .35s ease; font-style: italic; font-weight: 700; }
.rotator.is-swapping { opacity: 0; transform: translateY(.3em); }
.hero-intro { font-family: var(--font-head); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; color: var(--ink); max-width: 680px; margin: 0 auto 1.6rem; text-wrap: balance; text-shadow: 0 1px 0 rgba(255,248,236,.9), 0 0 18px rgba(255,248,236,.9); }
.hero-intro::before, .hero-intro::after { content: ""; display: block; width: 56px; height: 3px; background: var(--sun); border-radius: 3px; margin: 0 auto .9rem; }
.hero-intro::after { margin: .9rem auto 0; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 0 0 3.5rem; }
.hero-fan { display: flex; justify-content: center; align-items: flex-end; width: 100%; margin-bottom: -22px; }
.hero-fan img { width: clamp(92px, 15vw, 170px); border-radius: 8px; box-shadow: 0 14px 30px rgba(43,42,51,.28); margin: 0 -10px; transition: transform .25s ease; transform-origin: bottom center; }
.hero-fan img:nth-child(1) { transform: rotate(-14deg) translateY(22px); }
.hero-fan img:nth-child(2) { transform: rotate(-7deg) translateY(8px); }
.hero-fan img:nth-child(3) { transform: translateY(0); z-index: 1; }
.hero-fan img:nth-child(4) { transform: rotate(7deg) translateY(8px); }
.hero-fan img:nth-child(5) { transform: rotate(14deg) translateY(22px); }
@media (max-width: 600px) { .hero-inner { padding-top: 3rem; } .hero-ctas { margin-bottom: 2.5rem; } .hero-fan img:nth-child(1), .hero-fan img:nth-child(5) { display: none; } }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.section-tile { background: var(--paper) url("/images/tile.png") repeat; background-size: 240px; }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a:not(.btn) { color: var(--sun); }
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-reverse { grid-template-columns: 1.25fr 1fr; }
.split-reverse .split-media { order: 2; }
.split-media img { margin-inline: auto; }
.cover-standing { max-width: 340px; width: 80%; border-radius: 6px; box-shadow: 0 25px 50px rgba(0,0,0,.35); transform: rotate(-2deg); }
@media (max-width: 800px) { .split, .split-reverse { grid-template-columns: 1fr; } .split-reverse .split-media { order: 0; } }

/* Book grid + cards */
.book-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; margin: 0 0 2rem; }
@media (max-width: 900px) { .book-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .book-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } .book-card .btn { display: none; } }
.book-card { text-align: center; }
.book-cover img { border-radius: 10px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.book-cover:hover img { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow); }
.book-card h3 { font-size: 1.05rem; margin: .9rem 0 .5rem; }
.book-card h3 a { text-decoration: none; color: var(--ink); }
.points { list-style: none; padding: 0; margin: 0 auto 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.2rem; }
.points li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem .45rem .8rem; font-weight: 600; font-size: .95rem; }
.points li::before { content: "✓"; color: var(--leaf); font-weight: 800; margin-right: .5rem; }
.points-inline { justify-content: flex-start; margin: 1rem 0 0; }

.book-list { display: grid; gap: 2rem; max-width: 900px; margin: 2rem auto 0; }
.book-row { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: center; background: var(--paper); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); scroll-margin-top: 90px; }
.book-row-cover img { border-radius: 10px; box-shadow: var(--shadow-sm); }
.book-row h3 { font-size: 1.5rem; }
@media (max-width: 700px) { .book-row { grid-template-columns: 1fr; text-align: center; } .book-row-cover img { max-width: 300px; margin-inline: auto; } .book-row .btn-row { justify-content: center; } }

/* Testimonials */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.quote-grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.quote-card { margin: 0; background: var(--paper); border-radius: var(--radius); padding: 1.6rem 1.6rem 1.4rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; border: 1px solid var(--line); }
.quote-card blockquote { margin: 0 0 1.2rem; flex: 1; }
.quote-card blockquote p { margin: 0; font-style: italic; color: var(--ink); }
.quote-card figcaption { display: flex; align-items: center; gap: .8rem; font-size: .95rem; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--sky); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); flex-shrink: 0; }
.quote-card:nth-child(3n+2) .avatar { background: #FCE8C3; }
.quote-card:nth-child(3n) .avatar { background: #E2EFD9; }

/* Newsletter */
.newsletter { background: linear-gradient(135deg, #F7C25A, var(--sun)); color: var(--ink); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.newsletter-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.newsletter h2 { margin-bottom: .3em; }
.newsletter p { margin: 0; }
.nl-form { display: flex; gap: .6rem; flex-wrap: wrap; position: relative; }
.nl-form input[type="email"] { flex: 1 1 220px; padding: .85rem 1.1rem; border-radius: 999px; border: 2px solid rgba(43,42,51,.15); font: inherit; background: #fff; }
.nl-form .btn-sun { background: var(--navy); color: #fff; }
.nl-form .btn-sun:hover { background: var(--navy-deep); color: #fff; }
.nl-note { grid-column: 1 / -1; margin-top: .5rem !important; color: rgba(43,42,51,.7); }
.form-status { flex-basis: 100%; margin: .4rem 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: #1f5c2e; }
.form-status.err { color: #9a2a1c; }
.newsletter .form-status.ok { color: var(--navy); }
@media (max-width: 760px) { .newsletter-inner { grid-template-columns: 1fr; } }

/* Tiles / merch */
.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.tile-row img { border-radius: 14px; box-shadow: var(--shadow-sm); background: #fff; aspect-ratio: 1; object-fit: contain; width: 100%; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.6rem; }
.product { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; border: 1px solid var(--line); }
.product img { aspect-ratio: 1; object-fit: cover; }
.product h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; padding: 1rem 1.1rem .4rem; margin: 0; flex: 1; }
.product .btn { margin: .4rem 1.1rem 1.1rem; align-self: flex-start; }
.notice { background: var(--sky); border-radius: 12px; padding: .8rem 1.1rem; font-size: .95rem; display: inline-block; }

/* Page heroes */
.page-hero { background: var(--paper) url("/images/tile.png") repeat; background-size: 240px; padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
.page-hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.page-hero-simple .wrap { max-width: 780px; }
@media (max-width: 900px) { .page-hero-inner { grid-template-columns: 1fr; } }

/* Dear World */
.dw-hero { position: relative; isolation: isolate; background: var(--navy-deep); color: #fff; overflow: hidden; }
.dw-hero h1 { color: #fff; }
.dw-hero .lede { color: rgba(255,255,255,.85); }
.dw-hero-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .55; }
.dw-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(21,32,59,.92) 0%, rgba(21,32,59,.7) 60%, rgba(21,32,59,.4) 100%); }
.dw-hero-inner { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: center; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.dw-cover { width: 100%; max-width: 300px; }
@media (max-width: 760px) { .dw-hero-inner { grid-template-columns: 1fr; } .dw-cover { max-width: 220px; } }
.spread-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.spread img { border-radius: 12px; box-shadow: var(--shadow); transition: transform .2s; }
.spread:hover img { transform: scale(1.015); }
.moment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; margin: 2.5rem 0; }
.moment img { border-radius: 14px; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 1rem; }
.moment h3 { color: var(--sun); }
.moment p { color: rgba(255,255,255,.85); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { background: var(--paper); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field input:not([type="checkbox"]), .field textarea { width: 100%; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(242,179,61,.3); }
.field-check { display: flex; gap: .6rem; align-items: flex-start; }
.field-check input { width: 20px; height: 20px; margin-top: .2rem; }
.field-check label { font-weight: 400; }
.contact-aside h2 { font-size: 1.3rem; }

/* Prose (legal) */
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.85); padding: 3.5rem 0 2rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid a { display: block; color: rgba(255,255,255,.85); text-decoration: none; margin-bottom: .5rem; }
.footer-grid a:hover { color: var(--sun); }
.brand-footer { color: #fff; font-size: 2rem; display: inline-block !important; margin-bottom: .5rem !important; }
.footer-tag { color: rgba(255,255,255,.65); }
.footer-h { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sun); margin-bottom: .9rem; }
.social { display: flex; gap: .8rem; }
.social a { display: inline-flex !important; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); align-items: center; justify-content: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .9rem; color: rgba(255,255,255,.6); }
.footer-bottom p { margin: 0 0 .4rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .book-cover img, .spread img, .rotator { transition: none; }
}
