/* Landing GAMP. Radios: tarjetas 16px, botones y campos 10px, etiquetas de uso en pastilla. */

@font-face { font-family: "Geist"; src: url("fonts/geist-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1fb;
  --ink: #131a33;
  --text: #3b4462;
  --muted: #5a6381;
  --line: #e1e5f0;
  --accent: #1d35c4;
  --accent-hover: #162a9e;
  --on-accent: #f7f8fd;
  --panel: #0f1634;
  --panel-ink: #f4f6fd;
  --panel-text: #d3d9ee;
  --panel-accent: #7fd6f8;
  --ok: #11734a;
  --err: #b42318;
  --radius-card: 16px;
  --radius-ctl: 10px;
  --shadow: 0 1px 2px rgba(19, 26, 51, .06), 0 10px 30px rgba(19, 26, 51, .07);
  --header-h: 68px;
}

/* Tema: sigue al sistema salvo que el visitante elija con el botón, que fija data-theme en <html> */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e1c;
    --surface: #11172c;
    --surface-2: #161f3b;
    --ink: #eef1fa;
    --text: #c5cbe0;
    --muted: #9aa3bf;
    --line: #232c49;
    --accent: #5ec9f6;
    --accent-hover: #8ad8f8;
    --on-accent: #06102a;
    --panel: #0d1430;
    --ok: #4fd39a;
    --err: #ff8a80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .28);
  }
  :root:not([data-theme="light"]) .wordmark { filter: brightness(0) invert(.94); }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0e1c;
  --surface: #11172c;
  --surface-2: #161f3b;
  --ink: #eef1fa;
  --text: #c5cbe0;
  --muted: #9aa3bf;
  --line: #232c49;
  --accent: #5ec9f6;
  --accent-hover: #8ad8f8;
  --on-accent: #06102a;
  --panel: #0d1430;
  --ok: #4fd39a;
  --err: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .28);
}
:root[data-theme="dark"] .wordmark { filter: brightness(0) invert(.94); }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 30; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-ctl); }
.skip:focus { left: 16px; }

.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }

/* Iconos de servicios y sectores: Phosphor en tinta dentro de un anillo con los colores del logo */
.ring { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; flex: none; }
/* Máscara radial: la de dos capas con content-box dejaba un tramo recto a la derecha del anillo en Chrome */
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #1d35c4, #01baf7, #7b2ff7, #dc0eef, #fb4521, #fd9b06, #1d35c4);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.75px), #000 calc(100% - 1.25px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.75px), #000 calc(100% - 1.25px));
}
.ico { display: block; width: 20px; height: 20px; color: var(--ink); fill: currentColor; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: auto; height: 36px; }
.brand .wordmark { width: auto; height: 22px; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text); }
.nav a:hover { color: var(--ink); }
.header-right { display: flex; align-items: center; gap: 16px; }
.lang { font-size: 14px; color: var(--muted); white-space: nowrap; }
.lang strong { color: var(--ink); font-weight: 600; }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--ink); }
.nav-toggle, .theme-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  background: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-ctl); cursor: pointer;
}
.theme-toggle { display: inline-flex; }
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--muted); }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding-inline: 20px;
  border: 1px solid transparent; border-radius: var(--radius-ctl);
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { height: 40px; padding-inline: 16px; font-size: 15px; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* Portada */
.hero { padding-block: 56px 72px; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  min-height: calc(100dvh - var(--header-h) - 128px);
}
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); max-width: 18ch; }
.hero .sub { margin-top: 22px; font-size: clamp(1.08rem, 1.45vw, 1.28rem); max-width: 38ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-mark { justify-self: center; width: min(320px, 100%); aspect-ratio: 1; }
.hero-mark img { width: 100%; height: 100%; }

/* Secciones */
.section { padding-block: 96px; }
.hero + .section { padding-top: 40px; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.section-head p { margin-top: 14px; max-width: 60ch; }

/* Servicios */
.bento { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.cell h3 { margin-top: 14px; font-size: 1.3rem; }
.cell p { margin-top: 8px; }
.cell-tint { background: var(--surface-2); }
.cell-lab {
  grid-row: 1 / span 3;
  position: relative; overflow: hidden;
  min-height: 540px; padding: 36px;
  background: var(--panel); border-color: transparent; color: var(--panel-text);
}
.cell-lab .lab-body { position: relative; z-index: 1; max-width: 32rem; }
.cell-lab .icon { color: var(--panel-accent); }
.cell-lab .ico { color: var(--panel-ink); }
/* Donde el título es mayor, el sello crece un poco para mantener la proporción */
.cell-lab .ring, .sector .ring { width: 44px; height: 44px; }
.cell-lab .ico, .sector .ico { width: 22px; height: 22px; }
.cell-lab h3 { color: var(--panel-ink); font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.cell-lab p { color: var(--panel-text); }
.checks { display: grid; gap: 10px; margin-top: 26px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks .icon { width: 20px; height: 20px; margin-top: 3px; }
.lab-mark { position: absolute; right: 32px; bottom: 32px; width: 150px; height: 150px; pointer-events: none; }

/* Sectores */
.sectors { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.sector { padding: 40px 40px 8px 0; }
.sector + .sector { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--line); }

.sector h3 { margin-top: 16px; font-size: 1.6rem; }
.sector > p { margin-top: 10px; max-width: 44ch; }
.uses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.uses li { padding: 8px 14px; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }

/* Método */
.process { background: var(--surface); border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { position: relative; padding-top: 26px; border-top: 2px solid var(--line); }
.step::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--accent); }
.step h3 { font-size: 1.25rem; }
.step p { margin-top: 8px; font-size: 16px; }

/* Contacto */
.contact-wrap h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 14px; }
.contact-lead { max-width: 60ch; margin-bottom: 28px; }

/* Pie */
.site-footer { padding-block: 32px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; font-size: 15px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .mark { width: auto; height: 30px; }
.footer-brand .wordmark { width: auto; height: 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Movimiento: el símbolo gira como su forma sugiere; las secciones entran al hacer scroll */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark img { animation: spin 90s linear infinite; }
  .lab-mark { animation: spin 120s linear infinite; }
  .cell:hover .ring::before, .sector:hover .ring::before { animation: spin 6s linear infinite; }
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 960px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 4px 20px 12px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open a { padding-block: 14px; border-bottom: 1px solid var(--line); }
  .nav.open a:last-child { border-bottom: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .hero-mark { width: min(240px, 60%); }
  .bento { grid-template-columns: 1fr; }
  .cell-lab { grid-row: auto; min-height: 0; padding-bottom: 200px; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding-block: 64px; }
  .hero { padding-block: 36px 56px; }
  .header-right { gap: 10px; }
  .ring { width: 36px; height: 36px; }
  .ico { width: 18px; height: 18px; }
  .cell-lab .ring, .sector .ring { width: 40px; height: 40px; }
  .cell-lab .ico, .sector .ico { width: 20px; height: 20px; }
  .header-right .btn { display: none; }
  .hero-mark { width: min(180px, 50%); }
  .cell-lab { padding: 26px 26px 160px; }
  .lab-mark { width: 116px; height: 116px; right: 24px; bottom: 24px; }
  .sectors { grid-template-columns: 1fr; }
  .sector, .sector + .sector { padding: 32px 0 8px; border-left: 0; }
  .sector + .sector { border-top: 1px solid var(--line); margin-top: 24px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
}
