@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --green-deep: #2D5A27;
  --green-meadow: #7A9E5F;
  --green-light: #A8C48A;
  --gold: #C9A227;
  --gold-light: #E8C94A;
  --stone: #C4A882;
  --stone-light: #E8D9C0;
  --cream: #F8F3E8;
  --cream-warm: #FDF8EF;
  --sky: #6B9DC2;
  --sky-light: #B8D4E8;
  --teal: #4A8E8E;
  --teal-light: #7BBDBD;
  --earth: #7A5C38;
  --walnut: #5C3D1A;
  --charcoal: #2C2C24;
  --text: #3A3A30;
  --text-light: #6B6B58;
  --white: #FFFFFF;
  --shadow: rgba(44,44,36,0.12);
  --shadow-deep: rgba(44,44,36,0.25);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
}

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

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--cream-warm);
  line-height: 1.7;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  color: var(--charcoal);
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; color: var(--text); }

a { color: var(--green-deep); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 2rem; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(248,243,232,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--gold);
  padding: 0 2rem;
  transition: all var(--transition);
}
.nav.scrolled {
  background: rgba(45,90,39,0.97);
  border-bottom-color: var(--gold);
}
.nav.scrolled .nav-logo-text,
.nav.scrolled .nav-links a { color: var(--cream); }
.nav.scrolled .nav-links a:hover { color: var(--gold-light); }

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo img { width: 48px; height: 48px; object-fit: contain; }
.nav-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--green-deep); line-height: 1.2;
  transition: color var(--transition);
}
.nav-logo-text span { display: block; font-size: 0.7rem; font-weight: 400; font-family: 'Inter', sans-serif; color: var(--text-light); letter-spacing: 0.05em; }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--charcoal); transition: color var(--transition);
  position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--gold); transition: width var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-donate-btn {
  background: var(--gold); color: var(--charcoal) !important;
  padding: 0.5rem 1.25rem !important; border-radius: 50px;
  font-weight: 600 !important; transition: all var(--transition) !important;
}
.nav-donate-btn:hover { background: var(--green-deep) !important; color: var(--cream) !important; }
.nav-donate-btn::after { display: none !important; }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; z-index: 1100; }
.nav-hamburger span { display: block; width: 28px; height: 3px; background: var(--green-deep); transition: all var(--transition); border-radius: 2px; }
.nav.scrolled .nav-hamburger span { background: var(--cream); }

/* Mobile Menu Container */
.nav-links.open {
  display: flex !important; flex-direction: column;
  position: fixed; inset: 0;
  background: var(--green-deep); 
  padding: 8rem 2rem 2rem;
  gap: 2rem; align-items: center; justify-content: flex-start;
  z-index: 1050;
  animation: fadeIn 0.3s ease;
}
.nav-links.open li a { color: var(--white); font-size: 1.5rem; font-family: 'Playfair Display', serif; }
.nav-links.open .nav-donate-btn { width: 100%; text-align: center; font-size: 1.2rem; margin-top: 1rem; }

/* ===== HERO ===== */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../assets/images/hero.png');
  background-size: cover; background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease-out;
}
.hero-bg.loaded { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(45,90,39,0.3) 0%, rgba(44,44,36,0.65) 60%, rgba(44,44,36,0.85) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 900px; padding: 0 2rem;
}
.hero-badge {
  display: inline-block;
  background: rgba(201,162,39,0.2); border: 1px solid var(--gold);
  color: var(--gold-light); padding: 0.4rem 1.2rem;
  border-radius: 50px; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero h1 { color: var(--white); text-shadow: 0 2px 20px rgba(0,0,0,0.4); margin-bottom: 1.25rem; }
.hero-tagline { font-size: 1.2rem; color: rgba(255,255,255,0.9); max-width: 680px; margin: 0 auto 2rem; }

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 2rem; border-radius: 50px; font-weight: 600; font-size: 1rem; transition: all var(--transition); cursor: pointer; border: 2px solid transparent; text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--charcoal); border-color: var(--gold); }
.btn-primary:hover { background: var(--green-deep); color: var(--white); border-color: var(--green-deep); transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow-deep); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: var(--white); color: var(--green-deep); border-color: var(--white); transform: translateY(-2px); }
.btn-green { background: var(--green-deep); color: var(--white); border-color: var(--green-deep); }
.btn-green:hover { background: var(--green-meadow); border-color: var(--green-meadow); transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.7); font-size: 0.8rem; letter-spacing: 0.1em; z-index: 2;
  animation: bounce 2s infinite;
}
.hero-scroll::after {
  content: ''; width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--green-deep);
  padding: 1.5rem 2rem;
}
.stats-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; text-align: center;
}
.stat-item { color: var(--white); }
.stat-number { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: var(--gold); line-height: 1; }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stone-light); margin-top: 0.25rem; }

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-dark { background: var(--green-deep); }
.section-dark h2, .section-dark h3, .section-dark p { color: var(--white); }
.section-stone { background: var(--stone-light); }
.section-cream { background: var(--cream); }

