/* =============================================================================
 * styles.css — PRESENTATION LAYER
 * Consumes only the tokens in tokens.css. No content lives here.
 * ========================================================================== */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-weight: 500;
  overflow-x: hidden;
  /* layered warm atmosphere instead of a flat fill */
  background-image:
    radial-gradient(1100px 700px at 12% -8%, rgba(246,198,103,0.30), transparent 60%),
    radial-gradient(900px 700px at 102% 4%, rgba(111,160,196,0.20), transparent 55%),
    radial-gradient(700px 600px at 50% 118%, rgba(143,176,106,0.18), transparent 60%);
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--sea-500); outline-offset: 3px; border-radius: 6px; }

.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body); font-weight: 700;
  padding: 0.85rem 1.5rem; border-radius: var(--r-pill);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.15em; height: 1.15em; }

.btn--amazon {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  color: #3a2a12; box-shadow: var(--shadow-md);
  border: 1px solid var(--gold-600);
}
.btn--amazon:hover { box-shadow: var(--shadow-lg); }
.btn--primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--clay-600); }
.btn--ghost { background: rgba(255,255,255,0.6); color: var(--text); border: 1.5px solid var(--clay-300); }
.btn--ghost:hover { background: #fff; border-color: var(--clay-500); }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(253,248,238,0.92), rgba(253,248,238,0.55));
  border-bottom: 1px solid rgba(194,112,63,0.14);
  transition: box-shadow var(--speed);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 0.65rem; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-400), var(--clay-500));
  display: grid; place-items: center; color: #fff; font-size: 1.2rem;
  box-shadow: inset 0 -3px 8px rgba(94,54,34,0.25);
}
.nav__links { display: flex; align-items: center; gap: 1.8rem; }
.nav__links a { font-weight: 600; color: var(--text-muted); transition: color 0.3s; position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--clay-500); transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 24px; height: 2.5px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: var(--section-y); position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(143,176,106,0.18); color: var(--sage-500);
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.45rem 1rem; border-radius: var(--r-pill); margin-bottom: 1.4rem;
}
.hero__title { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 1.2rem; }
.hero__title em { font-style: italic; color: var(--clay-500); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text-muted); max-width: 34ch; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__stats { display: flex; gap: 2.2rem; margin-top: 2.6rem; }
.hero__stat strong { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--clay-600); }
.hero__stat span { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* hero artwork */
.hero__art { position: relative; }
.hero__art-frame {
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 8px solid #fff; transform: rotate(-2deg);
  transition: transform 0.6s var(--ease);
}
.hero__art:hover .hero__art-frame { transform: rotate(0deg) scale(1.01); }
.hero__art-badge {
  position: absolute; left: -22px; bottom: 26px; z-index: 2;
  background: var(--sea-500); color: #fff; font-family: var(--font-display);
  font-weight: 600; padding: 0.8rem 1.2rem; border-radius: var(--r-md);
  box-shadow: var(--shadow-md); transform: rotate(-4deg); font-size: 0.95rem;
}
.hero__art-sun {
  position: absolute; top: -26px; right: 18px; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, var(--gold-400), var(--gold-600));
  box-shadow: 0 0 40px rgba(240,173,60,0.5); z-index: -1;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

/* gentle wave divider */
.wave { display: block; width: 100%; height: auto; color: var(--sand-50); }

/* ---------- Collections intro (two worlds) ---------- */
.collections { background: var(--bg-soft); }
.collections__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2rem); }
.collection-card {
  position: relative; border-radius: var(--r-lg); padding: clamp(1.8rem, 3vw, 2.6rem);
  overflow: hidden; color: #fff; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-md); transition: transform var(--speed) var(--ease);
}
.collection-card:hover { transform: translateY(-5px); }
.collection-card--stories { background: linear-gradient(135deg, var(--sea-500), var(--sea-400)); }
.collection-card--coloring { background: linear-gradient(135deg, var(--clay-500), var(--clay-400)); }
.collection-card h3 { font-size: 1.9rem; margin-bottom: 0.5rem; }
.collection-card p { opacity: 0.92; font-weight: 600; max-width: 36ch; }
.collection-card__icon { font-size: 2.4rem; position: absolute; top: 1.4rem; right: 1.6rem; opacity: 0.85; }
.collection-card a { margin-top: 1.2rem; align-self: flex-start; }

/* ---------- Section heading ---------- */
.sec-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.sec-head__kicker {
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--clay-500); display: block; margin-bottom: 0.7rem;
}
.sec-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.7rem; }
.sec-head p { color: var(--text-muted); font-size: 1.05rem; }
.sec-head--center { margin-inline: auto; text-align: center; }

