/* =========================================================
   Klimkari Publications — main stylesheet
   Minimal, premium, pastel editorial design
   ========================================================= */

:root {
  --ivory: #F7F5EF;
  --heading: #3F3B37;
  --text: #514D48;
  --blue: #4A6B85;
  --blue-dark: #3B5870;
  --sage: #DCE5D8;
  --beige: #EEE7DB;
  --rose: #EADDE1;
  --powder: #DFE8EF;
  --white: #FFFFFF;
  --line: #E2DDD3;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Lato", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --narrow: 720px;
  --radius: 4px;
  --section: clamp(72px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue-dark); }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--heading);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 1.85rem); }
h4 { font-size: 1.35rem; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }
.section { padding: var(--section) 0; }
.center { text-align: center; }
.bg-ivory { background: var(--ivory); }
.bg-sage { background: var(--sage); }
.bg-beige { background: var(--beige); }
.bg-rose { background: var(--rose); }
.bg-powder { background: var(--powder); }

.label {
  display: block;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 18px;
}
.rule {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--blue);
  margin: 26px 0 30px;
  border: 0;
}
.center .rule, .hero-center .rule { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.15rem; }
.muted { opacity: .85; font-size: .95rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 15px 30px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  line-height: 1.2;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-small { padding: 10px 18px; font-size: .74rem; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.center .btn-row { justify-content: center; }

/* ---------- Icons ---------- */
.icon { color: var(--blue); width: 34px; height: 34px; stroke-width: 1.5; }
[data-lucide] { stroke-width: 1.5; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 239, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: 20px;
}
.logo img { height: 66px; width: auto; }
.logo-text { font-family: var(--serif); font-size: 1.6rem; color: var(--heading); }
.main-nav ul { list-style: none; display: flex; gap: 34px; margin: 0; padding: 0; }
.main-nav a {
  color: var(--heading);
  font-size: .9rem;
  letter-spacing: .04em;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--blue); border-bottom-color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.cart-link { position: relative; color: var(--heading); display: inline-flex; }
.cart-link svg { width: 24px; height: 24px; }
.cart-count {
  position: absolute;
  top: -6px; right: -9px;
  background: var(--blue);
  color: #fff;
  font-size: .66rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center; justify-content: center;
  padding: 0 4px;
}
.cart-count.show { display: inline-flex; }
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--heading);
  cursor: pointer;
  padding: 4px;
}
.menu-toggle svg { width: 26px; height: 26px; }

/* ---------- Split hero ---------- */
.hero-split { padding: clamp(56px, 8vw, 110px) 0; }
.hero-split .grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.hero-split p { max-width: 470px; font-size: 1.12rem; }
.hero-photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--beige); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Centred hero (About, Journal, Careers, policies) */
.hero-center { padding: clamp(80px, 11vw, 140px) 0 clamp(60px, 8vw, 100px); text-align: center; }
.hero-center p { max-width: 620px; margin: 0 auto; font-size: 1.15rem; }

/* ---------- Featured book (home) ---------- */
.feature-book .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.feature-book img { width: 100%; max-width: 520px; margin-left: auto; }
.feature-book .text { max-width: 470px; }

/* ---------- Values / icon grids ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 36px;
  margin-top: 60px;
  text-align: center;
}
.values-grid .icon { margin: 0 auto 18px; }
.values-grid h4 { margin-bottom: 8px; }
.values-grid p { font-size: .95rem; line-height: 1.65; }

.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 54px;
}
.soft-card {
  background: rgba(255, 255, 255, .55);
  padding: 34px 28px;
  border-radius: var(--radius);
}
.soft-card .icon { margin-bottom: 16px; }
.soft-card h4 { margin-bottom: 6px; }
.soft-card p { font-size: .95rem; line-height: 1.65; }

.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 56px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 50px; }
.cols-3 h3, .cols-2 h3 { margin-bottom: 10px; }

/* ---------- Journal cards ---------- */
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 54px; }
.journal-card { display: flex; flex-direction: column; color: var(--text); }
.journal-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--beige); margin-bottom: 22px; }
.journal-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.journal-card:hover .thumb img { transform: scale(1.03); }
.journal-card .meta { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 10px; }
.journal-card .meta span { color: var(--text); font-weight: 400; letter-spacing: .08em; }
.journal-card h3 { font-size: 1.55rem; margin-bottom: 10px; }
.journal-card p { font-size: .97rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { margin-top: 14px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--blue); }

