/* ============================================================
   Christian Astrology — Design System
   Deep blues, soft golds, cream backgrounds.
   Elegant serif headings + clean sans-serif body.
   Mobile-first, fast-loading.
   ============================================================ */

:root {
  /* Palette */
  --navy-deep: #0F1B2D;
  --navy: #1A2744;
  --navy-light: #243556;
  --gold: #C9A84C;
  --gold-soft: rgba(201, 168, 76, 0.2);
  --gold-deep: #A68A3E;
  --cream: #FAF7F2;
  --cream-dark: #F0EBE3;
  --ivory: #FFFFFF;
  --text-primary: #1C2321;
  --text-secondary: #45453F;
  --text-muted: #6E6A62;
  --border-light: #E7E0D6;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 27, 45, 0.08);
  --shadow-lg: 0 8px 30px rgba(15, 27, 45, 0.12);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cinzel', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --max-narrow: 760px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ============================================================
   Layout helpers
   ============================================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
.narrow { max-width: var(--max-narrow); margin: 0 auto; }

.section { padding: var(--space-12) 0; }
.section-sm { padding: var(--space-8) 0; }

.text-center { text-align: center; }
.hidden { display: none !important; }

/* ============================================================
   Navigation — sticky top bar
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-deep);
  border-bottom: 2px solid var(--gold);
  backdrop-filter: blur(8px);
}
.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}
.navbar-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
  letter-spacing: 0.03em;
}
.navbar-links a:hover,
.navbar-links a.active {
  color: var(--gold);
}
.navbar-auth {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.navbar-tier-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Mobile nav toggle */
.nav-toggle { display: none; }

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    color: var(--gold);
    font-size: 1.5rem;
    padding: var(--space-2);
  }
  .navbar-links,
  .navbar-auth {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    border-bottom: 2px solid var(--gold);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .navbar-links.open,
  .navbar-auth.open {
    transform: translateY(0);
  }
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-deep); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: 0.03em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

.hero-kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: var(--space-4) auto 0;
  line-height: 1.7;
}

.prose p { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1em; line-height: 1.8; }
.prose h3 { font-family: var(--font-display); font-size: 1.4rem; margin: 2em 0 0.8em; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
  border: 1px solid var(--gold);
}
.btn-primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn-secondary {
  background: transparent;
  color: var(--navy-deep);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-navy {
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
}
.btn-navy:hover { background: var(--navy-light); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }

/* ============================================================
   Cards & Grids
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

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

.card {
  background: var(--ivory);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

/* ============================================================
   Sign cards (Mazzaroth)
   ============================================================ */
.sign-card {
  background: var(--ivory);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: var(--space-6);
  text-align: center;
  transition: all 0.2s ease;
}
.sign-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.sign-icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.sign-name { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy-deep); margin-bottom: var(--space-1); }
.sign-hebrew { font-family: var(--font-serif); font-style: italic; color: var(--text-muted); font-size: 0.95rem; margin-bottom: var(--space-2); }
.sign-tribe { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: var(--space-3); }
.sign-summary { font-family: var(--font-serif); font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   Pricing tiers
   ============================================================ */
.tier-card {
  background: var(--ivory);
  border: 2px solid var(--border-light);
  border-radius: 10px;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}
.tier-card:hover { box-shadow: var(--shadow-lg); }
.tier-card.featured {
  border-color: var(--gold);
  outline: 3px solid var(--gold-soft);
  outline-offset: -1px;
}
.tier-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 999px;
}
.tier-name { font-family: var(--font-display); font-size: 1.5rem; color: var(--navy-deep); margin-bottom: var(--space-2); }
.tier-price { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--navy-deep); line-height: 1; }
.tier-price small { font-size: 0.9rem; font-family: var(--font-sans); font-weight: 400; color: var(--text-muted); }
.tier-desc { font-family: var(--font-serif); font-style: italic; color: var(--text-muted); margin: var(--space-3) 0 var(--space-5); }
.tier-list { list-style: none; text-align: left; margin: var(--space-6) 0; padding: 0; }
.tier-list li { padding: var(--space-2) 0; font-size: 0.9rem; color: var(--text-secondary); border-bottom: 1px solid var(--cream-dark); display: flex; align-items: flex-start; gap: var(--space-2); }
.tier-list li::before { content: "\2713"; color: var(--gold-deep); font-weight: bold; flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   Paywall / blurred gate
   ============================================================ */
.gate { position: relative; overflow: hidden; border-radius: 8px; }
.gate .gate-body { filter: blur(6px) saturate(0.85); user-select: none; pointer-events: none; }
.gate .gate-veil {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(250, 247, 242, 0.6);
  backdrop-filter: blur(2px);
}
.gate .gate-veil-inner { text-align: center; padding: var(--space-8); }
.gate .gate-veil h3 { font-family: var(--font-display); color: var(--navy-deep); margin-bottom: var(--space-2); }
.gate .gate-veil p { font-family: var(--font-serif); color: var(--text-muted); font-style: italic; margin-bottom: var(--space-4); }
.gate.open .gate-veil { display: none; }
.gate.open .gate-body { filter: none; pointer-events: auto; user-select: text; }

/* ============================================================
   Message board threads
   ============================================================ */
.thread-item {
  background: var(--ivory);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-4);
}
.thread-meta { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); flex-wrap: wrap; }
.thread-title { font-family: var(--font-display); font-size: 1.15rem; color: var(--navy-deep); margin-bottom: var(--space-2); }
.thread-body { font-family: var(--font-serif); font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }
.denom-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}
.denom-Catholic { background: #E8D5B7; color: #6B4F2A; }
.denom-Orthodox { background: #C9D4E0; color: #2A3F5C; }
.denom-Evangelical { background: #D4E8D0; color: #2A5C2A; }
.denom-Mainline { background: #E0D4E8; color: #3F2A5C; }
.denom-Ecumenical { background: var(--gold-soft); color: var(--gold-deep); }

/* ============================================================
   Store products
   ============================================================ */
.product-card {
  background: var(--ivory);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); }
.product-img {
  height: 200px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border-light);
}
.product-info { padding: var(--space-5); }
.product-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: var(--space-2); }
.product-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--navy-deep); margin-bottom: var(--space-2); }
.product-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: var(--space-4); }
.product-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.product-price { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy-deep); }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: var(--space-4); text-align: left; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--space-2); letter-spacing: 0.03em; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border-light);
  border-radius: 6px; background: var(--ivory); font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--gold); }

