/* GEAC Engineering Solutions — hoja de estilos
   Paleta: tinta (azul pizarra), papel frío, gris de plano, amarillo de señal AT */

@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #102b44;
  --ink-2: #2b3e52;
  --muted: #55667a;
  --paper: #f2f5f7;
  --surface: #ffffff;
  --rule: #cdd6de;
  --signal: #6ab23e;
  --signal-ink: #0b2033;
  --link: #1f5d8c;
  --grid-line: rgba(20, 39, 59, 0.06);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6edf3;
    --ink-2: #c3cfda;
    --muted: #96a6b6;
    --paper: #0f1b27;
    --surface: #152433;
    --rule: #2a3c4f;
    --link: #8cc2ec;
    --grid-line: rgba(230, 237, 243, 0.05);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-stretch: 78%;
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); font-weight: 720; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.08rem; font-stretch: 90%; font-weight: 640; margin-bottom: 0.4em; }
p { margin: 0 0 1em; max-width: 66ch; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* ---------- cabecera */
.site-head {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.head-row { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.mark img { display: block; width: auto; height: 100%; }
.brand .mark { display: block; height: 44px; }
.brand-name { font-stretch: 80%; font-weight: 780; font-size: 1.35rem; letter-spacing: 0.02em; }
.brand-sub { font-size: 0.85rem; color: var(--muted); font-stretch: 90%; }
.main-nav { margin-left: auto; }
.main-nav ul, .lang ul, .foot-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: 0.97rem; }
.main-nav a:hover { text-decoration: underline; }
.lang ul { gap: 4px; }
.lang a {
  display: block; padding: 4px 7px; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); text-decoration: none; border-radius: 3px;
}
.lang a[aria-current] { color: var(--signal-ink); background: var(--signal); }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .lang { margin-left: auto; }
  .brand-sub { display: none; }
}

/* ---------- portada */
.hero {
  padding: clamp(40px, 7vw, 88px) 0 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px); align-items: center;
}
.hero h1 { max-width: 15ch; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 54ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 28px; }

