/* ==========================================================
   E3S — Tecnología. Educación. Innovación.
   Paleta de marca: azul #0081B8 · verde #7EBA27 · gris #707272
   ========================================================== */

/* Tipografías alojadas en el propio servidor (licencia SIL OFL) */
@font-face {
  font-family: 'Oxanium';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(assets/fonts/oxanium-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: 'Oxanium';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(assets/fonts/oxanium-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: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/pt-sans-regular-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: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/pt-sans-regular-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: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/pt-sans-bold-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: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/pt-sans-bold-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: 'PT Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/pt-sans-italic-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: 'PT Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/pt-sans-italic-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;
}

:root {
  /* Marca (colores del logotipo) */
  --blue: #0081b8;
  --blue-ui: #0072a3;      /* azul para fondos con texto blanco (contraste AA) */
  --blue-ui-hover: #005f88;
  --green: #7eba27;
  --green-deep: #5a8f12;   /* verde para texto pequeño (contraste AA) */
  --gray: #707272;

  /* Base clara */
  --bg: #f6f7f4;
  --bg-2: #eceee9;
  --surface: #ffffff;
  --surface-2: #f2f4f1;
  --ink: #0f1b22;
  --text: #0f1b22;
  --muted: #4f5a62;
  --dim: #6b757c;
  --line: rgba(15, 27, 34, 0.1);
  --line-2: rgba(15, 27, 34, 0.18);
  --night: #0f1b22;

  /* Oxanium para titulares, PT Sans para el texto */
  --font: "PT Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Oxanium", var(--font);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 22px;
  --radius-sm: 14px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);   /* ease-out exponencial */
  --shadow: 0 1px 2px rgba(15,27,34,.04), 0 10px 30px -16px rgba(15,27,34,.16);

  /* Tokens que cambian con el tema */
  --ink-rgb: 15, 27, 34;
  --blue-text: #0076a8;
  --hero-1: #0081b8; --hero-2: #5a8f12; --hero-3: #707272;   /* titular en claro (contraste ≥ 3:1) */
  --glass: rgba(255, 255, 255, .82);
  --overlay: rgba(246, 247, 244, .98);
  color-scheme: light;
  accent-color: var(--blue-ui);
}

/* ---------- Modo oscuro ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1216; --bg-2: #0f181d; --surface: #131e24; --surface-2: #19262d;
    --ink: #eef3f5; --text: #eef3f5; --muted: #a9b3b9; --dim: #85919a;
    --line: rgba(238, 243, 245, .1); --line-2: rgba(238, 243, 245, .18);
    --ink-rgb: 238, 243, 245;
    --blue-text: #3fb0e3; --green-deep: #93cf3c;
  --hero-1: #3fb0e3; --hero-2: #93cf3c; --hero-3: #a4a7a7;
    --glass: rgba(19, 30, 36, .82); --overlay: rgba(11, 18, 22, .98);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 40px -20px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1216; --bg-2: #0f181d; --surface: #131e24; --surface-2: #19262d;
  --ink: #eef3f5; --text: #eef3f5; --muted: #a9b3b9; --dim: #85919a;
  --line: rgba(238, 243, 245, .1); --line-2: rgba(238, 243, 245, .18);
  --ink-rgb: 238, 243, 245;
  --blue-text: #3fb0e3; --green-deep: #93cf3c;
  --hero-1: #3fb0e3; --hero-2: #93cf3c; --hero-3: #a4a7a7;
  --glass: rgba(19, 30, 36, .82); --overlay: rgba(11, 18, 22, .98);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 40px -20px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  scrollbar-color: rgba(var(--ink-rgb), .28) transparent;
  -webkit-tap-highlight-color: rgba(0, 129, 184, .15);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  caret-color: var(--blue);
  transition: background-color .4s, color .4s;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a, button, label, input, textarea { touch-action: manipulation; }
h1, h2, h3 { text-wrap: balance; font-family: var(--display); }
.footer__tagline, .contact__mail { font-family: var(--display); }
p, li { text-wrap: pretty; }
em { font-style: italic; }
::selection { background: rgba(126, 186, 39, .45); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 88px; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Colores de marca: los tres puntos del lema siguen el orden E · 3 · S */
.c-blue { color: var(--blue); }
.c-green { color: var(--green); }
.c-gray { color: var(--gray); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--font);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), background-color .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--blue-ui); color: #fff; }
.btn--primary:hover { background: var(--blue-ui-hover); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Navegación ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding: 14px 0; transition: padding .4s var(--ease); }
.nav__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav.is-scrolled { padding: 8px 0; }
.nav::before {
  content: ""; position: absolute; inset: 0;
  background: var(--glass); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  opacity: 0; transition: opacity .3s; z-index: -1;
}
.nav.is-scrolled::before { opacity: 1; }

