/* =====================================================
   BHARATHA VAHINI — Professional Sacred Design System
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=Noto+Serif+Devanagari:wght@400;500;600;700&display=swap');

:root {
  --saffron: #C2410C;
  --saffron-light: #EA580C;
  --gold: #D97706;
  --gold-light: #FBBF24;
  --cream: #FFFBEB;
  --cream-dark: #FEF3C7;
  --white: #FFFFFF;
  --ink: #1C1917;
  --ink-soft: #44403C;
  --ink-muted: #78716C;
  --border: #E7E5E4;
  --shadow: 0 4px 24px -4px rgba(28,25,23,0.08);
  --shadow-lg: 0 12px 40px -8px rgba(28,25,23,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 72px;
  --viewer-h: 40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Typography */
h1,h2,h3,h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.sanskrit {
  font-family: 'Noto Serif Devanagari', 'Cormorant Garamond', serif;
}

/* ===== TOP BAR ===== */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--viewer-h);
  background: linear-gradient(90deg, #7C2D12, #9A3412, #C2410C);
  color: #FEF3C7;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.02em;
}
.top-bar strong {
  color: #FDE68A;
  font-weight: 700;
  margin: 0 0.25rem;
}

/* ===== HEADER ===== */
.header {
  position: fixed; top: var(--viewer-h); left: 0; right: 0; z-index: 999;
  height: var(--header-h);
  background: rgba(255,251,235,0.92);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.logo {
  display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
}
.logo-mark {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.4rem;
  box-shadow: 0 2px 8px rgba(194,65,12,0.25);
}
.logo-text h1 {
  font-size: 1.25rem; font-weight: 700; color: var(--saffron);
  letter-spacing: -0.01em;
}
.logo-text span {
  display: block; font-size: 0.7rem; color: var(--gold);
  font-family: 'Noto Serif Devanagari', serif; margin-top: -2px;
}

.nav {
  display: flex; align-items: center; gap: 0.15rem;
}
.nav a {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem; font-weight: 500; color: var(--ink-soft);
  border-radius: 8px; transition: all 0.2s;
}
.nav a:hover { color: var(--saffron); background: rgba(194,65,12,0.06); }
.nav a.active { color: var(--saffron); background: rgba(194,65,12,0.1); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.user-chip {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 500; color: var(--saffron);
  padding: 0.35rem 0.75rem; background: rgba(194,65,12,0.08); border-radius: 100px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.25rem; font-size: 0.875rem; font-weight: 600;
  border-radius: 10px; transition: all 0.2s; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--saffron), #9A3412);
  color: white; box-shadow: 0 2px 10px rgba(194,65,12,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(194,65,12,0.4); }
.btn-secondary {
  background: white; color: var(--saffron); border: 1.5px solid rgba(194,65,12,0.25);
}
.btn-secondary:hover { background: rgba(194,65,12,0.05); border-color: var(--saffron); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { color: var(--saffron); }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 0.95rem; border-radius: 12px; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8125rem; }

.menu-btn {
  display: none; width: 40px; height: 40px;
  align-items: center; justify-content: center; border-radius: 8px;
}
.menu-btn:hover { background: rgba(194,65,12,0.08); }
.menu-btn svg { width: 22px; height: 22px; stroke: var(--ink); }

/* ===== MAIN OFFSET ===== */
.page-wrap { padding-top: calc(var(--header-h) + var(--viewer-h)); min-height: 100vh; display: flex; flex-direction: column; }
.page-content { flex: 1; }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 5rem 1.5rem 6rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(251,191,36,0.18), transparent),
    radial-gradient(ellipse 50% 40% at 90% 60%, rgba(194,65,12,0.06), transparent),
    var(--cream);
}
.hero-inner {
  max-width: 820px; margin: 0 auto; text-align: center; position: relative; z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.9rem; background: white; border: 1px solid var(--border);
  border-radius: 100px; font-size: 0.8rem; font-weight: 500; color: var(--saffron);
  margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem); font-weight: 700;
  color: var(--ink); letter-spacing: -0.02em; margin-bottom: 0.75rem;
}
.hero h1 em { font-style: italic; color: var(--saffron); }
.hero-sanskrit {
  font-family: 'Noto Serif Devanagari', serif;
  font-size: 1.35rem; color: var(--gold); margin-bottom: 1.25rem;
}
.hero-desc {
  font-size: 1.1rem; color: var(--ink-soft); max-width: 560px;
  margin: 0 auto 2rem; line-height: 1.75;
}
.hero-actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }
.hero-mantra {
  margin-top: 3rem; padding: 1.25rem 2rem;
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: inline-block;
}
.hero-mantra p { font-family: 'Noto Serif Devanagari', serif; font-size: 1.15rem; color: var(--saffron); }
.hero-mantra small { display: block; font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.25rem; font-style: italic; }

/* ===== SECTION ===== */
.section { padding: 4.5rem 1.5rem; }
.section-alt { background: white; }
.container { max-width: 1120px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .label {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--saffron);
  margin-bottom: 0.6rem;
}
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 0.5rem; }
.section-header p { color: var(--ink-muted); font-size: 1.05rem; max-width: 480px; margin: 0 auto; }