/* ============================================================
   Toast notifications
   ============================================================ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--navy-deep); color: #fff; padding: 12px 24px; border-radius: 8px;
  font-size: 0.9rem; z-index: 200; opacity: 0; transition: all 0.3s ease;
  box-shadow: var(--shadow-lg); max-width: 90vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ============================================================
   Spinner
   ============================================================ */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--gold-soft); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.6); padding: var(--space-12) 0 var(--space-8); margin-top: var(--space-16); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-8); max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
.footer-col h4 { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--space-3); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a { font-size: 0.85rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { text-align: center; margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; color: rgba(255,255,255,0.35); max-width: var(--max-width); margin-left: auto; margin-right: auto; padding-left: var(--space-6); padding-right: var(--space-6); }

/* ============================================================
   Modal overlays
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 27, 45, 0.7); backdrop-filter: blur(8px);
  z-index: 150; display: none; align-items: center; justify-content: center; padding: var(--space-6);
}
.modal-overlay.active { display: flex; }
.modal-box { background: var(--ivory); border-radius: 10px; max-width: 640px; width: 100%; padding: var(--space-8); position: relative; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: var(--space-3); right: var(--space-4); font-size: 1.5rem; color: var(--text-muted); cursor: pointer; background: none; border: none; line-height: 1; }

/* ============================================================
   Utility classes
   ============================================================ */
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.text-muted { color: var(--text-muted); } .text-gold { color: var(--gold-deep); } .font-serif { font-family: var(--font-serif); }

/* ============================================================
   Account page specific
   ============================================================ */
.account-section { background: var(--ivory); border: 1px solid var(--border-light); border-radius: 8px; padding: var(--space-6); margin-bottom: var(--space-6); }
.account-section h3 { font-family: var(--font-display); color: var(--navy-deep); margin-bottom: var(--space-4); }
.tier-highlight { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5); background: linear-gradient(135deg, var(--cream), var(--ivory)); border-radius: 8px; margin-bottom: var(--space-6); }
.tier-highlight-icon { font-size: 2.5rem; }
.tier-highlight-info h3 { color: var(--navy-deep); margin-bottom: var(--space-1); }
.hall-of-saints-list { list-style: none; padding: 0; }
.hall-of-saints-list li { padding: var(--space-2) 0; border-bottom: 1px solid var(--cream-dark); font-family: var(--font-serif); color: var(--text-secondary); }

/* ============================================================
   Success / Cancel pages
   ============================================================ */
.status-page { text-align: center; padding: var(--space-16) 0; }
.status-icon { font-size: 4rem; margin-bottom: var(--space-4); }
.status-success .status-icon { color: #2A7D3B; }
.status-cancelled .status-icon { color: var(--text-muted); }
