@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   DESIGN TOKENS — Modern Dark Zen
   ============================================================ */
:root {
  --color-earth:       #1C1917;
  --color-earth-mid:   #242120;
  --color-earth-light: #2E2B28;
  --color-sand:        #D4C5A9;
  --color-sand-muted:  #7A6E5E;
  --color-warm-white:  #F5F0E8;
  --color-red:         #9B2335;
  --color-red-glow:    rgba(155, 35, 53, 0.35);

  --shadow-dark: 0 12px 40px rgba(0,0,0,0.5);
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--color-earth);
  color: var(--color-warm-white);
  line-height: 1.7;
  overflow-x: hidden;
  /* position:relative so absolute children (path SVG) anchor to body */
  position: relative;
}

/* ============================================================
   GRAIN TEXTURE OVERLAY
   ============================================================ */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.045;
}

/* ============================================================
   PETAL CANVAS
   ============================================================ */
#petal-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ============================================================
   CONTINUOUS GARDEN PATH SVG
   ============================================================ */
#garden-path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1; /* Below the glass cards but above background */
  overflow: visible;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(28, 25, 23, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(212, 197, 169, 0.07);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-sand);
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo span { color: var(--color-red); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  color: var(--color-sand-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--color-sand);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover, .nav-link.active { color: var(--color-sand); }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
  z-index: 10;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 50%,
    rgba(212, 197, 169, 0.055) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-sand-muted);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(4.5rem, 13vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--color-sand);
  margin-bottom: 1rem;
}
.hero-title span { color: var(--color-red); }

.hero-tagline {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 300;
  color: var(--color-sand-muted);
  line-height: 1.6;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-sand-muted);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: hintFadeIn 1.2s 1s both;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-sand-muted), transparent);
  animation: scrollLinePulse 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollLinePulse {
  0%, 100% { opacity: 0.35; transform: scaleY(1); }
  50%       { opacity: 0.9;  transform: scaleY(1.15); }
}
@keyframes hintFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   GARDEN SECTIONS
   ============================================================ */
.garden-section {
  position: relative;
  padding: 7rem 2rem;
  z-index: 10;
}

.section-inner { max-width: 900px; margin: 0 auto; }

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--color-sand);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 3rem;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.30s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.60s; }
.reveal-delay-5 { transition-delay: 0.75s; }

/* ============================================================
   MISSION
   ============================================================ */
.mission-layout {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.mission-text-col {
  flex: 1 1 0;
  min-width: 0;
}

.mission-stone-col {
  flex: 0 0 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stone-wrap {
  position: relative;
  width: 450px;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stone-img {
  position: relative;
  z-index: 2;
  width: 900px;
  max-width: 120%;
  height: auto;
  mix-blend-mode: normal;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.7));
}

.mission-text { max-width: 100%; }

.mission-lead {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-warm-white);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(212, 197, 169, 0.12);
}

/* Responsive: stack vertically on smaller screens */
@media (max-width: 768px) {
  .mission-layout { flex-direction: column; gap: 2rem; }
  .mission-stone-col { flex: none; order: -1; }
  .stone-wrap { width: 300px; height: 300px; }
  .stone-img { width: 220px; }
}

.mission-body {
  font-size: 1.02rem;
  color: var(--color-sand-muted);
  line-height: 1.95;
  font-weight: 300;
}

/* ============================================================
   BOARD MEMBERS
   ============================================================ */
.board-grid {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 2rem; 
}

.board-member {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  
  /* S-shape logic */
  width: 32%; 
  height: 250px; /* Shorter card */
  display: flex;
  flex-direction: row; /* Horizontal layout for expansion */
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  position: relative;
  z-index: 2;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Mirror the content for right-side cards so they expand leftwards into the center! */
.board-member:nth-child(even) {
  flex-direction: row-reverse;
  text-align: right;
}

/* Internal Layouts */
.member-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100%; /* Initially takes full width of the unexpanded card */
  text-align: center;
  transition: min-width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.member-bio {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  padding: 0;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap; /* Prevent messy wrapping during animation */
}

.member-bio p {
  white-space: normal; /* Normal wrapping once expanded */
  width: 380px; /* Fixed width so text reflows instantly */
  margin: 0;
  line-height: 1.6;
}

/* HOVER EXPANSION STATE */
.board-member:hover {
  width: 75%; /* Expand smoothly into the center runway */
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 197, 169, 0.3);
  box-shadow: 0 15px 50px rgba(0,0,0,0.4);
  z-index: 10; /* Bring above other cards while expanded */
}

.board-member:hover .member-profile {
  min-width: 180px; /* Shrink profile to make room for bio */
}

.board-member:hover .member-bio {
  opacity: 1;
  max-width: 500px;
  padding: 0 2rem;
}

/* Create the vertical overlap by pulling subsequent cards UP */
.board-member + .board-member {
  margin-top: -3rem; /* Adjusted for shorter 250px height */
}

/* Stagger them left and right! */
.board-member:nth-child(odd) {
  align-self: flex-start;
}
.board-member:nth-child(even) {
  align-self: flex-end;
}

.board-member:hover {
  border-color: rgba(212, 197, 169, 0.25);
  transform: translateY(-8px);
  box-shadow: var(--shadow-dark);
}

.member-avatar {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 20px;
  object-fit: cover;
  background: rgba(212, 197, 169, 0.1);
  border: 2px solid rgba(212, 197, 169, 0.2);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s ease;
  margin-bottom: 1.5rem;
}
.board-member:hover .member-avatar { border-color: rgba(212, 197, 169, 0.4); }
.placeholder-avatar::after { content: '👤'; font-size: 2.5rem; opacity: 0.25; }

