/* eTecnova — hoja de estilos. Sin dependencias ni fuentes externas.
   Tipografía: pila del sistema (para autoalojar una fuente, cambiar --font y --font-display). */

:root {
  --navy: #10294D;
  --navy-deep: #0A1D38;
  --blue: #1F6FEB;
  --blue-light: #6EA8FF;
  --teal: #2BB3C6;
  --amber: #F2A33A;
  --paper: #F4F7FB;
  --line: #D8E0EB;
  --gray: #51607A;
  --wa: #0E7A3D;
  --wa-hover: #0B6633;

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Semibold", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --max: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--font);
  color: var(--navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--blue); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.site-header :focus-visible,
.hero :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible { outline-color: #fff; }

.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 8px; z-index: 100; padding: 8px 14px; border-radius: 6px; background: #fff; color: var(--navy); }

.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--max)); margin-inline: auto; }

/* Tipografía de títulos */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h1 { margin: 0 0 24px; font-size: clamp(2.4rem, 4.8vw, 4rem); line-height: 1.05; letter-spacing: -0.03em; }
h2 { margin: 0 0 16px; font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.1; }
h3 { margin: 0 0 8px; font-size: 1.375rem; line-height: 1.25; }
p { margin: 0 0 1em; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border: 1.5px solid transparent; border-radius: 999px;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--sm { padding: 10px 18px; font-size: .9375rem; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); }
.btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light .icon { color: var(--wa); }
.btn--light:hover { background: var(--paper); }

/* Encabezado */
.site-header { background: var(--navy); color: #fff; }
.site-header__bar { display: flex; align-items: center; gap: 32px; padding-block: 20px; }
.brand { display: inline-flex; flex: none; }
.brand img { display: block; width: auto; height: 40px; }
.site-nav { margin-inline: auto; }
.site-nav ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: #D5E0F1; font-size: .9375rem; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }

/* Hero */
/* margin-top negativo: evita la costura de subpíxel entre el encabezado y el hero (mismo color) */
.hero { margin-top: -1px; background: var(--navy); color: #fff; overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(32px, 6vw, 80px) clamp(56px, 8vw, 104px);
}
.hero__lead { max-width: 34em; margin-bottom: 36px; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: #C9D6EA; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__art { display: block; width: 100%; height: auto; }
.art-orbit { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1.2; stroke-dasharray: 3 7; }
.art-links path { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 1.4; stroke-dasharray: 160; }
.art-node rect { fill: #16335C; stroke: rgba(255, 255, 255, .3); stroke-width: 1.2; }
.art-node text { fill: #fff; font: 600 17px var(--font); text-anchor: middle; dominant-baseline: central; }

/* Único momento animado: las cuatro personas llegan y se conectan */
@media (prefers-reduced-motion: no-preference) {
  .art-person { animation: person-in .9s cubic-bezier(.2, .8, .2, 1) both; }
  .art-person--1 { animation-delay: .10s; }
  .art-person--2 { animation-delay: .25s; }
  .art-person--3 { animation-delay: .40s; }
  .art-person--4 { animation-delay: .55s; }
  .art-links path { animation: draw 1s ease-out 1.1s both; }
  .art-node { animation: fade-in .6s ease-out 1.5s both; }
}
@keyframes person-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Secciones */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section--paper { background: var(--paper); }
section[id] { scroll-margin-top: 16px; }
.section__head { max-width: 36em; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head p { color: var(--gray); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.split__aside { align-self: start; position: sticky; top: 32px; }
.split__aside p { color: var(--gray); max-width: 26em; }

/* Listado de servicios y clientes */
.index { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.service { padding: 28px 0; border-top: 1px solid var(--line); }
.service p { max-width: 38em; margin: 0; color: var(--gray); }
.service small { display: block; margin-top: 12px; color: var(--gray); font-size: .875rem; }
.service h3 a {
  color: inherit; text-decoration: underline; text-decoration-color: var(--line);
  text-decoration-thickness: 2px; text-underline-offset: 6px; transition: color .15s, text-decoration-color .15s;
}
.service h3 a:hover { color: var(--blue); text-decoration-color: currentColor; }

/* Proceso: una secuencia real, por eso va numerada */
.steps {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  margin: 0; padding: 0; list-style: none; counter-reset: step;
}
.steps::before { /* hilo que conecta a las cuatro personas */
  content: ""; position: absolute; top: 23px; left: 0; right: calc(25% - 42px); height: 2px; background: var(--line);
}
.step { position: relative; counter-increment: step; }
.step__person {
  position: relative; display: block; padding-right: 14px; box-sizing: content-box;
  background: var(--paper); fill: currentColor;
}
.step:nth-child(1) .step__person { color: var(--navy); }
.step:nth-child(2) .step__person { color: var(--blue); }
.step:nth-child(3) .step__person { color: var(--teal); }
.step:nth-child(4) .step__person { color: var(--amber); }
.step h3::before { content: counter(step) ". "; color: var(--gray); font-weight: 500; }
.step__text { margin-top: 18px; }
.step p { margin: 0; color: var(--gray); }

/* Contacto */
.contact { background: var(--blue); color: #fff; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.contact p { max-width: 30em; margin-bottom: 28px; color: #EAF2FF; }
.contact__data { display: grid; gap: 6px; font-style: normal; font-size: 1.0625rem; }
.contact__data a { color: #fff; }

/* Pie de página */
.site-footer { padding-block: 56px 40px; background: var(--navy-deep); color: #B9C7DD; font-size: .9375rem; }
.site-footer a { color: #E4ECF8; }
.site-footer__grid { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.site-footer__brand { flex: 1 1 240px; }
.site-footer__brand img { display: block; height: 35px; width: auto; margin-bottom: 18px; }
.site-footer__legal { flex: 2 1 340px; max-width: 46em; }
.site-footer__legal ul { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.site-footer__qr { flex: none; display: block; padding: 6px; border-radius: 8px; background: #fff; }
.site-footer__qr img { display: block; }
.site-footer__brand p, .site-footer__legal p { margin: 0 0 .75em; }
.site-footer__note { max-width: 62em; margin: 40px 0 0; font-size: .8125rem; color: #8FA2BF; }
.site-footer__note + .site-footer__note { margin-top: 8px; }

/* Botón flotante de WhatsApp */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 20;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; box-shadow: 0 6px 20px rgba(10, 29, 56, .35);
  transition: background-color .15s, transform .15s;
}
.fab:hover { background: var(--wa-hover); transform: translateY(-2px); }
.fab .icon { width: 28px; height: 28px; }

/* Páginas legales */
.legal { max-width: 760px; padding-block: clamp(40px, 7vw, 80px) clamp(64px, 9vw, 112px); }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 12px; }
.legal h2 { margin: 2.2em 0 .6em; font-size: 1.5rem; }
.legal h3 { margin: 1.6em 0 .4em; font-size: 1.1875rem; }
.legal .legal__meta { color: var(--gray); }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: .4em; }

/* Pantallas chicas */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header__bar { justify-content: space-between; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 520px; margin-inline: auto; }
  .split, .contact__grid { grid-template-columns: 1fr; }
  .split__aside { position: static; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 24px; bottom: 24px; left: 23px; right: auto; width: 2px; height: auto; }
  .step { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; }
  .step__person { padding: 0; }
  .step__text { margin-top: 0; }
}
@media (max-width: 560px) {
  .site-header .btn__label { display: none; }
  .site-header .btn--sm { width: 44px; height: 44px; padding: 0; }
  .brand img { height: 34px; }
  .art-node, .art-links { display: none; }
  .btn { width: 100%; }
  .hero__actions { flex-direction: column; }
}
