/* =========================================================
   When Squirrels Fly — Cover Palette Theme (drop-in)
   Keeps original class names so the site continues to work.
   ========================================================= */

/* Cover-matching palette while preserving your existing variable names */
:root {
  /* New theme colors (cover-inspired) */
  --ink: #1E2A5A;        /* deep navy */
  --coral: #F07E6E;      /* coral/pink */
  --cream: #F3E7D6;      /* warm paper */
  --mist: #EEF1FA;       /* soft cool background */
  --slate: #46527A;      /* secondary navy */

  /* Map to your original variable names so the site keeps working */
  --primary: var(--ink);
  --accent: var(--coral);
  --highlight: var(--cream);
  --dark: var(--ink);
  --light: #ffffff;

  --shadow-soft: 0 10px 25px rgba(30, 42, 90, 0.12);
  --shadow-med: 0 18px 45px rgba(30, 42, 90, 0.22);

  /* Background decoration system (kept from your original idea) */
  --bg-images:
    url(Acorn.png),
    url(Acorn.png),
    url(Leaf.png),
    url(Leaf.png),
    url(Acorn.png),
    url(Leaf2.png),
    url(Leaf3.png),
    url(Leaf3.png),
    url(Leaf2.png),
    url(Leaf3.png);

  --bg-positions:
    10% 15%,
    right 8% top 40%,
    40% 75%,
    70% 20%,
    85% 80%,
    20% 60%,
    8% 80%,
    85% 10%,
    38% 23%,
    65% 50%;

  --bg-sizes:
    120px, 80px, 100px, 140px, 90px, 100px, 100px, 100px, 100px, 100px;
}

/* Reset & base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Lora', serif;
  color: var(--dark);
  /* Keep your pattern, but on a cooler/lighter base */
  background: var(--mist) url('pattern.png') repeat;
  position: relative;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* Optional “global faint icons” layer (if you use <div class="bg-icons"></div>) */
.bg-icons {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.08;
  background-repeat: no-repeat;
  background-image: var(--bg-images, none);
  background-position: var(--bg-positions, 0 0);
  background-size: var(--bg-sizes, 0);
}

/* Leaf & acorn decorations (if used in HTML) */
.leaf { position: absolute; width: 80px; opacity: 0.10; z-index: 1; }
.leaf1 { top: 5%; left: 3%; transform: rotate(15deg); }
.leaf2 { top: 20%; right: 10%; transform: rotate(-20deg); }
.leaf3 { bottom: 15%; left: 8%; transform: rotate(45deg); }
.leaf4 { bottom: 10%; right: 5%; transform: rotate(-45deg); }
.leaf5 { top: 50%; left: 40%; transform: rotate(90deg); width: 100px; }
.leaf6 { bottom: 30%; left: 60%; transform: rotate(-10deg); }

.acorn { position: absolute; width: 60px; opacity: 0.10; z-index: 1; }
.acorn1 { top: 10%; right: 30%; transform: rotate(20deg); }
.acorn2 { top: 40%; left: 75%; transform: rotate(-30deg); }
.acorn3 { bottom: 20%; right: 40%; transform: rotate(15deg); }
.acorn4 { bottom: 35%; left: 20%; transform: rotate(-25deg); }

/* =========================================================
   Navbar (kept sticky; updated to cream + navy + coral)
   ========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 231, 214, 0.92); /* cream */
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(30, 42, 90, 0.12);
  box-shadow: 0 2px 10px rgba(30, 42, 90, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Indie Flower', cursive;
  font-size: 1.4rem;
  color: var(--ink);
  white-space: nowrap;
}
/* Add breathing room to the right of the logo/title */
.navbar .brand {
  padding-right: 1.5rem;
}

.brand img { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex: 1;
  justify-content: flex-end;
}

