/* Sustenaa — custom styles layered on top of Tailwind utilities */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
}

.font-display {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
}

/* ---------- Nav ---------- */
.nav-shell {
  background: linear-gradient(to bottom, rgba(15, 31, 23, 0.55), rgba(15, 31, 23, 0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s ease;
}
.nav-shell.scrolled {
  background: rgba(15, 31, 23, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-links a {
  color: rgba(255, 255, 255, 0.85);
}
.hover\:text-lime:hover {
  color: #B4FA0E;
}

/* ---------- Hero ---------- */
.hero-gradient {
  background:
    linear-gradient(to top, rgba(15, 31, 23, 0.95) 0%, rgba(15, 31, 23, 0.55) 42%, rgba(15, 31, 23, 0.25) 65%, rgba(15, 31, 23, 0.35) 100%);
}
.eyebrow {
  letter-spacing: 0.14em;
}

/* ---------- Grain texture (subtle, adds warmth without noise on load) ---------- */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Vine divider (signature element) ---------- */
.vine-wrap {
  line-height: 0;
}
.vine-svg {
  width: 100%;
  height: 40px;
  display: block;
}
.vine-svg path {
  fill: none;
  stroke: #B4FA0E;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.vine-svg path.grown {
  stroke-dashoffset: 0;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Cards ---------- */
.mission-card,
.team-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.mission-card:hover,
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(21, 35, 27, 0.18);
}

/* ---------- Buttons ---------- */
.btn-primary {
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
}

/* ---------- Focus states (accessibility) ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #B4FA0E;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Impact photo carousel ----------
   Built on native horizontal scrolling (overflow-x: auto), not a pure
   CSS animation — so it works as a real scrollable element: draggable,
   swipeable, and scrollable with a trackpad or scrollbar, in addition
   to auto-advancing on its own (driven by script.js). This is more
   robust than a keyframe-only approach, since native scroll degrades
   gracefully everywhere even if the auto-scroll JS fails for any
   reason — the row is still usable by hand. Card width is a plain
   flexbox percentage (no container queries needed), so exactly 3
   cards fill the row at any screen size. */
.impact-scroll-wrap {
  --imp-unit: 0.75rem;
  position: relative;
  width: 100%;
}
@media (min-width: 768px) {
  .impact-scroll-wrap {
    --imp-unit: 1.5rem;
  }
}
.impact-track {
  display: flex;
  gap: var(--imp-unit);
  overflow-x: auto;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.impact-track::-webkit-scrollbar {
  display: none;
}
.impact-track.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.impact-card {
  flex: 0 0 auto;
  width: calc((100% - 2 * var(--imp-unit)) / 3);
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(21, 35, 27, 0.05);
  pointer-events: none; /* let drags pass through to the track, not individual images */
}
.impact-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}
@media (min-width: 768px) {
  .impact-fade { width: 56px; }
}
.impact-fade-left {
  left: 0;
  background: linear-gradient(to right, #F7F3E6, transparent);
}
.impact-fade-right {
  right: 0;
  background: linear-gradient(to left, #F7F3E6, transparent);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .vine-svg path {
    stroke-dashoffset: 0;
    transition: none;
  }
  .btn-primary:hover {
    transform: none;
  }
}
