/*
 * Church of Veritas Maiestas Terrae (Covmt) — Public Design System
 * Tagline: Sovereignty of Man - Divinity of Nature
 * Sanctuary Palette: Deep Forest Green (#1B3B2B), Warm Gold (#C59B27), Parchment Cream (#FBF9F5), Slate Charcoal (#1A2420)
 */

:root {
  --bg-parchment: #FBF9F5;
  --bg-surface: #FFFFFF;
  --bg-muted: #F2EFE9;
  --forest-900: #0F241A;
  --forest-800: #1B3B2B;
  --forest-700: #26503B;
  --forest-600: #33674D;
  --gold-600: #9E7818;
  --gold-500: #C59B27;
  --gold-400: #DFB746;
  --gold-100: #F9F2DF;
  --text-primary: #1A2420;
  --text-secondary: #43524B;
  --text-muted: #64736C;
  --border-subtle: #DFDAD0;
  --danger: #9E2A2B;
  --success: #1E5E3A;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(15, 36, 26, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 36, 26, 0.10);
  --max-w: 1180px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text-primary);
  background-color: var(--bg-parchment);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--forest-900);
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

p {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

a {
  color: var(--forest-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--forest-900);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

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

/* Header & Navigation */
.site-header {
  background: var(--forest-900);
  color: #fff;
  border-bottom: 2px solid var(--gold-500);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
}

.brand-logo:hover {
  color: var(--gold-400);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.brand-tagline {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold-400);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-400);
  background: rgba(255, 255, 255, 0.07);
}

/* 1-Level Header Dropdowns */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-caret {
  font-size: 0.75rem;
  opacity: 0.85;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--forest-900);
  border: 1px solid var(--gold-500);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.4rem 0;
  z-index: 300;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 0.55rem 1rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: var(--forest-700);
  color: var(--gold-400);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--gold-500);
  color: var(--forest-900);
  border-color: var(--gold-500);
}

.btn-primary:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--forest-900);
}

.btn-secondary {
  background: var(--forest-800);
  color: #fff;
  border-color: var(--forest-800);
}

.btn-secondary:hover {
  background: var(--forest-700);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: var(--gold-400);
}

.btn-outline:hover {
  background: rgba(223, 183, 70, 0.14);
  color: var(--gold-400);
}

.btn-outline-dark {
  background: transparent;
  color: var(--forest-800);
  border-color: var(--forest-800);
}

.btn-outline-dark:hover {
  background: var(--forest-800);
  color: #fff;
}

.nav-cta {
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
}

/* Hero Sections */
.hero {
  background: radial-gradient(circle at 80% 20%, rgba(197, 155, 39, 0.16), transparent 45%),
              linear-gradient(155deg, var(--forest-900) 0%, var(--forest-800) 65%, #163325 100%);
  color: #fff;
  padding: 5rem 0 4.5rem;
  border-bottom: 3px solid var(--gold-500);
}

.page-hero {
  background: linear-gradient(155deg, var(--forest-900) 0%, var(--forest-800) 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  border-bottom: 2px solid var(--gold-500);
}

.hero h1,
.page-hero h1 {
  color: #fff;
}

.eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-400);
  margin-bottom: 0.65rem;
}

.lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 740px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* Sections & Grid */
.section {
  padding: 4rem 0;
}

.section-muted {
  background: var(--bg-muted);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--forest-800);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.card-gold {
  border-top-color: var(--gold-500);
}

.badge {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  background: var(--gold-100);
  color: var(--forest-900);
  margin-bottom: 0.75rem;
}

.prose {
  max-width: 780px;
}

.callout-box {
  background: var(--gold-100);
  border-left: 4px solid var(--gold-500);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest-900);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.96rem;
  color: var(--text-primary);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--gold-500);
  border-color: var(--forest-800);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.status-banner {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.92rem;
  margin-top: 1rem;
}

.status-banner.success {
  background: #E6F4EC;
  color: var(--success);
  border: 1px solid #A8D8B9;
}

.status-banner.error {
  background: #FCEAEA;
  color: var(--danger);
  border: 1px solid #F1B5B5;
}

/* Calendar & Donation Specifics */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-btn {
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.95rem;
  border-radius: 99px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.pill-btn.active,
.pill-btn:hover {
  background: var(--forest-800);
  color: #fff;
  border-color: var(--forest-800);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.amount-preset {
  padding: 0.7rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: var(--forest-900);
}

.amount-preset.active,
.amount-preset:hover {
  background: var(--forest-800);
  color: #fff;
  border-color: var(--forest-800);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg-muted);
  border-radius: 99px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest-700), var(--gold-500));
  width: 0%;
  transition: width 0.3s ease;
}

/* Footer */
.site-footer {
  background: var(--forest-900);
  color: rgba(255, 255, 255, 0.86);
  padding: 3.5rem 0 2.5rem;
  border-top: 3px solid var(--gold-500);
  font-size: 0.94rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 2.5rem;
}

.site-footer h3,
.site-footer h4 {
  color: var(--gold-400);
  margin-bottom: 0.65rem;
}

.footer-tagline {
  font-style: italic;
  color: #fff;
  margin-bottom: 0.4rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold-400);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.68);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: inline-block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--forest-900);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--gold-500);
  }
  .site-nav.open {
    display: flex;
  }
  .nav-dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media print {
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
