/* ===== Variables & Reset ===== */
:root {
  --crimson: #BA262D;
  --crimson-dark: #961f24;
  --clay: #876237;
  --clay-light: #a07a4f;
  --dark-brown: #3E2E18;
  --parchment: #F5EEE3;
  --parchment-dark: #E8DFD0;
  --peach-light: #FFEDE6;
  --white: #ffffff;
  --text: #3E2E18;
  --text-secondary: #6b5d4f;
  --orange: #f49322;
  --green: #728e38;
  --blue: #005c85;
  --light-blue: #4fa7c5;
  --tan: #d8ccb7;
  --dark-green: #34441c;
  --deep-red: #6c162b;
  --deep-blue: #003b59;
  --shadow-sm: 0 1px 3px rgba(62, 46, 24, 0.08);
  --shadow: 0 4px 12px rgba(62, 46, 24, 0.1);
  --shadow-lg: 0 8px 30px rgba(62, 46, 24, 0.15);
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
}

body {
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--text);
  background: var(--parchment);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark-brown);
}

/* PT Serif for subheads, callouts, and italic accents */
.tagline,
.meet-location,
.meet-note,
.schedule-detail,
.event-meta,
.grade-label {
  font-family: 'PT Serif', Georgia, serif;
}

a {
  color: var(--crimson);
  text-decoration: underline;
  text-decoration-color: rgba(186, 38, 45, 0.3);
  text-underline-offset: 3px;
  transition: color 0.3s, text-decoration-color 0.3s;
}

a:hover {
  color: var(--crimson-dark);
  text-decoration-color: var(--crimson-dark);
}

/* ===== Scroll-triggered Animations (Apple-style) ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.24s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.36s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Scale-in for hero */
.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ===== Layout ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--parchment-dark);
}


.section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 4px solid var(--crimson);
  color: var(--dark-brown);
}

/* ===== Header / Hero Slideshow ===== */
.hero {
  position: relative;
  background: var(--dark-brown);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
}

/* Dark overlay on top of slides */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(62,46,24,0.35) 0%, rgba(62,46,24,0.6) 100%);
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 48px 20px;
}

.hero-overlay h1 {
  color: var(--white);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  letter-spacing: 1.5px;
}

.tagline {
  color: var(--peach-light);
  font-family: 'PT Serif', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 3px;
  text-transform: none;
}

/* ===== Sticky Nav ===== */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark-brown);
  box-shadow: 0 2px 10px rgba(62, 46, 24, 0.3);
  backdrop-filter: blur(10px);
  transition: background 0.3s;
}

.sticky-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
}

.sticky-nav a {
  display: block;
  padding: 15px 26px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.3s, background 0.3s;
  position: relative;
}

.sticky-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--crimson);
  transition: width 0.3s, left 0.3s;
}

.sticky-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.sticky-nav a:hover::after {
  width: 60%;
  left: 20%;
}

/* ===== Mission ===== */
#mission p {
  font-size: 1.08rem;
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--text);
}

.mission-links {
  font-weight: 600;
}

/* ===== Where We Meet ===== */
.meet-location {
  font-size: 1.05rem;
  margin-bottom: 36px;
  line-height: 1.9;
}

.meet-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: var(--white);
  border-left: 3px solid var(--clay);
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 28px;
  max-width: 720px;
  box-shadow: var(--shadow-sm);
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Meeting cards */
.meeting-card {
  border-top: 3px solid var(--crimson);
}

.meeting-card h3 {
  font-size: 1.12rem;
  margin-bottom: 12px;
  color: var(--dark-brown);
  text-transform: none;
}

.grade-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 400;
  font-style: italic;
  text-transform: none;
}

.schedule-detail {
  font-weight: 700;
  font-style: italic;
  color: var(--clay);
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.schedule-time {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--crimson);
  margin-bottom: 8px;
}

/* Event cards */
.event-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.date-badge {
  flex-shrink: 0;
  width: 70px;
  background: var(--crimson);
  color: var(--white);
  border-radius: var(--radius);
  text-align: center;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  transition: transform 0.3s;
}

.card:hover .date-badge {
  transform: scale(1.05);
}

.date-month {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.date-day {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'Open Sans', sans-serif;
}

.date-year {
  font-size: 0.68rem;
  opacity: 0.8;
}

.event-info h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--dark-brown);
  text-transform: none;
}

.event-meta {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ===== What is Trail Life — Pillar Cards ===== */
#what-is-trail-life p {
  font-size: 1.08rem;
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--text);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.pillar-card {
  text-align: center;
  border-top: 3px solid var(--clay);
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--crimson);
}

.pillar-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
  color: var(--dark-brown);
  text-transform: none;
}

.pillar-card p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.faq-item {
  border-left: 3px solid var(--crimson);
  padding: 0;
  cursor: pointer;
}

.faq-item summary {
  list-style: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--crimson);
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item summary h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--dark-brown);
  pointer-events: none;
  text-transform: none;
  font-family: 'PT Serif', Georgia, serif;
  font-style: italic;
}

.faq-item p {
  padding: 0 24px 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Contact Form ===== */
#contact > .container > p {
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.contact-form {
  max-width: 640px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  transition: box-shadow 0.3s;
}

.contact-form:focus-within {
  box-shadow: var(--shadow-lg);
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--dark-brown);
}

.required {
  color: var(--crimson);
}

.optional {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--parchment-dark);
  border-radius: 6px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--parchment);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--crimson);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(186, 38, 45, 0.1);
}

.btn-submit {
  background: var(--crimson);
  color: var(--white);
  border: none;
  padding: 13px 36px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn-submit:hover {
  background: var(--crimson-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(186, 38, 45, 0.3);
}

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

/* ===== Embedded Map ===== */
.map-wrapper {
  margin-top: 48px;
  max-width: 640px;
}

.map-wrapper h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--dark-brown);
  text-transform: none;
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}

.map-container iframe {
  display: block;
  width: 100%;
  min-height: 350px;
}

/* ===== Footer ===== */
footer {
  background: var(--dark-brown);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 40px 20px;
}

.footer-main {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--peach-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-small {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ===== Hamburger Button (hidden on desktop) ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 20px;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .hero {
    min-height: 300px;
  }

  .hero-overlay h1 {
    font-size: 1.7rem;
  }

  .tagline {
    font-size: 0.9rem;
    letter-spacing: 2px;
  }

  .section {
    padding: 52px 0;
  }

  .section h2 {
    font-size: 1.4rem;
  }

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

  .event-card {
    flex-direction: column;
    gap: 12px;
  }

  .date-badge {
    flex-direction: row;
    width: auto;
    gap: 8px;
    padding: 8px 16px;
    align-items: baseline;
  }

  .date-day {
    font-size: 1.2rem;
  }

  .contact-form {
    padding: 22px;
  }

  /* Hamburger visible on mobile */
  .hamburger {
    display: flex;
  }

  .sticky-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .sticky-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-brown);
    box-shadow: 0 8px 20px rgba(62, 46, 24, 0.3);
  }

  .sticky-nav ul.nav-open {
    display: flex;
  }

  .sticky-nav a {
    padding: 14px 24px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sticky-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .scale-in,
  .stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
