:root {
  --accent: #8dc63f;
  --accent-hover: #7ab52e;
  --accent-light: rgba(141, 198, 63, 0.12);
  --dark: #0d0d0d;
  --dark-light: #1a1a1a;
  --charcoal: #1e1e1e;
  --text: #444;
  --text-light: #888;
  --white: #fff;
  --warm: #f8f6f2;
  --warm-dark: #f0ece4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 20px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.07);
  --transition: 0.3s ease;
  --font: 'Sora', 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- SCROLL PROGRESS ---- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---- NAV ---- */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(20px);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; }

.nav-logo img {
  height: 36px;
  transition: var(--transition);
}

.nav-logo img:hover { opacity: 0.85; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
}

.nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.06); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  overflow: hidden;
}

/* Subtle grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 8s ease-in-out infinite alternate;
}

@keyframes gridPulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Floating accent shapes */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 85%, rgba(141, 198, 63, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(141, 198, 63, 0.04) 0%, transparent 35%);
  animation: floatAccents 16s ease-in-out infinite alternate;
}

@keyframes floatAccents {
  0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
  100% { transform: scale(1.08) translate(-1%, 1%); opacity: 1; }
}

.hero-slideshow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.88) 100%);
  z-index: 1;
}

/* Aurora glow layers */
.hero-overlay::before {
  content: '';
  position: absolute;
  inset: -50%;
  z-index: 0;
  background:
    radial-gradient(circle at 25% 40%, rgba(141, 198, 63, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 75% 60%, rgba(141, 198, 63, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(60, 40, 20, 0.04) 0%, transparent 35%);
  filter: blur(60px);
  animation: aurora 18s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
  33% { transform: translate(4%, -3%) rotate(2deg); opacity: 1; }
  66% { transform: translate(-3%, 2%) rotate(-1deg); opacity: 0.8; }
  100% { transform: translate(2%, -2%) rotate(1deg); opacity: 1; }
}

/* Scanning line accent */
.hero-overlay::after {
  content: '';
  position: absolute;
  left: -100%;
  bottom: 0;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(141, 198, 63, 0.15), transparent);
  animation: scanLine 8s ease-in-out infinite;
}

@keyframes scanLine {
  0% { left: -60%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding: 120px 0;
}

.hero-logo {
  margin-bottom: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: logoReveal 0.8s ease forwards;
}

@keyframes logoReveal {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-logo img {
  height: 100px;
  width: auto;
  display: block;
  opacity: 0.95;
  filter: drop-shadow(0 0 20px rgba(141, 198, 63, 0.08));
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.text-accent {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.text-accent::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: underlineGrow 0.6s ease 0.5s forwards;
  transform: scaleX(0);
  transform-origin: left;
}

@keyframes underlineGrow {
  to { transform: scaleX(1); }
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.45);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(141, 198, 63, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- SECTION DIVIDER ---- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.06), transparent);
}

/* ---- SECTIONS ---- */
.section {
  padding: 100px 0;
  position: relative;
}

.section-dark {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
}

.section-dark .section-header h2 { color: var(--white); }
.section-dark .section-header p { color: rgba(255,255,255,0.5); }

.section-warm {
  background: var(--warm);
}

#servicios.section-dark {
  background: linear-gradient(135deg, var(--charcoal) 0%, #252525 100%);
}

#proyectos.section-dark {
  background: linear-gradient(180deg, var(--charcoal) 0%, #1a1a1a 100%);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-logo { margin-bottom: 16px; }

.section-logo img {
  height: 36px;
  opacity: 0.3;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

.section-header p {
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.6;
  letter-spacing: 0.5px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- GRID 3 (productos) ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ---- CARDS ---- */
.card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: var(--radius);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.card-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: var(--accent);
  transition: var(--transition);
}

.card:hover .card-icon {
  background: var(--accent);
  color: var(--white);
  transform: scale(1.05) rotate(-3deg);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ---- SERVICIOS (on dark) ---- */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.servicio-item {
  padding: 36px 28px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(4px);
}

.servicio-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(141, 198, 63, 0.2);
  transform: translateY(-4px);
}

.servicio-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.servicio-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.servicio-item p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

/* ---- CLIENTES ---- */
.clientes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  align-items: center;
}

.cliente-logo {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
  height: 90px;
}

.cliente-logo:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  border-color: var(--accent);
}

.cliente-logo img {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
  filter: grayscale(40%);
  opacity: 0.65;
  transition: var(--transition);
}

.cliente-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---- PROYECTOS (on dark) ---- */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.proyecto-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}

.proyecto-item:hover {
  border-color: rgba(141, 198, 63, 0.3);
  transform: translateY(-2px);
}

.proyecto-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.proyecto-item:hover img { transform: scale(1.1); }

.proyecto-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  opacity: 0;
  transition: var(--transition);
  transform: translateY(10px);
}

