/* CSS Variables - Default (Dark) */
:root {
  --bg-color: #12151a; 
  --surface-main: #1a1e26; 
  --surface-hover: #212731;
  --primary: #a8c93b;
  --primary-hover: #bde04b;
  --primary-glow: rgba(168, 201, 59, 0.3);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(168, 201, 59, 0.4);
  --glass-bg: rgba(26, 30, 38, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 30px rgba(168, 201, 59, 0.15);
  
  --input-bg: rgba(0, 0, 0, 0.2);
  --footer-bg: #080a0d;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-color: #f8fdf9;
  --surface-main: #ffffff;
  --surface-hover: #f1f5f9;
  --primary: #8aaa2a; /* Slightly darker green for contrast in light mode */
  --primary-hover: #a8c93b;
  --primary-glow: rgba(138, 170, 42, 0.2);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(138, 170, 42, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 10px 40px rgba(0, 0, 0, 0.08);
  
  --input-bg: #f8fafc;
  --footer-bg: #f1f5f9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Typography */
h1, h2, h3 { font-weight: 800; color: var(--text-main); line-height: 1.1; letter-spacing: -0.02em; }
h1 span { color: var(--primary); text-shadow: 0 0 20px var(--primary-glow); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1.2rem;
  background: rgba(168, 201, 59, 0.1);
  color: var(--primary);
  border: 1px solid var(--border-highlight);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

/* Header */
.header {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.4s ease;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; color: var(--text-main); }
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--text-main); font-weight: 500; transition: color 0.3s ease; font-size: 0.95rem; }
.nav-links a:not(.btn):hover { color: var(--primary); }

.btn-theme {
  background: transparent;
  border: 1px solid var(--border-color);
  background-color: rgba(128,128,128,0.1);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}
.btn-theme:hover { background-color: var(--surface-hover); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 15px var(--primary-glow);
  border: 1px solid transparent;
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--primary-hover);
  box-shadow: 0 8px 25px rgba(168, 201, 59, 0.4);
}

.btn-secondary {
  background: rgba(128, 128, 128, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(4px);
}
.btn-secondary:hover {
  background: rgba(128, 128, 128, 0.1);
  border-color: rgba(128, 128, 128, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(128, 128, 128, 0.2);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(168, 201, 59, 0.05);
}

/* Hero Section */
.hero { padding: 5rem 0 8rem 0; position: relative; overflow: hidden; }
.hero-bg-gradient {
  position: absolute;
  top: 10%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
  z-index: -1;
  filter: blur(40px);
  transition: background 0.4s ease;
}

.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero-content h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
.hero-content p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 90%; }
.hero-actions { display: flex; gap: 1.5rem; }
.hero-3d { width: 100%; height: 550px; position: relative; }
#hero-3d-container { width: 100%; height: 100%; filter: drop-shadow(0 0 30px var(--primary-glow)); }

/* Glass Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Bento Services */
.bento-section { padding: 8rem 0; position: relative; }
.section-header { text-align: center; max-width: 650px; margin: 0 auto 5rem auto; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 1.2rem; }
.section-header p { color: var(--text-muted); font-size: 1.15rem; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(280px, auto);
  gap: 1.5rem;
}

.item-large { grid-column: span 3; }
@media (min-width: 768px) { .item-large { grid-column: span 1; grid-row: span 2; } }

.clickable { cursor: pointer; }
.clickable:hover {
  box-shadow: var(--shadow-glow);
  border-color: var(--border-highlight);
}

.glass-panel .icon {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  background: rgba(168, 201, 59, 0.1);
  display: inline-flex;
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(168, 201, 59, 0.2);
  color: var(--primary);
}
.glass-panel h3 { font-size: 1.6rem; margin-bottom: 1rem; color: var(--text-main); }
.glass-panel p { color: var(--text-muted); font-size: 1.05rem; }

/* Carousel Section */
.clients-section {
  padding: 4rem 0;
  background: var(--surface-main);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}
.section-subtitle { text-align: center; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 3rem; font-size: 0.85rem; }
.carousel-container { width: 100%; overflow: hidden; position: relative; }
.carousel-container::before, .carousel-container::after {
  content: ""; position: absolute; top: 0; width: 15%; height: 100%; z-index: 2; pointer-events: none;
}
.carousel-container::before { left: 0; background: linear-gradient(to right, var(--surface-main) 0%, transparent 100%); }
.carousel-container::after { right: 0; background: linear-gradient(to left, var(--surface-main) 0%, transparent 100%); }

.clients-logos {
  display: flex; align-items: center; width: max-content; gap: 4rem;
  animation: scrollCarousel 25s linear infinite;
}
.clients-logos:hover { animation-play-state: paused; }
.client-logo { font-weight: 800; font-size: 1.4rem; color: var(--text-main); display: flex; align-items: center; gap: 0.8rem; opacity: 0.4; transition: opacity 0.3s ease; white-space: nowrap; }
.client-logo:hover { opacity: 1; }

@keyframes scrollCarousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 2rem)); }
}