.nav-links a {
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  font-size: 0.98rem;
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover {
  background: rgba(240, 126, 110, 0.16); /* coral tint */
  color: var(--ink);
  transform: translateY(-1px);
}

/* Slightly smaller on medium screens to avoid wrapping */
@media (max-width: 1100px) {
  .nav-inner { padding: 0.6rem 0.75rem; }
  .brand { font-size: 1.25rem; }
  .nav-links { gap: 0.6rem; }
  .nav-links a { font-size: 0.92rem; padding: 0.32rem 0.45rem; }
}

/* On narrow screens, keep in one line using tighter spacing */
@media (max-width: 900px) {
  .brand { font-size: 1.15rem; }
  .nav-links { gap: 0.5rem; }
  .nav-links a { font-size: 0.88rem; padding: 0.28rem 0.42rem; }
}

/* =========================================================
   Header (hero) — match cover palette (remove green blob)
   ========================================================= */
header.hero {
  text-align: center;
  padding: 4rem 1rem 4.5rem;
  /* Keep your squirrels svg accent */
  background-image: url('squirrels-flying.svg');
  background-size: 200px;
  background-position: top right;
  background-repeat: no-repeat;
  position: relative;
  z-index: 2;
  color: var(--ink);
}

/* Replace the old green ellipse with a cover-style gradient */
header.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 340px;
  background:
    radial-gradient(900px 380px at 50% 0%, rgba(240,126,110,0.38), transparent 65%),
    linear-gradient(180deg, rgba(243,231,214,1) 0%, rgba(238,241,250,1) 100%);
  clip-path: ellipse(72% 100% at 50% 0%);
  z-index: -1;
}

.hero-cover {
  width: 300px;
  max-width: 100%;
  transform: rotate(-2.2deg);
  border: 6px solid rgba(243,231,214,0.95);
  border-radius: 14px;
  box-shadow: var(--shadow-med);
  margin-bottom: 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
}

.hero-cover:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 22px 55px rgba(30, 42, 90, 0.28);
}

header h1 {
  font-family: 'Indie Flower', cursive;
  font-size: 3.2rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

header .tagline {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--slate);
  margin-bottom: 1.25rem;
}

/* Hero buttons — primary navy + secondary coral-outline */
.hero-buttons a {
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hero-buttons a:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

/* First = filled */
.hero-buttons a:first-child {
  background: var(--ink);
  color: var(--cream);
  border: 2px solid rgba(30, 42, 90, 0.12);
}

/* Second = outline */
.hero-buttons a:last-child {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--coral);
  box-shadow: none;
}

.hero-buttons a:last-child:hover {
  background: rgba(240, 126, 110, 0.12);
}

/* =========================================================
   Headings & divider
   ========================================================= */
.section-title {
  font-family: 'Indie Flower', cursive;
  font-size: 2.4rem;
  color: var(--ink);
  text-align: center;
  margin-bottom: 1rem;
}

.divider {
  width: 80px;
  height: 4px;
  background: var(--coral);
  margin: 1rem auto;
  border-radius: 2px;
  position: relative;
}

/* Icons under headings */
.divider.acorn::after,
.divider.leaf::after {
  content: '';
  display: block;
  width: 100px;
  height: 100px;
  margin: 0.5rem auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.10;
}
.divider.acorn::after { background-image: url('acorn-decoration.svg'); }
.divider.leaf::after { background-image: url('leaf6.svg'); }

/* =========================================================
   Sections
   ========================================================= */
.description-content {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 2rem auto;
  color: var(--slate);
}

/* Reviews & Praise */
#reviews { padding: 4rem 0; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 1.5rem auto 0;
}

.review-card {
  background: #fff;
  border: 1px solid rgba(30, 42, 90, 0.10);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(30,42,90,0.08);
}

.stars { font-size: 1rem; letter-spacing: 2px; color: #c89d00; margin-bottom: 0.5rem; }
.reviewer { font-weight: 800; margin-top: 0.5rem; color: var(--ink); }

/* Buy */
#buy {
  position: relative;
  background: transparent;
  padding: 4rem 0;
}

.buy-content {
  text-align: center;
  font-size: 1rem;
  color: var(--slate);
}

.buy-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.buy-buttons a {
  padding: 0.8rem 1.5rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.buy-buttons a:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  background: rgba(30, 42, 90, 0.92);
}

/* Author */
#author { position: relative; padding: 4rem 0; }

.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.author-photo {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: cover;
  border: 6px solid rgba(243,231,214,0.95);
  border-radius: 14px;
  box-shadow: 0 16px 35px rgba(30,42,90,0.16);
  margin-bottom: 2rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 14px;
  border: 4px solid rgba(243,231,214,0.95);
  box-shadow: 0 14px 30px rgba(30,42,90,0.12);
}

/* Events */
#events { padding: 3rem 0; }

.events-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(30,42,90,0.10);
  border: 1px solid rgba(30, 42, 90, 0.10);
}

.events-table th, .events-table td {
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid rgba(30, 42, 90, 0.08);
  text-align: left;
  color: var(--slate);
}

