:root {
  /* Satluj river dusk + Punjab wheat + remembrance */
  --bg-deep: #120f1a;
  --bg: #1a1528;
  --bg-soft: #231d35;
  --river: #1a8a96;
  --river-light: #2eb8c4;
  --wheat: #d4a44a;
  --wheat-soft: #e8c878;
  --saffron: #c9782e;
  --dusk: #3d2a5c;
  --text: #f5f0e8;
  --muted: #b8ad9e;
  --card: rgba(255, 248, 235, 0.04);
  --border: rgba(212, 164, 74, 0.18);
  --accent: var(--river-light);
  --accent-warm: var(--wheat);
  --max: 720px;
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(46, 184, 196, 0.14), transparent),
    radial-gradient(ellipse 70% 40% at 100% 20%, rgba(201, 120, 46, 0.1), transparent),
    radial-gradient(ellipse 60% 35% at 0% 80%, rgba(61, 42, 92, 0.35), transparent),
    linear-gradient(180deg, #1e1830 0%, var(--bg-deep) 45%, #0d0a12 100%);
  line-height: 1.65;
}

a {
  color: var(--river-light);
  text-decoration: none;
}

a:hover {
  color: var(--wheat-soft);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(18, 15, 26, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 1px rgba(46, 184, 196, 0.25);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(46, 184, 196, 0.12);
  text-decoration: none;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem 3.5rem;
}

.hero {
  text-align: center;
  padding: 1.5rem 0 0;
}

.hero-logo {
  width: clamp(140px, 42vw, 190px);
  height: clamp(148px, 44vw, 200px);
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 164, 74, 0.35);
  box-shadow:
    0 0 0 4px rgba(26, 138, 150, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wheat);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 7vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, var(--wheat-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1rem;
}

/* Home live stats — matches app metric pills */
.home-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
  margin-bottom: 0;
  width: 100%;
}

.app-download-section {
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 2.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.app-download-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0;
  width: 100%;
}

.app-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  font-size: clamp(0.82rem, 3.6vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.app-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.app-download-btn.ios {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
}

.app-download-btn.android {
  color: #fff;
  background: linear-gradient(135deg, rgba(31, 169, 113, 0.28), rgba(31, 169, 113, 0.12));
  border-color: rgba(31, 169, 113, 0.35);
}

@media (max-width: 520px) {
  .app-download-section {
    margin-top: 1.75rem;
    margin-bottom: 2rem;
    padding: 1.35rem 0;
  }

  .app-download-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.05);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.stat-value {
  font-size: clamp(1.05rem, 4.5vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-value.muted {
  color: var(--muted);
  font-weight: 600;
  font-size: clamp(0.95rem, 4vw, 1.1rem);
}

.stat-value.growth-up {
  color: #1fa971;
}

.stat-value.countdown {
  letter-spacing: 0.02em;
}

.stat-label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  max-width: 42%;
  line-height: 1.35;
}

.metric-value {
  font-weight: 700;
}

.metric-unit {
  margin-left: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.metric-shimmer {
  display: inline-block;
  width: 6.5rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.08);
  position: relative;
  overflow: hidden;
  vertical-align: middle;
}

.metric-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 248, 235, 0.06) 35%,
    rgba(255, 248, 235, 0.22) 50%,
    rgba(255, 248, 235, 0.06) 65%,
    transparent 100%
  );
  animation: metric-shimmer 1.15s ease-in-out infinite;
}

.metric-shimmer.wide {
  width: 8.5rem;
}

.metric-shimmer.countdown {
  width: 7.5rem;
}

@keyframes metric-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-shimmer::after {
    animation: none;
    transform: none;
    background: rgba(255, 248, 235, 0.12);
  }
}

.story {
  margin-top: 0.25rem;
}

.story-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
  margin-bottom: 1rem;
}

.story-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--wheat-soft);
  font-weight: 700;
}

.story-block p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
}

.story-block p:last-child {
  margin-bottom: 0;
}

.story-quote {
  border-left: 3px solid var(--river);
  padding-left: 1rem;
  margin: 1rem 0 0;
  font-style: italic;
  color: var(--text);
}

