/* ============================================================
   WALDEN PUBLICATION — brand: deer green, mustard gold,
   ink brown on paper. Devanagari-first.
   ============================================================ */
:root {
  --ink: #40291b;          /* logo lettering brown */
  --ink-soft: #6b543f;
  --green: #4b9b6e;        /* deer green */
  --green-deep: #2f7a52;
  --gold: #d9a52a;         /* deer gold accent */
  --paper: #f7f3ea;
  --paper-deep: #efe8d8;
  --card: #fffdf8;
  --line: #e0d5bf;
  --wa: #1fa855;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(64, 41, 27, 0.10);
  --font-display: "Tiro Devanagari Marathi", "Mukta", serif;
  --font-body: "Mukta", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--green-deep); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 234, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--gold);
}
/* cover band under header (Option D) */
.cover-band { position: relative; height: 170px; display: flex; overflow: hidden; }
.cover-band img { flex: 1; width: 20%; object-fit: cover; filter: saturate(0.92); }
.cover-band::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(64,41,27,0.22), rgba(47,122,82,0.14)); }
.cover-band .band-text { position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; padding-left: 26px; color: #fff;
  font-family: var(--font-display); font-size: 1.4rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.cover-band.slim { height: 170px; }
@media (max-width: 480px) {
  .cover-band, .cover-band.slim { height: 96px; }
  .cover-band .band-text { font-size: 1.05rem; padding-left: 14px; }
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 7px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem; color: var(--ink); line-height: 1.1;
}
.brand-sub { font-size: 0.7rem; letter-spacing: 0.35em; color: var(--ink-soft); }
nav.mainnav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
nav.mainnav a { color: var(--ink); font-weight: 500; font-size: 1rem; padding: 4px 2px; border-bottom: 2px solid transparent; }
nav.mainnav a:hover, nav.mainnav a[aria-current="page"] { border-bottom-color: var(--gold); }
.lang-btn {
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  padding: 5px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.lang-btn:hover { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 34px 20px 42px;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }

/* hero shelf */
.shelf { position: relative; display: flex; justify-content: center; }
.shelf-stack { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; transform: rotate(-1.5deg); max-width: 1060px; }
.shelf-stack img {
  border-radius: 6px; box-shadow: 0 8px 22px rgba(64,41,27,0.22);
  aspect-ratio: 2 / 3; object-fit: cover; background: var(--paper-deep);
  transition: transform 0.2s ease;
}
.shelf-stack img { animation: shelfFloat 7s ease-in-out infinite; }
.shelf-stack img:nth-child(2n) { animation-duration: 8.5s; animation-delay: -2.8s; }
.shelf-stack img:nth-child(3n) { animation-duration: 9.5s; animation-delay: -4.6s; }
.shelf-stack img:hover {
  animation-play-state: paused;
  box-shadow: 0 14px 30px rgba(64,41,27,0.3);
}
@keyframes shelfFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-stack img { animation: none; }
}

/* ---------- sections ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 36px 20px; }
.section-alt { background: var(--paper-deep); }
.section-alt-inner { max-width: 1120px; margin: 0 auto; padding: 36px 20px; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--green-deep);
  border-bottom: 2px solid var(--gold); padding-bottom: 3px; margin-bottom: 8px;
}
h2.section-title { font-family: var(--font-display); font-size: 1.9rem; margin-bottom: 6px; line-height: 1.35; }
.section-sub { color: var(--ink-soft); max-width: 40em; }

/* language strip */
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lang-chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px; font-size: 0.95rem; color: var(--ink);
}
.lang-chip strong { color: var(--green-deep); }

