/* ===========================
   VSP - Vidhya Sindhu Polypet
   Custom Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-light: #dcfce7;
  --blue: #0284c7;
  --blue-dark: #0369a1;
  --blue-light: #e0f2fe;
  --navy: #0f172a;
  --navy-light: #1e293b;
  --gray: #f8fafc;
  --gray-mid: #e2e8f0;
  --gray-text: #64748b;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  background: var(--white);
  overflow-x: hidden;
  max-width: 100vw;
}

h1, h2, h3, h4, h5 {
  font-family: 'Syne', sans-serif;
}

/* ===========================
   LOADER
   =========================== */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(34,197,94,0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-logo {
  position: absolute;
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.1em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===========================
   HEADER
   =========================== */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.4s ease;
  padding: 1.25rem 0;
}

#main-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 30px rgba(0,0,0,0.08);
  padding: 0.75rem 0;
}

.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--green-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--green-dark);
}

/* Header transparent state — light hero bg, so dark text */
#main-header:not(.scrolled) .nav-link {
  color: #0f172a;
}

#main-header:not(.scrolled) .nav-link:hover {
  color: #16a34a;
}

#main-header:not(.scrolled) .nav-link::after {
  background: #22c55e;
}

#main-header:not(.scrolled) #menu-toggle {
  color: #0f172a;
}

/* Mobile menu */
#mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

#mobile-menu.open {
  display: flex;
}

#mobile-menu .nav-link {
  color: var(--white);
  font-size: 1.5rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

#mobile-menu .nav-link::after {
  background: var(--green);
}

/* ===========================
   BUTTONS
   =========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green-dark);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary span {
  position: relative;
  z-index: 1;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1.5px solid rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.btn-blue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-blue:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

/* ===========================
   SECTIONS
   =========================== */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 0.375rem 1rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--gray-text);
  line-height: 1.7;
  max-width: 600px;
}

/* ===========================
   HERO
   =========================== */
.hero-section {
  min-height: 100vh;
  padding-top: 70px;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fffe 40%, #ffffff 60%, #f0f9ff 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(34,197,94,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,197,94,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-blob-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(34,197,94,0.18) 0%, transparent 70%);
  border-radius: 50%;
  top: -80px;
  right: -100px;
  animation: blob-move 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-blob-2 {
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(2,132,199,0.14) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -50px;
  left: -80px;
  animation: blob-move 10s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

@keyframes blob-move {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 30px) scale(1.1); }
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-title .accent {
  color: var(--green);
}

.hero-stats-bar {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(34,197,94,0.2);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 120px;
}

.stat-pill .num {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1;
}

.stat-pill .label {
  font-size: 0.75rem;
  color: var(--gray-text);
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1.5px solid rgba(15,23,42,0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline-dark:hover {
  background: rgba(15,23,42,0.06);
  border-color: var(--navy);
}

.hero-visual {
  position: relative;
}

.hero-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2rem;
}

.floating-badge {
  position: absolute;
  background: var(--white);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: float 4s ease-in-out infinite;
  max-width: 180px;
}

.floating-badge.badge-1 {
  top: -0.5rem;
  right: 0;
  animation-delay: 0s;
}

.floating-badge.badge-2 {
  bottom: -0.5rem;
  left: 0;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===========================
   CARDS
   =========================== */
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34,197,94,0.04) 0%, rgba(2,132,199,0.04) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.1);
  border-color: var(--green);
}

.product-card:hover::before {
  opacity: 1;
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 14px;
  padding: 1.75rem;
  transition: all 0.35s ease;
  position: relative;
}

.feature-card:hover {
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  border-color: transparent;
  transform: translateY(-4px);
}

.glass-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2rem;
}

/* ===========================
   PROCESS TIMELINE
   =========================== */
.process-step {
  position: relative;
}

.step-connector {
  position: absolute;
  top: 28px;
  left: calc(100% - 0px);
  width: calc(100% - 56px);
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  z-index: 0;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(34,197,94,0.35);
  margin: 0 auto 1rem;
}

/* ===========================
   STATS COUNTER
   =========================== */
.stats-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(34,197,94,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,197,94,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.counter-num {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), #86efac);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ===========================
   GALLERY
   =========================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}

.gallery-item:nth-child(1) { grid-row: span 2; }
.gallery-item:nth-child(4) { grid-row: span 2; grid-column: span 1; }
.gallery-item:nth-child(5) { grid-column: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

/* ===========================
   CONTACT
   =========================== */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--gray-mid);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.contact-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.375rem;
  letter-spacing: 0.02em;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), var(--blue), transparent);
}

.footer-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  display: block;
  padding: 0.2rem 0;
}

.footer-link:hover {
  color: var(--green);
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===========================
   BACK TO TOP
   =========================== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(34,197,94,0.4);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: var(--green-dark);
  transform: translateY(-3px);
}

/* WhatsApp floating */
#whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 52px;
  height: 52px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  z-index: 500;
  transition: all 0.3s ease;
  animation: pulse-green 2s ease-in-out infinite;
}

#whatsapp-btn:hover {
  transform: scale(1.1);
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 8px 24px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 8px 40px rgba(37,211,102,0.7); }
}

/* ===========================
   SCROLL ANIMATIONS
   =========================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ===========================
   UTILITY
   =========================== */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: 100px;
  margin: 1rem 0 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-pattern {
  background-color: var(--gray);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2322c55e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Page Hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fffe 40%, #ffffff 60%, #f0f9ff 100%);
  padding: 7rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

/* Map placeholder */
.map-placeholder {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  border-radius: 16px;
  height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--gray-mid);
  overflow: hidden;
  position: relative;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-item:nth-child(1) { grid-row: span 1; }
  .gallery-item:nth-child(4) { grid-row: span 1; grid-column: span 1; }
  .gallery-item:nth-child(5) { grid-column: span 1; }
  
  .step-connector {
    display: none;
  }
  
  .hero-stats-bar {
    gap: 0.75rem;
  }
  
  .stat-pill {
    min-width: 90px;
    padding: 0.75rem 0.875rem;
    flex: 1;
  }

  .stat-pill .num {
    font-size: 1.375rem;
  }

  .hero-section {
    padding-top: 72px;
    align-items: flex-start;
    padding-bottom: 3rem;
  }

  .hero-blob-1,
  .hero-blob-2 {
    width: 250px;
    height: 250px;
  }

  .page-hero {
    padding: 6rem 0 3.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  
  .gallery-item:nth-child(n) {
    grid-row: span 1;
    grid-column: span 1;
  }

  .hero-stats-bar {
    gap: 0.5rem;
  }

  .stat-pill {
    min-width: 80px;
    padding: 0.625rem 0.75rem;
  }

  .stat-pill .num {
    font-size: 1.25rem;
  }

  .btn-primary,
  .btn-outline,
  .btn-blue {
    padding: 0.7rem 1.25rem;
    font-size: 0.8125rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .glass-card {
    padding: 1.25rem;
  }

  .product-card {
    padding: 1.5rem;
  }
}

/* Hamburger icon */
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}