/* Motivara Lotus — Master Design System
   Warm Ivory • Deep Himalayan Maroon • Subtle Antique Gold
   Supports Light Mode & Dark Mode, plus Tibetan/Devanagari/Latin Typography */

:root {
  --bg: #fbf7ef;
  --bg-alt: #f4ecdc;
  --surface: #fffdf9;
  --surface-elevated: #f9f2e4;
  --text: #221415;
  --text-soft: #4e3937;
  --muted: #6c5754;
  --maroon: #6b141a;
  --maroon-deep: #4c0b10;
  --maroon-soft: rgba(107, 20, 26, 0.08);
  --gold: #9a6e1c;
  --gold-bright: #c99733;
  --gold-soft: rgba(201, 151, 51, 0.14);
  --border: #e2d1ae;
  --border-strong: #c9ae7a;
  --ribbon-bg: #4c0b10;
  --ribbon-text: #f6e7c1;
  --nav-bg: rgba(251, 247, 239, 0.94);
  --shadow-sm: 0 2px 10px rgba(48, 18, 20, 0.05);
  --shadow-md: 0 12px 32px rgba(48, 18, 20, 0.08);
  --success-bg: #e7f6ec;
  --success-text: #156235;
  --success-border: #a6dcb9;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-w: 1180px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", "Kailasa", "Noto Serif Tibetan", "Microsoft Himalaya", sans-serif;
  --font-display: "Georgia", "Noto Serif", "Noto Serif Devanagari", "Kailasa", "Noto Serif Tibetan", serif;
}

[data-theme="dark"] {
  --bg: #110b0c;
  --bg-alt: #181012;
  --surface: #1b1214;
  --surface-elevated: #25191b;
  --text: #f3eae0;
  --text-soft: #dcd0c3;
  --muted: #b09e95;
  --maroon: #c84b53;
  --maroon-deep: #8c1f27;
  --maroon-soft: rgba(200, 75, 83, 0.14);
  --gold: #e0b65a;
  --gold-bright: #ecc774;
  --gold-soft: rgba(224, 182, 90, 0.12);
  --border: rgba(224, 182, 90, 0.22);
  --border-strong: rgba(224, 182, 90, 0.42);
  --ribbon-bg: #24080b;
  --ribbon-text: #f1d99a;
  --nav-bg: rgba(17, 11, 12, 0.94);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.45);
  --success-bg: rgba(21, 128, 61, 0.22);
  --success-text: #86efac;
  --success-border: rgba(134, 239, 172, 0.35);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
}

/* Generous line-height for stacked Tibetan vowel/subjoined Unicode clusters */
html[lang="bo"] body {
  line-height: 1.9;
  font-size: 16.5px;
}
html[lang="bo"] h1, html[lang="bo"] h2, html[lang="bo"] h3 {
  line-height: 1.48;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Non-interactive top sacred motto strip keeps top-right 56px clear */
.top-ribbon {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: var(--ribbon-bg);
  color: var(--ribbon-text);
  border-bottom: 1px solid rgba(229, 186, 93, 0.35);
  padding: 10px 20px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  user-select: none;
}

.top-ribbon .container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ribbon-dot {
  color: var(--gold-bright);
  opacity: 0.9;
}

/* Header & Navigation */
.site-header {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 40;
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 18px;
  padding: 14px 0 10px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-link:hover { text-decoration: none; }

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.controls-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lang-group {
  display: inline-flex;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--maroon);
  color: #fff8eb;
}
[data-theme="dark"] .lang-btn.active {
  background: var(--gold);
  color: #1b0f10;
}

.theme-btn, .menu-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.theme-btn:hover, .menu-toggle-btn:hover {
  border-color: var(--gold);
}

.quick-patro-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
  background: var(--maroon);
  color: #fff8eb;
  border: 1px solid var(--gold-bright);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.quick-patro-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  opacity: 0.94;
}
[data-theme="dark"] .quick-patro-btn {
  background: var(--gold);
  color: #1b0f10;
  border-color: #f3d889;
}

.menu-toggle-btn {
  display: none;
}

/* Primary 10-link Navigation */
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding: 8px 0 12px;
  border-top: 1px solid var(--border);
}