.events-table th {
  background: var(--ink);
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.events-table tr:last-child td { border-bottom: none; }

/* Forms */
form.contact {
  background: #fff;
  border: 1px solid rgba(30, 42, 90, 0.10);
  border-radius: 14px;
  padding: 1.25rem;
  max-width: 720px;
  margin: 1rem auto;
  box-shadow: 0 12px 26px rgba(30,42,90,0.10);
}

form.contact label {
  display: block;
  font-weight: 800;
  margin: 0.5rem 0 0.25rem;
  color: var(--ink);
}

form.contact input,
form.contact textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(30, 42, 90, 0.18);
  border-radius: 12px;
  outline: none;
}

form.contact input:focus,
form.contact textarea:focus {
  border-color: rgba(240,126,110,0.75);
  box-shadow: 0 0 0 3px rgba(240,126,110,0.18);
}

form.contact button {
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

form.contact button:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--slate);
}

.social-links a { margin: 0 0.5rem; color: var(--ink); }
.social-links a:hover { color: var(--coral); }

.social-links a:not(:last-child)::after {
  content: '·';
  margin-left: 0.5rem;
  color: rgba(30, 42, 90, 0.35);
}

/* Utility */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

/* =========================================================
   Ann Arbor Locations (homepage mosaic)
   ========================================================= */
#ann-arbor { padding: 4rem 0; }

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 90px;
  gap: 10px;
  max-width: 1000px;
  margin: 1.5rem auto 0;
}

.mosaic-grid figure {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 5px solid rgba(243,231,214,0.95);
  box-shadow: 0 16px 32px rgba(30,42,90,0.10);
}

.mosaic-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .4s ease;
}

.mosaic-grid figure:hover img { transform: scale(1.05); }

.mosaic-grid figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(243,231,214,0.92);
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 800;
  color: var(--ink);
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(30,42,90,0.10);
}

/* Specific tile spans for aesthetic layout */
.tile-a { grid-column: span 7; grid-row: span 4; }
.tile-b { grid-column: span 5; grid-row: span 3; }
.tile-c { grid-column: span 4; grid-row: span 3; }
.tile-d { grid-column: span 4; grid-row: span 2; }
.tile-e { grid-column: span 4; grid-row: span 2; }

/* Responsive tweaks */
@media (max-width: 820px) {
  .mosaic-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 80px; }
  .tile-a { grid-column: span 6; grid-row: span 4; }
  .tile-b { grid-column: span 6; grid-row: span 3; }
  .tile-c, .tile-d, .tile-e { grid-column: span 3; grid-row: span 2; }
}

@media (max-width: 520px) {
  .mosaic-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 75px; }
  .tile-a, .tile-b { grid-column: span 4; grid-row: span 4; }
  .tile-c, .tile-d, .tile-e { grid-column: span 4; grid-row: span 3; }
}

/* =========================================================
   Publisher page formatting
   ========================================================= */
.publisher-content {
  max-width: 720px;
  margin: 2rem auto;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--slate);
}

.publisher-wrap {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.publisher-wrap .section-title { margin-top: 0.5rem; }
.publisher-wrap .description-content { margin-top: 0.75rem; }

/* =========================================================
   Chapter Reading Styles
   ========================================================= */
.read-hero {
  text-align: center;
  padding: 3rem 1rem 1rem;
  background-image: url('squirrels-flying.svg');
  background-size: 160px;
  background-position: top right;
  background-repeat: no-repeat;
  position: relative;
}

.read-hero h1 {
  font-family: 'Indie Flower', cursive;
  color: var(--ink);
  font-size: 2.6rem;
}

.read-meta { color: rgba(70, 82, 122, 0.85); margin-top: 0.25rem; }

.chapter {
  max-width: 760px;
  margin: 1rem auto 3rem;
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 16px 35px rgba(30,42,90,0.10);
  border: 1px solid rgba(30, 42, 90, 0.10);
}

.chapter p {
  font-size: 1.08rem;
  line-height: 1.8;
  margin: 1rem 0;
  color: var(--slate);
}

.dropcap:first-letter {
  -webkit-initial-letter: 2;
  initial-letter: 2;
  font-weight: 900;
  color: var(--coral);
  margin-right: 0.5rem;
}

.chapter hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(30,42,90,0.12), transparent);
  margin: 2rem 0;
}

