/* ═══════════════════════════════════════════════════════════
   FARMELIO — MODERN LAYER
   Enhancements: scroll progress, impact bento, testimonial
   carousel, pre-footer CTA, gradient text, focus rings.
   Loads after glass.css so specificity is unambiguous.
═══════════════════════════════════════════════════════════ */

/* ── EXTRA ROOT TOKENS ───────────────────────────────────── */
:root {
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --amber-700: #b45309;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --z-progress: 1001;
  --z-toast:    9999;
}

/* ── GLOBAL FOCUS RING ────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--green-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── SCROLL PROGRESS BAR ─────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--green-600), var(--green-400), var(--amber-400));
  z-index: var(--z-progress);
  pointer-events: none;
  transition: width 0.1s linear;
}

/* ── HERO GRADIENT ACCENT ────────────────────────────────── */
.hero__headline-accent.is-gradient {
  background: linear-gradient(135deg, var(--green-300) 0%, var(--amber-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__headline-accent.is-gradient::after { display: none; }

/* ── HERO SUB CONTRAST FIX ───────────────────────────────── */
.hero__sub { color: rgba(255,255,255,.75); }

/* ── TABULAR NUMS ON PRICES ──────────────────────────────── */
.product-card__price,
.hero__card span { font-variant-numeric: tabular-nums; }

/* ── BIGGER ABOUT STATS ──────────────────────────────────── */
.about__stat-num { font-size: 3.5rem !important; }

/* ══════════════════════════════════════════════════════════
   IMPACT NUMBERS BENTO
══════════════════════════════════════════════════════════ */
.impact {
  background: var(--stone-950);
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

.impact::before {
  content: '';
  position: absolute;
  width: 700px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,.07) 0%, transparent 70%);
  top: -150px; right: -100px;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.impact .container { position: relative; z-index: 1; }

.impact-bento {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r-2xl);
  overflow: hidden;
}

.impact-cell {
  background: #080d09;
  padding: var(--space-12) var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: background var(--t-slow) var(--ease);
}

.impact-cell:hover { background: #0d1810; }

.impact-cell--xl   { grid-row: span 2; }

.impact-cell--accent       { background: rgba(22,101,52,.32); }
.impact-cell--accent:hover { background: rgba(22,101,52,.44); }

.impact-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  display: block;
}

.impact-num-suffix {
  font-size: 0.5em;
  letter-spacing: 0;
  color: rgba(255,255,255,.45);
  margin-left: 2px;
}

.impact-cell--accent .impact-num         { color: var(--green-400); }
.impact-cell--accent .impact-num-suffix  { color: rgba(74,222,128,.55); }

.impact-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,.38);
  max-width: 260px;
  line-height: 1.5;
}

.impact-cell--accent .impact-label { color: rgba(74,222,128,.55); }

@media (max-width: 768px) {
  .impact-bento { grid-template-columns: 1fr; }
  .impact-cell--xl { grid-row: auto; }
  .impact-num { font-size: clamp(3.5rem, 14vw, 5rem); }
  .impact-cell { padding: var(--space-8) var(--space-6); }
}

/* ══════════════════════════════════════════════════════════
   TESTIMONIAL CAROUSEL
══════════════════════════════════════════════════════════ */
.testimonial-carousel {
  margin: 0 calc(-1 * var(--space-6));
  padding: 0 var(--space-6);
}

.testimonial-track {
  display: flex;
  gap: var(--space-5);
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  padding: var(--space-2) 0 var(--space-6);
}

.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-track.is-dragging        { cursor: grabbing; }

/* Override: was grid, now flex carousel items */
.testimonial-grid { display: contents; }

.testimonial {
  scroll-snap-align: start !important;
  flex: 0 0 min(84vw, 520px) !important;
  /* keep existing glass.css styles, just fix layout */
}

.testimonial--featured {
  flex: 0 0 min(90vw, 600px) !important;
}

.testimonial__quote-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 0.6;
  font-style: italic;
  color: var(--green-600);
  opacity: 0.35;
  margin-bottom: var(--space-4);
  user-select: none;
}

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding-top: var(--space-2);
}

.tc-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  transition: all var(--t-base) var(--ease-out);
  flex-shrink: 0;
  cursor: pointer;
}

.tc-btn:hover {
  background: rgba(34,197,94,.18);
  border-color: rgba(74,222,128,.4);
  color: var(--green-400);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(34,197,94,.12);
}

.tc-dots {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.tc-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  border: none; padding: 0;
  cursor: pointer;
  transition: all var(--t-base) var(--ease);
}

.tc-dot.active {
  background: var(--green-400);
  width: 20px;
  border-radius: 3px;
}

@media (max-width: 480px) {
  .testimonial          { flex: 0 0 90vw !important; }
  .testimonial--featured { flex: 0 0 93vw !important; }
}

/* ══════════════════════════════════════════════════════════
   PRE-FOOTER CTA
══════════════════════════════════════════════════════════ */
.prefooter {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--green-950) 0%, #060e08 55%, var(--stone-950) 100%);
  padding: var(--space-24) 0;
  text-align: center;
}

.prefooter::before {
  content: '';
  position: absolute;
  width: 700px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,.13) 0%, transparent 70%);
  top: -140px; left: 50%;
  transform: translateX(-50%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.prefooter .container { position: relative; z-index: 1; }

.prefooter .section-eyebrow { color: var(--green-400); margin-bottom: var(--space-4); }

.prefooter__headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
  text-wrap: balance;
  margin: 0 0 var(--space-5);
}

.prefooter__sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.50);
  max-width: 400px;
  margin: 0 auto var(--space-10);
  line-height: 1.7;
}

.prefooter__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .prefooter__actions { flex-direction: column; align-items: stretch; }
  .prefooter__actions .btn { justify-content: center; }
}

/* ── DARK MODE ────────────────────────────────────────────── */
/* New sections are already dark — no dark-mode overrides needed.
   Only the tc-btn in light-mode contexts (if testimonials ever
   renders light) needs an alternative. Currently testimonials
   stays dark via glass.css, so all good. */
