/* Marion's Book — warm school-library palette */
:root {
  --ink: #1e2f28;
  --ink-soft: #3d5248;
  --paper: #f6f1e4;
  --paper-deep: #e8dfc8;
  --leaf: #2f6b4f;
  --leaf-deep: #1f4a37;
  --leaf-soft: #7ea88f;
  --sun: #f0c14b;
  --sun-soft: #f7e3a1;
  --bow: #c23b3b;
  --bow-soft: #e08a7a;
  --sky: #d7ebe3;
  --white: #fffcf5;
  --shadow: rgba(30, 47, 40, 0.14);
  --radius: 1.25rem;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", "Trebuchet MS", "Segoe UI", sans-serif;
  --max: 68rem;
  --focus: 0 0 0 3px var(--white), 0 0 0 6px var(--leaf);
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--sun-soft), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, var(--sky), transparent 50%),
    linear-gradient(180deg, #fbf7ec 0%, var(--paper) 40%, #efe6d0 100%);
  min-height: 100vh;
}

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

a {
  color: var(--leaf-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--bow);
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 252, 245, 0.88);
  border-bottom: 1px solid rgba(47, 107, 79, 0.12);
}

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--leaf-soft);
}

.nav-toggle {
  display: none;
  border: 2px solid var(--leaf);
  background: var(--white);
  color: var(--leaf-deep);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--leaf-deep);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-wrap {
    flex-wrap: wrap;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 0 0.25rem;
    gap: 0.65rem;
  }
}

.hero {
  position: relative;
  min-height: min(92vh, 52rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% 40%;
  transform: scale(1.04);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(20, 42, 32, 0.82) 0%, rgba(20, 42, 32, 0.55) 42%, rgba(20, 42, 32, 0.22) 100%),
    linear-gradient(0deg, rgba(20, 42, 32, 0.7) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 6rem 1.25rem 3.5rem;
}

.hero-brand-block {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  animation: rise 0.9s ease both;
}

@media (min-width: 800px) {
  .hero-brand-block {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
  }
}

.hero-logo {
  width: min(100%, 340px);
  max-width: 340px;
  height: auto;
  border-radius: 0.85rem;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(255, 252, 245, 0.55);
  background: var(--white);
}

.hero-brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero h1 {
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
}

.hero-lead {
  margin: 0 0 1.5rem;
  max-width: 34ch;
  font-size: 1.125rem;
  color: rgba(255, 252, 245, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--sun);
  color: var(--ink);
}

.button-primary:hover {
  background: var(--sun-soft);
  color: var(--ink);
}

.button-ghost {
  background: transparent;
  border-color: rgba(255, 252, 245, 0.65);
  color: var(--white);
}

.button-ghost:hover {
  background: rgba(255, 252, 245, 0.12);
  color: var(--white);
}

.button-solid {
  background: var(--leaf);
  color: var(--white);
}

.button-solid:hover {
  background: var(--leaf-deep);
  color: var(--white);
}

.button-outline {
  background: transparent;
  border-color: var(--leaf);
  color: var(--leaf-deep);
}

.button-outline:hover {
  background: var(--leaf);
  color: var(--white);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--bow);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--leaf-deep);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.book-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 820px) {
  .book-grid {
    gap: 3rem;
  }
}

.book-row {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding-block: 0.5rem;
}

@media (min-width: 820px) {
  .book-row {
    grid-template-columns: minmax(12rem, 18rem) 1fr;
    gap: 2rem;
  }

  .book-row:nth-child(even) {
    grid-template-columns: 1fr minmax(12rem, 18rem);
  }

  .book-row:nth-child(even) .book-cover {
    order: 2;
  }
}

.book-cover {
  position: relative;
}

.book-cover img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow:
    0 18px 40px var(--shadow),
    0 2px 0 rgba(255, 255, 255, 0.5) inset;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book-cover a:hover img,
.book-cover a:focus-visible img {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 26px 48px rgba(30, 47, 40, 0.22);
}

.book-meta h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.2;
  color: var(--ink);
}

.book-meta h3 a {
  color: inherit;
  text-decoration: none;
}

.book-meta h3 a:hover {
  color: var(--leaf-deep);
}

