/* ============================================================
   VIONETA Design System — main.css
   Award-winning polish: smooth animations, refined typography,
   glassmorphism, micro-interactions, and optimized layout.
   ============================================================ */

/* --- Base Reset & Typography --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Headings use Space Grotesk --- */
h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* --- Code / Tech elements --- */
.font-mono-tech {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================================
   PAGE LOAD OVERLAY — smooth reveal on page entry
   ============================================================ */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.page-loader .loader-logo {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: #10B981;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}
@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   GRADIENTS & COLORS
   ============================================================ */
.gradient-primary {
  background: linear-gradient(135deg, #0D6B3F 0%, #10B981 100%);
}
.gradient-primary-dark {
  background: linear-gradient(135deg, #064E2C 0%, #0D6B3F 100%);
}
.gradient-hero {
  background: linear-gradient(160deg, #0F172A 0%, #064E2C 50%, #0D6B3F 100%);
}
.gradient-gold {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
}
.text-gradient {
  background: linear-gradient(135deg, #10B981 0%, #0D6B3F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   NAVIGATION — polished glassmorphism header
   ============================================================ */
.nav-link {
  position: relative;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #10B981;
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}
.nav-link:hover {
  color: #10B981;
}
.nav-link.active:hover {
  color: #fff;
}

/* Mobile menu */
#mobile-menu {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 800px;
  opacity: 1;
}

/* ============================================================
   CARDS — refined glassmorphism and hover effects
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08),
              0 0 0 1px rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
.card-dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease,
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s ease;
}
.card-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   BUTTONS — refined with glow, ripple-ready, smooth transitions
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #0D6B3F 0%, #10B981 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(13, 107, 63, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(13, 107, 63, 0.4),
              0 0 20px rgba(16, 185, 129, 0.15);
}
.btn-primary:hover::before {
  opacity: 1;
}
.btn-primary:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(13, 107, 63, 0.3);
}
.btn-primary:focus-visible {
  outline: 2px solid #10B981;
  outline-offset: 2px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  transition: background 0.3s ease, border-color 0.3s ease,
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}
.btn-secondary:active {
  transform: translateY(0px);
}
.btn-secondary:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #0D6B3F;
  font-weight: 600;
  border: 2px solid #0D6B3F;
  border-radius: 0.75rem;
  transition: background 0.3s ease, color 0.3s ease,
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
}
.btn-outline:hover {
  background: #0D6B3F;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(13, 107, 63, 0.25);
}
.btn-outline:active {
  transform: translateY(0px);
}
.btn-outline:focus-visible {
  outline: 2px solid #0D6B3F;
  outline-offset: 2px;
}
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4),
              0 0 20px rgba(245, 158, 11, 0.15);
}
.btn-gold:hover::before {
  opacity: 1;
}
.btn-gold:active {
  transform: translateY(0px);
}
.btn-gold:focus-visible {
  outline: 2px solid #F59E0B;
  outline-offset: 2px;
}

/* ============================================================
   ANIMATIONS — GSAP Fallback
   ============================================================ */
.animate-on-scroll,
.animate-slide-left,
.animate-slide-right,
.animate-scale-in {
  opacity: 0;
  visibility: hidden;
}
.animate-on-scroll { transform: translateY(30px); }
.animate-slide-left { transform: translateX(-40px); }
.animate-slide-right { transform: translateX(40px); }
.animate-scale-in { transform: scale(0.95); }

/* GSAP fallback — if JS fails, elements become visible via CSS */
.gsap-fallback .animate-on-scroll,
.gsap-fallback .animate-slide-left,
.gsap-fallback .animate-slide-right,
.gsap-fallback .animate-scale-in {
  animation: vionetaFadeUp 0.6s ease forwards;
  animation-delay: var(--d, 0s);
}
@keyframes vionetaFadeUp {
  to { opacity: 1; transform: none; visibility: visible; }
}

/* Hero carousel — smooth crossfade */
.hero-carousel-item {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  transform: scale(1.02);
}
.hero-carousel-item.active {
  opacity: 1;
  transform: scale(1);
}
.hero-carousel-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(6, 78, 44, 0.78) 55%, rgba(6, 78, 44, 0.65) 100%);
  z-index: 1;
}

/* ============================================================
   SECTION STYLES — refined spacing and backgrounds
   ============================================================ */
.section-dark {
  background: linear-gradient(160deg, #0F172A 0%, #064E2C 100%);
  color: #fff;
}
.section-alt {
  background: #F0FDF4;
}
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #E2E8F0, transparent);
}

/* Stats counter */
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Feature icon box */
.icon-box {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  font-size: 1.25rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
}
.icon-box:hover {
  transform: scale(1.08);
}
.icon-box-green {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}
.icon-box-green:hover {
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}
.icon-box-gold {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}
.icon-box-gold:hover {
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}
.icon-box-white {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ============================================================
   BLOG CARDS — polished image zoom and hover
   ============================================================ */
.blog-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
.blog-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.blog-card:hover img {
  transform: scale(1.05);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-gradient {
  background: linear-gradient(180deg, #0F172A 0%, #064E2C 100%);
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 640px) {
  .stat-number {
    font-size: 2rem;
  }
}

/* ============================================================
   SCROLLBAR — refined
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ============================================================
   FORM STYLES — refined focus and floating states
   ============================================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid #E2E8F0;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease,
              background-color 0.3s ease;
  outline: none;
  background: #fff;
}
.form-input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12),
              0 1px 3px rgba(0, 0, 0, 0.04);
  background: #FAFFFE;
}
.form-input::placeholder {
  color: #94A3B8;
  transition: color 0.3s ease;
}
.form-input:focus::placeholder {
  color: #CBD5E1;
}

/* ============================================================
   BADGE — refined with subtle glow
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.badge:hover {
  transform: translateY(-1px);
}
.badge-green {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}
.badge-gold {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}
.badge-white {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============================================================
   SECTION REVEAL — subtle gradient border animation
   ============================================================ */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10B981, #F59E0B, transparent);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.gradient-border:hover::before {
  opacity: 1;
}

/* ============================================================
   SMOOTH COUNTER ANIMATION — for stat numbers
   ============================================================ */
.stat-counting {
  display: inline-block;
}

/* ============================================================
   ACCESSIBILITY — Reduced Motion
   ============================================================ */
@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;
  }
  .page-loader { display: none !important; }
  .animate-on-scroll,
  .animate-slide-left,
  .animate-slide-right,
  .animate-scale-in {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .hero-carousel-item { transition: none !important; }
}
