/* Creado por IvelianK · © 2026 IvelianK */
/* Fuentes servidas desde la propia web (sin peticiones a Google). Manrope y JetBrains Mono: SIL Open Font License 1.1. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* CMN Systems. Oscuro por defecto, claro con [data-theme="light"].
   Compatibilidad: sin color-mix ni propiedades translate/scale sueltas; alternativas para svh, máscaras y backdrop-filter. */
:root {
  --bg: #070d12;
  --bg-2: #0a1219;
  --surface: #0e1820;
  --surface-2: #132029;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eaf2f4;
  --muted: #9ab0b8;
  --accent: #1fd6d8;
  --accent-ink: #03161a;
  --danger: #ff8a8a;
  --ring: rgba(0, 218, 220, 0.15);
  --spot: rgba(0, 218, 220, 0.12);
  --halo: rgba(0, 218, 220, 0.12);
  --grad: linear-gradient(120deg, #00dadc 0%, #1ae5be 45%, #3a9dff 100%);
  --grad-soft: linear-gradient(120deg, rgba(0, 218, 220, 0.16), rgba(58, 157, 255, 0.12));
  --header-bg: rgba(7, 13, 18, 0.78);
  --globe-a: 0, 218, 220;
  --globe-b: 58, 157, 255;
  --blob-a: rgba(0, 218, 220, 0.22);
  --blob-b: rgba(58, 157, 255, 0.2);
  --blob-c: rgba(26, 229, 190, 0.14);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 24px -12px rgba(0, 0, 0, 0.55), 0 32px 64px -32px rgba(0, 0, 0, 0.7);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 16px 32px -12px rgba(0, 0, 0, 0.6), 0 40px 80px -30px rgba(0, 160, 180, 0.35);

  --f-body: "Manrope", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --radius: 20px;
  --gutter: 16px;
  --header-h: 72px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f2f6f8;
  --bg-2: #e9f0f3;
  --surface: #ffffff;
  --surface-2: #f7fafb;
  --line: rgba(10, 40, 50, 0.09);
  --line-strong: rgba(10, 40, 50, 0.18);
  --text: #0b1c24;
  --muted: #4a5f68;
  --accent: #007a80;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --ring: rgba(0, 122, 128, 0.18);
  --spot: rgba(0, 122, 128, 0.08);
  --halo: rgba(0, 122, 128, 0.12);
  --grad: linear-gradient(120deg, #006d73 0%, #007a64 45%, #1a5fc8 100%);
  --grad-soft: linear-gradient(120deg, rgba(0, 131, 138, 0.1), rgba(31, 111, 224, 0.08));
  --header-bg: rgba(242, 246, 248, 0.82);
  --globe-a: 0, 131, 138;
  --globe-b: 31, 111, 224;
  --blob-a: rgba(0, 200, 205, 0.22);
  --blob-b: rgba(60, 140, 255, 0.18);
  --blob-c: rgba(26, 229, 190, 0.16);
  --shadow: 0 1px 2px rgba(10, 40, 50, 0.05), 0 12px 28px -14px rgba(10, 40, 50, 0.18), 0 32px 64px -36px rgba(10, 40, 50, 0.22);
  --shadow-hover: 0 1px 2px rgba(10, 40, 50, 0.06), 0 18px 36px -14px rgba(10, 40, 50, 0.22), 0 40px 80px -30px rgba(0, 131, 138, 0.3);
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 56px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00dadc, #3a9dff); border: 2px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-corner { background: var(--bg); }
::selection { background: var(--accent); color: var(--accent-ink); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  accent-color: var(--accent);
}
@supports (overflow: clip) { body { overflow-x: clip; } }
body.is-locked { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-weight: 700; }
.skip:focus { top: 16px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i18n-wait body { visibility: hidden; }

/* Texto en degradado */
.grad, .hero-title .grad .wi, .fact dd, .step-num, .sheet-tag { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.eyebrow, .label { display: inline-flex; align-items: center; gap: 10px; font: 500 0.75rem/1.3 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); flex-shrink: 0; }
.label { color: var(--muted); margin-bottom: 16px; }
.h2 { margin-top: 14px; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
@media (min-width: 768px) { .h2 { font-size: 2.25rem; } }
@media (min-width: 1280px) { .h2 { font-size: 2.75rem; } }
.lead { color: var(--muted); font-size: 1.0625rem; max-width: 62ch; }
.section { position: relative; padding: 48px 0; }
@media (min-width: 1024px) { .section { padding: 64px 0; } }

/* Caja flotante: degradado sutil, borde y sombra en capas */
.box, .card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
}
.box { padding: 24px; }
@media (min-width: 768px) { .box { padding: 36px; } }
@media (min-width: 1280px) { .box { padding: 48px; } }
/* Filo superior en degradado */
.box-accent { overflow: hidden; }
.box-accent::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); }

.head { display: grid; gap: 16px; margin-bottom: 32px; }
@media (min-width: 1024px) { .head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: end; margin-bottom: 40px; } }
.split { display: grid; gap: 32px; }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; } }
.section > .container > .split > .box { height: 100%; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Botones ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.9375rem; line-height: 1;
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.875rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-primary { background: var(--grad); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(0, 200, 210, 0.55); }
[data-theme="light"] .btn-primary { box-shadow: 0 10px 30px -12px rgba(0, 110, 115, 0.5); }
/* Barrido de brillo al pasar el ratón */
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 50%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-20deg) translateX(0); pointer-events: none; }
.btn-ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.02); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(0, 200, 210, 0.7); }
  .btn-primary:hover::after { transform: skewX(-20deg) translateX(420%); transition: transform 0.7s var(--ease-out); }
  .btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
  .btn:hover svg { transform: translateX(3px); }
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 10px;
  border: 1px solid var(--line); background: transparent;
  transition: border-color 0.2s ease, transform 0.16s var(--ease-out);
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { border-color: var(--accent); } }
.text-link { display: inline-flex; gap: 6px; color: var(--accent); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .text-link:hover { text-decoration: underline; text-underline-offset: 4px; } }