/* ---------- book grid ---------- */
.book-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px; margin-top: 20px;
}
.book-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-cover { aspect-ratio: 2 / 3; overflow: hidden; position: relative; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; padding: 18px;
}
.cover-ph .ph-title { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; }
.cover-ph .ph-author { margin-top: 10px; font-size: 0.85rem; opacity: 0.85; }
.ph-a { background: linear-gradient(160deg, #3f7d5c, #2f5a44); color: #f3eedd; }
.ph-b { background: linear-gradient(160deg, #57402c, #3c2a1c); color: #eadfc8; }
.ph-c { background: linear-gradient(160deg, #c99a2e, #a97e1f); color: #3c2a1c; }
.badge-upcoming {
  position: absolute; top: 10px; left: 10px;
  background: var(--gold); color: var(--ink); font-size: 0.75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.book-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.book-title { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.4; }
.book-author { font-size: 0.92rem; color: var(--ink-soft); }
.book-meta { font-size: 0.82rem; color: var(--green-deep); font-weight: 600; }
.book-desc { font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); flex: 1; margin-top: 4px; }
.book-desc.clamped p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.readmore {
  align-self: flex-start; background: none; border: none; padding: 2px 0;
  color: var(--green-deep); font-family: var(--font-body); font-weight: 600;
  font-size: 0.85rem; cursor: pointer;
}
.readmore .rm-less { display: none; }
.readmore.open .rm-more { display: none; }
.readmore.open .rm-less { display: inline; }
/* cover flip */
.book-cover { perspective: 1200px; }
.flip-inner { position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform 0.55s ease; }
.book-cover.flipped .flip-inner { transform: rotateY(180deg); }
.flip-inner .face { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-inner .face.back { transform: rotateY(180deg); }
.flip-btn {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(64,41,27,0.78); color: #fff; font-size: 1.05rem; line-height: 1;
}
.flip-btn:hover { background: var(--green-deep); }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }
.book-price { font-weight: 700; font-size: 0.98rem; margin-top: 4px; }
.btn-order {
  margin-top: 8px; display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  background: var(--wa); color: #fff; border-radius: 8px; padding: 9px 12px;
  font-weight: 600; font-size: 0.92rem;
}
.btn-order:hover { background: #178a45; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filter-btn {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 7px 18px; font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 500; cursor: pointer;
}
.filter-btn:hover { border-color: var(--green); }
.filter-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- awards ---------- */
.awards-list { list-style: none; margin-top: 20px; display: grid; gap: 12px; max-width: 46em; }
.award-item {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: var(--radius);
  padding: 14px 18px;
}
.award-book { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.4; color: var(--ink); }
.award-detail { font-size: 0.95rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.about-grid .logo-big { max-width: 240px; margin: 0 auto; }
.founder { margin-top: 18px; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
footer { background: var(--ink); color: #efe6d6; margin-top: 40px; }
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 32px 20px 22px;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 26px;
}
footer h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 12px; color: #fff; }
footer a { color: var(--gold); }
footer .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 16px; font-size: 0.82rem; opacity: 0.75; }
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  background: var(--wa); color: #fff; border-radius: 999px;
  padding: 13px 20px; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.wa-float:hover { background: #178a45; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { padding-top: 26px; }
  .shelf-stack { grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 440px; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  nav.mainnav { gap: 14px; }
  nav.mainnav a.hide-m { display: none; }
}

/* small phones */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .topbar-inner { padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
  .brand img { height: 38px; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub { letter-spacing: 0.22em; }
  nav.mainnav { gap: 12px; }
  nav.mainnav a { font-size: 0.92rem; }
  .lang-btn { padding: 4px 10px; font-size: 0.8rem; }
  .hero { padding: 26px 16px 30px; gap: 30px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .shelf-stack { grid-template-columns: repeat(3, 1fr); gap: 8px; transform: none; }
  .section, .section-alt-inner { padding: 40px 16px; }
  h2.section-title { font-size: 1.6rem; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .book-body { padding: 12px 11px 14px; }
  .book-title { font-size: 1rem; }
  .book-desc.clamped p { -webkit-line-clamp: 3; }
  .btn-order { font-size: 0.82rem; padding: 8px 8px; }
  .filter-btn { padding: 6px 13px; font-size: 0.85rem; }
  .wa-float { padding: 11px 16px; font-size: 0.9rem; right: 14px; bottom: 14px; }
}

/* tap target comfort on any touch device */
@media (hover: none) {
  .btn, .btn-order, .filter-btn, .lang-btn { min-height: 44px; }
}