.logo { display: inline-flex; align-items: center; position: relative; z-index: 2; }
.logo img { height: 40px; width: auto; transition: transform .4s var(--ease); }
.logo:hover img { transform: rotate(-4deg); }
.nav.is-scrolled .logo img { height: 34px; }

.nav__links { display: flex; align-items: center; gap: 28px; font-size: 16px; font-weight: 500; color: var(--muted); }
.nav__links a:not(.btn) { transition: color .2s; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav__links a:not(.btn):hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--green); }
.nav__toggle { display: none; }

.nav__actions { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line-2); color: var(--text); cursor: pointer;
  transition: border-color .2s, transform .4s var(--ease);
}
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 128px 0 32px; overflow: hidden; isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero__title {
  margin: 0; color: var(--ink);
  font-size: clamp(60px, 11vw, 164px); font-weight: 700; line-height: 1.04; letter-spacing: -.02em;
}
.hero__title .line { display: block; }
/* Cada palabra en un color del logotipo; el punto, en tinta */
.hero__title .line:nth-child(1) { color: var(--hero-1); }
.hero__title .line:nth-child(2) { color: var(--hero-2); }
.hero__title .line:nth-child(3) { color: var(--hero-3); }
.hero__title .line > span { color: var(--ink); }
.hero__title .line:nth-child(2) { padding-left: .55em; }   /* escalonado: rompe la columna perfecta */
.hero__title .line:nth-child(3) { padding-left: .18em; }

/* Momento de entrada: solo el titular, una vez */
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }
.hero__title .line { animation: rise 1s var(--ease) both; }
.hero__title .line:nth-child(2) { animation-delay: .1s; }
.hero__title .line:nth-child(3) { animation-delay: .2s; }

.hero__bottom {
  display: grid; grid-template-columns: minmax(0, 560px) auto; justify-content: space-between; align-items: end; gap: 28px 48px;
  margin-top: clamp(32px, 5vw, 56px);
}
.hero__lead { margin: 0; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); line-height: 1.5; }
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

.hero__index {
  display: flex; gap: 8px 28px; flex-wrap: wrap;
  margin-top: clamp(40px, 6vw, 72px); padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--muted);
}
.hero__index a { display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.hero__index a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.hero__index a:nth-child(even)::before { background: var(--green); }
.hero__index a:hover { color: var(--text); }

/* ---------- Secciones ---------- */
/* Encabezado de sección: etiqueta corta en minúsculas al margen + titular */
.section-head {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 40px; align-items: baseline;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.section-tag {
  margin: 0; font-size: 16px; font-weight: 600; color: var(--blue-text);
  display: inline-flex; align-items: center; gap: 10px;
}
.section-tag::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--green); }
.section-title {
  margin: 0; max-width: 16ch;
  font-size: clamp(40px, 5.8vw, 84px); line-height: .98; letter-spacing: -.02em; font-weight: 700;
}
.section-sub { grid-column: 2; max-width: 52ch; margin: 18px 0 0; color: var(--muted); font-size: 18px; }

/* Intro */
.intro { padding-top: clamp(96px, 13vw, 168px); padding-bottom: clamp(96px, 13vw, 168px); }
.intro .section-head { margin-bottom: 0; }
.intro__text {
  margin: 0; max-width: 30ch;
  font-size: clamp(28px, 3.8vw, 52px); line-height: 1.22; letter-spacing: -.01em; font-weight: 400;
}
.intro__text .mark { color: var(--blue-text); }