/* ---------- Cabecera fija (siempre visible) ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.header.is-scrolled, .header.is-open { background: var(--bg); border-bottom-color: var(--line); box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.5); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .header.is-scrolled, .header.is-open { background: var(--header-bg); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); }
}
.header-inner {
  height: var(--header-h);
  width: 100%; max-width: 1440px; margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right));
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; height: 36px; color: var(--text); flex-shrink: 0; }
.brand svg { height: 100%; width: auto; }
@media (max-width: 559px) { .brand { width: 80px; height: 32px; overflow: hidden; } .brand svg { max-width: none; } .header-inner { gap: 10px; } }
.nav { position: relative; display: none; margin: 0 auto; }
.nav ul { display: flex; gap: 2px; list-style: none; padding: 0; }
.nav a { display: block; padding: 10px 14px; font-size: 0.9375rem; font-weight: 600; color: var(--muted); transition: color 0.2s ease; }
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav-line { position: absolute; left: 0; bottom: 2px; width: 100px; height: 2px; border-radius: 2px; background: var(--grad); transform-origin: 0 50%; transform: translateX(0) scaleX(0); opacity: 0; transition: transform 0.3s var(--ease-out), opacity 0.2s ease; pointer-events: none; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.lang-btn { border: 0; background: transparent; min-width: 36px; height: 32px; padding: 0 8px; border-radius: 7px; font: 500 0.75rem/1 var(--f-mono); color: var(--muted); transition: background-color 0.2s ease, color 0.2s ease; }
.lang-btn[aria-pressed="true"] { background: var(--grad); color: var(--accent-ink); }
.theme-toggle .i-moon, [data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }
.header-cta { display: none; }
.burger { position: relative; width: 18px; height: 12px; }
.burger i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s var(--ease-out); }
.burger i:first-child { top: 1px; }
.burger i:last-child { top: 9px; }
.menu-toggle[aria-expanded="true"] .burger i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .burger i:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--line);
  padding: 8px max(var(--gutter), env(safe-area-inset-left)) 20px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; font-weight: 700; }
.mobile-menu-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 16px; color: var(--muted); font-size: 0.9rem; }
@media (min-width: 1100px) {
  .nav { display: block; }
  .menu-toggle, .mobile-menu { display: none !important; }
  .header-cta { display: inline-flex; }
}

/* ---------- Portada a pantalla completa ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 32px) 0 120px;
  overflow: hidden;
  isolation: isolate;
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -2; pointer-events: none; }
.hero-bg::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
/* Manchas de color que derivan muy despacio */
.blob { position: absolute; border-radius: 50%; -webkit-filter: blur(60px); filter: blur(60px); will-change: transform; }
.b1 { width: 52vw; height: 52vw; max-width: 760px; max-height: 760px; top: -18%; left: -12%; background: var(--blob-a); -webkit-animation: drift1 22s var(--ease-in-out) infinite alternate; animation: drift1 22s var(--ease-in-out) infinite alternate; }
.b2 { width: 46vw; height: 46vw; max-width: 680px; max-height: 680px; top: 10%; right: -14%; background: var(--blob-b); -webkit-animation: drift2 26s var(--ease-in-out) infinite alternate; animation: drift2 26s var(--ease-in-out) infinite alternate; }
.b3 { width: 40vw; height: 40vw; max-width: 600px; max-height: 600px; bottom: -30%; left: 30%; background: var(--blob-c); -webkit-animation: drift1 30s var(--ease-in-out) infinite alternate-reverse; animation: drift1 30s var(--ease-in-out) infinite alternate-reverse; }
@-webkit-keyframes drift1 { to { -webkit-transform: translate(8vw, 6vh); } }
@keyframes drift1 { to { transform: translate(8vw, 6vh); } }
@-webkit-keyframes drift2 { to { -webkit-transform: translate(-6vw, 8vh); } }
@keyframes drift2 { to { transform: translate(-6vw, 8vh); } }