.board-member h3 {
  color: var(--color-sand);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.board-member p {
  color: var(--color-sand-muted);
  font-size: 0.88rem;
  line-height: 1.75;
  font-weight: 300;
}

/* ============================================================
   PAST EVENTS TIMELINE
   ============================================================ */
.timeline-container {
  border-left: 1px solid rgba(212, 197, 169, 0.15);
  padding-left: 2.5rem;
}

.timeline-item { position: relative; margin-bottom: 3rem; }

.timeline-dot {
  position: absolute;
  left: -2.9rem; top: 0.5rem;
  width: 13px; height: 13px;
  background: var(--color-red);
  border-radius: 50%;
  border: 3px solid var(--color-earth);
  box-shadow: 0 0 14px var(--color-red-glow);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--color-earth-mid);
  border: 1px solid rgba(212, 197, 169, 0.07);
  border-radius: var(--border-radius-md);
  padding: 1.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.timeline-content:hover {
  border-color: rgba(212, 197, 169, 0.18);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
@media (min-width: 600px) {
  .timeline-content { flex-direction: row; align-items: flex-start; }
}

.timeline-photo {
  flex-shrink: 0; width: 100%; height: 160px;
  background: var(--color-earth-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-sand-muted); font-size: 0.88rem;
}
@media (min-width: 600px) { .timeline-photo { width: 200px; height: 140px; } }

.timeline-text h3 { color: var(--color-sand); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.timeline-text h3 a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.timeline-text h3 a:hover { color: var(--color-red); }
.timeline-text p { color: var(--color-sand-muted); font-size: 0.9rem; line-height: 1.8; font-weight: 300; margin-top: 0.5rem; }

.event-date {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--color-sand-muted);
  border: 1px solid rgba(212, 197, 169, 0.18);
  padding: 0.2rem 0.65rem; border-radius: 99px; margin-bottom: 0.5rem;
}
.event-date.highlight { color: var(--color-red); border-color: rgba(155, 35, 53, 0.45); }

/* ============================================================
   UPCOMING EVENTS
   ============================================================ */
.upcoming-events-container { display: flex; flex-direction: column; gap: 1.5rem; }

.event-card-horizontal {
  display: flex; flex-direction: column;
  background: var(--color-earth-mid);
  border: 1px solid rgba(212, 197, 169, 0.07);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.event-card-horizontal.featured { border-color: rgba(155, 35, 53, 0.25); }
.event-card-horizontal:hover {
  border-color: rgba(212, 197, 169, 0.22);
  transform: translateY(-5px);
  box-shadow: var(--shadow-dark);
}
@media (min-width: 768px) { .event-card-horizontal { flex-direction: row; } }

.event-card-photo {
  width: 100%; height: 220px;
  background: var(--color-earth-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-sand-muted); font-size: 0.88rem;
  flex-shrink: 0;
}
@media (min-width: 768px) { .event-card-photo { width: 38%; height: auto; min-height: 220px; } }

.event-card-details { padding: 2rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.event-card-details h3 { font-size: 1.05rem; font-weight: 600; color: var(--color-sand); margin-bottom: 0.5rem; }
.event-card-details h3 a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.event-card-details h3 a:hover { color: var(--color-red); }
.event-card-details p { color: var(--color-sand-muted); font-size: 0.9rem; line-height: 1.75; font-weight: 300; margin: 0.25rem 0 0.75rem; }
/* ============================================================
   BUTTON
   ============================================================ */
.btn-primary {
  align-self: flex-start;
  background: var(--color-red);
  color: var(--color-warm-white);
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-family: inherit; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; letter-spacing: 0.04em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { background: #b5293f; transform: translateY(-2px); box-shadow: 0 6px 20px var(--color-red-glow); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid rgba(212, 197, 169, 0.07);
  z-index: 10; position: relative;
}
.footer-logo { font-size: 1.8rem; font-weight: 800; color: var(--color-sand); letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.footer-logo span { color: var(--color-red); }
.footer-copyright { color: var(--color-sand-muted); font-size: 0.8rem; font-weight: 300; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-container { padding: 1rem 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; }
  .nav-link { font-size: 0.75rem; }
  .garden-section { padding: 4.5rem 1.5rem; }
}

@media (max-width: 768px) { .board-grid { gap: 2rem; } .board-member { width: 100%; flex-direction: column !important; text-align: center !important; align-self: center !important; } .member-avatar { margin-bottom: 1rem; } }

/* ============================================================
   CAROUSEL & LIGHTBOX
   ============================================================ */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
  flex-shrink: 0;
}
@media (min-width: 600px) {
  .carousel-wrapper {
    width: 250px;
    margin-bottom: 0;
  }
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.carousel-btn:hover { background: rgba(0, 0, 0, 0.8); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-container {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar {
  display: none;
}
.carousel-track {
  display: flex;
  gap: 0;
}
.carousel-image {
  scroll-snap-align: start;
  flex: 0 0 100%;
  height: 250px;
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.carousel-image:hover {
  transform: scale(1.02);
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}
.lightbox.active {
  display: flex;
}
.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s ease;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10002;
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10001;
}
.lightbox-btn:hover { background: rgba(0, 0, 0, 0.8); }
.lightbox-btn.prev { left: 40px; }
.lightbox-btn.next { right: 40px; }

@keyframes zoomIn {
  from {transform: scale(0.9); opacity: 0;}
  to {transform: scale(1); opacity: 1;}
}
