/* ===== Variables ===== */
:root {
  --bg-dark: #0c0e12;
  --bg-card: #13161d;
  --bg-elevated: #1a1e28;
  --text: #e4e6eb;
  --text-muted: #9ca3af;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --accent-secondary: #3b82f6;
  --accent-secondary-dim: rgba(59, 130, 246, 0.12);
  --border: #2a2f3b;
  --danger: #ef4444;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

/* ===== Reset & base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #00f0c0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: 1200px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(12, 14, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--text);
}

.logo-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-icon {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.1rem;
}

.logo-servi {
  color: #2563eb;
}

.logo-net {
  color: #dc2626;
}

.logo-reg {
  color: #dc2626;
  font-size: 0.65em;
  vertical-align: super;
  font-weight: 400;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: transparent;
  border: 2px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 2.5rem;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.nav-list a:hover,
.nav-list a:focus {
  color: var(--accent);
  background: rgba(0, 212, 170, 0.2);
  border-color: var(--accent);
  outline: none;
}

.nav-list a.nav-link-active {
  color: var(--accent);
  background: rgba(0, 212, 170, 0.15);
  border-color: var(--accent);
}

.nav-list a.nav-link-active:hover {
  background: rgba(0, 212, 170, 0.25);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
  filter: blur(60px);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 2rem;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

.hero-logo-image {
  max-width: min(980px, 100%);
  width: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.hero-title-accent {
  color: var(--accent);
  position: relative;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: #00f0c0;
  color: var(--bg-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* ===== Sections ===== */
.section {
  padding: 5rem 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ===== Empresa ===== */
.section-empresa {
  padding-top: 2rem;
}

.section-empresa .section-desc {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-empresa .section-label,
.section-empresa .section-title {
  text-align: center;
}

.empresa-logo-wrap {
  text-align: center;
  margin-bottom: 0;
}

.empresa-logo {
  width: 100%;
  max-width: 900px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.empresa-grid {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.empresa-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.empresa-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.empresa-card-text {
  color: var(--text-muted);
  line-height: 1.7;
}

.empresa-card-accent {
  position: relative;
  background:
    radial-gradient(ellipse at top left, var(--accent-dim) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, var(--accent-secondary-dim) 0%, transparent 60%),
    var(--bg-card);
}

.empresa-bullets {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.empresa-bullets li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.empresa-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
}

/* ===== Service blocks ===== */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.service-block-reverse {
  direction: rtl;
}

.service-block-reverse > * {
  direction: ltr;
}

.service-block-reverse .service-content {
  text-align: left;
}

.service-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-icon {
  width: 140px;
  height: 140px;
  color: var(--accent);
  opacity: 0.9;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-icon-security {
  color: var(--accent-secondary);
}

.service-icon-perimetral {
  color: var(--accent);
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.service-intro {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.service-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.service-block-reverse .service-list li::before {
  background: var(--accent-secondary);
}

/* ===== Trabajos y clientes ===== */
.section-trabajos .section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.section-trabajos .section-title {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section-trabajos .section-desc {
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.trabajos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.section-trabajos .trabajo-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color var(--transition);
}

.section-trabajos .trabajo-card:hover {
  border-color: var(--accent);
}

.trabajo-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.trabajo-card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.trabajo-card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-trabajos .clientes-wrap {
  display: block;
  padding-top: 2rem;
  margin-top: 0;
  border-top: 1px solid var(--border);
}

.clientes-desc {
  margin-bottom: 1.5rem;
}

.clientes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cliente-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  gap: 0.5rem;
}

.cliente-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.cliente-link:hover .cliente-name {
  color: var(--accent);
}

.cliente-item img {
  max-height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.cliente-name {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
}

/* ===== CTA ===== */
.section-cta {
  padding: 4rem 0;
}

.cta-box {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.cta-title {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.cta-desc {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-methods a {
  font-weight: 500;
}

.contact-method-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===== Footer ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.footer-brand .logo-icon {
  font-family: var(--font-mono);
  color: var(--accent);
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .empresa-grid {
    grid-template-columns: 1fr;
  }

  .trabajos-grid {
    grid-template-columns: 1fr;
  }

  .clientes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-block,
  .service-block-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    text-align: left;
  }

  .service-block-reverse .service-content {
    text-align: left;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .nav-list.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-stats {
    gap: 2rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 1rem 3rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .service-block,
  .service-block-reverse {
    padding: 1.5rem;
  }

  .clientes-grid {
    grid-template-columns: 1fr;
  }
}