.pull-quote {
  font-style: italic;
  border-left: 4px solid var(--coral);
  padding-left: 0.75rem;
  color: rgba(70, 82, 122, 0.95);
  margin: 1.25rem 0;
}

.chapter-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.chapter-cta a {
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.chapter-cta a:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}



/* Always-sticky navbar (fixed to top for full page) */
.navbar{
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
}

/* Prevent the fixed navbar from covering the top of the hero */

/* If you ever jump to anchors (#description, etc.), offset for the fixed nav */
html{
  scroll-padding-top: 80px;
}


/* Navbar is fixed; don't push the whole page down */


/* Push only the hero down so it doesn't hide under the navbar */
header.hero { padding-top: 6.25rem; } /* tweak if needed */

/* Keep anchor jumps correct */
html { scroll-padding-top: 80px; }


/* ============================
   Author bio text refinement
   ============================ */

#author .description-content,
.author-bio {
  max-width: 680px;          /* tighter line length = better reading */
  margin: 0 auto;
  text-align: left;          /* center is bad for long prose */
  line-height: 1.75;
  font-size: 1.05rem;
  color: var(--slate);
}

/* Add breathing room between paragraphs */
#author .description-content p,
.author-bio p {
  margin-bottom: 1.25rem;
}

/* Optional: slightly stronger first paragraph */
#author .description-content p:first-of-type,
.author-bio p:first-of-type {
  font-size: 1.1rem;
  color: var(--ink);
}

/* Optional: subtle divider feel without a line */
#author .description-content p:last-of-type {
  margin-bottom: 0;
}


/* ============================
   Inside the Tale text refinement
   ============================ */

#description .description-content{
  max-width: 680px;     /* comfortable line length */
  margin: 0 auto;
  text-align: left;     /* cleaner for long prose */
  line-height: 1.75;
  font-size: 1.05rem;
  color: var(--slate);
}

#description .description-content p{
  margin-bottom: 1.25rem; /* breathing room between paragraphs */
}

#description .description-content p:last-child{
  margin-bottom: 0;
}

/* Optional: emphasize the opening paragraph slightly */
#description .description-content p:first-of-type{
  font-size: 1.1rem;
  color: var(--ink);
}



/* ============================
   Fixed navbar spacing using body classes
   ============================ */

/* One source of truth for navbar height */
:root {
  --nav-h: 64px;  /* tweak if your nav is taller/shorter */
}

/* Home page: already looks good, no global push */
body.home {
  padding-top: 0;
}

/* All other pages: push content down below fixed nav */
body.page {
  padding-top: calc(var(--nav-h) + 12px);
}

/* Anchor jumps (e.g. #publisher, #gallery) land below navbar */
html {
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

/* ============================
   Mobile navbar layout
   ============================ */
@media (max-width: 640px) {
  /* Stack logo/title above the links */
  .nav-inner {
    flex-direction: column;
    align-items: center;   /* or center if you prefer */
    gap: 0.25rem;
  }

  /* Let links wrap to a second line instead of being cut off */
  .nav-links {
    flex-wrap: wrap;
    white-space: normal;
    justify-content: center;  /* or center */
    gap: 0.4rem 0.75rem;          /* row gap / column gap */
  }

  /* Slightly smaller, tighter link styling on phones */
  .nav-links a {
    font-size: 0.85rem;
    padding: 0.22rem 0.4rem;
  }
  
  
    /* Push the hero down further on small screens
     so it clears the taller, wrapped navbar */
  header.hero {
    padding-top: 10rem;   /* you can nudge this up/down if needed */
  }
}

/* ============================
   Mobile navbar + spacing
   ============================ */
@media (max-width: 640px) {

  /* Stack & center the brand above the links */
  .nav-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  /* Let links wrap, and center them */
  .nav-links {
    flex-wrap: wrap;
    white-space: normal;
    justify-content: center;
    gap: 0.4rem 0.75rem;
  }

  /* Slightly smaller/tighter links on phones */
  .nav-links a {
    font-size: 0.85rem;
    padding: 0.22rem 0.4rem;
  }

  /* Home hero: extra space under the taller nav */
  header.hero {
    padding-top: 10rem;
  }

  /* All inner pages: push content down under the taller nav */
  body.page {
    padding-top: 120px;  /* bump to 130px if it still feels tight */
  }

  /* Anchor jumps (#events, #gallery, etc.) land below the nav on mobile */
  html {
    scroll-padding-top: 120px;
  }
}



