/* ===================================
   The Trail to Mossbrae
   A single-page advocacy site
   =================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Colors - derived from falls.jpeg */
  --color-forest: #2d5a3d;
  --color-forest-dark: #1e3d29;
  --color-moss: #5a8a5c;
  --color-moss-light: #7ba87d;
  --color-water: #7a9ba8;
  --color-water-light: #a8c4cf;
  --color-stone: #a89680;
  --color-stone-light: #c9bfb0;

  --color-bg: #faf9f7;
  --color-bg-alt: #f0eeea;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing - generous for contemporary feel */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  /* Layout */
  --container-max: 48rem;
  --container-wide: 64rem;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 var(--space-md);
}

a {
  color: var(--color-forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-moss);
}

ul {
  margin: 0;
  padding: 0 0 0 1.5rem;
}

li {
  margin-bottom: var(--space-xs);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 50vh;
  min-height: 400px;
  max-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 61, 41, 0.4) 0%,
    rgba(30, 61, 41, 0.6) 50%,
    rgba(30, 61, 41, 0.8) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: var(--space-lg);
  max-width: 50rem;
}

.hero-content h1 {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  opacity: 0.95;
  max-width: 48rem;
  margin: 0 auto;
}

/* --- Introduction Section --- */
.intro {
  padding: var(--space-xl) 0 var(--space-lg) 0;
}

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

.intro p {
  font-size: 1.25rem;
  line-height: 1.9;
  color: var(--color-text-muted);
}

.intro p:first-of-type {
  font-size: 1.375rem;
  color: var(--color-text);
}

/* --- Statistics --- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.stat {
  background: var(--color-bg-alt);
  border-radius: 8px;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--color-forest);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

@media (min-width: 640px) {
  .stats {
    gap: var(--space-md);
  }

  .stat {
    padding: var(--space-lg);
  }
}

/* --- Intro Video --- */
.intro-video {
  margin: 0;
  padding-top: var(--space-lg);
}

.intro-video video {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.intro-video figcaption {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* --- Timeline Section --- */
.timeline-section {
  padding: var(--space-xl) 0 0;
  background: var(--color-bg);
}

.timeline-section > .container > h2 {
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* --- Timeline Chapters --- */
.timeline-chapter {
  padding: var(--space-xl) 0 var(--space-2xl);
  border-top: 1px solid var(--color-stone-light);
}

.chapter-header {
  max-width: var(--container-max);
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-md);
  text-align: center;
}

.chapter-number {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-stone);
  margin-bottom: var(--space-sm);
}

.chapter-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.chapter-dates {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--color-forest);
  margin-bottom: var(--space-md);
}

.chapter-intro {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0;
}

.timeline {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0;
}

/* --- Timeline Entry --- */
.timeline-entry {
  position: relative;
  padding: 0 0 var(--space-xl);
  border-left: 2px solid var(--color-stone-light);
  padding-left: var(--space-lg);
  margin-left: var(--space-sm);
}

.timeline-entry:last-child {
  border-left-color: transparent;
}

.timeline-marker {
  position: absolute;
  left: -0.5rem;
  top: 0;
}

.timeline-marker::before {
  content: '';
  display: block;
  width: 1rem;
  height: 1rem;
  background: var(--color-forest);
  border-radius: 50%;
  border: 3px solid var(--color-bg);
}

.timeline-year {
  display: block;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-forest);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-xs);
}

.timeline-content h3 {
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.timeline-content p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.timeline-source {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-water);
  text-decoration: none;
}

.timeline-source:hover {
  color: var(--color-forest);
  text-decoration: underline;
}

.timeline-source::before {
  content: '→ ';
  opacity: 0.6;
}

/* Incident entry styling */
.timeline-entry--incident .timeline-marker::before {
  background: #c43c3c;
}

.timeline-entry--incident .timeline-year {
  color: #c43c3c;
}

.timeline-entry--incident .timeline-content h3 {
  color: #9a2e2e;
}

.incident-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: #c43c3c;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  font-style: normal;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Future entry styling */
.timeline-entry--future .timeline-marker::before {
  background: var(--color-water);
}

.timeline-entry--future .timeline-year {
  color: var(--color-water);
}

/* --- Featured Quote --- */
.featured-quote {
  position: relative;
  margin: var(--space-xl) 0;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-stone-light);
  border-bottom: 1px solid var(--color-stone-light);
}

.featured-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.5;
  color: var(--color-forest);
  margin: 0 0 var(--space-md);
  text-align: center;
}

.featured-quote p::before {
  content: '"';
}

.featured-quote p::after {
  content: '"';
}

.featured-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-align: center;
}

.quote-source {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-stone);
  margin-top: 0.25rem;
}

/* --- Proposal Section --- */
.proposal-section {
  background: var(--color-bg);
}

.proposal-card {
  margin: 0 auto;
  background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-forest-dark) 100%);
  color: #fff;
  border-radius: 12px;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.proposal-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.proposal-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-moss-light);
 }

.proposal-card h2 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.proposal-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.proposal-note {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-moss-light);
  margin-bottom: var(--space-lg);
}

.proposal-download {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.proposal-download:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

.download-icon::before {
  content: '↓';
  display: inline-block;
  font-size: 1.25rem;
  line-height: 1;
}

/* --- Call to Action Section --- */
.cta {
  padding: var(--space-lg) 0;
  background: var(--color-bg-alt);
}

.cta .container {
  max-width: var(--container-max);
  text-align: center;
}

.cta h2 {
  margin-bottom: var(--space-md);
}

.cta > .container > p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.signature {
}

.signature-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

.signature-email {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-forest);
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-md) 0;
  background: var(--color-stone-light);
  text-align: center;
}

.site-footer h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  display: block;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg);
  border-radius: 4px;
  color: var(--color-forest);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* --- Utilities --- */
@media (max-width: 639px) {
  .stats {
    gap: var(--space-sm);
  }

  .stat {
    padding: var(--space-sm);
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.8125rem;
  }
}

/* --- Print Styles --- */
@media print {
  .hero {
    min-height: auto;
    padding: var(--space-lg);
    background: var(--color-forest);
    color: #fff;
  }

  .hero-image,
  .hero-overlay,
  .scroll-indicator {
    display: none;
  }

  .timeline::before {
    background: #ccc;
  }

  .timeline-content {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .featured-quote {
    background: #f0f0f0;
    color: var(--color-text);
    border: 2px solid var(--color-forest);
  }

  .contact-card {
    background: #f0f0f0;
    color: var(--color-text);
    border: 2px solid var(--color-forest);
  }

  .contact-link {
    color: var(--color-forest);
    background: none;
  }
}

/* --- Scroll Animation (enhanced by JS) --- */
.timeline-entry,
.featured-quote {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-entry.animate-in,
.featured-quote.animate-in {
  opacity: 1;
  transform: translateY(0);
}