.section-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.75rem; display: block;
}
.section-title { margin-bottom: 1rem; }
.section-subtitle { font-size: 1.1rem; color: var(--text-light); max-width: 620px; }
.section-header { margin-bottom: 3.5rem; }
.section-header-center { text-align: center; }
.section-header-center .section-subtitle { margin: 0 auto; }

/* ===== MISSION CARDS ===== */
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.mission-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2.5rem 2rem; box-shadow: 0 4px 20px var(--shadow);
  border-top: 4px solid transparent;
  transition: all var(--transition);
}
.mission-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px var(--shadow-deep); border-top-color: var(--gold); }
.mission-icon { font-size: 2.5rem; margin-bottom: 1.25rem; }
.mission-card h3 { margin-bottom: 0.75rem; }
.mission-card p { color: var(--text-light); font-size: 0.95rem; }

/* ===== HISTORY TIMELINE ===== */
.timeline { position: relative; max-width: 1000px; margin: 5rem auto; padding: 2rem 0; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--gold), var(--green-meadow));
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  display: flex; align-items: flex-start; width: 100%;
  margin-bottom: 5rem; position: relative;
  opacity: 0; transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }

/* Right items (Odd) - Domesday Book, etc. */
.timeline-item:nth-child(odd) { justify-content: flex-end; text-align: left; }
.timeline-item:nth-child(odd) .timeline-side { padding-left: 60px; }

/* Left items (Even) - Giffard Family, etc. */
.timeline-item:nth-child(even) { justify-content: flex-start; text-align: right; }
.timeline-item:nth-child(even) .timeline-side { padding-right: 60px; }

.timeline-side { width: 50%; box-sizing: border-box; position: relative; z-index: 2; }

.timeline-dot {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  z-index: 3; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); border: 4px solid var(--white);
  box-shadow: 0 0 0 3px var(--gold);
}

.timeline-content { display: flex; flex-direction: column; width: 100%; }
.timeline-year { font-size: 0.85rem; font-weight: 700; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.5rem; }
.timeline-content h4 { font-size: 1.4rem; margin-bottom: 0.75rem; color: var(--charcoal); font-family: 'Playfair Display', serif; line-height: 1.2; }
.timeline-content p { font-size: 0.98rem; color: var(--text-light); line-height: 1.7; margin: 0; max-width: 100%; }

/* ===== DONATION MODULE ===== */
.donation-module {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 3rem; box-shadow: 0 8px 40px var(--shadow-deep);
}
.donation-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; background: var(--cream); border-radius: 50px; padding: 4px; }
.donation-tab {
  flex: 1; text-align: center; padding: 0.6rem 1rem;
  border-radius: 50px; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition); color: var(--text-light);
  border: none; background: none;
}
.donation-tab.active { background: var(--green-deep); color: var(--white); }

.donation-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.amount-btn {
  padding: 1rem; border: 2px solid var(--stone-light);
  border-radius: var(--radius); background: var(--white);
  text-align: center; cursor: pointer; transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}
.amount-btn:hover { border-color: var(--green-meadow); background: var(--cream); }
.amount-btn.active { border-color: var(--green-deep); background: var(--green-deep); color: var(--white); }
.amount-btn .amount-value { font-size: 1.5rem; font-weight: 700; font-family: 'Playfair Display', serif; display: block; }
.amount-btn .amount-impact { font-size: 0.75rem; margin-top: 0.2rem; opacity: 0.8; }

.donation-custom { margin-bottom: 1.5rem; }
.donation-custom label { font-size: 0.85rem; font-weight: 600; color: var(--text-light); display: block; margin-bottom: 0.5rem; }
.donation-custom input {
  width: 100%; padding: 0.85rem 1.25rem; border: 2px solid var(--stone-light);
  border-radius: var(--radius); font-size: 1.1rem; font-family: 'Inter', sans-serif;
  transition: border-color var(--transition); outline: none;
}
.donation-custom input:focus { border-color: var(--green-deep); }

.progress-wrap { margin-bottom: 2rem; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--text-light); }
.progress-label strong { color: var(--green-deep); font-size: 1rem; }
.progress-bar { height: 12px; background: var(--stone-light); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green-deep), var(--green-meadow), var(--gold)); border-radius: 6px; transition: width 1.5s ease; width: 0; }
.progress-count { font-size: 0.8rem; color: var(--text-light); margin-top: 0.4rem; }