/* ---------- Líneas de trabajo ---------- */
.lines { padding-bottom: clamp(96px, 12vw, 160px); }
.line-card {
  --c: var(--blue);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line-2);
}
.line-card:last-child { border-bottom: 1px solid var(--line-2); }
.line-card--green { --c: var(--green); }
.line-card:nth-child(even) .line-card__visual { order: -1; }   /* alterna lados */

.line-card h3 {
  margin: 0 0 16px; font-size: clamp(36px, 4.4vw, 60px); line-height: 1; letter-spacing: -.02em; font-weight: 700;
}
.line-card__lead { margin: 0 0 28px; color: var(--muted); font-size: clamp(17px, 1.35vw, 19px); max-width: 56ch; }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.features li { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.features strong { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.features strong::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.features span { color: var(--muted); font-size: 15.5px; line-height: 1.5; }

.line-card__visual {
  align-self: stretch; display: grid; place-items: center; min-height: 280px;
  border-radius: var(--radius); background: var(--bg-2); overflow: hidden; position: relative;
}

/* Ilustraciones: quietas por defecto, se animan al pasar el ratón */
.viz { width: 86%; max-width: 340px; position: relative; z-index: 1; }
.viz path, .viz rect, .viz circle { vector-effect: non-scaling-stroke; }
.viz *, .caret { animation-play-state: paused; }
.line-card:hover .viz *, .line-card:hover .caret { animation-play-state: running; }
.viz__links path { stroke: rgba(var(--ink-rgb),.28); stroke-width: 1.5; fill: none; stroke-dasharray: 4 6; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -20; } }
.viz__nodes rect { fill: var(--surface); stroke: var(--line-2); }
.viz__nodes rect:nth-child(odd) { animation: blink 3s ease-in-out infinite; }
.viz__nodes rect:nth-child(3n) { animation-delay: 1s; }
@keyframes blink { 50% { stroke: var(--green); fill: rgba(126,186,39,.14); } }
.viz__core { fill: var(--c); }
.viz__ring { fill: none; stroke: var(--c); stroke-opacity: .45; transform-box: fill-box; transform-origin: center; animation: ring 3s var(--ease) infinite; }
@keyframes ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.viz__lock { fill: #fff; }
.viz__waves path { fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; animation: wave 2.4s ease-in-out infinite; }
.viz__waves path:nth-child(2) { animation-delay: .3s; }
.viz__waves path:nth-child(3) { animation-delay: .6s; }
@keyframes wave { 50% { opacity: .2; } }
.viz__core-dot { fill: var(--c); }
.viz__stem { stroke: var(--gray); stroke-width: 3; }
.viz__bars rect { fill: var(--blue); opacity: .8; }
.viz__dev { fill: var(--surface); stroke: rgba(var(--ink-rgb),.28); stroke-width: 1.5; }
.viz__dev--accent { stroke: var(--c); stroke-width: 2; transform-box: fill-box; animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.viz__ui rect { fill: rgba(var(--ink-rgb),.14); }
.viz__ui rect:nth-child(1) { fill: var(--blue); }
.viz__ui rect:nth-child(4) { fill: var(--green); }

.code {
  position: relative; z-index: 1; width: 88%; max-width: 380px;
  background: var(--night); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(15,27,34,.5);
}
.code__bar { display: flex; align-items: center; padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.code__bar span { font: 12.5px var(--mono); color: #93a0a8; }
.code pre { margin: 0; padding: 18px; font: 13px/1.75 var(--mono); color: #e8eef2; overflow-x: auto; }
.code .k { color: #4fc1f0; } .code .f { color: #9fd85a; } .code .s { color: #f3c969; } .code .n { color: #ff9f7a; } .code .c { color: #8a959c; }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--green); vertical-align: -3px; margin-left: 4px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Método ---------- */
.method { padding: clamp(96px, 12vw, 152px) 0; background: var(--bg-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; counter-reset: paso; }
.step { position: relative; padding: 28px 0 8px; border-top: 2px solid var(--line-2); }
.step::before {
  content: ""; position: absolute; top: -2px; left: 0; height: 2px; width: 100%; background: var(--blue);
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease);
}
.step:nth-child(even)::before { background: var(--green); }
.step.is-in::before { transform: scaleX(1); }
.step:nth-child(2)::before { transition-delay: .15s; } .step:nth-child(3)::before { transition-delay: .3s; } .step:nth-child(4)::before { transition-delay: .45s; }
.step__n { font-size: 15px; font-weight: 700; color: var(--blue-text); font-variant-numeric: tabular-nums; }
.step:nth-child(even) .step__n { color: var(--green-deep); }
.step h3 { margin: 18px 0 8px; font-size: clamp(24px, 2.3vw, 30px); letter-spacing: -.01em; font-weight: 650; line-height: 1.1; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- En qué creemos ---------- */
.approach { padding-top: clamp(96px, 12vw, 152px); padding-bottom: clamp(96px, 12vw, 152px); }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 6vw, 88px); }
.principles li { padding: 28px 0 36px; border-top: 1px solid var(--line-2); }
.principles h3 { margin: 0 0 10px; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.05; letter-spacing: -.015em; font-weight: 700; }
.principles h3 .c-blue, .principles h3 .c-green { font-weight: 800; }
.principles p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 17px; }

/* ---------- Contacto ---------- */
.contact { position: relative; padding: clamp(96px, 12vw, 152px) 0; border-top: 1px solid var(--line); }
.contact__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact .section-tag { margin-bottom: 20px; }
.contact__title {
  margin: 0 0 36px; font-size: clamp(44px, 6vw, 88px); line-height: .96; letter-spacing: -.02em; font-weight: 700;
}
.contact__mail {
  display: inline-flex; gap: 10px; font-size: clamp(24px, 2.8vw, 36px); letter-spacing: -.02em; font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 3px; text-underline-offset: 8px;
  transition: color .2s;
}
.contact__mail:hover { color: var(--blue-text); }

.form { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 20px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 15px; font-weight: 600; color: var(--text); padding: 0; margin-bottom: 4px; }
.field input[type="text"], .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; color: var(--text);
  font: 400 16px/1.5 var(--font); padding: 13px 16px; transition: border-color .2s, box-shadow .2s, background-color .2s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,129,184,.16); }
.field .is-invalid { border-color: #c93b3b !important; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { margin: 0; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: inline-block; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); transition: background-color .2s, border-color .2s, color .2s; }
.pills label:hover span { border-color: var(--text); }
.pills input:checked + span { background: var(--green); color: #0f1b22; border-color: var(--green); }
.pills input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.form__note { margin: 0; min-height: 1.2em; font-size: 15px; color: var(--muted); }
.form__note:empty { display: none; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.consent a, .form__info a { color: var(--blue-text); text-decoration: underline; text-underline-offset: 2px; }
.consent.is-invalid { color: #c93b3b; }
.form__info { margin: 0; font-size: 13px; line-height: 1.55; color: var(--dim); }
.form__info strong { color: var(--muted); font-weight: 600; }

/* ---------- Pie ---------- */
.footer { padding: 56px 0 32px; border-top: 1px solid var(--line); background: var(--surface); }
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.footer__logo { width: 140px; height: auto; }
.footer__tagline { margin: 0; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.01em; font-weight: 650; }
.footer__bar { display: flex; height: 5px; border-radius: 5px; overflow: hidden; margin-bottom: 22px; }
.footer__bar i { flex: 1; } .footer__bar i:nth-child(1) { background: var(--blue); } .footer__bar i:nth-child(2) { background: var(--green); } .footer__bar i:nth-child(3) { background: var(--gray); }
.footer__row { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: 15px; color: var(--dim); }
.footer__row nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__row a { transition: color .2s; }
.footer__row a:hover { color: var(--blue-text); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .section-head { grid-template-columns: 1fr; }
  .section-sub { grid-column: 1; }
}
@media (max-width: 820px) {
  .nav__toggle {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; position: relative; z-index: 2;
  }
  .nav__toggle span { width: 18px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease); }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 26px;
    background: var(--overlay); font-size: 34px; font-weight: 650; color: var(--text); letter-spacing: -.02em;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; overscroll-behavior: contain;
  }
  .nav__links .btn { font-size: 17px; height: 52px; padding: 0 28px; margin-top: 12px; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; }

  .hero__bottom { grid-template-columns: 1fr; }
  .line-card { grid-template-columns: 1fr; }
  .line-card:nth-child(even) .line-card__visual { order: 0; }
  .features { grid-template-columns: 1fr; }
  .line-card__visual { min-height: 230px; }
  .principles { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .steps { grid-template-columns: 1fr; }
  .hero__title .line:nth-child(2) { padding-left: .3em; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; }
  .logo img { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================
   Páginas legales
   ========================================================== */
.legal { padding: clamp(120px, 14vw, 168px) 0 clamp(80px, 10vw, 128px); }
.legal__head { max-width: 900px; margin-bottom: clamp(40px, 6vw, 72px); }
.legal__head .section-tag { margin-bottom: 18px; }
.legal__head h1 {
  margin: 0 0 20px; font-size: clamp(44px, 6.5vw, 92px); line-height: .96; letter-spacing: -.02em; font-weight: 700;
}
.legal__head h1 em { font-style: normal; color: var(--green); }
.legal__lead { margin: 0; max-width: 62ch; color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); }
.legal__meta { margin: 20px 0 0; font-size: 15px; color: var(--dim); }

.legal__grid { display: grid; grid-template-columns: 230px minmax(0, 740px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.legal__toc { position: sticky; top: 104px; display: grid; gap: 2px; font-size: 15px; border-left: 1px solid var(--line-2); }
.legal__toc p { margin: 0 0 8px; padding-left: 16px; font-weight: 650; color: var(--text); }
.legal__toc a { padding: 5px 0 5px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); transition: color .2s, border-color .2s; }
.legal__toc a:hover { color: var(--text); border-color: var(--green); }

.legal__body { font-size: 17px; line-height: 1.7; color: var(--text); }
.legal__body section { padding-top: 8px; margin-bottom: 44px; }
.legal__body h2 { display: flex; gap: 14px; align-items: baseline; margin: 0 0 16px; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.01em; line-height: 1.15; font-weight: 650; }
.legal__body h2 span { font-size: 15px; font-weight: 700; color: var(--blue-text); flex: none; font-variant-numeric: tabular-nums; }
.legal__body h3 { margin: 28px 0 10px; font-size: 19px; font-weight: 650; }
.legal__body p, .legal__body li { color: var(--muted); }
.legal__body p { margin: 0 0 14px; }
.legal__body strong { color: var(--text); font-weight: 650; }
.legal__body ul { margin: 0 0 16px; padding-left: 20px; }
.legal__body li { margin-bottom: 6px; }
.legal__body li::marker { color: var(--green); }
.legal__body a:not(.btn) { color: var(--blue-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal__body a:not(.btn):hover { text-decoration-color: var(--green); }

.legal__card { padding: 22px 26px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.legal__card dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; }
.legal__card dt { font-size: 15px; font-weight: 600; color: var(--dim); }
.legal__card dd { margin: 0; color: var(--text); }

.legal__table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15.5px; display: block; overflow-x: auto; }
.legal__table th, .legal__table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal__table th { font-size: 14px; font-weight: 650; color: var(--text); background: var(--surface); white-space: nowrap; }
.legal__table td { color: var(--muted); min-width: 140px; }
.legal__table code, .legal__body code { font: 14px var(--mono); color: var(--text); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

.legal__note { padding: 18px 22px; border-radius: var(--radius-sm); background: rgba(126,186,39,.14); color: var(--text) !important; }

@media (max-width: 900px) {
  .legal__grid { grid-template-columns: 1fr; }
  .legal__toc { position: static; }
}
@media (max-width: 560px) {
  .legal__card dl { grid-template-columns: 1fr; gap: 2px; }
  .legal__card dd { margin-bottom: 10px; }
}