/* Contact Section */
.contact-section { padding: 6rem 0; background: var(--bg-color); transition: background 0.4s ease; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: center; }
.contact-info h2 { font-size: 2.5rem; margin-bottom: 1.2rem; }
.contact-info > p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2.5rem; }
.info-items p { margin-bottom: 1.2rem; font-size: 1.05rem; }
.info-items strong { color: var(--primary); margin-right: 0.5rem; }

/* Forms */
.form-modern { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
.form-full { grid-column: span 2; }
.form-group label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--text-muted); }

.form-group input, .form-group select, .form-group textarea {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(128,128,128,0.1);
}
.form-group select option { background: var(--surface-main); color: var(--text-main); }

/* Footer */
.footer { background: var(--footer-bg); border-top: 1px solid var(--border-color); padding: 5rem 0 2rem 0; transition: all 0.4s ease; }
.footer-grid-extended { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand h3 { font-size: 2rem; margin-bottom: 1rem; }
.footer-brand p { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 80%; }
.social-links { display: flex; gap: 1rem; }
.social-icon {
  display: inline-flex; justify-content: center; align-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(128, 128, 128, 0.05); color: var(--text-main);
  border: 1px solid var(--border-color); transition: all 0.3s ease;
  text-decoration: none; font-weight: 700; font-size: 0.9rem;
}
.social-icon:hover { background: var(--primary); color: #000; border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 5px 15px var(--primary-glow); }
.footer-links h4, .footer-contact-info h4 { color: var(--text-main); margin-bottom: 1.5rem; font-size: 1.1rem; }
.footer-links a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 0.8rem; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--primary); }
.footer-contact-info p { color: var(--text-muted); margin-bottom: 0.8rem; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.9rem; }

/* 1. Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 2. WhatsApp Glass Widget */
.wa-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  border-radius: 50px;
  padding: 0.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  max-width: 55px;
  transition: max-width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease, transform 0.3s ease;
  white-space: nowrap;
}
.wa-widget:hover {
  max-width: 300px;
  transform: translateY(-5px);
  border-color: var(--primary);
}
.wa-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
}
.wa-icon {
  font-size: 1.8rem;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}
.wa-text {
  color: var(--text-main);
  font-weight: 600;
  opacity: 0;
  font-size: 0.95rem;
  transition: opacity 0.3s ease;
  padding-right: 1rem;
}
.wa-widget:hover .wa-text {
  opacity: 1;
  transition-delay: 0.1s;
}

/* 3. Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 6rem;
  right: 2.3rem;
  z-index: 998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.4s ease;
  padding: 0; /* Override generic glass panel padding */
}
.scroll-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-to-top:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px var(--primary-glow);
}

/* 5. Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  width: 90%;
  max-width: 550px;
  padding: 3rem;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.open .modal-content {
  transform: scale(1);
}
.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close-modal:hover { color: var(--primary); }
.modal-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}
.modal-content h3 { font-size: 2rem; margin-bottom: 1rem; color: var(--text-main); }
.modal-content p { color: var(--text-muted); font-size: 1.1rem; }

/* Responsive Adjustments */
@media (max-width: 992px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-modern { grid-template-columns: 1fr; }
  .form-group:not(.form-full) { grid-column: span 2; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .bento-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn-theme) { display: none; }
  .footer-grid-extended { grid-template-columns: 1fr; text-align: center; }
  .social-links { justify-content: center; }
  .wa-widget { right: 1rem; bottom: 1rem; }
}