/* ===== IMAGE SECTIONS ===== */
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.split-section.reverse .split-image { order: 2; }
.split-section.reverse .split-content { order: 1; }
.split-image { position: relative; min-height: 500px; overflow: hidden; }
.split-image img { width: 100%; height: 100%; object-fit: cover; }
.split-content { padding: 5rem 4rem; display: flex; flex-direction: column; justify-content: center; }

/* ===== CALLOUT / ALERT BANNER ===== */
.alert-banner {
  background: linear-gradient(135deg, var(--earth) 0%, var(--walnut) 100%);
  padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden;
}
.alert-banner::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.alert-banner h2, .alert-banner p { color: var(--white); position: relative; }
.alert-banner h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.75rem; }
.alert-banner p { opacity: 0.9; max-width: 700px; margin: 0 auto 1.5rem; }

/* ===== CARDS GRID ===== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: 0 4px 20px var(--shadow);
  transition: all var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px var(--shadow-deep); }
.card-img { height: 220px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 1.75rem; }
.card-tag { font-size: 0.75rem; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.card-body h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card-body p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* ===== SOCIAL FEED ===== */
.social-feed-wrap {
  background: var(--stone-light); border-radius: var(--radius-lg);
  padding: 2.5rem; text-align: center;
}
.social-feed-placeholder {
  border: 2px dashed var(--stone); border-radius: var(--radius);
  padding: 4rem 2rem; color: var(--text-light);
}
.social-icons { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem; border-radius: 50px;
  font-size: 0.9rem; font-weight: 500; transition: all var(--transition);
  text-decoration: none;
}
.social-link-fb { background: #1877F2; color: var(--white); }
.social-link-ig { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: var(--white); }
.social-link:hover { transform: translateY(-3px); box-shadow: 0 6px 20px var(--shadow-deep); }

/* ===== TRUST BADGES ===== */
.trust-row { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 2.5rem; padding: 2.5rem 0; border-top: 1px solid var(--stone-light); margin-top: 2rem; }
.trust-item { display: flex; align-items: center; gap: 0.75rem; color: var(--text-light); font-size: 0.9rem; }
.trust-icon { font-size: 1.6rem; }

/* ===== FOOTER ===== */
.footer { background: var(--charcoal); color: var(--stone-light); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .nav-logo-text { color: var(--cream); }
.footer-brand .nav-logo-text span { color: var(--stone); }
.footer-tagline { font-size: 0.9rem; color: var(--stone); margin-top: 1rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 { color: var(--cream); font-size: 1rem; margin-bottom: 1.25rem; font-family: 'Playfair Display', serif; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--stone); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0; display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-light); margin: 0; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: var(--stone); font-size: 1.2rem; transition: color var(--transition); }
.footer-social a:hover { color: var(--gold); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 10rem 0 5rem;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--walnut) 100%);
  text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: var(--stone-light); font-size: 1.1rem; max-width: 650px; margin: 1rem auto 0; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--charcoal); }
.form-control {
  width: 100%; padding: 0.85rem 1.25rem;
  border: 2px solid var(--stone-light); border-radius: var(--radius);
  font-size: 1rem; font-family: 'Inter', sans-serif;
  transition: border-color var(--transition); outline: none; background: var(--white);
}
.form-control:focus { border-color: var(--green-deep); }
textarea.form-control { resize: vertical; min-height: 140px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mission-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .split-section { grid-template-columns: 1fr; }
  .split-image { min-height: 400px; order: 1 !important; }
  .split-content { padding: 4rem 2rem; order: 2 !important; }
  .stats-inner { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  html { font-size: 14px; }
  .container { padding: 0 1.5rem; }
  
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  
  .hero h1 { font-size: 2.8rem; }
  .hero-tagline { font-size: 1rem; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
  .btn { width: 100%; justify-content: center; }

  .stats-inner { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0; }
  .stat-number { font-size: 2.8rem; }

  .mission-grid { grid-template-columns: 1fr; }
  
  /* Mobile Timeline: Flatten to left */
  .timeline::before { left: 20px; transform: none; }
  .timeline-item { width: 100% !important; flex-direction: row !important; text-align: left !important; margin-bottom: 3.5rem; }
  .timeline-side { width: 100%; padding: 0 0 0 50px !important; }
  .timeline-dot { left: 20px !important; transform: translateX(-50%) !important; top: 8px; }
  .timeline-content h4 { font-size: 1.25rem; }

  .donation-module { padding: 2rem 1.5rem; }
  .donation-amounts { grid-template-columns: 1fr 1fr; }
  
  .cards-grid { grid-template-columns: 1fr; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { text-align: center; }
  .footer-brand .nav-logo { justify-content: center; }
  .footer-tagline { max-width: 100%; margin: 1rem auto; }
  .footer-col { text-align: center; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .donation-amounts { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}