.globe { position: absolute; z-index: -1; top: 50%; right: -8vw; width: 64vw; height: 64vw; margin-top: -32vw; width: min(64vw, 940px); height: min(64vw, 940px); margin-top: calc(min(64vw, 940px) / -2); opacity: 0; transition: opacity 1.2s ease; }
.globe.is-on { opacity: 1; }
.hero-inner { position: relative; }
.eyebrow.pill { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--grad-soft); color: var(--text); }
.hero-title { margin-top: 24px; font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; max-width: 11ch; }
.hero-title .line { display: block; }
/* Sin partir en palabras (movimiento reducido o sin JS) el degradado solo cubre la caja de línea: aire para los trazos descendentes */
.hero-title .line.grad { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero-lead { margin-top: 26px; color: var(--muted); font-size: 1.0625rem; max-width: 52ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
@media (min-width: 480px) { .hero-title { font-size: 3.75rem; } }
@media (min-width: 768px) { .hero-title { font-size: 5rem; } .hero-lead { font-size: 1.1875rem; } }
@media (min-width: 1280px) { .hero-title { font-size: 6.75rem; } }
@media (min-width: 1600px) { .hero-title { font-size: 7.5rem; } }
@media (max-width: 1023px) {
  .globe { right: -30vw; width: 110vw; height: 110vw; margin-top: -55vw; opacity: 0; }
  .globe.is-on { opacity: 0.45; }
}

/* Titular: cada palabra sube desde su máscara */
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.2em; margin-bottom: -0.2em; }
.hero-title .wi { display: inline-block; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.js .hero-title .wi { transform: translateY(110%); transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + 100ms); }
.js .is-ready .hero-title .wi { transform: none; }
.hero-title .grad .wi { -webkit-animation: sheen 9s linear infinite; animation: sheen 9s linear infinite; }
.hero-title.is-split .line.grad { background: none; color: inherit; }
@-webkit-keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.js [data-hero] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .is-ready [data-hero] { opacity: 1; transform: none; }
.js .is-ready .eyebrow[data-hero] { transition-delay: 0s; }
.js .is-ready .hero-lead[data-hero] { transition-delay: 0.45s; }
.js .is-ready .hero-ctas[data-hero] { transition-delay: 0.55s; }

/* Cifras clave: caja flotante que monta sobre el final de la portada */
.facts-wrap { position: relative; z-index: 2; margin-top: -64px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 22px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact:nth-child(2n) { border-right: 0; }
.fact:nth-child(n+3) { border-bottom: 0; }
.fact dd { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.fact dt { color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
  .fact, .fact:nth-child(2n) { padding: 32px; border-right: 1px solid var(--line); border-bottom: 0; }
  .fact:last-child { border-right: 0; }
  .fact dd { font-size: 2.75rem; }
}

/* ---------- Introducción ---------- */
.intro { padding-top: 64px; }
@media (min-width: 1024px) { .intro { padding-top: 96px; } }
.intro-text { display: grid; gap: 16px; color: var(--muted); font-size: 1.0625rem; }
@media (min-width: 1024px) { .intro-text { padding-top: 34px; } }

/* ---------- Tarjetas (servicios y pasos): elevación, foco de luz y borde en degradado ---------- */
.cards { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.card {
  --mx: 50%; --my: 0%;
  overflow: hidden;
  display: flex; flex-direction: column;
  padding: 26px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx) var(--my), var(--spot), transparent 60%);
  opacity: 0; transition: opacity 0.3s ease;
}
.card-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-soft); border: 1px solid var(--line-strong); font: 500 0.8125rem/1 var(--f-mono); color: var(--accent); }
.card h3 { margin-top: 18px; font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.015em; }
.card p { margin-top: 10px; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.card-more { position: static; margin-top: auto; padding: 18px 0 0; border: 0; background: none; align-self: flex-start; display: inline-flex; gap: 6px; font-size: 0.9rem; font-weight: 700; color: var(--accent); text-align: left; }
.card-more span[aria-hidden] { display: inline-block; transition: transform 0.25s var(--ease-out); }
.card-more::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: var(--radius); }
.card-cta { background: var(--grad-soft), linear-gradient(180deg, var(--surface-2), var(--surface)); border-color: var(--line-strong); }
.card-cta h3 { margin-top: 0; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
  .card:hover::before { opacity: 1; }
  .card:hover .card-more span[aria-hidden] { transform: translateX(4px); }
}
/* Borde en degradado al pasar el ratón (solo donde hay máscaras compuestas) */
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .card::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none;
    border-radius: inherit; padding: 1px; background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity 0.3s ease;
  }
  @media (hover: hover) and (pointer: fine) { .card:hover::after { opacity: 1; } }
}

