@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@300;400;500;600&display=swap');

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

:root {
  --negro: #0a0a0a;
  --negro2: #141414;
  --negro3: #1e1e1e;
  --verde: #22c55e;
  --verde-oscuro: #16a34a;
  --verde-dim: #166534;
  --blanco: #f5f5f0;
  --gris: #888;
}

html { scroll-behavior: smooth; }
body { font-family: 'Barlow', sans-serif; background: var(--negro); color: var(--blanco); overflow-x: hidden; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 3rem;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(34,197,94,0.15);
}
.logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; letter-spacing: 0.08em; color: var(--blanco); }
.logo span { color: var(--verde); }
nav ul { list-style: none; display: flex; gap: 2.5rem; }
nav ul a { text-decoration: none; color: var(--gris); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; transition: color 0.2s; }
nav ul a:hover { color: var(--verde); }
.nav-ig { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--gris); font-size: 0.85rem; font-weight: 500; transition: color 0.2s; }
.nav-ig:hover { color: var(--verde); }
.nav-ig svg { stroke: currentColor; }

/* HERO */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 8rem 3rem 4rem; position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(22,163,74,0.12) 0%, transparent 70%),
              radial-gradient(ellipse 40% 60% at 10% 80%, rgba(34,197,94,0.06) 0%, transparent 60%);
}
.hero-grid {
  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;
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}
.hero-content { position: relative; z-index: 2; max-width: 750px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
  border-radius: 2rem; padding: 0.35rem 1rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--verde); margin-bottom: 2rem;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--verde); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.7); } }
h1 { font-family: 'Bebas Neue', sans-serif; font-size: clamp(4rem, 10vw, 8rem); line-height: 0.92; letter-spacing: 0.02em; margin-bottom: 1.5rem; }
h1 .verde { color: var(--verde); }
h1 .outline { -webkit-text-stroke: 2px var(--blanco); color: transparent; }
.hero-desc { font-size: 1.1rem; font-weight: 300; color: #aaa; line-height: 1.7; max-width: 500px; margin-bottom: 2.5rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { position: absolute; right: 3rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2rem; z-index: 2; }
.stat-item { text-align: right; }
.stat-num { font-family: 'Bebas Neue', sans-serif; font-size: 3rem; color: var(--verde); line-height: 1; }
.stat-label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gris); }

/* BUTTONS */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--verde); color: var(--negro);
  padding: 0.9rem 2rem; border-radius: 0.25rem;
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.05em;
  text-decoration: none; text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #16a34a; transform: translateY(-2px); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.2); color: var(--blanco);
  padding: 0.9rem 2rem; border-radius: 0.25rem;
  font-weight: 500; font-size: 0.9rem; letter-spacing: 0.05em;
  text-decoration: none; text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--verde); color: var(--verde); }

/* SECTIONS */
section { padding: 6rem 3rem; }
.section-tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--verde); margin-bottom: 1rem; }
.section-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; letter-spacing: 0.02em; margin-bottom: 1rem; }
.section-desc { font-size: 1rem; font-weight: 300; color: #aaa; line-height: 1.7; max-width: 500px; }
.divider { width: 40px; height: 2px; background: var(--verde); margin: 1rem 0 1.5rem; }

/* SERVICIOS */
#servicios { background: var(--negro2); }
.servicios-header { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; margin-bottom: 4rem; }
.servicios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: rgba(34,197,94,0.08); }
.servicio-card { background: var(--negro2); padding: 2.5rem 2rem; border: 1px solid rgba(255,255,255,0.05); transition: border-color 0.25s, transform 0.25s; }
.servicio-card:hover { border-color: rgba(34,197,94,0.4); transform: translateY(-4px); }
.servicio-icon { width: 48px; height: 48px; border: 1px solid rgba(34,197,94,0.3); border-radius: 0.25rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; font-size: 1.4rem; }
.servicio-card h3 { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 0.05em; margin-bottom: 0.75rem; color: var(--blanco); }
.servicio-card p { font-size: 0.9rem; font-weight: 300; color: #888; line-height: 1.7; }
.servicio-tag { display: inline-block; margin-top: 1.25rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--verde); }