.tribute {
  font-size: 0.92rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.disclaimer {
  font-size: 0.82rem;
  color: rgba(184, 173, 158, 0.85);
  margin-top: 1.25rem;
  line-height: 1.55;
}

/* Social links — same Firestore source as app Socials screen */
.site-socials {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.socials-heading {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wheat);
}

.socials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.socials-empty {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.social-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
  min-height: 56px;
}

.social-card:hover {
  text-decoration: none;
  border-color: var(--social-tint, var(--river-light));
  transform: translateY(-1px);
}

.social-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 1rem;
  color: var(--wheat-soft);
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.social-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.social-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.social-handle {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 480px) {
  .socials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 2rem;
}

@media (min-width: 520px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
}

.card h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: var(--wheat-soft);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 44px;
  line-height: 44px;
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  color: var(--wheat-soft);
}

.page-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.prose {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
}

.prose h2 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.05rem;
  color: var(--river-light);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 1.15rem 0 0.45rem;
  font-size: 0.98rem;
  color: var(--wheat-soft);
}

.legal-summary {
  margin: 0 0 1.25rem;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  background: rgba(46, 184, 196, 0.08);
  border: 1px solid rgba(46, 184, 196, 0.22);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
}

.legal-summary strong {
  color: var(--wheat-soft);
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 0.95rem;
}

.prose ul {
  padding-left: 1.15rem;
}

.books-intro {
  margin-bottom: 1.25rem;
}

.books-intro .disclaimer {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.books-page .page-title {
  margin-bottom: 0.25rem;
}

.about-page .page-title {
  margin-bottom: 0.25rem;
}

.about-hero,
.books-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.about-hero-eyebrow,
.books-hero-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--river-light);
}

.about-prose {
  font-family: var(--font-serif);
}

.about-lead {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--text) !important;
  line-height: 1.75;
}

.about-prose .source-ref {
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--river-light);
  white-space: nowrap;
}

.about-prose .source-ref:hover {
  color: var(--wheat-soft);
}

.about-next {
  margin-top: 1.5rem;
  margin-bottom: 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
  font-family: var(--font);
  font-size: 0.92rem;
}

.about-next a {
  font-weight: 600;
}

.books-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.book-card {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 1.25rem;
  align-items: start;
  background:
    linear-gradient(145deg, rgba(255, 248, 235, 0.06), rgba(255, 248, 235, 0.02));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.book-cover-wrap {
  margin: 0;
  position: relative;
}

.book-cover-wrap::after {
  content: "";
  position: absolute;
  inset: 8% -6% -8% 6%;
  background: linear-gradient(135deg, rgba(46, 184, 196, 0.18), rgba(201, 120, 46, 0.12));
  border-radius: 12px;
  filter: blur(18px);
  z-index: 0;
  opacity: 0.75;
}

.book-cover {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.06);
  transform: perspective(800px) rotateY(-4deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover .book-cover {
  transform: perspective(800px) rotateY(0deg) translateY(-3px);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(255, 255, 255, 0.08);
}

.book-card-body {
  min-width: 0;
}

.book-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--river-light);
}

.book-card h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  color: var(--wheat-soft);
  line-height: 1.3;
}

.book-author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.book-author-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(46, 184, 196, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.book-author-initial {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--wheat-soft);
  background: linear-gradient(135deg, rgba(201, 120, 46, 0.35), rgba(61, 42, 92, 0.5));
  border: 2px solid rgba(212, 164, 74, 0.35);
  flex-shrink: 0;
}

.book-author {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
}

.book-author-role {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.book-desc {
  margin: 0 0 0.85rem;
  color: var(--text);
  line-height: 1.65;
  font-size: 0.95rem;
}

.book-highlights {
  margin: 0 0 1.1rem;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.book-highlights li {
  margin-bottom: 0.35rem;
}

.book-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.book-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--river-light), var(--river));
  border: 1px solid rgba(46, 184, 196, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.book-buy-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.book-buy-btn.secondary {
  background: rgba(255, 248, 235, 0.06);
  border-color: var(--border);
  color: var(--text);
}

.book-buy-btn.secondary:hover {
  color: var(--wheat-soft);
  background: rgba(255, 248, 235, 0.1);
}

@media (max-width: 640px) {
  .book-card {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .book-cover-wrap {
    max-width: 220px;
    margin: 0 auto;
  }

  .book-cover {
    transform: none;
  }

  .book-card:hover .book-cover {
    transform: translateY(-2px);
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0.75rem 0.85rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    padding: 0.5rem 0.85rem 0.85rem;
    background: rgba(18, 15, 26, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    border-radius: 10px;
  }

  main {
    padding: 1rem 0.85rem 3rem;
  }

  .story-block {
    padding: 1.1rem 1rem;
  }
}
