/* Manna House of Oakhurst - Global Styles */
/* Design system: Premium Aesthetics */
:root {
  /* Colors */
  --green: #14492b;
  /* Deepened for better contrast */
  --green-light: #2c7a4d;
  --cream: #FAF9F6;
  /* Off-white/alabaster for cleaner look */
  --gold: #D4A017;
  /* Richer gold */
  --gold-light: #F4C430;
  --text: #1a1a1a;
  --muted: #596e5f;
  --white: #ffffff;
  --bg: var(--cream);

  /* Dimensions & Effects */
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(20, 73, 43, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 73, 43, 0.12);
  --shadow-lg: 0 16px 48px rgba(20, 73, 43, 0.18);
  --header-height: 80px;

  /* Transitions */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --duration: 0.3s;
}

/* Typography & Base */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: 'Merriweather', serif;
  line-height: 1.25;
  color: var(--green);
  margin-bottom: 0.75rem;
  font-weight: 800;
}

h1 {
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1.25rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

/* Utilities */
.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.spacer {
  height: 2rem;
}

.badge {
  background: #FFF8E1;
  color: #8C6B1F;
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 2000;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 1rem;
  background: var(--white);
  color: var(--green);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* Animation Utilities */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.8;
}

.brand img {
  height: 42px;
  width: auto;
}

.brand span {
  font-weight: 800;
  color: var(--green);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  transform-origin: top;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

/* Enhanced Toggle visibility */
.nav[hidden] {
  display: flex;
  /* Override default hidden to allow transition, handled by opacity */
}

.nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav a:hover {
  background: rgba(20, 73, 43, 0.05);
  color: var(--green);
}

.nav a[aria-current="page"] {
  color: var(--green);
  background: rgba(20, 73, 43, 0.08);
}

#nav-toggle {
  display: inline-flex;
}

@media (min-width: 800px) {
  #nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav[hidden] {
    display: flex;
  }

  /* Ensure flex is active on desktop always */
  .nav a {
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  /* Pill shape for modern look */
  border: 2px solid transparent;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  font-size: 0.95rem;
}

.btn:focus-visible {
  outline: 3px solid rgba(212, 160, 23, 0.5);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--green-light);
}

.btn-secondary {
  background: var(--gold);
  color: #1a1a1a;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: rgba(20, 73, 43, 0.2);
}

.btn-ghost:hover {
  border-color: var(--green);
  background: rgba(20, 73, 43, 0.05);
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.95);
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  padding: 0.5rem;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s var(--ease-out);
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-menu[hidden] {
  display: block;
}

/* Controlled by opacity/vis */

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(20, 73, 43, 0.04);
  color: var(--green);
  outline: none;
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  background: radial-gradient(circle at top right, rgba(212, 160, 23, 0.1), transparent 40%),
    radial-gradient(circle at bottom left, rgba(20, 73, 43, 0.05), transparent 40%);
}

.hero .card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  margin-bottom: 1rem;
}

.hero p.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Grid sections */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  transition: all 0.3s ease;
  height: 100%;
  box-sizing: border-box;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 73, 43, 0.1);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.card .muted {
  color: var(--muted);
  font-size: 1rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat .num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--green);
}

.stat .label {
  color: var(--muted);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 3rem 0;
  position: relative;
}

.section h2 {
  margin-bottom: 0.75rem;
  font-size: 2.2rem;
  text-align: center;
}

.section .description {
  color: var(--muted);
  margin-bottom: 2.5rem;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  margin-top: 4rem;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 2rem;
}

.footer .inner {
  padding: 2rem 0;
}

.footer .grid {
  gap: 2rem;
}

.footer small {
  color: var(--muted);
  opacity: 0.8;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 2rem;
}

/* Footer contact links */
.footer a[href^="mailto:"],
.footer a[href^="tel:"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.footer a[href^="mailto:"]:hover,
.footer a[href^="tel:"]:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* Global contact links (non-footer sections) */
a[href^="mailto:"],
a[href^="tel:"] {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(31, 94, 59, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

a[href^="mailto:"]:hover,
a[href^="tel:"]:hover,
a[href^="mailto:"]:focus-visible,
a[href^="tel:"]:focus-visible {
  color: #183E29;
  border-bottom-color: currentColor;
  outline: none;
}

/* Forms */
form {
  display: grid;
  gap: 0.75rem;
}

label {
  font-weight: 600;
}

input,
select,
textarea {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #d7d7d7;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(31, 94, 59, 0.2);
  border-color: var(--green);
}

/* Utilities */
.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.spacer {
  height: 1rem;
}

.badge {
  background: rgba(217, 164, 65, 0.2);
  color: #5c440f;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-weight: 700;
  font-size: 0.8rem;
}

.list {
  padding-left: 1rem;
}

.hidden {
  display: none !important;
}

/* Donate tiers */
.tiers {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tier {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.tier .amt {
  font-weight: 900;
  color: var(--green);
}

/* Holiday Theme */
.snowflake {
  position: fixed;
  top: -10px;
  color: #fff;
  font-size: 1em;
  font-family: Arial, sans-serif;
  text-shadow: 0 0 5px #000;
  user-select: none;
  z-index: 9999;
  pointer-events: none;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.8;
  }

  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.christmas-lights {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  position: fixed;
  top: 5px;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
  z-index: 10001;
}

.christmas-lights li {
  position: relative;
  list-style: none;
  margin: 0 10px;
  padding: 0;
  display: inline-block;
  width: 12px;
  height: 22px;
  border-radius: 50%;
  background: #f0f0f0;
  box-shadow: 0px 5px 24px 3px rgba(255, 255, 255, 0.6);
  animation-fill-mode: both;
  animation-iteration-count: infinite;
  animation-name: flash;
  animation-duration: 2s;
}

.christmas-lights li:nth-child(2n+1) {
  background: #f02424;
  box-shadow: 0px 5px 24px 3px #f02424;
  animation-duration: 1.5s;
}

.christmas-lights li:nth-child(4n+2) {
  background: #24f024;
  box-shadow: 0px 5px 24px 3px #24f024;
  animation-duration: 2.2s;
}

.christmas-lights li:nth-child(odd) {
  animation-duration: 1.8s;
}

.christmas-lights li:nth-child(3n+1) {
  background: #248bf0;
  box-shadow: 0px 5px 24px 3px #248bf0;
  animation-duration: 2.5s;
}

.christmas-lights li::before {
  content: "";
  position: absolute;
  background: #222;
  width: 10px;
  height: 8px;
  border-radius: 3px;
  top: -4px;
  left: 1px;
}

.christmas-lights li::after {
  content: "";
  top: -10px;
  left: 9px;
  position: absolute;
  width: 32px;
  height: 10px;
  border-bottom: solid #222 2px;
  border-radius: 50%;
}

.christmas-lights li:last-child::after {
  content: none;
}

@keyframes flash {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
    filter: brightness(1.5);
  }
}