/* ============================================================
   MEDITATIONS ON AGRICULTURE — page stylesheet
   Aesthetic: Roman fresco meets woodblock print.
   Ancient and immediate. Tactile. Warm. Not BBS, not corporate.
   Palette from the book cover.
   ============================================================ */

:root {
  /* Cover palette */
  --soil:      #3B2F1E;   /* deep soil brown */
  --terra:     #B85C38;   /* terracotta */
  --olive:     #6B7F3B;   /* olive green */
  --wheat:     #D4A843;   /* wheat gold */
  --amber:     #E8A849;   /* sky amber */
  --sea:       #4A6B8A;   /* sea blue */
  --indigo:    #1A1A2E;   /* indigo night */
  --phosphor:  #00FF41;   /* subtle accent */

  /* Derived */
  --bg:        #F4EFE6;   /* warm parchment */
  --bg-deep:   #EAE2D2;   /* deeper parchment */
  --ink:       #2B2418;   /* near-black warm ink */
  --ink-soft:  #5A4E3A;   /* muted ink */
  --line:      #C9BCA3;   /* hairline */
  --card:      #FBF7EF;   /* card surface */
  --serif:     'EB Garamond', Garamond, Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- Top bar ---- */
.topbar {
  background: var(--indigo);
  color: var(--wheat);
  padding: 0.9rem 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.topbar a {
  color: var(--wheat);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar a:hover { border-bottom-color: var(--wheat); }
.topbar .brand { font-weight: 600; }

/* ---- Hero ---- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212,168,67,0.18), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(74,107,138,0.15), transparent 50%),
    var(--bg-deep);
  border-bottom: 1px solid var(--line);
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.hero .kicker {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 600;
  color: var(--soil);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 auto;
}
.hero .rule {
  width: 90px;
  height: 3px;
  background: var(--terra);
  margin: 1.5rem auto 0;
}

/* ---- Layout ---- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.book-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  align-items: start;
}
.book-cover {
  position: sticky;
  top: 1.5rem;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(59,47,30,0.18);
  background: var(--card);
  padding: 0.5rem;
}
.book-cover img {
  width: 100%;
  display: block;
}
.book-cover .caption {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  padding: 0.5rem 0 0.25rem;
  font-style: italic;
}

/* ---- Book info ---- */
.book-info h1 {
  font-size: 2.2rem;
  color: var(--soil);
  margin: 0 0 0.4rem;
  font-weight: 600;
  line-height: 1.1;
}
.book-subtitle {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--terra);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.book-desc {
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.book-desc p { margin: 0 0 1rem; }
.book-desc strong { color: var(--soil); font-weight: 600; }

/* ---- Pull quote ---- */
.pullquote {
  border-left: 4px solid var(--olive);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--card);
  line-height: 1.7;
}
.pullquote::before {
  content: '\201C';
  font-size: 3rem;
  color: var(--olive);
  opacity: 0.4;
  line-height: 0;
  display: block;
  height: 1.2rem;
}

/* ---- Price / buy ---- */
.price-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.price {
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--soil);
}
.btn-buy {
  background: var(--terra);
  color: #fff;
  border: none;
  padding: 0.95rem 2.2rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(184,92,56,0.3);
}
.btn-buy:hover {
  background: var(--soil);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59,47,30,0.3);
}
.btn-buy:disabled { opacity: 0.6; cursor: wait; }
.format-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}
.format-note strong { color: var(--olive); font-weight: 600; }
.status-msg {
  margin-top: 1rem;
  color: var(--terra);
  font-size: 0.95rem;
  min-height: 1.2em;
}

/* ---- Delivery note ---- */
.delivery-note {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.delivery-note strong { color: var(--soil); font-weight: 600; }

/* ---- Section divider ---- */
.divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 2.5rem 0;
}
.divider-ornament {
  text-align: center;
  color: var(--olive);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
  margin: 2.5rem 0;
}

/* ---- Table of contents ---- */
.toc {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 2rem 2.2rem;
  margin: 2rem 0;
}
.toc h2 {
  font-size: 1.3rem;
  color: var(--soil);
  margin: 0 0 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
  color: var(--ink);
}
.toc li:last-child { border-bottom: none; }
.toc li strong { color: var(--soil); font-weight: 600; }
.toc li em { color: var(--terra); font-style: italic; }

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 2.5rem 2rem 3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.footer a {
  color: var(--olive);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer a:hover { border-bottom-color: var(--olive); }

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .book-layout { grid-template-columns: 1fr; }
  .book-cover { position: static; max-width: 300px; margin: 0 auto 1.5rem; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
  .wrap { padding: 2rem 1.25rem; }
}
