/* ============================================
   PI Pottle Series — warm storybook theme
   ============================================ */

:root {
  --cream: #fbf3e4;
  --cream-deep: #f4e8d0;
  --ink: #3f2e22;
  --ink-soft: #6b5847;
  --gold: #d8a438;
  --gold-deep: #b9822a;
  --teal: #3d6b78;
  --coral: #b85a3f;
  --paper-border: #e4cfa3;
  --shadow: 0 6px 18px rgba(63, 46, 34, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(216, 164, 56, 0.08), transparent 40%),
    radial-gradient(circle at 90% 30%, rgba(95, 147, 161, 0.08), transparent 45%);
  color: var(--ink);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  line-height: 1.65;
}

h1, h2, h3, h4, .brand-name, .nav-links a, .btn {
  font-family: 'Baloo 2', 'Comic Sans MS', system-ui, sans-serif;
}

a {
  color: var(--teal);
}

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

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */

header.site-header {
  background: var(--cream-deep);
  border-bottom: 3px dashed var(--paper-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-tag {
  font-family: 'Lora', serif;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-style: italic;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
  z-index: 25;
  position: relative;
  line-height: 1;
  padding: 4px 8px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  border-color: var(--gold);
  color: var(--gold-deep);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coral);
  color: #fff;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: #9c4a32;
  transform: translateY(-2px);
  color: #fff;
}

.btn.secondary {
  background: var(--teal);
}

.btn.secondary:hover {
  background: #2f545f;
}

.btn.small {
  padding: 9px 20px;
  font-size: 0.9rem;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--ink);
}

.hero .tagline {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.15rem;
  margin-bottom: 22px;
}

.hero-image-frame {
  border: 6px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(-1.5deg);
  background: #fff;
  align-self: start;
}

.hero-image-frame img {
  border-radius: 10px;
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Sections ---------- */

section {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 40px;
}

.intro-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  border: 2px dashed var(--paper-border);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 36px 0;
}

.cta-left {
  justify-content: flex-start;
}

/* ---------- Book grid ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.book-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--paper-border);
  transition: transform 0.2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-cover {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--cream-deep);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.book-body h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink);
}

.book-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  flex: 1;
}

.book-number {
  display: inline-block;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-deep);
  background: rgba(216, 164, 56, 0.15);
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}

/* ---------- Preview strip on home ---------- */

.preview-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.preview-item {
  text-align: center;
}

.preview-item .book-cover {
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.preview-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- About page ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 44px;
  align-items: start;
}

.about-photo {
  border: 6px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(1.2deg);
}

.about-text h1 {
  margin-top: 0;
}

.pullquote {
  border-left: 4px solid var(--gold);
  padding-left: 20px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 24px 0;
  font-size: 1.1rem;
}

/* ---------- Characters strip ---------- */

.characters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.character-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
  border: 2px dashed var(--paper-border);
}

.character-card h4 {
  margin: 6px 0 6px;
  font-size: 1.15rem;
}

.character-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.paw {
  font-size: 1.6rem;
}

.character-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow);
  margin: 0 auto;
}

/* ---------- Look inside gallery ---------- */

.look-inside {
  margin-top: 18px;
  border-top: 1px dashed var(--paper-border);
  padding-top: 16px;
}

.look-inside summary {
  cursor: pointer;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  color: var(--gold-deep);
  font-size: 0.92rem;
  list-style: none;
}

.look-inside summary::-webkit-details-marker {
  display: none;
}

.look-inside summary::before {
  content: "\1F441  ";
}

.inside-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.inside-grid a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.inside-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.inside-grid a:hover img {
  transform: scale(1.06);
}

/* ---------- Favorite badge ---------- */

.favorite-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 2;
}

.book-card {
  position: relative;
}

/* ---------- Start here callout ---------- */

.start-here {
  background: rgba(216, 164, 56, 0.14);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 32px;
  text-align: center;
  font-size: 0.95rem;
}

.start-here a {
  color: var(--gold-deep);
  font-weight: 700;
}

/* ---------- Newsletter ---------- */

.newsletter {
  background: #fff;
  border: 2px dashed var(--paper-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  text-align: center;
}

.newsletter h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.newsletter p {
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1 1 240px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid var(--paper-border);
  font-family: 'Lora', serif;
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
}

.newsletter-form input[type="email"]:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--ink);
  color: var(--cream-deep);
  margin-top: 60px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 24px 30px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 32px;
}

.footer-inner h4 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.footer-inner p, .footer-inner a {
  color: #d8cabb;
  font-size: 0.92rem;
  text-decoration: none;
  line-height: 1.8;
}

.footer-inner a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding: 16px 24px 24px;
  font-size: 0.8rem;
  color: #a3927e;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-inner,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    text-align: center;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .preview-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .characters {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream-deep);
    flex-direction: column;
    padding: 16px 24px 24px;
    border-bottom: 3px dashed var(--paper-border);
    gap: 16px;
    z-index: 24;
  }

  .nav-links.open {
    display: flex;
  }

  .cta-row,
  .cta-left {
    justify-content: center !important;
  }

  .inside-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter {
    padding: 28px 20px;
  }
}
