/* ============================================================
   Soporte TI Linares — estilos
   Paleta tomada del logo: verde STIL, menta y carbón.
   ============================================================ */

:root {
  --carbon: #17211c;      /* fondo del panel y contacto (del fondo del logo) */
  --carbon-2: #22302a;
  --verde: #008a36;       /* verde principal del logo */
  --verde-oscuro: #006b2a;
  --menta: #a9d6b6;       /* segundo cuadrado del logo */
  --papel: #eef2ef;       /* fondo general, gris frío verdoso */
  --blanco: #ffffff;
  --tinta: #1b2420;       /* texto principal */
  --tinta-suave: #4d5a53;
  --linea: #cfd8d2;
  --ambar: #f0b43a;       /* solo para estados en el panel */

  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --texto: "Albert Sans", "Segoe UI", system-ui, sans-serif;

  --ancho: 1180px;
  --radio: 4px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; font-weight: 600; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; }

.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.saltar {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--verde); color: #fff; padding: .6rem 1rem; text-decoration: none;
}
.saltar:focus { top: 1rem; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem;
  background: var(--verde); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid var(--verde); border-radius: var(--radio);
  transition: background .15s, border-color .15s;
}
.boton:hover { background: var(--verde-oscuro); border-color: var(--verde-oscuro); }
.boton--linea { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.boton--linea:hover { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.boton--chico { padding: .55rem 1rem; font-size: .95rem; }
.boton--claro { background: var(--menta); color: var(--carbon); border-color: var(--menta); }
.boton--claro:hover { background: #fff; border-color: #fff; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgba(238, 242, 239, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.marca img { width: 40px; height: 40px; }
.marca span { font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; }
.marca b { color: var(--verde); font-weight: 700; }

.menu { display: flex; align-items: center; gap: 1.8rem; }
.menu a:not(.boton) { text-decoration: none; font-weight: 500; font-size: .98rem; color: var(--tinta-suave); }
.menu a:not(.boton):hover { color: var(--tinta); }

.menu-boton { display: none; }

/* ---------- Portada ---------- */
.portada { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem); }
.portada__grilla {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
}
.portada__lugar { font-weight: 500; color: var(--verde); margin-bottom: 1.1rem; }
.portada h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 700; letter-spacing: -.01em; max-width: 16ch;
}
.portada__bajada { margin-top: 1.4rem; font-size: 1.15rem; color: var(--tinta-suave); max-width: 46ch; }
.portada__acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* Panel de red: el elemento protagonista */
.panel {
  margin: 0;
  background: var(--carbon);
  color: #dfe9e3;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 48px -24px rgba(23, 33, 28, .55);
  overflow: hidden;
}
.panel__barra {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem 1.1rem;
  font-family: var(--display); font-weight: 500; font-size: .95rem;
  border-bottom: 1px solid rgba(169, 214, 182, .14);
}
.panel__leds { display: flex; gap: 5px; }
.panel__leds i { width: 9px; height: 9px; background: var(--verde); }
.panel__leds i:nth-child(2) { background: var(--menta); }
.panel__leds i:nth-child(3) { background: transparent; outline: 2px solid var(--verde); outline-offset: -2px; }

.panel__red { display: block; width: 100%; height: auto; padding: 1.2rem 1rem .4rem; }

.cables path { fill: none; stroke: #3a4b42; stroke-width: 2; }
.paquetes path {
  fill: none; stroke: var(--menta); stroke-width: 2.5;
  stroke-dasharray: 6 60; stroke-linecap: square;
  animation: flujo 2.6s linear infinite;
}
.paquetes path:nth-child(3) { animation-delay: -.4s; }
.paquetes path:nth-child(4) { animation-delay: -1.1s; }
.paquetes path:nth-child(5) { animation-delay: -1.7s; }
.paquetes path:nth-child(6) { animation-delay: -.9s; }
@keyframes flujo { to { stroke-dashoffset: -132; } }

.nodo rect:first-child { fill: var(--carbon-2); stroke: #3f5248; stroke-width: 1.5; }
.nodo--nube rect:first-child { fill: transparent; stroke: var(--menta); stroke-dasharray: 4 4; }
.nodo--switch rect:first-child { fill: var(--verde); stroke: var(--verde); }
.nodo text {
  fill: #e6efe9; font-family: var(--display); font-size: 15px; font-weight: 500;
  text-anchor: middle;
}
.nodo--switch text { fill: #fff; font-weight: 600; }
.nodo--equipo text { font-size: 13.5px; transform: translateX(6px); }
.led { fill: var(--menta); animation: parpadeo 1.8s steps(2, jump-none) infinite; }
.nodo--switch .led { fill: #fff; }
.led.l2 { animation-delay: -.3s; } .led.l3 { animation-delay: -.9s; }
.led.l4 { animation-delay: -1.3s; } .led.l5 { animation-delay: -.6s; }
@keyframes parpadeo { 50% { opacity: .35; } }

.panel__estado {
  list-style: none; margin: 0; padding: .4rem 1.1rem 1rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
}
.panel__estado li {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .7rem .8rem; background: rgba(169, 214, 182, .06);
  border-left: 3px solid var(--verde);
  font-size: .82rem; color: #a9b8af;
}
.panel__estado b { font-family: var(--display); font-size: 1.05rem; color: #fff; font-weight: 600; }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(4rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--linea); }
.encabezado {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.encabezado h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.encabezado p { color: var(--tinta-suave); font-size: 1.1rem; max-width: 52ch; }

/* Servicios: dos familias */
.familias { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.familia__titulo {
  font-size: 1.05rem; font-weight: 600; color: var(--verde);
  padding-bottom: .9rem; border-bottom: 2px solid var(--tinta);
}
.servicio {
  display: grid; grid-template-columns: 44px 1fr; gap: 1.1rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--linea);
}
.servicio__icono {
  width: 40px; height: 40px; fill: none; stroke: var(--verde); stroke-width: 1.8;
  stroke-linejoin: miter;
}
.servicio h4 { font-size: 1.3rem; margin-bottom: .4rem; }
.servicio p { color: var(--tinta-suave); max-width: 50ch; }

/* Proceso: es una secuencia real, por eso va numerado */
.seccion--proceso { background: var(--blanco); }
.proceso {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  counter-reset: paso;
}
.proceso li {
  counter-increment: paso;
  position: relative; padding: 3.4rem 1.6rem 0 0;
}
.proceso li::before {
  content: counter(paso);
  position: absolute; top: 0; left: 0;
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  background: var(--verde); color: #fff;
  font-family: var(--display); font-weight: 700;
}
.proceso li::after {
  content: ""; position: absolute; top: 1.1rem; left: 2.2rem; right: 0;
  height: 2px; background: var(--linea);
}
.proceso li:last-child::after { display: none; }
.proceso h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.proceso p { color: var(--tinta-suave); }

/* Trabajos */
.trabajos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem 1.6rem;
}
.trabajo { margin: 0; }
.trabajo__foto {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: var(--carbon); border-radius: var(--radio); overflow: hidden;
  aspect-ratio: 4 / 3;
}
.trabajo__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.trabajo__foto:hover img { transform: scale(1.03); }
.trabajo figcaption { padding-top: 1rem; }
.trabajo__tipo { font-size: .88rem; font-weight: 600; color: var(--verde); }
.trabajo h3 { font-size: 1.2rem; margin: .25rem 0 .35rem; }
.trabajo p { font-size: .97rem; color: var(--tinta-suave); }


/* Proyecto web destacado */
.destacado {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--linea);
}
.navegador {
  display: block; text-decoration: none;
  background: var(--carbon); border-radius: 6px; overflow: hidden;
  box-shadow: 0 24px 48px -28px rgba(23, 33, 28, .6);
}
.navegador__barra { display: flex; align-items: center; gap: 6px; padding: .6rem .8rem; }
.navegador__barra i { width: 9px; height: 9px; background: #3a4b42; }
.navegador__url {
  flex: 1; margin-left: .6rem; padding: .25rem .7rem;
  background: var(--carbon-2); color: #b9c8bf; font-size: .85rem; border-radius: 3px;
}
.navegador__pantalla { position: relative; display: block; aspect-ratio: 1387 / 984; background: var(--carbon-2); }
.navegador__pantalla img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.navegador__vacio {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 600; color: var(--menta);
}
.navegador:hover .navegador__url { color: #fff; }
.destacado__texto h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: .35rem 0 .8rem; }
.destacado__texto p { color: var(--tinta-suave); margin-bottom: 1.5rem; max-width: 46ch; }

/* Contacto */
.contacto { background: var(--carbon); color: #e6efe9; padding: clamp(4rem, 8vw, 6.5rem) 0; }
.contacto__grilla { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contacto h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: #fff; max-width: 18ch; }
.contacto p { margin: 1.2rem 0 2rem; color: #b9c8bf; font-size: 1.1rem; max-width: 46ch; }
.contacto__datos { margin: 0; display: grid; gap: 1.5rem; }
.contacto__datos div { border-top: 1px solid rgba(169, 214, 182, .2); padding-top: 1rem; }
.contacto__datos dt { font-size: .9rem; color: var(--menta); margin-bottom: .25rem; }
.contacto__datos dd { margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 500; color: #fff; }
.contacto__datos a { text-decoration: none; }
.contacto__datos a:hover { color: var(--menta); }
.contacto__redes { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* Pie */
.pie { background: #111a15; color: #8fa097; font-size: .92rem; }
.pie__fila { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; }
.pie a { text-decoration: none; }
.pie a:hover { color: #fff; }

/* WhatsApp flotante */
.whatsapp-flotante {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--verde); border-radius: 50%;
  box-shadow: 0 8px 20px -6px rgba(0, 107, 42, .6);
}
.whatsapp-flotante svg { width: 28px; height: 28px; fill: #fff; }
.whatsapp-flotante:hover { background: var(--verde-oscuro); }

/* Visor de fotos */
.visor {
  padding: 0; border: 0; background: transparent; max-width: 92vw; max-height: 90vh;
}
.visor::backdrop { background: rgba(17, 26, 21, .88); }
.visor img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.visor__cerrar {
  position: fixed; top: 1rem; right: 1rem;
  width: 44px; height: 44px; border: 0; border-radius: var(--radio);
  background: #fff; color: var(--tinta); font-size: 1.8rem; line-height: 1; cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .portada__grilla, .encabezado, .familias, .contacto__grilla, .destacado { grid-template-columns: 1fr; }
  .portada h1 { max-width: 18ch; }
  .encabezado { gap: 1rem; }
  .proceso { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .proceso li:nth-child(2)::after { display: none; }
  .trabajos { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .menu-boton {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--linea); border-radius: var(--radio); cursor: pointer;
  }
  .menu-boton__barras, .menu-boton__barras::before, .menu-boton__barras::after {
    display: block; width: 20px; height: 2px; background: var(--tinta); position: relative; content: "";
  }
  .menu-boton__barras::before { position: absolute; top: -6px; }
  .menu-boton__barras::after { position: absolute; top: 6px; }

  .menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--papel); border-bottom: 1px solid var(--linea);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .menu.abierto { display: flex; }
  .menu a:not(.boton) { padding: .9rem 0; border-bottom: 1px solid var(--linea); font-size: 1.05rem; }
  .menu .boton { margin-top: 1rem; }
}

@media (max-width: 600px) {
  .panel__red { padding: .8rem .4rem .2rem; }
  .nodo text { font-size: 19px; }
  .nodo--equipo text { font-size: 15.5px; }
  .panel__estado { grid-template-columns: 1fr; }
  .panel__estado li { flex-direction: row; justify-content: space-between; align-items: baseline; }
  .proceso, .trabajos { grid-template-columns: 1fr; }
  .proceso li::after { display: none; }
  .portada__acciones .boton { flex: 1 1 100%; }
  .pie__fila { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .paquetes path, .led { animation: none; }
  .paquetes path { stroke-dasharray: none; stroke-opacity: .35; }
  .trabajo__foto img { transition: none; }
}
