/* =========================================================
   URBAN GURU — Design System
   Warm heritage palette drawn from manuscript & sandalwood tones.
   Display: "Fraunces" (warm, literary, has Devanagari-sympathetic warmth)
   Body: "Work Sans" (clean, bilingual-friendly, high legibility)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,450;0,9..144,600;0,9..144,700;1,9..144,450&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color: manuscript & sandalwood */
  --ink: #2B2118;           /* near-black warm ink */
  --ink-soft: #5B4A3A;      /* softened body text */
  --parchment: #F4ECDC;     /* base background, aged paper */
  --parchment-deep: #EADFC7;/* card / section background */
  --saffron: #C4761F;       /* primary accent — turmeric/saffron */
  --maroon: #7A2E2A;        /* deep maroon — headings, emphasis */
  --brass: #9C7A2E;         /* brass gold — dividers, small accents */
  --forest: #2F4A3C;        /* deep green — secondary accent, links */
  --line: #D9C9A8;          /* hairline rule color */
  --white-warm: #FBF7ED;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', 'Noto Sans', sans-serif;

  --radius: 3px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper texture via layered gradient noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(156,122,46,0.05) 0, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(122,46,42,0.04) 0, transparent 45%);
}

a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--maroon);
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.7em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--maroon);
  color: var(--white-warm);
}
.btn-primary:hover {
  background: #5f2320;
  box-shadow: 0 4px 14px rgba(122,46,42,0.28);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--maroon);
  color: var(--maroon);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  padding: 0.85em 0.4em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-sm { padding: 0.6em 1.2em; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244,236,220,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark .u-guru { font-style: italic; font-weight: 450; }
.wordmark small {
  font-family: var(--font-body);
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { text-decoration: none; color: var(--maroon); }
.main-nav a.active { color: var(--maroon); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--saffron);
  border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 18px; }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
  padding: 6px;
}
.cart-count {
  background: var(--saffron);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.2s;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--white-warm);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-150%);
    transition: transform 0.25s ease;
    z-index: 40;
  }
  .main-nav.open { transform: translateY(0); }
}

/* ============ Footer ============ */
.site-footer {
  background: var(--ink);
  color: #DFD3BC;
  margin-top: 100px;
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--white-warm);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-grid a {
  display: block;
  color: #C9BB9E;
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.footer-grid a:hover { color: var(--white-warm); text-decoration: none; }
.footer-word {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--white-warm);
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.footer-tagline { color: #9C8D72; font-size: 0.9rem; max-width: 300px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.82rem;
  color: #8A7C63;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============ Sections generic ============ */
section { padding: 90px 0; position: relative; z-index: 1; }
.section-tight { padding: 60px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 50px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 0;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(196,118,31,0.12);
  color: var(--saffron);
}

/* ============ Grids ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* ============ Book Card (signature-adjacent component) ============ */
.book-card {
  background: var(--white-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(43,33,24,0.14);
  text-decoration: none;
}
.book-cover {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--maroon), #5a211e);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  overflow: hidden;
}
.book-cover::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  pointer-events: none;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.book-cover-label {
  position: relative;
  z-index: 1;
  color: var(--white-warm);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}
.book-info { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.book-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brass); font-weight: 600; margin-bottom: 6px; }
.book-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.book-desc { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 14px; flex: 1; }
.book-footer { display: flex; align-items: center; justify-content: space-between; }
.book-price { font-family: var(--font-display); font-weight: 600; color: var(--maroon); font-size: 1.15rem; }
.book-price .strike { text-decoration: line-through; color: #A99A80; font-size: 0.85rem; font-weight: 400; margin-right: 6px; }

/* ============ Hero ============ */
.hero {
  padding: 70px 0 60px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 0.3em; }
.hero .hi-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 450;
  color: var(--forest);
}
.hero-sub { font-size: 1.08rem; max-width: 480px; margin-bottom: 2em; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* manuscript motif — open book SVG shape used as signature element */
.manuscript {
  position: relative;
}
.manuscript svg { width: 100%; height: auto; }

/* ============ Cards general (philosophy, steps etc) ============ */
.info-card {
  background: var(--white-warm);
  border: 1px solid var(--line);
  padding: 30px 28px;
  border-radius: var(--radius);
}
.info-card h3 { font-size: 1.1rem; }
.info-card .num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--saffron);
  font-size: 1.6rem;
  display: block;
  margin-bottom: 10px;
}

/* ============ Quote / pull ============ */
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--maroon);
  line-height: 1.4;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

/* ============ Newsletter / CTA band ============ */
.cta-band {
  background: var(--maroon);
  color: var(--white-warm);
  border-radius: 6px;
  padding: 60px 50px;
  text-align: center;
}
.cta-band h2 { color: var(--white-warm); }
.cta-band p { color: #E7CFC7; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ============ Forms ============ */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white-warm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--saffron);
  outline-offset: 1px;
  border-color: var(--saffron);
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 30px;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb .sep { margin: 0 6px; color: var(--brass); }
.breadcrumb .current { color: var(--maroon); font-weight: 600; }

/* ============ Filter pills ============ */
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.pill {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--white-warm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  transition: 0.15s;
}
.pill:hover { border-color: var(--saffron); color: var(--saffron); }
.pill.active { background: var(--maroon); border-color: var(--maroon); color: var(--white-warm); }

/* ============ Utility ============ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small-note { font-size: 0.82rem; color: var(--ink-soft); }

/* Reveal-on-scroll (subtle, respectful of reduced motion) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ Cart drawer ============ */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(43,33,24,0.45);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--parchment);
  z-index: 91;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.2);
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-drawer-head h3 { margin: 0; }
.cart-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--ink); line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-thumb {
  width: 52px; height: 68px;
  background: linear-gradient(135deg, var(--maroon), #5a211e);
  border-radius: 2px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-title { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--ink); margin-bottom: 4px; }
.cart-item-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; }
.qty-control button {
  background: none; border: none; width: 26px; height: 26px;
  cursor: pointer; font-size: 0.95rem; color: var(--ink);
}
.qty-control span { font-size: 0.85rem; min-width: 18px; text-align: center; }
.cart-item-price { font-weight: 600; color: var(--maroon); font-size: 0.9rem; }
.cart-remove { background: none; border: none; color: #A9887E; font-size: 0.78rem; cursor: pointer; text-decoration: underline; padding: 0; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.cart-drawer-foot { padding: 20px 24px 26px; border-top: 1px solid var(--line); }
.cart-subtotal { display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--maroon); margin-bottom: 16px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white-warm);
  padding: 13px 22px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
