/* ==========================================================================
   FutureReadyTeens Foundation — Shared Styles
   Design tokens: Sprout #73C46C · Mint #A8E6A3 · Moss #163A2E
                  Ink #1F2937 · Canvas #FAFAFA · Slate #6B7280
   Type: Manrope (display) / Inter (body)
   ========================================================================== */

:root {
  --sprout: #73C46C;
  --sprout-dark: #5AA854;
  --mint: #A8E6A3;
  --moss: #163A2E;
  --moss-light: #1F4D3C;
  --ink: #1F2937;
  --slate: #6B7280;
  --canvas: #FAFAFA;
  --surface: #FFFFFF;
  --border: #E7E9E4;
  --shadow-soft: 0 2px 8px rgba(22, 58, 46, 0.05), 0 12px 32px -12px rgba(22, 58, 46, 0.12);
  --shadow-lift: 0 8px 16px rgba(22, 58, 46, 0.06), 0 24px 48px -16px rgba(22, 58, 46, 0.18);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

h1, h2, h3, h4, .font-display {
  font-family: 'Manrope', system-ui, sans-serif;
}

/* ---------- Focus states (accessibility) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--sprout-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Selection ---------- */
::selection { background: var(--mint); color: var(--moss); }

/* ---------- Sticky nav ---------- */
.site-nav {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(250, 250, 250, 0.78);
  border-bottom: 1px solid rgba(22, 58, 46, 0.06);
  transition: box-shadow .3s ease;
}
.site-nav.scrolled { box-shadow: 0 1px 0 rgba(22,58,46,0.06), 0 8px 24px -16px rgba(22,58,46,0.15); }

/* Animated underline links */
.nav-link {
  position: relative;
  color: var(--ink);
  font-weight: 500;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--sprout);
  border-radius: 2px;
  transition: width .28s cubic-bezier(.4,0,.2,1);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--moss); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: .875rem 1.75rem;
  transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s ease, background .22s ease, color .22s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--sprout) 0%, var(--sprout-dark) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(22,58,46,.08), 0 10px 24px -10px rgba(115,196,108,.55);
  background-size: 160% 160%;
  background-position: 0% 50%;
}
.btn-primary:hover { box-shadow: 0 1px 2px rgba(22,58,46,.1), 0 16px 32px -12px rgba(115,196,108,.65); background-position: 100% 50%; }

.btn-secondary {
  background: var(--surface);
  color: var(--moss);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--sprout); background: #F3FAF2; }

.btn-dark {
  background: var(--moss);
  color: #fff;
}
.btn-dark:hover { background: var(--moss-light); box-shadow: 0 16px 32px -14px rgba(22,58,46,.5); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(115,196,108,0.35);
}

/* ---------- Partner logo cards ---------- */
.partner-card {
  filter: none;
  opacity: 1;
  transition: filter .35s ease, opacity .35s ease, transform .35s ease;
}
.partner-card:hover {
  filter: none;
  opacity: 1;
  transform: translateY(-4px);
}
.board-photo {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  min-width: 5.5rem;
  margin-inline: auto;
  border-radius: 9999px;
  object-fit: cover;
  object-position: center 28%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px rgba(115,196,108,.3), var(--shadow-soft);
}
.partner-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 82px;
  object-fit: contain;
}
.partner-logo-operation {
  object-fit: cover;
  object-position: center 52%;
}

/* ---------- Fade in on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* ---------- Hero growth line (signature element) ---------- */
.growth-path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw-line 2.2s cubic-bezier(.65,0,.35,1) .3s forwards;
}
.growth-fill {
  opacity: 0;
  animation: fade-in .8s ease 1.6s forwards;
}
.growth-dot {
  opacity: 0;
  transform-origin: center;
  animation: pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
.growth-dot:nth-of-type(1) { animation-delay: .9s; }
.growth-dot:nth-of-type(2) { animation-delay: 1.35s; }
.growth-dot:nth-of-type(3) { animation-delay: 1.8s; }
.growth-dot:nth-of-type(4) { animation-delay: 2.2s; }

.growth-label {
  opacity: 0;
  animation: fade-up .6s ease forwards;
}
.growth-label:nth-of-type(1) { animation-delay: 1.05s; }
.growth-label:nth-of-type(2) { animation-delay: 1.5s; }
.growth-label:nth-of-type(3) { animation-delay: 1.95s; }
.growth-label:nth-of-type(4) { animation-delay: 2.35s; }

@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes pop-in { to { opacity: 1; transform: scale(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Small decorative sparkline divider echoed between sections */
.sparkline-divider { display: flex; align-items: center; justify-content: center; }
.sparkline-divider svg { overflow: visible; }
.sparkline-divider path {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  transition: stroke-dashoffset 1.1s cubic-bezier(.16,1,.3,1);
}
.sparkline-divider.is-visible path { stroke-dashoffset: 0; }

/* ---------- Hero headline load animation ---------- */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: word-in .8s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes word-in { to { opacity: 1; transform: translateY(0); } }

/* ---------- Gradient mesh backdrop ---------- */
.mesh-bg {
  background:
    radial-gradient(circle at 15% 20%, rgba(168,230,163,0.35), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(115,196,108,0.22), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(22,58,46,0.06), transparent 50%);
}

/* ---------- Stat counters ---------- */
.stat-number { font-variant-numeric: tabular-nums; }

/* ---------- Workshop photo carousel ---------- */
.gallery-carousel { max-width: 820px; margin-inline: auto; }
.carousel-viewport {
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--moss);
  box-shadow: var(--shadow-lift);
}
.carousel-track { display: flex; transition: transform .45s cubic-bezier(.16,1,.3,1); }
.carousel-slide { display: block; flex: 0 0 100%; min-width: 100%; margin: 0; }
.carousel-slide img {
  display: block;
  width: 100%;
  height: clamp(260px, 48vw, 470px);
  object-fit: contain;
  background: #eef3ee;
}
.carousel-caption {
  padding: .85rem 1.25rem;
  color: #fff;
  background: var(--moss);
  font-size: .875rem;
  text-align: center;
}
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; }
.carousel-arrow {
  width: 2.75rem; height: 2.75rem; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--moss); border: 1px solid var(--border);
  box-shadow: var(--shadow-soft); transition: transform .2s ease, border-color .2s ease;
}
.carousel-arrow:hover { transform: translateY(-2px); border-color: var(--sprout); }
.carousel-dots { display: flex; align-items: center; gap: .55rem; }
.carousel-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #cdd7ce; transition: width .25s ease, background .25s ease; }
.carousel-dot.active { width: 1.65rem; border-radius: 9999px; background: var(--sprout-dark); }

/* ---------- Lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(22, 58, 46, 0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(6px);
}
#lightbox.open { display: flex; animation: fade-in .25s ease; }
#lightbox img { max-height: 85vh; max-width: 90vw; border-radius: .75rem; box-shadow: 0 30px 60px rgba(0,0,0,.4); }

/* ---------- Loader ---------- */
#page-loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--canvas);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--sprout);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mobile nav ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1);
}
#mobile-menu.open { max-height: 26rem; }

/* ---------- Form ---------- */
.form-field {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: .875rem;
  padding: .875rem 1rem;
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: 'Inter', sans-serif;
}
.form-field:focus {
  border-color: var(--sprout);
  box-shadow: 0 0 0 4px rgba(115,196,108,0.18);
  outline: none;
}

/* ---------- Utility ---------- */
.text-gradient {
  background: linear-gradient(120deg, var(--sprout-dark), var(--sprout) 55%, var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-word, .growth-path, .growth-fill, .growth-dot, .growth-label, .sparkline-divider path {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}
