/* =====================================================
   Little Saporito Press
   Storybook-feeling palette pulled from the logo:
   sage green, warm cream paper, tree-bark brown,
   a touch of dusty rose accent.
   ===================================================== */

:root {
  /* Colors */
  --paper:        #fbf6ec;   /* warm cream, like aged book paper */
  --paper-soft:   #f3ecdc;   /* slightly deeper for alt sections */
  --ink:          #2e2a25;   /* warm near-black for body text */
  --ink-soft:     #6b6359;   /* muted brown-grey for secondary text */
  --bark:         #6b4423;   /* tree-bark brown, primary accent */
  --bark-deep:    #4d3018;   /* darker hover state */
  --leaf:         #8aa874;   /* sage green from the leaves */
  --leaf-deep:    #5e7a4c;   /* deeper sage */
  --rose:         #b97a86;   /* dusty rose from the logo border */
  --line:         #e6dcc7;   /* subtle border lines */

  /* Type */
  --font-display: "Fraunces", Georgia, "Iowan Old Style", serif;
  --font-body:    "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --radius:       10px;
  --radius-lg:    18px;
  --max-width:    1120px;
  --shadow-soft:  0 6px 24px rgba(77, 48, 24, 0.08);
  --shadow-lift:  0 14px 40px rgba(77, 48, 24, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* Subtle paper-grain texture using layered radial gradients — no images needed */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(138, 168, 116, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(185, 122, 134, 0.04) 0%, transparent 45%);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--bark-deep);
}
.logo-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.nav { display: flex; gap: 28px; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--leaf);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:hover { color: var(--bark-deep); }
.nav a:hover::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* soft sage glow behind the logo art */
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(138, 168, 116, 0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-art img {
  max-width: 460px;
  width: 100%;
  filter: drop-shadow(0 12px 30px rgba(77, 48, 24, 0.12));
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--leaf-deep);
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: var(--bark-deep);
}
.hero-tagline {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--bark);
  color: var(--paper);
  box-shadow: 0 4px 0 var(--bark-deep);
}
.btn-primary:hover {
  background: var(--bark-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--bark-deep);
}
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--bark-deep); }
.btn-ghost {
  background: transparent;
  color: var(--bark-deep);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--bark);
  background: rgba(107, 68, 35, 0.04);
}
.btn-small {
  padding: 10px 20px;
  font-size: 14px;
  background: var(--bark);
  color: var(--paper);
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
  font-weight: 700;
  transition: background 0.2s ease;
}
.btn-small:hover { background: var(--bark-deep); }

/* ---------- Sections ---------- */
.section {
  padding: 90px 0;
  position: relative;
}
.section-alt {
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-accent {
  background: var(--leaf-deep);
  color: var(--paper);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.section-accent::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--leaf-deep);
  margin: 0 0 12px;
  text-align: center;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 12px;
  text-align: center;
  color: var(--bark-deep);
  letter-spacing: -0.01em;
}
.section-title-left { text-align: left; }
.section-sub {
  text-align: center;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto 56px;
}

/* ---------- Featured book layout ---------- */
.feature-book {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
  margin-top: 40px;
}
.feature-book-cover {
  position: relative;
}
.feature-book-cover img {
  border-radius: 6px;
  box-shadow: var(--shadow-lift);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
}
.feature-book-cover:hover img { transform: rotate(0deg) scale(1.02); }
.book-meta {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--leaf-deep);
  font-weight: 700;
  margin: 0 0 16px;
}
.book-blurb {
  font-size: 18px;
  margin: 0 0 24px;
  color: var(--ink);
}
.book-quick-facts {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.book-quick-facts li {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- Card grid (shop) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 18px 0 8px;
  font-size: 22px;
  color: var(--bark-deep);
}
.card p {
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-size: 15px;
}
.card-image {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  background: var(--paper-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 14px;
  overflow: hidden;
}
/* Only show dashed border on actual placeholders */
.card-image.placeholder {
  border: 2px dashed var(--line);
  font-style: italic;
}
/* When the card-image contains a real image, fill the box */
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.card:hover .card-image img {
  transform: scale(1.04);
}

/* ---------- Support / Ko-fi callout ---------- */
.support-callout {
  margin-top: 56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}
.support-callout::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 4px;
  background: linear-gradient(90deg, var(--leaf), var(--rose));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.support-text {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 22px;
  line-height: 1.6;
}
.support-text strong {
  color: var(--bark-deep);
  font-weight: 700;
}
.btn-support {
  display: inline-block;
  background: var(--rose);
  color: var(--paper);
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 0 #93606a;
}
.btn-support:hover {
  background: #a86974;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #93606a;
}
.btn-support:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #93606a;
}
.support-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text .section-eyebrow { text-align: left; }
.about-photo {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 15px;
  border: 2px dashed var(--line);
  font-style: italic;
  text-align: center;
  padding: 20px;
}
.placeholder-sub { font-size: 12px; opacity: 0.7; }

/* ---------- Newsletter ---------- */
.newsletter { position: relative; z-index: 1; }
.newsletter h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 38px);
  margin: 0 0 14px;
  color: var(--paper);
}
.newsletter p {
  margin: 0 0 14px;
  opacity: 0.95;
  font-size: 17px;
}
.placeholder-note { font-style: italic; opacity: 0.85; font-size: 14px; }

