/* =============================================
   Acton Bahá'í Community — Stylesheet
   ============================================= */

/* Custom Properties */
:root {
  /* Colors */
  --green-deep:     #0F2A22;
  --green-dark:     #1A4232;
  --green-mid:      #1E5040;
  --green-primary:  #2D6A4F;
  --green-light:    #52936E;
  --gold-primary:   #B87332;
  --gold-bright:    #C98A3E;
  --gold-light:     #DCA86E;
  --gold-pale:      #F0D4A8;
  --cream:          #FBF7F1;
  --warm-white:     #FFFFFF;
  --sand:           #F2E8D8;
  --sand-mid:       #E6D8C4;
  --text-dark:      #1C1208;
  --text-mid:       #463520;
  --text-light:     #7A6248;
  --text-muted:     #A8927A;
  --border:         #DCCFB8;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-w:        1180px;
  --max-w-narrow: 700px;
  --pad-x:        1.5rem;

  /* Shape */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 8px rgba(28, 18, 8, 0.07);
  --shadow-card: 0 3px 20px rgba(28, 18, 8, 0.09);
  --shadow-hover:0 10px 44px rgba(28, 18, 8, 0.15);
  --shadow-lg:   0 20px 64px rgba(28, 18, 8, 0.15);

  /* Motion */
  --t:      0.2s ease;
  --t-med:  0.35s ease;
  --t-slow: 0.5s ease;
}


/* =============================================
   Base Reset
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--text-dark);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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


/* =============================================
   Layout Utilities
   ============================================= */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

.text-center { text-align: center; }

.section {
  padding-block: 5.5rem;
}

.section--alt {
  background-color: var(--sand);
}


/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--green-mid);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.625rem;
}

p { color: var(--text-mid); }

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 0.75rem;
}

.section-header { margin-bottom: 3.5rem; }

.section-lead {
  font-size: 1.05rem;
  max-width: 600px;
  margin-inline: auto;
  color: var(--text-mid);
  line-height: 1.85;
}


/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.875rem;
  border-radius: var(--r-full);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  transition: all var(--t);
  white-space: nowrap;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold-primary);
  color: white;
  border-color: var(--gold-primary);
}
.btn-gold:hover {
  background: #9A5E20;
  border-color: #9A5E20;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(184, 115, 50, 0.45);
}

.btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-outline {
  background: transparent;
  color: var(--green-primary);
  border-color: var(--green-primary);
}
.btn-outline:hover {
  background: var(--green-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(45, 106, 79, 0.3);
}

.btn-full { width: 100%; }


/* =============================================
   Navigation
   ============================================= */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 1000;
  padding-block: 1.375rem;
  transition: background var(--t-med), padding var(--t-med), box-shadow var(--t-med);
}

.site-header.is-scrolled {
  background: rgba(15, 42, 34, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-block: 0.875rem;
  box-shadow: 0 2px 28px rgba(0, 0, 0, 0.28);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
}

.nav-star { color: var(--gold-light); flex-shrink: 0; }

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

.nav-links li { list-style: none; }

.nav-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--t);
  padding-block: 0.25rem;
}

.nav-links a:hover { color: white; }

.nav-cta {
  background: var(--gold-primary) !important;
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--r-full);
  transition: background var(--t) !important;
}
.nav-cta:hover { background: #9A5E20 !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform var(--t-med), opacity var(--t);
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* =============================================
   Hero
   ============================================= */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(
    148deg,
    var(--green-deep) 0%,
    #184034 28%,
    #1E5035 55%,
    #2E4420 75%,
    #462C0A 100%
  );
}

/* Subtle dot texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Bottom vignette */
.hero::after {
  content: '';
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  height: 35%;
  background: linear-gradient(to bottom, transparent, rgba(8, 22, 18, 0.45));
  pointer-events: none;
}

/* Large decorative nine-pointed star */
.hero-bg-star {
  position: absolute;
  inset-inline-end: -4%;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: min(580px, 58vw);
  aspect-ratio: 1;
  opacity: 0.09;
  pointer-events: none;
}
.hero-bg-star svg { width: 100%; height: 100%; }

.hero .container { position: relative; z-index: 1; }

.hero-content {
  padding-block: 8rem 5rem;
  max-width: 680px;
}

.hero-content .eyebrow { color: var(--gold-light); }

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 4.25rem);
  color: white;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: clamp(0.975rem, 1.8vw, 1.125rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.85;
}

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

.hero-scroll {
  position: absolute;
  inset-block-end: 2rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.1rem;
  z-index: 1;
  animation: float 2.4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}


/* =============================================
   Intro Section
   ============================================= */
.intro-section {
  padding-block: 5.5rem;
  background: var(--warm-white);
}

.star-divider {
  color: var(--gold-primary);
  margin-inline: auto;
  margin-bottom: 2rem;
  width: fit-content;
  opacity: 0.65;
}

.intro-quote {
  margin-bottom: 2rem;
}

.intro-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  color: var(--green-mid);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.intro-quote footer {
  color: var(--gold-bright);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.intro-text {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.9;
}


/* =============================================
   Cards — Principles
   ============================================= */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--warm-white);
  border-radius: var(--r-md);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--t), box-shadow var(--t);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card--bordered {
  border-top: 3px solid var(--gold-primary);
}

.card-icon {
  color: var(--gold-bright);
  margin-bottom: 1.25rem;
  width: fit-content;
}

.card h3 { color: var(--green-mid); }

.card p {
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.78;
}


/* =============================================
   Quote Sections
   ============================================= */
.quote-section {
  padding-block: 5.5rem;
}