.btn {
  display: inline-block; padding: 13px 22px;
  background: var(--signal); color: var(--signal-ink);
  font-weight: 650; text-decoration: none; border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--signal) 70%, #000);
}
.btn:hover { background: color-mix(in srgb, var(--signal) 88%, #fff); text-decoration: none; }
.btn-quiet { color: var(--ink); font-weight: 600; }

.sld { width: 100%; max-width: 440px; height: auto; display: block; margin-left: auto; }
.sld .w, .sld .bus, .sld .tr, .sld .cb, .sld .gen, .sld .sld-grid-sym {
  fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.sld .sld-grid-sym path { stroke-width: 1.4; }
.sld .bus { stroke-width: 7; stroke-linecap: square; }
.sld .cb { fill: var(--paper); }
.sld .hot { stroke: var(--signal); }
.sld .gen.hot path { stroke-width: 3; }
.sld text { fill: var(--muted); font-family: inherit; font-size: 13px; font-stretch: 90%; }
.sld .val { fill: var(--ink); font-weight: 650; }

/* el unifilar se dibuja una vez al cargar */
@media (prefers-reduced-motion: no-preference) {
  .sld .w, .sld .bus {
    stroke-dasharray: 320; stroke-dashoffset: 320;
    animation: draw 1.1s ease-out forwards;
  }
  .sld .bus { animation-delay: 0.35s; }
  .sld .f { animation-delay: 0.7s; }
  .sld .hot { animation: draw 1.1s ease-out 0.7s forwards, energize 1.6s ease-in-out 1.8s 2 alternate; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes energize { to { opacity: 0.45; } }
}

.facts {
  list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.facts li { padding: 22px 24px 26px 0; display: flex; flex-direction: column; gap: 4px; }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.fact-n { font-stretch: 75%; font-weight: 720; font-size: 2rem; line-height: 1.1; }
.fact-t { color: var(--muted); font-size: 0.95rem; max-width: 30ch; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .sld { margin: 0 auto; max-width: 360px; }
  .facts { grid-template-columns: 1fr; }
  .facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- bloques */
.block { padding: clamp(56px, 8vw, 104px) 0; }
.block-alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.block-head { margin-bottom: clamp(28px, 4vw, 48px); }
.block-head p { color: var(--ink-2); font-size: 1.1rem; }

/* sectores */
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 56px; }
.sectors li { border-left: 3px solid var(--signal); padding-left: 20px; }
.sectors h3 { font-size: 1.35rem; }
.sectors p { color: var(--ink-2); margin: 0; }
@media (max-width: 760px) { .sectors { grid-template-columns: 1fr; } }

/* pasos: cuelgan de una barra, como derivaciones de un embarrado */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 28px;
  border-top: 7px solid var(--ink); position: relative;
}
.steps li { position: relative; padding-top: 52px; }
.steps li::before {
  content: ""; position: absolute; left: 16px; top: 0; width: 2.4px; height: 26px; background: var(--ink);
}
.step-n {
  position: absolute; top: 22px; left: 5px; width: 24px; height: 24px;
  border: 2.4px solid var(--ink); background: var(--paper); border-radius: 2px;
  font-size: 0.8rem; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
.steps h3 { font-size: 1.25rem; margin-top: 16px; }
.steps p { color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 1060px) {
  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 7px solid var(--ink); padding-left: 0; }
  .steps li { padding: 0 0 8px 54px; }
  .steps li::before { left: 0; top: 16px; width: 26px; height: 2.4px; }
  .step-n { left: 22px; top: 5px; }
  .steps h3 { margin-top: 4px; }
}

/* equipo */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 48px; }
.team li { border-top: 2px solid var(--ink); padding-top: 20px; }
.team h3 { font-size: 1.35rem; }
.team p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .team { grid-template-columns: 1fr; } }

/* boletín */
.news { background: #102b44; color: #e9eff4; padding: clamp(44px, 6vw, 72px) 0; }
.news h2 { color: #fff; }
.news p { color: #c7d3de; }
.news-row { display: grid; grid-template-columns: minmax(0, 2fr) auto; gap: 24px 48px; align-items: center; }
.news .btn { border-color: var(--signal); }
@media (max-width: 760px) { .news-row { grid-template-columns: 1fr; } }

/* contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.big-mail { font-stretch: 78%; font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.6rem); margin-top: 24px; overflow-wrap: anywhere; }
.big-mail a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 4px; text-underline-offset: 8px; }
.contact-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; border-top: 1px solid var(--rule); padding-top: 20px; }
.contact-list dt { color: var(--muted); font-size: 0.92rem; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* pie */
.site-foot { border-top: 1px solid var(--rule); padding: 28px 0 36px; font-size: 0.93rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); }
.foot-brand .mark { display: block; height: 26px; }
.foot-links { flex-wrap: wrap; gap: 10px 24px; }
.foot-links a { color: var(--ink-2); }

/* páginas legales */
.legal { padding: clamp(40px, 6vw, 80px) 0; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 0.6em; }
.legal h2 { font-size: 1.3rem; font-stretch: 85%; margin-top: 2em; }
.legal .note { color: var(--muted); font-size: 0.95rem; }
.legal .back { margin-top: 3em; }

/* ---------- zona oscura: cabecera, portada y cifras (igual en modo claro y oscuro) */
.site-head, .hero, .stats {
  --ink: #eef3f7;
  --ink-2: #c5d2dd;
  --muted: #8fa3b5;
  --paper: #0b2033;
  --rule: rgba(238, 243, 247, 0.14);
  --grid-line: rgba(238, 243, 247, 0.045);
  --link: #a9d98a;
  color: var(--ink);
}
.site-head { background: rgba(11, 32, 51, 0.94); border-bottom-color: var(--rule); }
.hero { background-color: #0b2033; border-bottom: 0; padding-bottom: clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.7rem); line-height: 1.02; max-width: 16ch; }
.hero h1::after {
  content: ""; display: inline-block; width: 0.42em; height: 0.08em;
  margin-left: 0.12em; background: var(--signal); vertical-align: baseline;
}
@media (prefers-reduced-motion: no-preference) {
  .hero h1::after { animation: blink 1.1s steps(1) 3; }
  @keyframes blink { 50% { opacity: 0; } }
}
.stats { background: #07182a; }
.stats .facts { margin: 0; border-top: 0; grid-template-columns: repeat(4, 1fr); }
.stats .facts li { padding: 34px 24px 38px 0; }
.stats .facts li + li { padding-left: 28px; }
.stats .fact-n { color: var(--signal); font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 760; white-space: nowrap; }
.stats .fact-t { color: var(--ink-2); }
@media (max-width: 860px) {
  .stats .facts { grid-template-columns: 1fr 1fr; }
  .stats .facts li, .stats .facts li + li { padding: 22px 16px 22px 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- servicios en tarjetas */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px;
  padding: 28px 26px 26px; border-top: 3px solid var(--signal);
}
.card:first-child { grid-column: 1 / -1; }
.card:first-child .card-groups, .card:first-child { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; align-content: start; }
.card:first-child > .ico, .card:first-child > h3, .card:first-child > .card-desc { grid-column: 1 / -1; }
.ico { width: 34px; height: 34px; fill: none; stroke: var(--signal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }
.card h3 { font-size: 1.4rem; margin-bottom: 0.35em; }
.card-desc { color: var(--ink-2); margin-bottom: 1.1em; }
.sg + .sg { margin-top: 14px; }
.card:first-child .sg + .sg { margin-top: 0; }
.sg h4 { font-size: 0.98rem; }
.sg ul { list-style: none; margin: 0; padding: 0; }
.sg li { padding: 3px 0 3px 16px; position: relative; color: var(--ink-2); font-size: 0.94rem; line-height: 1.45; }
.sg li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 8px; height: 2px; background: var(--signal); }
@media (max-width: 680px) {
  .cards { grid-template-columns: 1fr; }
  .card:first-child { display: block; }
  .card:first-child .sg + .sg { margin-top: 14px; }
}

/* ---------- software */
.software {
  margin-top: 20px; padding: 26px; border: 1px solid var(--rule); border-radius: 6px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 40px; align-items: center;
}
.software h3 { font-size: 1.25rem; margin-bottom: 0.2em; }
.software p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.software ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.software li {
  padding: 6px 12px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  background: color-mix(in srgb, var(--signal) 14%, transparent); color: var(--ink);
}
@media (max-width: 760px) { .software { grid-template-columns: 1fr; } }