/* ===== CARDS ===== */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem;
}
.card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; transition: all 0.25s; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  opacity: 0; transition: opacity 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(194,65,12,0.1), rgba(217,119,6,0.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.card .sanskrit-label { font-size: 0.85rem; color: var(--gold); margin-bottom: 0.6rem; }
.card p { font-size: 0.9rem; color: var(--ink-muted); flex: 1; margin-bottom: 1.1rem; }
.card-meta { font-size: 0.8rem; font-weight: 600; color: var(--saffron); }

/* ===== ARTICLE LIST ===== */
.article-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.article-list a {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.35rem; background: white;
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.2s;
}
.article-list a:hover {
  border-color: rgba(194,65,12,0.3); box-shadow: var(--shadow);
  transform: translateX(4px);
}
.article-list .num {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: rgba(194,65,12,0.08); color: var(--saffron);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}
.article-list .title { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.article-list .arrow { margin-left: auto; color: var(--ink-muted); font-size: 1.1rem; transition: transform 0.2s; }
.article-list a:hover .arrow { transform: translateX(3px); color: var(--saffron); }

/* ===== ARTICLE PAGE ===== */
.article-hero {
  background: linear-gradient(135deg, #7C2D12 0%, #C2410C 50%, #D97706 100%);
  color: white; padding: 3.5rem 1.5rem 3rem; text-align: center;
}
.article-hero .breadcrumb {
  font-size: 0.8rem; opacity: 0.75; margin-bottom: 1rem;
}
.article-hero .breadcrumb a { opacity: 0.9; text-decoration: underline; text-underline-offset: 2px; }
.article-hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); color: white; margin-bottom: 0.4rem; }
.article-hero .sanskrit { font-size: 1.1rem; opacity: 0.85; }

.article-body-wrap { max-width: 760px; margin: -1.5rem auto 0; padding: 0 1.25rem 4rem; position: relative; z-index: 2; }
.article-body {
  background: white; border-radius: var(--radius-lg); padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.article-body p {
  margin-bottom: 1.15rem; font-size: 1.05rem; color: var(--ink-soft); line-height: 1.85;
}
.article-body h2 {
  font-size: 1.45rem; color: var(--saffron); margin: 2rem 0 0.85rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
}
.article-body h3 { font-size: 1.2rem; color: var(--ink); margin: 1.5rem 0 0.6rem; }
.article-body ul, .article-body ol { margin: 0.8rem 0 1.3rem 1.4rem; }
.article-body li { margin-bottom: 0.4rem; color: var(--ink-soft); font-size: 1.02rem; }
.article-body strong { color: var(--ink); font-weight: 600; }

.back-row { margin-top: 1.5rem; }
.back-row a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 600; color: var(--saffron);
}
.back-row a:hover { text-decoration: underline; }

/* ===== AUTH ===== */
.auth-page {
  min-height: calc(100vh - var(--header-h) - var(--viewer-h));
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.25rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(251,191,36,0.12), transparent),
    var(--cream);
}
.auth-card {
  width: 100%; max-width: 420px; background: white;
  border-radius: var(--radius-lg); padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.auth-card .icon-wrap {
  width: 56px; height: 56px; margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: white;
}
.auth-card h2 { text-align: center; font-size: 1.6rem; margin-bottom: 0.3rem; }
.auth-card .sub { text-align: center; color: var(--ink-muted); font-size: 0.9rem; margin-bottom: 1.75rem; }
.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block; font-size: 0.825rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.35rem;
}
.form-group input {
  width: 100%; padding: 0.75rem 1rem; font-size: 0.95rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--cream); transition: all 0.2s; color: var(--ink);
}
.form-group input:focus {
  outline: none; border-color: var(--saffron); background: white;
  box-shadow: 0 0 0 3px rgba(194,65,12,0.12);
}
.auth-msg { text-align: center; margin-top: 1rem; font-size: 0.875rem; min-height: 1.3em; }
.auth-msg.error { color: #DC2626; }
.auth-msg.success { color: #16A34A; }
.auth-switch { text-align: center; margin-top: 1.4rem; font-size: 0.875rem; color: var(--ink-muted); }
.auth-switch a { color: var(--saffron); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ===== QUOTE BAND ===== */
.quote-band {
  background: linear-gradient(135deg, #7C2D12, #C2410C);
  color: white; padding: 3.5rem 1.5rem; text-align: center;
}
.quote-band blockquote {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-style: italic; max-width: 680px; margin: 0 auto 0.75rem; line-height: 1.6;
}
.quote-band cite { font-size: 0.875rem; opacity: 0.75; font-style: normal; }

/* ===== FOOTER ===== */
.footer {
  background: #1C1917; color: #A8A29E; padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 2rem; border-bottom: 1px solid #292524; margin-bottom: 1.5rem;
}
.footer-brand .logo-mark { margin-bottom: 0.75rem; }
.footer-brand h3 { color: #FBBF24; font-size: 1.15rem; margin-bottom: 0.3rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; }
.footer h4 { color: #E7E5E4; font-size: 0.9rem; font-family: 'Inter', sans-serif; font-weight: 600; margin-bottom: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.45rem; }
.footer ul a { font-size: 0.875rem; transition: color 0.2s; }
.footer ul a:hover { color: #FBBF24; }
.footer-bottom {
  max-width: 1120px; margin: 0 auto; text-align: center;
  font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom .sanskrit { color: #D97706; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 0.75rem; gap: 0.15rem;
    box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav a { padding: 0.7rem 1rem; }
  .menu-btn { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 600px) {
  .hero { padding: 3.5rem 1.25rem 4rem; }
  .article-body { padding: 1.75rem 1.35rem; }
  .auth-card { padding: 2rem 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: center; }
}