/* ---------- Contact ---------- */
.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.social-list a {
  display: block;
  text-align: center;
  padding: 22px 18px;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.social-list a:hover {
  transform: translateY(-3px);
  border-color: var(--leaf);
  box-shadow: var(--shadow-soft);
}
.social-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--bark-deep);
  margin-bottom: 4px;
}
.social-handle {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  background: var(--paper);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 14px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.footer-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.7;
}
.footer-links { margin: 0; }
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-links a:hover {
  color: var(--bark-deep);
  border-color: var(--bark);
}

/* ---------- Breadcrumb (book detail page) ---------- */
.breadcrumb-wrap {
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.breadcrumb {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--bark-deep); }
.breadcrumb span { opacity: 0.6; }

/* ---------- Book detail hero ---------- */
.book-hero { padding: 70px 0 60px; }
.book-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}
.book-hero-cover img {
  border-radius: 6px;
  box-shadow: var(--shadow-lift);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
  max-width: 380px;
  margin: 0 auto;
}
.book-hero-cover:hover img { transform: rotate(0deg); }
.book-hero-info .hero-title {
  text-align: left;
  font-size: clamp(36px, 4.5vw, 52px);
  margin-bottom: 14px;
}
.book-hero-info .eyebrow { text-align: left; }
.book-hero-info .hero-tagline { margin-left: 0; }
.book-hero-info .hero-actions { justify-content: flex-start; }
.book-hero-info .book-quick-facts { justify-content: flex-start; }

/* ---------- Book content blocks ---------- */
.book-content-wrap {
  max-width: 760px;
}
.book-content-wrap .section-title { margin-top: 0; }
.lede {
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--bark-deep);
  line-height: 1.4;
  margin: 0 0 24px;
}

/* Parent / teacher cards */
.parent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.parent-card {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.parent-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--bark-deep);
}
.parent-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- Excerpt block ---------- */
.excerpt {
  background: var(--paper);
  border-left: 4px solid var(--leaf);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}
.excerpt p:last-child { margin-bottom: 0; }

/* ---------- Press mention block ---------- */
.press-mention {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-top: 32px;
}
.press-source {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--leaf-deep);
  margin: 0 0 12px;
}
.press-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--bark-deep);
  margin: 0 0 20px;
  line-height: 1.4;
}

/* ---------- Reading level callout ---------- */
.reading-level {
  background: var(--paper-soft);
  border-left: 3px solid var(--leaf);
  padding: 12px 18px;
  margin-top: 24px !important;
  font-size: 15px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- Legal / privacy page ---------- */
.legal-page {
  max-width: 720px;
}
.legal-page h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin: 36px 0 12px;
  color: var(--bark-deep);
}
.legal-page p {
  margin: 0 0 14px;
}
.legal-page a {
  color: var(--bark);
  text-decoration: underline;
  text-decoration-color: var(--leaf);
  text-underline-offset: 3px;
}
.legal-page a:hover { color: var(--bark-deep); }
.legal-meta {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 32px !important;
  font-style: italic;
}

/* ---------- Responsive: book detail ---------- */
@media (max-width: 880px) {
  .book-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .book-hero-info .hero-title,
  .book-hero-info .eyebrow,
  .book-hero-info .hero-actions,
  .book-hero-info .book-quick-facts { text-align: center; justify-content: center; }
  .book-hero-info .hero-tagline { margin: 0 auto 24px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero { padding: 60px 0 80px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-art { order: -1; }
  .hero-art img { max-width: 300px; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  .feature-book {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .feature-book-cover { max-width: 320px; margin: 0 auto; }
  .book-quick-facts { justify-content: center; }
  .feature-book-info .hero-actions { justify-content: center; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .about-text .section-eyebrow,
  .section-title-left { text-align: center; }
  .about-photo { max-width: 240px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }
  .nav { gap: 20px; }
  .logo-text { font-size: 18px; }
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
}