/* AUTOMATISMOS */
#automatismos { background: var(--negro); position: relative; overflow: hidden; }
.auto-bg { position: absolute; top: -20%; left: -10%; width: 60%; height: 140%; background: radial-gradient(ellipse, rgba(22,163,74,0.07) 0%, transparent 70%); pointer-events: none; }
.auto-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; position: relative; z-index: 2; }
.auto-features { display: flex; flex-direction: column; }
.auto-feature { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.auto-feature:last-child { border-bottom: none; }
.auto-feature-num { font-family: 'Bebas Neue', sans-serif; font-size: 1.2rem; color: var(--verde-dim); min-width: 2rem; padding-top: 0.15rem; }
.auto-feature-body h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.35rem; }
.auto-feature-body p { font-size: 0.85rem; font-weight: 300; color: #777; line-height: 1.6; }
.auto-visual { background: var(--negro3); border: 1px solid rgba(255,255,255,0.07); border-radius: 0.5rem; padding: 2.5rem; }
.gate-svg { width: 100%; }

/* PORTFOLIO */
#trabajos { background: var(--negro2); }
.trabajos-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; }
.trabajos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.trabajo-item {
  border-radius: 0.25rem; overflow: hidden;
  background: var(--negro3); border: 1px solid rgba(255,255,255,0.05);
  aspect-ratio: 4/3; position: relative;
  transition: border-color 0.25s, transform 0.25s;
  cursor: pointer;
}
.trabajo-item:hover { border-color: rgba(34,197,94,0.4); transform: scale(1.02); }
.trabajo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.trabajo-item:hover img { transform: scale(1.06); }
.trabajo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.8) 100%);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 1rem 1.25rem;
}
.trabajo-item:hover .trabajo-overlay { opacity: 1; }
.trabajo-overlay span { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--verde); }

/* LIGHTBOX */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 0.25rem; border: 1px solid rgba(34,197,94,0.3); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  font-size: 2rem; color: #fff; cursor: pointer; line-height: 1;
  background: none; border: none; transition: color 0.2s;
}
.lightbox-close:hover { color: var(--verde); }

/* VIDEOS */
#videos { background: var(--negro); }
.videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 3rem; }
.video-item {
  border-radius: 0.25rem; overflow: hidden;
  background: var(--negro3); border: 1px solid rgba(255,255,255,0.05);
  aspect-ratio: 9/16;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
}
.video-item:hover { border-color: rgba(34,197,94,0.3); }
.video-item video { width: 100%; height: 100%; object-fit: cover; }
.video-placeholder { text-align: center; padding: 2rem; }
.video-placeholder p { font-size: 0.8rem; color: #444; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.75rem; }
.video-placeholder .play-icon { font-size: 2rem; color: rgba(34,197,94,0.3); }

/* CONTACTO */
#contacto { background: var(--negro); border-top: 1px solid rgba(34,197,94,0.15); }
.contacto-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.contacto-info { display: flex; flex-direction: column; }
.contacto-item { display: flex; gap: 1.25rem; align-items: center; padding: 1.25rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); text-decoration: none; color: inherit; transition: border-color 0.2s; }
.contacto-item:first-child { padding-top: 0; }
.contacto-item:last-child { border-bottom: none; }
.contacto-item:hover .contacto-icon { border-color: rgba(34,197,94,0.6); }
.contacto-item:hover .contacto-val { color: var(--verde); }
.contacto-icon { width: 46px; height: 46px; border: 1px solid rgba(34,197,94,0.25); border-radius: 0.25rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color 0.2s; }
.contacto-icon svg { width: 20px; height: 20px; stroke: var(--verde); fill: none; stroke-width: 1.8; }
.contacto-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--verde); margin-bottom: 0.3rem; }
.contacto-val { font-size: 0.95rem; color: #bbb; transition: color 0.2s; }

/* FORM */
.form-group { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input-field { background: var(--negro3); border: 1px solid rgba(255,255,255,0.08); border-radius: 0.25rem; padding: 0.85rem 1rem; color: var(--blanco); font-family: 'Barlow', sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.2s; width: 100%; }
.input-field::placeholder { color: #555; }
.input-field:focus { border-color: rgba(34,197,94,0.5); }
textarea.input-field { resize: vertical; min-height: 120px; }
.btn-send { background: var(--verde); color: var(--negro); border: none; padding: 0.9rem 2.5rem; border-radius: 0.25rem; font-family: 'Barlow', sans-serif; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; align-self: flex-start; transition: background 0.2s, transform 0.15s; }
.btn-send:hover { background: #16a34a; transform: translateY(-2px); }
.form-msg { font-size: 0.82rem; color: var(--verde); display: none; margin-top: -0.5rem; }

/* FOOTER */
footer { background: var(--negro2); border-top: 1px solid rgba(255,255,255,0.06); padding: 2rem 3rem; display: flex; justify-content: space-between; align-items: center; }
footer .logo { font-size: 1.3rem; }
footer p { font-size: 0.8rem; color: #555; }
.footer-ig { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: #555; font-size: 0.85rem; font-weight: 500; transition: color 0.2s; }
.footer-ig svg { stroke: currentColor; }
.footer-ig:hover { color: var(--verde); }

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  nav ul { display: none; }
  .hero { padding: 6rem 1.5rem 3rem; }
  .hero-stats { display: none; }
  section { padding: 4rem 1.5rem; }
  .servicios-header, .auto-layout, .contacto-layout { grid-template-columns: 1fr; gap: 2rem; }
  .servicios-grid, .trabajos-grid, .videos-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (max-width: 600px) {
  .servicios-grid, .trabajos-grid, .videos-grid { grid-template-columns: 1fr; }
}