.proyecto-item:hover .proyecto-overlay {
  opacity: 1;
  transform: translateY(0);
}

.proyecto-overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.active { display: flex; animation: lightboxIn 0.25s ease; }

@keyframes lightboxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 6px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  line-height: 1;
}

.lightbox-close:hover { opacity: 1; }

/* ---- CTA ---- */
.cta {
  padding: 100px 0;
  background: var(--dark);
  text-align: center;
}

.cta-logo {
  margin-bottom: 20px;
  display: inline-block;
  background: rgba(255,255,255,0.04);
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}

.cta-logo img {
  height: 44px;
  display: block;
  opacity: 0.85;
}

.cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.cta p {
  font-size: 1rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 28px;
}

/* ---- CONTACT ---- */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contacto-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacto-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
}

.contacto-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(141, 198, 63, 0.06);
}

.contacto-card i {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: 8px;
}

.contacto-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.contacto-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.contacto-form {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.05);
}

.form-group { margin-bottom: 16px; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #eee;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: var(--transition);
  background: #fafafa;
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(141, 198, 63, 0.08);
}

.form-group textarea { resize: vertical; }

/* ---- FOOTER ---- */
.footer {
  background: var(--dark);
  padding: 60px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }

.footer-brand .logo-wrap {
  display: inline-block;
  background: rgba(255,255,255,0.04);
  padding: 10px 20px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.footer-brand img {
  height: 40px;
  display: block;
}

.footer-brand p {
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  max-width: 280px;
  line-height: 1.7;
}

.footer-links h4,
.footer-social h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links ul { list-style: none; }

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover { color: var(--accent); }

.social-icons { display: flex; gap: 10px; }

.social-icons a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
}

.social-icons a:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.2);
  font-size: 0.8rem;
}

/* ---- WHATSAPP FLOAT ---- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 52px;
  height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
  transition: all 0.25s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37,211,102,0.45);
  color: #fff;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 1024px) {
  .contacto-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    padding: 80px 24px 24px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }

  .nav-menu.active { right: 0; }

  .nav-link { font-size: 0.95rem; padding: 10px 14px; }

  .hero { min-height: 90vh; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; }
  .hero-logo img { height: 80px; }
  .hero-content { padding: 100px 0 60px; }

  .section { padding: 60px 0; }

  .grid-3 { grid-template-columns: 1fr; }
  .servicios-grid { grid-template-columns: 1fr; }
  .clientes-grid { grid-template-columns: repeat(3, 1fr); }
  .proyectos-grid { grid-template-columns: repeat(2, 1fr); }

  .contacto-grid { grid-template-columns: 1fr; }
  .contacto-form { padding: 24px; }

  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { max-width: 100%; }
  .footer-brand { align-items: center; }
  .social-icons { justify-content: center; }
}

@media (max-width: 480px) {
  .hero { min-height: 85vh; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.85rem; }
  .hero-logo img { height: 60px; }
  .hero-content { padding: 80px 0 40px; }

  .clientes-grid { grid-template-columns: repeat(2, 1fr); }
  .cliente-logo { height: 70px; padding: 12px; }

  .proyectos-grid { grid-template-columns: 1fr; }

  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }

  .grid-3 { gap: 12px; }
  .card { padding: 24px 20px; }
  .contacto-info { gap: 10px; }
  .contacto-card { padding: 14px; flex-direction: column; align-items: center; text-align: center; }
  .btn-lg { padding: 14px 24px; font-size: 0.95rem; }
  .cta { padding: 60px 0; }
  .cta h2 { font-size: 1.4rem; }
  .footer { padding: 40px 0 0; }
}