.journal-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: center;
  color: var(--text);
  margin-top: 56px;
}
.journal-featured .thumb { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--beige); }
.journal-featured .thumb img { width: 100%; height: 100%; object-fit: cover; }
.journal-featured h2 { font-size: clamp(2rem, 3.4vw, 2.7rem); }
.journal-featured .meta { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 14px; }
.journal-featured .meta span { color: var(--text); font-weight: 400; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.filter-btn {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 9px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 40px;
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Article page ---------- */
.article-hero { aspect-ratio: 21 / 9; max-height: 560px; width: 100%; overflow: hidden; background: var(--beige); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-head { padding-top: 64px; text-align: center; }
.article-head .meta { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.article-head .date { font-size: .9rem; margin-top: 10px; }
.article-body { max-width: 680px; margin: 0 auto; padding-bottom: 40px; font-size: 1.08rem; line-height: 1.85; }
.article-body h2 { font-size: 2rem; margin-top: 1.6em; }
.end-box {
  max-width: 680px;
  margin: 40px auto 0;
  background: var(--sage);
  padding: 30px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  align-items: center;
  border-radius: var(--radius);
}
.end-box img { width: 110px; box-shadow: 0 6px 20px rgba(63,59,55,.12); }
.end-box h4 { margin-bottom: 4px; }
.share { max-width: 680px; margin: 34px auto 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; }

/* ---------- Dusty rose CTA ---------- */
.cta p { max-width: 560px; margin-left: auto; margin-right: auto; font-size: 1.1rem; }

/* ---------- Newsletter ---------- */
.subscribe-form { display: flex; gap: 10px; max-width: 520px; margin: 36px auto 0; }
.subscribe-form input { flex: 1; }
.form-success {
  display: none;
  margin-top: 22px;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 1.35rem;
}
.form-success.show { display: block; }

/* ---------- Forms ---------- */
input, select, textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--heading);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  width: 100%;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { min-height: 170px; resize: vertical; }
.form-card {
  background: var(--white);
  max-width: 720px;
  margin: 50px auto 0;
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--radius);
  text-align: left;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .85rem; font-weight: 700; color: var(--heading); margin-bottom: 7px; letter-spacing: .02em; }
.field .hint { font-size: .8rem; opacity: .8; margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: auto; margin-top: 6px; }
.form-card .btn { margin-top: 26px; }
.form-card .form-success { text-align: center; }

/* ---------- Book page ---------- */
.book-top { padding: 56px 0 var(--section); }
.book-top .grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.gallery-main {
  background: var(--white);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  padding: 28px;
}
.gallery-main img { max-height: 100%; width: auto; object-fit: contain; box-shadow: 0 10px 30px rgba(63,59,55,.12); }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; }
.thumbs button {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 4px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
}
.thumbs button.active { border-color: var(--blue); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy-box h1 { font-size: clamp(2.3rem, 4vw, 3.3rem); }
.tagline { font-family: var(--serif); font-size: 1.45rem; color: var(--heading); font-style: italic; }
.price { font-family: var(--serif); font-size: 2.5rem; color: var(--heading); margin: 22px 0 0; line-height: 1; }
.price small { font-family: var(--sans); font-size: .85rem; color: var(--text); margin-left: 8px; }
.specs { font-size: .93rem; margin-top: 12px; }
.availability { font-size: .93rem; margin-top: 4px; }
.availability strong { color: var(--blue); }
.preorder-note { font-size: .93rem; color: var(--blue); margin-top: 6px; display: none; }
.preorder-note.show { display: block; }
.qty-row { display: flex; align-items: center; gap: 16px; margin-top: 26px; font-size: .9rem; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.qty button { background: none; border: 0; width: 42px; height: 44px; font-size: 1.2rem; color: var(--heading); cursor: pointer; }
.qty input { width: 52px; border: 0; text-align: center; padding: 0; }
.buy-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.buy-buttons .btn-wa { grid-column: 1 / -1; }
.btn-wa { background: transparent; color: var(--blue); }
.btn-wa:hover { background: var(--blue); color: #fff; }
.buy-note { font-size: .88rem; margin-top: 20px; line-height: 1.65; }

.explorers-img { margin-top: 50px; border-radius: var(--radius); overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.tag {
  background: var(--beige);
  color: var(--heading);
  padding: 10px 20px;
  border-radius: 40px;
  font-size: .95rem;
}

.peek-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 50px 28px 16px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.peek-row button {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  border: 0;
  padding: 0;
  background: var(--white);
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(63,59,55,.08);
}
.peek-row img { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; }

.details-table { width: 100%; max-width: 720px; margin: 44px auto 0; border-collapse: collapse; }
.details-table th, .details-table td { padding: 15px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 1rem; vertical-align: top; }
.details-table th { width: 38%; color: var(--heading); font-weight: 700; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.split .photo { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--beige); }
.split .photo img { width: 100%; height: 100%; object-fit: cover; }
.split.reverse .photo { order: 2; }

.bulk {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: var(--beige) center / cover no-repeat;
}
.bulk::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(247,245,239,.95) 0%, rgba(247,245,239,.82) 45%, rgba(247,245,239,.1) 80%); }
.bulk .wrap { position: relative; width: 100%; }
.bulk .text { max-width: 500px; }

.policy-links { margin-top: 20px; font-size: .95rem; }

/* FAQ accordions */
.faq-list { max-width: 780px; margin: 44px auto 0; }
.faq-group-title { font-family: var(--serif); font-size: 1.7rem; color: var(--heading); margin: 54px 0 8px; }
.faq-group-title:first-child { margin-top: 0; }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  font-size: 1.05rem;
  color: var(--heading);
  font-weight: 700;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--blue);
}
details[open] summary::after { content: "–"; }
details .answer { padding: 0 0 24px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 46px; margin-top: 56px; }
.step-num { font-family: var(--serif); font-size: 4.5rem; color: var(--blue); opacity: .35; line-height: 1; margin-bottom: 12px; }

/* Contact cards */
.contact-card { background: var(--white); padding: 38px 30px; border-radius: var(--radius); text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-card .icon { margin-bottom: 16px; }
.contact-card p { font-size: .97rem; flex: 1; }
.contact-card .btn { margin-top: 22px; }

/* Vision cards */
.vision-card { padding: 50px 42px; border-radius: var(--radius); }

/* Policy / legal pages */
.policy-body { max-width: 720px; margin: 0 auto; }
.policy-body h2 { font-size: 1.7rem; margin-top: 1.6em; }
.updated { font-size: .9rem; margin-top: -6px; }
.grievance { max-width: 720px; margin: 60px auto 0; padding: 36px; background: var(--beige); border-radius: var(--radius); }

/* Cart / checkout */
.cart-table { width: 100%; border-collapse: collapse; margin-top: 40px; }
.cart-table th, .cart-table td { padding: 18px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.cart-table th { font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--heading); }
.cart-item { display: flex; gap: 18px; align-items: center; }
.cart-item img { width: 64px; }
.summary { background: var(--white); padding: 34px; border-radius: var(--radius); }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; font-weight: 700; color: var(--heading); font-size: 1.1rem; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; margin-top: 40px; }
.remove-btn { background: none; border: 0; color: var(--blue); cursor: pointer; font-size: .85rem; text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 80px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 50px; }
.footer-logo img { height: 150px; width: auto; margin-bottom: 18px; }
.footer-title { font-family: var(--sans); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--heading); margin-bottom: 20px; }
.footer-nav { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 30px; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a, .footer-contact a { color: var(--text); }
.footer-nav a:hover, .footer-contact a:hover { color: var(--blue); }
.footer-contact p { margin-bottom: 10px; }
.social { display: flex; gap: 14px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--blue); }
.social a:hover { border-color: var(--blue); }
.social svg { width: 18px; height: 18px; }
.footer-subscribe { display: flex; gap: 8px; margin-top: 22px; max-width: 340px; }
.footer-subscribe input { padding: 10px 12px; font-size: .9rem; }
.footer-subscribe .btn { padding: 10px 14px; }
.footer-bottom { margin-top: 64px; border-top: 1px solid var(--line); padding: 26px 0 30px; font-size: .84rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-bottom a { color: var(--text); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(63,59,55,.22);
  z-index: 90;
}
.wa-float:hover { background: var(--blue-dark); color: #fff; }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Mobile sticky buy bar ---------- */
.sticky-buy {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(247,245,239,.98);
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  z-index: 95;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.sticky-buy .p { font-family: var(--serif); font-size: 1.5rem; color: var(--heading); line-height: 1.1; }
.sticky-buy .p small { display: block; font-family: var(--sans); font-size: .72rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(40, 37, 34, .92);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 40px 70px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 100%; object-fit: contain; background: #fff; }
.lb-btn { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; padding: 10px; }
.lb-btn svg { width: 34px; height: 34px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* Missing-image placeholder look (while images are being added) */
img:not([src]), img[src=""] { visibility: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav ul { gap: 22px; }
  .values-grid { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .header-buy { display: none; }
  .main-nav {
    position: fixed;
    top: 80px; left: 0; right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 10px 28px 26px;
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .header-inner { position: relative; height: 80px; }
  .logo img { height: 52px; }
  .logo { order: 0; }

  .hero-split .grid, .feature-book .grid, .split, .book-top .grid,
  .journal-featured, .checkout-grid { grid-template-columns: 1fr; }
  .hero-split .hero-photo { order: -1; aspect-ratio: 4 / 3; }
  .split .photo, .split.reverse .photo { order: -1; }
  .feature-book img { margin: 0 auto; }
  .journal-grid, .cols-3, .steps { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .sticky-buy.ready { display: flex; }
  .book-page .wa-float { bottom: 88px; }
  .book-page .site-footer { padding-bottom: 76px; }
  .bulk::before { background: rgba(247,245,239,.86); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .values-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .cards-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .soft-card { padding: 22px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .subscribe-form { flex-direction: column; }
  .buy-buttons { grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .end-box { grid-template-columns: 1fr; text-align: center; }
  .end-box img { margin: 0 auto; }
  .lightbox { padding: 60px 10px; }
  .btn-row .btn { width: 100%; }
  .cart-table th:nth-child(2), .cart-table td:nth-child(2) { display: none; }
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300;
  background: linear-gradient(90deg, var(--blue), #9DB9CE, #D7B4BE);
  transform-origin: 0 50%; transform: scaleX(0);
}

/* Reveal on scroll */
.js-anim .reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
.js-anim .reveal.from-left { transform: translateX(-60px); }
.js-anim .reveal.from-right { transform: translateX(60px); }
.js-anim .reveal.zoom { transform: scale(.9); }
.js-anim .reveal.in { opacity: 1; transform: none; }
.js-anim .rule.reveal { opacity: 1; transform: scaleX(0); transform-origin: left center; }
.js-anim .center .rule.reveal, .js-anim .rule.reveal[style*="auto"] { transform-origin: center; }
.js-anim .rule.reveal.in { transform: scaleX(1); }

/* Hero entrance */
@keyframes riseIn { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes curtain { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.js-anim .hero-split .grid > div:first-child > *,
.js-anim .hero-center .wrap > *,
.js-anim .buy-box > * { opacity: 0; animation: riseIn 1s cubic-bezier(.2,.7,.2,1) forwards; }
.js-anim .hero-split .grid > div:first-child > :nth-child(1), .js-anim .hero-center .wrap > :nth-child(1), .js-anim .buy-box > :nth-child(1) { animation-delay: .1s; }
.js-anim .hero-split .grid > div:first-child > :nth-child(2), .js-anim .hero-center .wrap > :nth-child(2), .js-anim .buy-box > :nth-child(2) { animation-delay: .25s; }
.js-anim .hero-split .grid > div:first-child > :nth-child(3), .js-anim .hero-center .wrap > :nth-child(3), .js-anim .buy-box > :nth-child(3) { animation-delay: .4s; }
.js-anim .hero-split .grid > div:first-child > :nth-child(4), .js-anim .hero-center .wrap > :nth-child(4), .js-anim .buy-box > :nth-child(4) { animation-delay: .55s; }
.js-anim .hero-split .grid > div:first-child > :nth-child(5), .js-anim .hero-center .wrap > :nth-child(5), .js-anim .buy-box > :nth-child(5) { animation-delay: .7s; }
.js-anim .hero-center .wrap > :nth-child(n+6), .js-anim .buy-box > :nth-child(n+6) { animation-delay: .85s; }
.js-anim .hero-photo { animation: curtain 1.5s .3s cubic-bezier(.7,0,.2,1) both; }
.js-anim .gallery-main, .js-anim .thumbs { animation: fadeIn 1.2s .2s both; }

/* Twinkling stars in the heroes */
.hero-split, .hero-center { position: relative; overflow: hidden; }
.hero-split .grid, .hero-center .wrap { position: relative; z-index: 1; }
.stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.stars span {
  position: absolute; line-height: 1; color: var(--blue); opacity: 0;
  animation: twinkle var(--t, 4s) var(--d, 0s) ease-in-out infinite, drift 14s ease-in-out infinite alternate;
}
.stars span.rose { color: #C9A0AC; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 50% { opacity: .55; transform: scale(1) rotate(45deg); } }
@keyframes drift { from { translate: 0 0; } to { translate: 12px -18px; } }

/* Hover: buttons */
.btn { transition: background .2s, color .2s, border-color .2s, transform .25s, box-shadow .25s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(74,107,133,.25); }
.btn:active { transform: translateY(0); }

/* Hover: sliding menu underline */
.main-nav a { position: relative; border-bottom: 0; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--blue);
  transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); transform-origin: left; }

/* Hover: photo zoom + parallax (uses separate scale/translate so they don't fight) */
.hero-photo img, .split .photo img, .journal-featured .thumb img, .journal-card .thumb img {
  transition: scale 1.4s cubic-bezier(.2,.7,.2,1); transform: none;
}
.hero-photo:hover img, .split .photo:hover img, .journal-featured:hover .thumb img, .journal-card:hover .thumb img { scale: 1.06; }
.journal-card:hover .thumb img { transform: none; }
.hero-photo img { translate: 0 var(--py, 0px); }

/* Floating 3D book */
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-18px) rotate(1.5deg); } }
.feature-book img { animation: floaty 6s ease-in-out infinite; filter: drop-shadow(0 30px 30px rgba(63,59,55,.12)); }

/* Cards: lift + icon wiggle */
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg) scale(1.1); } 40% { transform: rotate(12deg) scale(1.1); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
.soft-card, .contact-card, .vision-card { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s, background .4s; }
.soft-card:hover, .contact-card:hover, .vision-card:hover { transform: translateY(-8px); box-shadow: 0 18px 36px rgba(63,59,55,.09); }
.soft-card:hover { background: #fff; }
.soft-card:hover .icon, .contact-card:hover .icon, .values-grid > div:hover .icon { animation: wiggle .7s ease-in-out; }
.values-grid > div { transition: transform .4s; }
.values-grid > div:hover { transform: translateY(-6px); }
.step-num { transition: opacity .4s, transform .4s; }
.steps > div:hover .step-num { opacity: .9; transform: scale(1.12); }

/* Book cover 3D tilt */
.gallery-main { perspective: 1000px; }
.gallery-main img { transition: transform .5s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }

/* Peek-inside pages lift */
.peek-row button { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.peek-row button:hover { transform: translateY(-10px) rotate(-1.5deg); box-shadow: 0 18px 34px rgba(63,59,55,.16); }
.thumbs button { transition: transform .3s, border-color .3s; }
.thumbs button:hover { transform: translateY(-3px); }

/* Nine great Indians: gliding marquee */
.tags.marquee {
  display: block; overflow: hidden; max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 36s linear infinite; }
.tags.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .tag { white-space: nowrap; transition: background .3s, color .3s; }
.marquee-track .tag:hover { background: var(--blue); color: #fff; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Count-up stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 60px; text-align: center; }
.stat .num { display: block; font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; color: var(--blue); }
.stat .lbl { display: block; margin-top: 10px; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--heading); }

/* Chiku peeking */
.chiku-wrap { position: fixed; right: 92px; bottom: 0; z-index: 89; width: 92px; height: 130px; pointer-events: none; }
.chiku {
  position: absolute; left: 0; bottom: 0; width: 92px; cursor: pointer; pointer-events: auto;
  transform: translateY(115%); transition: transform .7s cubic-bezier(.3,1.6,.5,1);
}
.chiku-wrap.peek .chiku { transform: translateY(14%) rotate(-6deg); }
.chiku-wrap.peek .chiku:hover { transform: translateY(4%) rotate(4deg); }
.chiku-bubble {
  position: absolute; right: 70px; bottom: 112px; width: max-content; max-width: 220px;
  background: #fff; color: var(--heading); font-size: .86rem; line-height: 1.4;
  padding: 10px 14px; border-radius: 14px; box-shadow: 0 10px 26px rgba(63,59,55,.14);
  opacity: 0; transform: translateY(10px) scale(.9); transform-origin: bottom right;
  transition: opacity .35s, transform .35s; pointer-events: none;
}
.chiku-bubble::after { content: ""; position: absolute; right: 14px; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.chiku-wrap.talk .chiku-bubble { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .main-nav a::after { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 34px 16px; }
  .chiku-wrap { right: 84px; width: 70px; }
  .chiku { width: 70px; }
  .book-page .chiku-wrap { display: none; }
}

/* Respect "reduce motion" settings */
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal, .js-anim .rule.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation: none !important; }
  .js-anim .hero-split .grid > div:first-child > *, .js-anim .hero-center .wrap > *, .js-anim .buy-box > * { opacity: 1 !important; }
  .stars, .chiku-wrap, .scroll-progress { display: none !important; }
}

/* mobile polish */
.hero-photo img { object-position: center 30%; }
@media (max-width: 600px) {
  .chiku-bubble { max-width: 160px; font-size: .78rem; padding: 8px 11px; right: 52px; bottom: 92px; }
}