.quote-section--green {
  background: linear-gradient(135deg, var(--green-dark), #256048);
}

.quote-section--warm {
  background: linear-gradient(135deg, #35280A, #5E3A10);
}

.pull-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 2rem);
  color: white;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.pull-quote footer {
  color: var(--gold-pale);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.07em;
}


/* =============================================
   Activities Grid
   ============================================= */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.activity-card {
  background: var(--warm-white);
  border-radius: var(--r-md);
  padding: 2rem 1.75rem 2rem 2.25rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--t), box-shadow var(--t);
  position: relative;
}

.activity-card::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  width: 3.5px;
  background: linear-gradient(to bottom, var(--gold-primary), var(--gold-pale));
  border-radius: var(--r-md) 0 0 var(--r-md);
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.activity-num {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--gold-pale);
  line-height: 1;
  margin-bottom: 0.875rem;
  font-weight: 700;
  user-select: none;
}

.activity-card h3 {
  font-size: 1.15rem;
  color: var(--green-mid);
}

.activity-card p {
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.78;
}


/* =============================================
   Get Involved
   ============================================= */
.involved-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.involved-card {
  background: var(--warm-white);
  border-radius: var(--r-md);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--t), box-shadow var(--t);
  display: flex;
  flex-direction: column;
}

.involved-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.involved-card h3 {
  font-size: 1.25rem;
  color: var(--green-mid);
  margin-bottom: 0.75rem;
}

.involved-card p {
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.78;
  margin-bottom: 1.5rem;
  flex: 1;
}

.text-link {
  color: var(--gold-bright);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--t), gap var(--t);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
}
.text-link:hover { color: var(--green-primary); }


/* =============================================
   Contact
   ============================================= */
.contact-section {
  background: var(--cream);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 5rem;
  align-items: start;
}

.contact-info .eyebrow { color: var(--gold-bright); }

.contact-info h2 { margin-bottom: 1.25rem; }

.contact-info > p {
  color: var(--text-mid);
  margin-bottom: 2.5rem;
  line-height: 1.88;
  font-size: 1.0125rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-mid);
}

.contact-list svg { color: var(--gold-bright); flex-shrink: 0; }

.contact-list a {
  color: var(--green-primary);
  transition: color var(--t);
}
.contact-list a:hover { color: var(--gold-bright); }

/* Form */
.contact-form {
  background: var(--warm-white);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.4375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  color: var(--text-dark);
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  resize: vertical;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.5;
}

.form-group textarea {
  min-height: 110px;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6248' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1rem;
  padding-right: 2.75rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.14);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group:last-of-type { margin-bottom: 1.5rem; }

.form-note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.875rem;
}


/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.62);
  padding: 3.5rem 0 2rem;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: white;
}

.footer-brand .nav-star { color: var(--gold-light); }

.footer-brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.footer-brand p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.125rem;
}

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.875rem;
  padding-block: 0.25rem;
  transition: color var(--t);
}
.footer-nav a:hover { color: white; }

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  max-width: 500px;
  line-height: 1.7;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.28);
}


/* =============================================
   Scroll Animations
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

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

/* Stagger delays for grids */
.principles-grid .card:nth-child(1),
.activities-grid .activity-card:nth-child(1),
.involved-grid .involved-card:nth-child(1) { transition-delay: 0ms; }

.principles-grid .card:nth-child(2),
.activities-grid .activity-card:nth-child(2),
.involved-grid .involved-card:nth-child(2) { transition-delay: 90ms; }

.principles-grid .card:nth-child(3),
.activities-grid .activity-card:nth-child(3),
.involved-grid .involved-card:nth-child(3) { transition-delay: 180ms; }

.principles-grid .card:nth-child(4),
.activities-grid .activity-card:nth-child(4) { transition-delay: 270ms; }

.principles-grid .card:nth-child(5),
.activities-grid .activity-card:nth-child(5) { transition-delay: 360ms; }

.principles-grid .card:nth-child(6),
.activities-grid .activity-card:nth-child(6) { transition-delay: 450ms; }


/* =============================================
   Responsive — Tablet
   ============================================= */
@media (max-width: 1024px) {
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .activities-grid  { grid-template-columns: repeat(2, 1fr); }
  .involved-grid    { grid-template-columns: repeat(2, 1fr); }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
}


/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 768px) {

  /* Nav — slide-in drawer */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(300px, 86vw);
    background: var(--green-deep);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 1.75rem 2rem;
    gap: 0;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform var(--t-med);
    z-index: 999;
  }

  .nav-links.is-open { transform: translateX(0); }

  .nav-links li { width: 100%; }

  .nav-links a {
    font-size: 1rem;
    padding-block: 0.75rem;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: block;
  }

  .nav-cta {
    display: inline-flex !important;
    width: auto !important;
    margin-top: 0.875rem;
    border-bottom: none !important;
  }

  /* Sections */
  .section,
  .intro-section,
  .quote-section { padding-block: 4rem; }

  /* Grids */
  .principles-grid,
  .activities-grid,
  .involved-grid { grid-template-columns: 1fr; }

  /* Hero */
  .hero-content { padding-block: 7rem 4.5rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 0.875rem; }
  .hero-bg-star { opacity: 0.05; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-top { flex-direction: column; gap: 1.75rem; }
}


/* =============================================
   Responsive — Small Mobile
   ============================================= */
@media (max-width: 480px) {
  :root { --pad-x: 1.125rem; }
  .contact-form { padding: 1.5rem; }
  .pull-quote p { font-size: 1.2rem; }
  .hero-content h1 { font-size: 2.1rem; }
}


/* =============================================
   Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