/* ---------- Featured spotlight ---------- */
.spotlight { background: var(--bg-soft); }
.spotlight__inner {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  background: var(--surface); border-radius: var(--r-xl); padding: clamp(1.6rem, 4vw, 3.2rem);
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.spotlight__inner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 320px at 88% 12%, rgba(246,198,103,0.18), transparent 70%);
}
.spotlight__cover { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; }
.spotlight__tag {
  display: inline-block; background: var(--sage-400); color: #fff; font-weight: 700;
  font-size: 0.78rem; padding: 0.35rem 0.9rem; border-radius: var(--r-pill); margin-bottom: 1rem;
}
.spotlight h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 1rem; }
.spotlight p { color: var(--text-muted); margin-bottom: 1.6rem; max-width: 46ch; }
.spotlight__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Book grid + cards (rendered by JS) ---------- */
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 3vw, 2rem); }
.book-card {
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  border: 1px solid rgba(194,112,63,0.10);
}
.book-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.book-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.book-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.book-card:hover .book-card__media img { transform: scale(1.06); }
.book-card__badge {
  position: absolute; top: 0.85rem; left: 0.85rem; z-index: 2;
  background: rgba(46,42,46,0.85); color: #fff; font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.04em; padding: 0.32rem 0.75rem; border-radius: var(--r-pill); backdrop-filter: blur(4px);
}
.book-card__badge--accent { background: var(--clay-500); }
.book-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.book-card__tag { font-size: 0.78rem; font-weight: 700; color: var(--sea-500); letter-spacing: 0.04em; margin-bottom: 0.35rem; }
.book-card__title { font-size: 1.3rem; margin-bottom: 0.55rem; }
.book-card__blurb { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.3rem; flex: 1; }

/* ---------- Languages strip ---------- */
.langs { background: linear-gradient(180deg, var(--sand-200), var(--sand-100)); }
.langs__inner { text-align: center; }
.lang-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 2rem; }
.lang-pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--surface); border: 1.5px solid rgba(194,112,63,0.18);
  padding: 0.65rem 1.25rem; border-radius: var(--r-pill); font-weight: 700;
  box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), border-color 0.3s;
}
.lang-pill:hover { transform: translateY(-3px); border-color: var(--clay-500); }
.lang-pill .flag { font-size: 1.25rem; }

/* ---------- QR / Follow ---------- */
.follow__inner {
  display: grid; grid-template-columns: 1fr 0.8fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  background: var(--ink-900); color: var(--sand-100); border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3.6rem); position: relative; overflow: hidden;
}
.follow__inner::after {
  content: ""; position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(246,198,103,0.22), transparent 70%); pointer-events: none;
}
.follow h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1rem; color: #fff; }
.follow p { color: rgba(251,244,230,0.78); margin-bottom: 1.8rem; max-width: 44ch; }
.follow__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.qr-card {
  background: #fff; border-radius: var(--r-lg); padding: 1.4rem; text-align: center;
  box-shadow: var(--shadow-lg); color: var(--ink-900); justify-self: center; max-width: 280px;
}
.qr-card canvas { width: 100%; height: auto; border-radius: var(--r-sm); display: block; }
.qr-card__label { font-weight: 700; margin-top: 0.9rem; font-size: 0.95rem; }
.qr-card__sub { font-size: 0.8rem; color: var(--ink-500); }

/* ---------- Ask for more (request) ---------- */
.request { background: var(--bg-soft); }
.request__card {
  background: linear-gradient(135deg, var(--sage-500), var(--sage-400));
  border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.4rem); color: #fff;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
  box-shadow: var(--shadow-md);
}
.request__card h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 0.8rem; }
.request__card p { opacity: 0.92; margin-bottom: 0; }
.request-form { display: flex; flex-direction: column; gap: 0.85rem; }
.request-form label { font-weight: 700; font-size: 0.85rem; }
.request-form input, .request-form textarea, .request-form select {
  font: inherit; padding: 0.8rem 1rem; border-radius: var(--r-md); border: none;
  background: rgba(255,255,255,0.95); color: var(--ink-900); width: 100%; font-weight: 600;
}
.request-form textarea { resize: vertical; min-height: 84px; }
.form-note { font-size: 0.85rem; opacity: 0.9; min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wood-800); color: var(--sand-200); padding-block: 3.5rem 2rem; }
.footer__grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer__brand { max-width: 320px; }
.footer__brand p { color: rgba(247,235,211,0.7); margin-top: 0.8rem; font-size: 0.92rem; }
.footer__links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer__col h4 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 0.9rem; }
.footer__col a { display: block; color: rgba(247,235,211,0.78); padding: 0.25rem 0; transition: color 0.3s; }
.footer__col a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(247,235,211,0.15); margin-top: 2.5rem; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; color: rgba(247,235,211,0.6); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__art-sun { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero__grid, .spotlight__inner, .follow__inner, .request__card { grid-template-columns: 1fr; }
  .hero__art { order: -1; max-width: 460px; margin-inline: auto; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .collections__grid { grid-template-columns: 1fr; }
  .spotlight__cover { max-width: 360px; margin-inline: auto; }
}
@media (max-width: 600px) {
  .nav__links { position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0; background: var(--sand-50);
    padding: 1rem var(--gutter) 1.5rem; box-shadow: var(--shadow-md); transform: translateY(-120%); transition: transform 0.4s var(--ease); }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 0.8rem 0; width: 100%; border-bottom: 1px solid rgba(194,112,63,0.12); }
  .nav__links .btn { margin-top: 0.6rem; }
  .nav__toggle { display: flex; }
  .book-grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.4rem; }
}