.book-byline {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.book-summary {
  margin: 0 0 1rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(47, 107, 79, 0.1);
  color: var(--leaf-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.about-panel,
.teachers-panel,
.buy-panel {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .about-panel,
  .teachers-panel {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.panel-copy p {
  margin-top: 0;
}

.aside-note {
  background:
    linear-gradient(160deg, rgba(240, 193, 75, 0.28), rgba(215, 235, 227, 0.55));
  border: 1px solid rgba(47, 107, 79, 0.15);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.aside-note h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--leaf-deep);
}

.aside-note p:last-child {
  margin-bottom: 0;
}

.illustrator-links {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}

.illustrator-links a {
  color: var(--leaf-deep);
}

.checklist {
  margin: 0;
  padding-left: 1.15rem;
}

.checklist li {
  margin-bottom: 0.55rem;
}

.buy-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .buy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.buy-item {
  padding: 1.15rem 1.2rem 1.3rem;
  border-top: 3px solid var(--leaf);
  background: rgba(255, 252, 245, 0.65);
}

.buy-item h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.buy-item p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.retailer-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.retailer-list a {
  display: inline-flex;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid rgba(47, 107, 79, 0.22);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.retailer-list a:hover {
  border-color: var(--leaf);
  background: rgba(47, 107, 79, 0.08);
}

.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 1.25rem 3rem;
  background: var(--leaf-deep);
  color: rgba(255, 252, 245, 0.88);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.site-footer a {
  color: var(--sun-soft);
}

.site-footer .brand {
  color: var(--white);
}

.footnote {
  margin: 0;
  font-size: 0.92rem;
}

.footnote.credit {
  font-size: 0.85rem;
  color: rgba(255, 252, 245, 0.72);
}

.footnote.credit a {
  color: var(--sun-soft);
}

/* Book detail pages */
.book-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .book-hero {
    grid-template-columns: minmax(14rem, 22rem) 1fr;
    align-items: start;
    gap: 2.5rem;
    padding-top: 3rem;
  }
}

.book-hero > img {
  width: 100%;
  border-radius: 0.85rem;
  box-shadow: 0 18px 40px var(--shadow);
}

.book-byline-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.85rem;
}

.book-byline-row .book-byline {
  margin: 0;
}

.author-thumb {
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  box-shadow: 0 6px 14px var(--shadow);
  border: 2px solid var(--white);
}

.book-hero-copy h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.12;
  color: var(--leaf-deep);
}

.detail-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(47, 107, 79, 0.12);
  font-size: 0.98rem;
}

.detail-list dt,
.detail-list .label {
  font-weight: 800;
  color: var(--leaf-deep);
}

.story-photo {
  margin: 0 0 1.25rem;
  max-width: 22rem;
}

.story-photo img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 12px 28px var(--shadow);
}

.story-photo figcaption {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.plush-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.15rem 0 0;
}

.plush-thumb {
  width: 125px;
  height: 125px;
  flex-shrink: 0;
  border-radius: 0.55rem;
  box-shadow: 0 8px 18px var(--shadow);
  background: var(--white);
}

.lake-photo {
  margin: 0.35rem 0 1.35rem;
  max-width: 36rem;
}

.lake-photo img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 10px 26px var(--shadow);
  opacity: 0.92;
  filter: saturate(0.92);
}

.lake-photo figcaption {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.author-memorial {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}

@media (min-width: 700px) {
  .author-memorial {
    grid-template-columns: minmax(10rem, 13.5rem) 1fr;
    gap: 2rem;
  }
}

.author-portrait {
  margin: 0;
  max-width: 13.5rem;
  justify-self: start;
}

.author-portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  box-shadow: 0 14px 32px var(--shadow);
  border: 4px solid var(--white);
}

.author-portrait figcaption {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.35;
}

.author-tribute .section-head {
  margin-bottom: 1.15rem;
}

.author-tribute > p:first-of-type {
  margin-top: 0;
}

.family-photo {
  margin: 0 0 1.35rem;
  max-width: 100%;
}

.family-photo img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 12px 28px var(--shadow);
}

.family-photo figcaption {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.interior-gallery {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3.5rem;
}

.interior-gallery h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--leaf-deep);
}

.interior-gallery > p {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid img {
  width: 100%;
  border-radius: 0.65rem;
  box-shadow: 0 10px 24px var(--shadow);
  background: var(--white);
}

.gallery-grid figcaption {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.author-quote {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--leaf);
  background: rgba(215, 235, 227, 0.45);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.from-the-book {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--leaf);
  background: rgba(240, 193, 75, 0.18);
  border-radius: 0 0.55rem 0.55rem 0;
}

.from-the-book-label {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--leaf-deep);
}

.from-the-book p {
  margin: 0 0 0.65rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.from-the-book p:last-child {
  margin-bottom: 0;
}

.early-artwork {
  padding-top: 0.5rem;
}

.early-grid {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.early-grid img {
  object-fit: contain;
  max-height: 16rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}

.reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
