/*
 * ═══════════════════════════════════════════════════════════════════
 *  snoop-theme.css  —  Snoop, A Messenger  —  Shared Design System
 *  /css/snoop-theme.css
 *
 *  Covers: CSS tokens, reset, body, backgrounds, layout, nav,
 *          footer, typography helpers, reveal animation, scrollbar,
 *          mobile nav, responsive breakpoints.
 *
 *  Pages using this file add only their own unique styles locally.
 *  Do NOT put page-specific styles here.
 * ═══════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════
   GOOGLE FONTS — import here so pages don't need it
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Rajdhani:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════
   ROOT TOKENS — Canonical (v2 main page values)
═══════════════════════════════════════════════════ */
:root {
  /* Parchment palette */
  --bg:           #0d0b07;
  --bg-2:         #141009;
  --bg-3:         #1a150d;
  --bg-card:      rgba(20, 16, 9, 0.92);
  --bg-glass:     rgba(15, 12, 7, 0.75);

  /* Gold system */
  --gold:         #d4a843;
  --gold-light:   #f0d278;
  --gold-bright:  #fae89a;
  --gold-dim:     #a87c30;
  --gold-soft:    rgba(212,168,67,0.22);
  --gold-border:  rgba(212,168,67,0.32);
  --gold-glow:    rgba(212,168,67,0.18);

  /* Ink / text */
  --ink:          #f2ead6;
  --ink-2:        #d8cba8;
  --ink-dim:      #a89670;
  --ink-faint:    #6a5c42;

  /* Borders */
  --border:       rgba(201,168,76,0.14);
  --border-2:     rgba(255,255,255,0.06);

  /* Accent */
  --teal:         #24b3c9;
  --red:          #8b2020;

  /* Compat aliases (chatbot widget etc.) */
  --accent-gold:       #d4a843;
  --accent-gold-soft:  rgba(212,168,67,0.35);
  --text-main:         #f2ead6;
  --text-soft:         #d8cba8;

  /* Layout */
  --radius:       16px;
  --radius-sm:    10px;
  --shadow:       0 24px 60px rgba(0,0,0,0.8);
  --blur:         20px;
  --max-w:        1180px;
  --nav-h:        72px;
}

/* ═══════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ═══════════════════════════════════════════════════
   BODY
═══════════════════════════════════════════════════ */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px;
  line-height: 1.72;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.7s ease;
  overflow-x: hidden;
}

body.loaded { opacity: 1; }

/* Fallback: show page after 1s even if JS hasn't fired */
@keyframes bodyReveal { to { opacity: 1; } }
body { animation: bodyReveal 0s 1s forwards; }

/* ═══════════════════════════════════════════════════
   ATMOSPHERIC BACKGROUND
═══════════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%,   rgba(212,168,67,0.13) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(36,179,201,0.09)  0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%,  rgba(139,32,32,0.07)   0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════ */
.site-wrap {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

/* ═══════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════ */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur));
  position: relative;
  overflow: hidden;
}

.site-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold-light);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px rgba(212,168,67,0.50);
  white-space: nowrap;
}

.nav-logo span {
  color: var(--gold-dim);
  font-size: 0.75em;
  margin: 0 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
  background: var(--gold-soft);
}

.lang-switcher select {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--ink-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}

.lang-switcher select:focus  { border-color: var(--gold-dim); }
.lang-switcher select option { color: #111; background: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-dim);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
footer {
  background: rgba(13,11,7,0.96);
  border-top: 1px solid var(--gold-border);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 2rem;
  font-size: 0.77rem;
  color: var(--ink-dim);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--gold-dim);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--gold-light); }

.footer-mark { color: var(--gold-dim); }

/* ═══════════════════════════════════════════════════
   TYPOGRAPHY HELPERS
═══════════════════════════════════════════════════ */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  line-height: 1.2;
}

.section-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.6rem;
}

blockquote,
.scripture-block {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--gold-dim);
  border-left: 2px solid var(--gold-dim);
  padding-left: 1.2rem;
  margin: 1rem 0;
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #0d0b07;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 18px rgba(212,168,67,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212,168,67,0.45);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: transparent;
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

/* ═══════════════════════════════════════════════════
   DIVIDER / RULE
═══════════════════════════════════════════════════ */
.gold-rule {
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.2rem auto;
  border: none;
}

/* ═══════════════════════════════════════════════════
   TAG PILLS
═══════════════════════════════════════════════════ */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

.tag {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid rgba(212,168,67,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

/* ═══════════════════════════════════════════════════
   REVEAL ANIMATION (IntersectionObserver trigger)
═══════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════ */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
* { scrollbar-width: thin; scrollbar-color: var(--gold-dim) var(--bg-2); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .nav-links { display: none; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(13,11,7,0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 4px;
    z-index: 100;
  }

  .nav-toggle { display: flex; }

  .site-wrap { width: 96%; padding: 1rem 0 3rem; }
}