/* ---------- Método ---------- */
.steps { position: relative; list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.step.box { padding: 28px; overflow: hidden; }
/* Barra superior que se dibuja al entrar en pantalla */
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); transform-origin: 0 50%; transform: scaleX(1); transition: transform 0.9s var(--ease-out); }
.js .step[data-reveal]::before { transform: scaleX(0); }
.js .step[data-reveal].in::before { transform: scaleX(1); transition-delay: calc(var(--rd, 0s) + 0.2s); }
.step-num { display: block; font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.step h3 { margin-top: 16px; font-size: 1.1875rem; font-weight: 800; }
.step p { margin-top: 10px; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Ingenieros de campo ---------- */
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; margin: -5px; }
.tags li { margin: 5px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--grad-soft); font-size: 0.9375rem; font-weight: 700; transition: transform 0.2s var(--ease-out), border-color 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .tags li:hover { transform: translateY(-2px); border-color: var(--accent); } }

/* ---------- Empresa ---------- */
.about-text { display: grid; gap: 16px; align-content: start; }
.about-text > p:not(.eyebrow) { color: var(--muted); }
.about-text .h2 { margin-bottom: 4px; }
.ones { list-style: none; padding: 0; display: grid; gap: 12px; }
.ones li { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.ones li::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--grad); box-shadow: 0 0 0 4px var(--halo); flex-shrink: 0; }
.ones b { font-size: 1.1875rem; font-weight: 800; }
.box-accent > p { margin-top: 20px; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact .lead { margin-top: 16px; }
.channels { margin-top: 28px; display: grid; }
.channels > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.channels dt { font: 500 0.75rem/1.9 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.channels dd { display: grid; gap: 4px; min-width: 0; }
.channels a { width: -webkit-fit-content; width: fit-content; max-width: 100%; overflow-wrap: anywhere; font-weight: 700; transition: color 0.2s ease; }
.channels address { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .channels a:hover { color: var(--accent); } }
@media (max-width: 380px) { .channels > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.mailer { display: grid; gap: 16px; }
.mailer-to { padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.mailer-to b { color: var(--text); font-weight: 700; }
.row { display: grid; gap: 16px; }
@media (min-width: 640px) { .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld label { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.fld input, .fld select, .fld textarea {
  width: 100%; margin: 0;
  font: 500 16px/1.4 var(--f-body); color: var(--text);
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fld textarea { resize: vertical; min-height: 130px; }
.fld select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231fd6d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.fld select::-ms-expand { display: none; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.err { display: none; color: var(--danger); font-size: 0.8125rem; }
.fld [aria-invalid="true"] { border-color: var(--danger); }
.fld [aria-invalid="true"] + .err { display: block; }
.mailer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mailer-status { flex-basis: 100%; min-height: 1.4em; color: var(--accent); font-size: 0.875rem; }

/* ---------- Pie ---------- */
.footer { position: relative; margin-top: 48px; padding: 56px 0 calc(24px + env(safe-area-inset-bottom)); background: var(--bg-2); }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); opacity: 0.7; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand svg { height: 38px; width: auto; color: var(--text); }
.footer-brand p { margin-top: 12px; color: var(--muted); font-size: 0.9375rem; max-width: 36ch; }
.footer nav, .footer-contact { display: grid; gap: 8px; align-content: start; font-size: 0.9375rem; }
.footer nav a, .footer-contact a { color: var(--muted); width: -webkit-fit-content; width: fit-content; max-width: 100%; overflow-wrap: anywhere; transition: color 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .footer nav a:hover, .footer-contact a:hover { color: var(--accent); } }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8125rem; }
@media (hover: hover) and (pointer: fine) { .footer-legal a:hover { color: var(--accent); } }

/* ---------- Ficha de servicio (panel lateral) ---------- */
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; left: auto;
  width: 100%; max-width: 600px; height: 100%; max-height: 100%;
  margin: 0; padding: 0;
  border: 0; border-left: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text);
  box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.sheet::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 3px; background: var(--grad); z-index: 1; }
.sheet:not([open]) { display: none; }
.sheet[open] { display: flex; -webkit-animation: sheetIn 0.45s var(--ease-drawer); animation: sheetIn 0.45s var(--ease-drawer); }
.sheet.is-closing { -webkit-animation: sheetOut 0.25s var(--ease-out) forwards; animation: sheetOut 0.25s var(--ease-out) forwards; }
@-webkit-keyframes sheetIn { from { -webkit-transform: translateX(100%); } }
@keyframes sheetIn { from { transform: translateX(100%); } }
@-webkit-keyframes sheetOut { to { -webkit-transform: translateX(100%); } }
@keyframes sheetOut { to { transform: translateX(100%); } }
.sheet::backdrop { background: rgba(3, 8, 12, 0.6); }
.sheet-inner { width: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 24px 24px calc(32px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .sheet-inner { padding: 36px 44px 44px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-num { font: 500 0.8125rem/1 var(--f-mono); color: var(--accent); }
.sheet-title { margin-top: 18px; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.sheet-tag { margin-top: 10px; font-weight: 700; }
.sheet-body { margin-top: 24px; display: grid; gap: 14px; color: var(--muted); }
.sheet-body > * { -webkit-animation: rise 0.5s var(--ease-out) both; animation: rise 0.5s var(--ease-out) both; }
.sheet-body > :nth-child(2) { -webkit-animation-delay: 0.05s; animation-delay: 0.05s; }
.sheet-body > :nth-child(3) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; }
.sheet-body > :nth-child(n+4) { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; }
@-webkit-keyframes rise { from { opacity: 0; -webkit-transform: translateY(12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.sheet-body h3 { margin-top: 10px; color: var(--text); font-size: 1.0625rem; font-weight: 800; }
.sheet-body ul { padding: 0; list-style: none; display: grid; gap: 8px; }
.sheet-body li { position: relative; padding-left: 20px; }
.sheet-body li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 3px; background: var(--grad); }
.sheet-cta { margin-top: 30px; }

/* ---------- Revelado al hacer scroll: opacidad + 24px, ease-out, escalonado ---------- */
/* Animación con fill-mode backwards: al terminar deja libre transform para el hover */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].in { opacity: 1; -webkit-animation: reveal 0.7s var(--ease-out) var(--rd, 0s) backwards; animation: reveal 0.7s var(--ease-out) var(--rd, 0s) backwards; }
@-webkit-keyframes reveal { from { opacity: 0; -webkit-transform: translateY(24px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

/* ---------- Movimiento reducido: fundidos, sin desplazamientos ---------- */
.rm { scroll-behavior: auto; }
.rm [data-hero], .rm .hero-title .wi { transform: none !important; }
.rm [data-reveal].in { -webkit-animation-name: fade; animation-name: fade; }
@-webkit-keyframes fade { from { opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.rm .blob, .rm .hero-title .grad .wi { -webkit-animation: none; animation: none; }
.rm .step::before { transition: none; }
.rm .sheet[open], .rm .sheet.is-closing, .rm .sheet-body > * { -webkit-animation: none; animation: none; }
.rm .mobile-menu { transform: none; }
.rm .card:hover, .rm .btn:hover, .rm .tags li:hover { transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .hero-title .grad .wi { -webkit-animation: none; animation: none; }
}

/* ---------- Impresión ---------- */
@media print {
  .header, .progress, .globe, .hero-bg, .mailer, .sheet { display: none !important; }
  .js [data-reveal], .js [data-hero], .js .hero-title .wi { opacity: 1 !important; transform: none !important; }
  .box, .card { box-shadow: none; }
  body { background: #fff; color: #000; }
}
