/* ============================================================
   GROXYN — Design Revamp (v2)
   Loaded after the Tailwind bundle. Refines the existing brand
   (forest green #386941, cream, charcoal, Plus Jakarta Sans)
   without altering markup structure.
   ============================================================ */

/* ---------- 1. Base polish ---------- */
::selection { background: #386941; color: #fff; }

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Branded scrollbar (desktop) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f4f2; }
::-webkit-scrollbar-thumb { background: #386941; border-radius: 8px; border: 2px solid #f1f4f2; }
::-webkit-scrollbar-thumb:hover { background: #2c5d36; }

/* ---------- 2. Buttons ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, filter 0.22s ease !important;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(56, 105, 65, 0.35), inset 0 1px 0 rgba(255,255,255,0.22) !important;
  filter: brightness(1.04);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
/* shine sweep */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }

/* ---------- 3. Cards ---------- */
.card-raised {
  border: 1px solid rgba(56, 105, 65, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}
.card-raised:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(45, 52, 50, 0.12) !important;
  border-color: rgba(56, 105, 65, 0.22);
}

/* ---------- 4. Nav ---------- */
.glass-nav {
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(253, 254, 253, 0.82) !important;
  border-bottom: 1px solid rgba(56, 105, 65, 0.08);
  transition: box-shadow 0.3s ease;
}
.glass-nav.scrolled { box-shadow: 0 8px 30px rgba(45, 52, 50, 0.08); }

/* ---------- 5. Hero ---------- */
.hero-mesh {
  background:
    radial-gradient(52% 38% at 18% 12%, rgba(185, 240, 189, 0.5) 0%, transparent 70%),
    radial-gradient(44% 36% at 85% 22%, rgba(52, 211, 153, 0.16) 0%, transparent 70%),
    radial-gradient(60% 46% at 50% 108%, rgba(56, 105, 65, 0.1) 0%, transparent 70%);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(56, 105, 65, 0.16);
  box-shadow: 0 6px 20px rgba(56, 105, 65, 0.1);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2c5d36;
}
.hero-eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 9999px;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.22);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52,211,153,0.25); }
  50% { box-shadow: 0 0 0 7px rgba(52,211,153,0.08); }
}

/* ---------- 6. Section rhythm & headings ---------- */
.section-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2c5d36;
}
.grad-text {
  background: linear-gradient(100deg, #386941 20%, #059669 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 7. Testimonials ---------- */
.testimonial-card { position: relative; overflow: hidden; }
.testimonial-card::before {
  content: "\201C";
  position: absolute;
  top: -0.4rem; right: 1rem;
  font-size: 5.5rem;
  line-height: 1;
  color: rgba(56, 105, 65, 0.1);
  font-family: Georgia, serif;
  pointer-events: none;
}

/* ---------- 8. FAQ accordion ---------- */
.faq-item { transition: background 0.25s ease, border-color 0.25s ease; }
.faq-item[data-open="true"] {
  background: rgba(240, 250, 234, 0.6);
  border-color: rgba(56, 105, 65, 0.2);
}

/* ---------- 9. Logo marquee ---------- */
.marquee-mask {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-logo {
  filter: grayscale(0.25) opacity(0.85);
  transition: filter 0.25s ease, transform 0.25s ease;
}
.marquee-logo:hover { filter: grayscale(0) opacity(1); transform: scale(1.06); }

/* ---------- 10. Footer ---------- */
.footer-link { position: relative; }
.footer-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1.5px;
  background: #386941;
  transition: width 0.25s ease;
}
.footer-link:hover::after { width: 100%; }

/* ---------- 11. Cookie banner ---------- */
#cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 90;
  max-width: 46rem;
  margin: 0 auto;
  background: rgba(31, 61, 40, 0.97);
  color: #f0faea;
  border: 1px solid rgba(185, 240, 189, 0.18);
  border-radius: 1.1rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 24px 60px rgba(20, 30, 24, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
#cookie-banner.show { transform: translateY(0); opacity: 1; }
#cookie-banner p { font-size: 0.85rem; line-height: 1.55; color: #dce8dd; margin: 0 0 0.9rem; }
#cookie-banner a { color: #b9f0bd; text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-actions button {
  flex: 1 1 0;
  min-width: 9rem;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
#cookie-reject {
  background: transparent;
  color: #f0faea;
  border: 1.5px solid rgba(240, 250, 234, 0.35);
}
#cookie-reject:hover { background: rgba(240, 250, 234, 0.1); transform: translateY(-1px); }
#cookie-accept {
  background: linear-gradient(#3f7a4d, #2c5d36);
  color: #fff;
  border: 1.5px solid transparent;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}
#cookie-accept:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(0,0,0,0.38); }

/* ---------- 12. Legal pages ---------- */
.legal-body h2 { scroll-margin-top: 6rem; }
.legal-body p, .legal-body li { color: #3a4340; }
.legal-body strong { color: #1f3d28; }
.legal-body a { color: #2c5d36; text-decoration: underline; text-underline-offset: 3px; }
.legal-body section {
  background: #fff;
  border: 1px solid rgba(56, 105, 65, 0.1);
  border-radius: 1rem;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 8px 24px rgba(45, 52, 50, 0.05);
}

/* ---------- 13. 404 ---------- */
.error-404 { text-align: center; padding: 7rem 1.5rem 5rem; }
.error-404 h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  color: #1f3d28;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.error-404 p { color: #59615f; max-width: 32rem; margin: 0 auto 2rem; }

/* ---------- 14. Accessibility ---------- */
:focus-visible {
  outline: 3px solid #059669 !important;
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #1f3d28;
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 0.6rem 0;
  z-index: 100;
  font-weight: 700;
  font-size: 0.85rem;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 15. Mobile refinements ---------- */
@media (max-width: 640px) {
  #cookie-banner { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }
  .btn-primary { min-height: 48px; }
}

/* vanilla mobile menu (legal pages, no React runtime) */
#mobile-menu {
  position: fixed; top: 4rem; left: 0; right: 0; z-index: 49;
  background: rgba(253,254,253,0.98);
  border-bottom: 1px solid rgba(56,105,65,0.1);
  box-shadow: 0 18px 40px rgba(45,52,50,0.1);
  padding: 0.75rem 1.25rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
#mobile-menu[hidden] { display: none; }
#mobile-menu a:not(.btn-primary) {
  padding: 0.7rem 0.5rem; border-radius: 0.6rem;
  font-weight: 600; font-size: 0.95rem; color: #2d3432;
}
#mobile-menu a:not(.btn-primary):hover { background: #f1f4f2; color: #2c5d36; }
#mobile-menu .btn-primary { margin-top: 0.5rem; text-align: center; }
@media (min-width: 768px) { #mobile-menu { display: none !important; } }