.nav-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-soft);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--maroon-soft);
  color: var(--maroon);
  text-decoration: none;
}
.nav-link.active {
  background: var(--maroon-soft);
  color: var(--maroon);
  box-shadow: inset 0 -2px 0 var(--gold-bright);
}
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: var(--gold-bright);
  background: var(--gold-soft);
}

/* Mobile Responsive Navigation Drawer */
@media (max-width: 900px) {
  .menu-toggle-btn {
    display: inline-flex;
  }
  .primary-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 0 16px;
  }
  .primary-nav.open {
    display: flex;
  }
  .nav-link {
    padding: 9px 12px;
    border: 1px solid transparent;
  }
  .nav-link.active {
    border-color: var(--border);
    box-shadow: none;
  }
}

/* Hero Section */
.hero {
  position: relative;
  padding: clamp(2.8rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4.2rem);
  background:
    radial-gradient(circle at 12% 18%, var(--gold-soft), transparent 46%),
    radial-gradient(circle at 88% 80%, var(--maroon-soft), transparent 44%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.18;
  margin: 0 0 14px;
  color: var(--text);
  letter-spacing: -0.015em;
}

.hero-lead {
  font-size: clamp(1rem, 1.45vw, 1.14rem);
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 640px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, #6b141a, #8a1d25);
  color: #fff8eb;
  border-color: #a97827;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #c99733, #a6781f);
  color: #1b0f10;
  border-color: #e6c473;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--gold-bright);
  background: var(--surface-elevated);
}

.btn-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--border-strong);
}

/* Featured Hero Card */
.hero-spotlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.spotlight-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.spotlight-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  object-fit: cover;
}
.spotlight-meta {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 16px;
}
.mini-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.87rem;
  color: var(--text-soft);
}
.mini-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.mini-list.key-val li {
  display: block;
}

/* Section Layout */
.section {
  padding: clamp(2.6rem, 5vw, 4.2rem) 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 20px;
  margin-bottom: 26px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  margin: 0 0 6px;
  color: var(--text);
}
.section-sub {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
  font-size: 0.95rem;
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .card[style*="span 2"] { grid-column: auto !important; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text);
}
.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.card-footer {
  margin-top: auto;
  padding-top: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.status-live {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}
.status-soon {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--border-strong);
}

/* Sacred Dates Table / Timeline */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data-table th, table.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data-table th {
  background: var(--surface-elevated);
  color: var(--maroon);
  font-weight: 700;
}
[data-theme="dark"] table.data-table th {
  color: var(--gold-bright);
}
table.data-table tr:last-child td { border-bottom: none; }

/* Screenshots Showcase */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 820px) {
  .screenshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .screenshot-grid { grid-template-columns: 1fr; }
}
.shot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}
.shot-card img {
  border-radius: 10px;
  margin: 0 auto 10px;
  max-height: 440px;
  object-fit: contain;
}
.shot-caption {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

/* Tibetan Alphabet Reference Grid */
.tibetan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .tibetan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tib-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.tib-glyph {
  font-family: "Kailasa", "Noto Serif Tibetan", "Noto Sans Tibetan", serif;
  font-size: 1.9rem;
  line-height: 1.5;
  color: var(--maroon);
  display: block;
}
[data-theme="dark"] .tib-glyph { color: var(--gold-bright); }
.tib-latin {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 15px 18px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.faq-a {
  display: none;
  padding: 0 18px 16px;
  font-size: 0.92rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.faq-item.open .faq-a { display: block; }

/* Notices / Disclaimers */
.notice-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--gold-bright);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* Prose Articles (Privacy, Terms, About) */
.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 38px);
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.prose-card h2 {
  font-family: var(--font-display);
  color: var(--maroon);
  margin: 26px 0 8px;
  font-size: 1.2rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .prose-card h2 { color: var(--gold-bright); }
.prose-card h2:first-of-type { margin-top: 18px; }
.prose-card p, .prose-card li { color: var(--text-soft); font-size: 0.95rem; }

/* Page Header Banner (Subpages) */
.page-banner {
  padding: clamp(2rem, 4.5vw, 3.2rem) 0;
  background:
    radial-gradient(circle at 18% 20%, var(--gold-soft), transparent 48%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.page-banner h1 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  color: var(--text);
}
.page-banner p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 44px 0 28px;
  font-size: 0.88rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--maroon);
}
[data-theme="dark"] .footer-links a:hover {
  color: var(--gold-bright);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  font-size: 0.82rem;
}

code {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.88em;
}
