/* ==========================================================================
   Pablo Iranzo · Servicios informáticos — hoja de estilos
   ========================================================================== */

/* ---------- Fuentes (autoalojadas, sin conexiones a terceros) ---------- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
}

/* ---------- Variables ---------- */
:root {
  --ink: #07192e;
  --ink-2: #0b2140;
  --ink-3: #122b4f;
  --ink-line: rgba(255, 255, 255, 0.09);
  --on-ink: #e8edf7;
  --on-ink-muted: #9aa7bf;

  --text: #0e1628;
  --muted: #55607a;
  --line: #e2e8f1;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;

  --primary: #0a6cd8;
  --primary-600: #0857b3;
  --primary-50: #e9f2fc;
  --accent: #1a9bec;
  --accent-50: #e6f4fd;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(14, 22, 40, 0.06);
  --shadow: 0 18px 40px -22px rgba(14, 22, 40, 0.35);
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);

  --font-body: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Manrope Variable", "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.03rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary-600); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 0.55em;
  font-weight: 800;
}
h1 { font-size: clamp(2.15rem, 4.6vw, 3.55rem); }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.45rem); }
h1, h2 { word-spacing: 0.02em; }
h3 { font-size: 1.2rem; letter-spacing: -0.004em; word-spacing: 0.05em; font-weight: 750; }
h4 { font-size: 1.02rem; letter-spacing: 0; word-spacing: 0.05em; font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 8vw, 112px); }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head--center { margin-inline: auto; text-align: center; }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.2rem); color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* Iconos */
.i { width: 1.25em; height: 1.25em; flex: none; }

/* Datos pendientes de completar (visibles a propósito) */
.pendiente {
  display: inline-block;
  background: #fff4d2;
  color: #6f5200;
  border: 1px dashed #d9a300;
  border-radius: 6px;
  padding: 0 0.4em;
  font-weight: 600;
  font-size: 0.95em;
  line-height: 1.5;
}
.pendiente-bloque {
  background: #fffaf0;
  border: 1.5px dashed #d9a300;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: #6f5200;
}
.pendiente-bloque strong { color: #5a4300; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--primary);
  --btn-fg: #fff;
  --btn-bd: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 650 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { --btn-bg: var(--primary-600); --btn-bd: var(--primary-600); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(10, 108, 216, 0.8); }
.btn .i { width: 1.1em; height: 1.1em; transition: transform 0.2s ease; }
.btn:hover .i--arrow { transform: translateX(3px); }

.btn--outline { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line); }
.btn--outline:hover { --btn-bg: var(--bg-soft); --btn-bd: #cdd6e4; color: var(--text); box-shadow: none; }

.btn--ghost { --btn-bg: rgba(255, 255, 255, 0.06); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.22); }
.btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.12); --btn-bd: rgba(255, 255, 255, 0.4); color: #fff; box-shadow: none; }

.btn--white { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--white:hover { --btn-bg: #eef2fb; --btn-bd: #eef2fb; color: var(--ink); }

.btn--sm { min-height: 42px; padding: 8px 16px; font-size: 0.95rem; border-radius: 10px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  text-decoration: none;
}
.link-arrow .i { width: 1em; height: 1em; transition: transform 0.2s ease; }
.link-arrow:hover .i { transform: translateX(3px); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(14, 22, 40, 0.4); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-logo { width: auto; height: 46px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 400 1.14rem/1.1 var(--font-head); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.brand-name b { font-weight: 800; }
.brand-tag { margin-top: 4px; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.site-footer .brand-name { color: #fff; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 560;
  font-size: 0.98rem;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a[aria-current="page"] { color: var(--primary-600); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav .btn { margin-left: 8px; color: #fff; }
.nav .btn:hover { background: var(--primary-600); color: #fff; }
.nav .btn[aria-current="page"]::after { display: none; }
.nav .btn[aria-current="page"] { color: #fff; background: var(--primary-600); }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle .i { width: 22px; height: 22px; }
.nav-toggle .i--close { display: none; }
.nav-toggle[aria-expanded="true"] .i--menu { display: none; }
.nav-toggle[aria-expanded="true"] .i--close { display: block; }

/* ---------- Hero (inicio) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 116px);
}
.hero::before {
  /* retícula técnica */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 40%, transparent 100%);
}
.hero::after {
  /* resplandor */
  content: "";
  position: absolute;
  z-index: -1;
  width: 900px; height: 900px;
  right: -260px; top: -380px;
  background:
    radial-gradient(closest-side, rgba(10, 108, 216, 0.45), transparent 70%),
    radial-gradient(closest-side at 70% 80%, rgba(34, 166, 242, 0.20), transparent 70%);
  filter: blur(10px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.hero .eyebrow { color: #7cc6ff; }
.hero h1 { color: #fff; margin-bottom: 20px; font-size: clamp(2.2rem, 4.3vw, 3.4rem); }
.hero h1 .grad {
  background: linear-gradient(90deg, #6fb2ff 0%, #52c7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { color: var(--on-ink-muted); max-width: 590px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--on-ink);
  font-size: 0.95rem;
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .i { color: #52c7ff; width: 1.1em; height: 1.1em; }

/* Diagrama de integración */
.diagram-card {
  position: relative;
  border-radius: 22px;
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--ink-line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.diagram-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--ink-line);
  margin-bottom: 8px;
}
.diagram-dots { display: flex; gap: 6px; }
.diagram-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.diagram-title { font-size: 0.8rem; color: var(--on-ink-muted); letter-spacing: 0.02em; }
.diagram-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7cc6ff;
}
.diagram-live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}
.diagram { width: 100%; height: auto; }
.diagram .node .bg { fill: #0e2240; stroke: rgba(255, 255, 255, 0.12); }
.diagram .node--core .bg { fill: #0f2b57; stroke: rgba(82, 170, 255, 0.6); }
.diagram .node--ai .bg { fill: #0b2f55; stroke: rgba(82, 199, 255, 0.6); }
.diagram .halo { fill: none; stroke: rgba(82, 170, 255, 0.16); stroke-width: 6; }
.diagram .node text { fill: #e8edf7; font-family: var(--font-body); font-size: 14px; font-weight: 600; }
.diagram .node .sub { fill: #93a0b8; font-size: 11.5px; font-weight: 500; }
.diagram .node svg { color: #7fb6ff; }
.diagram .node--ai svg { color: #52c7ff; }
.diagram .flow {
  fill: none;
  stroke: rgba(143, 176, 255, 0.55);
  stroke-width: 1.6;
  stroke-dasharray: 5 7;
  animation: flow 1.4s linear infinite;
}
.diagram .flow--ai { stroke: rgba(82, 199, 255, 0.7); }
.diagram .pill rect { fill: #07192e; stroke: rgba(255, 255, 255, 0.14); }
.diagram .pill text { fill: #b4bfd3; font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
@keyframes flow { to { stroke-dashoffset: -24; } }

/* ---------- Tarjetas y rejillas ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 28px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card h3 { margin-bottom: 8px; line-height: 1.3; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card p:last-child { margin-bottom: 0; }
.card--link { text-decoration: none; color: inherit; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfd9ea; color: inherit; }
.card--link .link-arrow { color: var(--primary-600); }
.card--compact { padding: 22px; }
.card--compact .icon-badge { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px; }
.card--compact h3 { font-size: 1.06rem; line-height: 1.3; }
.card--compact p { font-size: 0.95rem; }
.group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(36px, 5vw, 52px) 0 18px;
  font: 700 0.85rem/1.3 var(--font-body);
  letter-spacing: 0.1em;
  word-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
}
.group-label:first-of-type { margin-top: 0; }
.group-label .i { width: 1.2em; height: 1.2em; color: var(--primary-600); }
.card .link-arrow { margin-top: auto; padding-top: 6px; }

.icon-badge {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary-600);
  margin-bottom: 18px;
  flex: none;
}
.icon-badge .i { width: 24px; height: 24px; }
.icon-badge--accent { background: var(--accent-50); color: #0b77c2; }

/* ---------- Bloque destacado IA ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.checklist { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .i { color: var(--accent); width: 1.3em; height: 1.3em; margin-top: 2px; }

.chat {
  position: relative;
  border-radius: 24px;
  background: var(--ink);
  color: var(--on-ink);
  padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(10, 18, 34, 0.5);
  max-width: 480px;
  margin-inline: auto;
  width: 100%;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 14px;
  border-bottom: 1px solid var(--ink-line);
}
.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22a6f2, #04348f);
  color: #fff;
}
.chat-avatar .i { width: 22px; height: 22px; }
.chat-name { font-weight: 700; font-size: 0.98rem; color: #fff; line-height: 1.2; }
.chat-status { font-size: 0.8rem; color: #7fe3c2; }
.chat-body { display: grid; gap: 10px; padding: 16px 4px 8px; }
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.5;
}
.msg--user { justify-self: end; background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.msg--bot { justify-self: start; background: #122b4f; color: var(--on-ink); border-bottom-left-radius: 6px; }
.msg-meta {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--on-ink-muted);
  padding-left: 6px;
}
.msg-meta .i { width: 0.95em; height: 0.95em; color: #52c7ff; }
.chat-note {
  margin: 10px 4px 0;
  font-size: 0.75rem;
  color: var(--on-ink-muted);
  text-align: center;
}

/* ---------- Casos de uso ---------- */
.usecase { display: flex; gap: 16px; align-items: flex-start; }
.usecase .icon-badge { margin-bottom: 0; }
.usecase h3 { font-size: 1.08rem; margin-bottom: 6px; }
.usecase p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- Pasos ---------- */
.steps { counter-reset: paso; }
.step { position: relative; padding-top: 8px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font: 800 1.05rem/1 var(--font-head);
  color: var(--primary-600);
  background: #fff;
  border: 1.5px solid #cdd9f5;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.steps-line { position: relative; }
.steps-line::before {
  content: "";
  position: absolute;
  top: 30px; left: 22px; right: 22px;
  height: 1.5px;
  background: repeating-linear-gradient(90deg, #cdd9f5 0 6px, transparent 6px 12px);
  z-index: 0;
}
.steps-line .step { z-index: 1; }

/* ---------- Ventajas ---------- */
.benefit { display: flex; gap: 14px; align-items: flex-start; }
.benefit .i { color: var(--primary-600); width: 26px; height: 26px; margin-top: 2px; }
.benefit h3 { font-size: 1.04rem; margin-bottom: 4px; }
.benefit p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* ---------- Chips tecnología ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.92rem;
  font-weight: 560;
  color: var(--text);
}
.chip--sm { padding: 5px 11px; font-size: 0.84rem; }
.chips-note { margin-top: 14px; font-size: 0.85rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq details[open] { border-color: #cfd9ea; box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font: 700 1.03rem/1.4 var(--font-head);
  letter-spacing: 0;
  word-spacing: 0.05em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--muted); transition: transform 0.25s ease; }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { color: var(--muted); margin: 0 0 18px; }

/* ---------- Banda CTA ---------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(36px, 5vw, 64px);
  background: linear-gradient(120deg, #04348f 0%, #0a6cd8 55%, #22a6f2 120%);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 28px;
  align-items: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, 0.86); margin: 0; font-size: 1.08rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.cta-band .pendiente { background: rgba(255, 244, 210, 0.95); }

/* ---------- Cabecera de páginas interiores ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(10, 108, 216, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 108, 216, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 85% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 85% 0%, #000 30%, transparent 75%);
}
.page-hero .lead { max-width: 720px; margin-bottom: 0; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #b3bdcd; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-600); }

/* ---------- Servicios (página) ---------- */
.subnav {
  position: sticky;
  top: 74px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.subnav ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-right: 48px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}
.subnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
}
.subnav a:hover { color: var(--text); background: var(--bg-soft); }
.subnav a.is-active { color: var(--primary-600); background: var(--primary-50); border-color: #d6e1ff; }
.subnav .i { width: 1.05em; height: 1.05em; }

.service {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  scroll-margin-top: 150px;
}
.service + .service { margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); }
.service-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.service-head .icon-badge { margin: 0; }
.service-head .service-title { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 800; letter-spacing: -0.02em; word-spacing: 0.02em; }
.service-claim { font: 700 1.08rem/1.4 var(--font-head); color: var(--primary-600); margin: 6px 0 14px; letter-spacing: 0; word-spacing: 0.05em; }
.service .incl-title { font-size: 1rem; margin: 22px 0 12px; text-transform: uppercase; letter-spacing: 0.08em; word-spacing: 0; color: var(--muted); font-family: var(--font-body); font-weight: 700; }
.service .checklist { margin: 0; gap: 10px; }
.aside-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.aside-card h4 { margin-bottom: 12px; }
.aside-card ul { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 9px; }
.aside-card li { display: flex; gap: 10px; color: var(--muted); font-size: 0.96rem; }
.aside-card li .i { color: var(--primary-600); width: 1.1em; height: 1.1em; margin-top: 3px; }
.aside-card .btn { width: 100%; margin-top: 6px; }
.aside-card .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aside-card .chip { display: inline-flex; color: var(--text); background: #fff; }

.modes .card { text-align: left; }
.service-group { scroll-margin-top: 150px; }
.service-group + .service-group { margin-top: clamp(80px, 10vw, 128px); padding-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--line); }
.group-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.group-head .eyebrow .i { width: 1.1em; height: 1.1em; }
.group-head .eyebrow::before { display: none; }

/* ---------- Sobre mí ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(10, 108, 216, 0.55), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(34, 166, 242, 0.35), transparent 50%),
    var(--ink);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow);
}
.portrait-initials { font: 800 clamp(4rem, 9vw, 6.5rem)/1 var(--font-head); letter-spacing: -0.04em; opacity: 0.95; }
.portrait-mark { width: 46%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35)); }
.portrait--foto { background: var(--bg-soft); }
.portrait--foto img { width: 100%; height: 100%; object-fit: cover; }
.portrait-note {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(10, 18, 34, 0.7);
  font-size: 0.8rem;
  color: #d6deec;
  text-align: center;
}
.facts { display: grid; gap: 12px; margin-top: 22px; }
.fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 0.97rem;
}
.fact .i { color: var(--primary-600); }
.prose p { color: #2a344a; }
.prose .lead { color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.timeline .icon-badge { margin: 0; width: 44px; height: 44px; }
.timeline h3 { font-size: 1.05rem; margin: 2px 0 4px; }
.prose .timeline p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.contact-cards { display: grid; gap: 14px; }
.contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.contact-card .icon-badge { margin: 0; width: 44px; height: 44px; }
.contact-card h3 { font-size: 1rem; margin: 0 0 2px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.contact-card a { font-weight: 650; }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 36px);
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.93rem; }
.field .req { color: #c2410c; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  border: 1.5px solid #d5ddea;
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2355607a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 42px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(10, 108, 216, 0.15);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.93rem; color: #2a344a; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.rgpd {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.83rem;
  color: var(--muted);
}
.rgpd-title { margin: 0; padding: 10px 14px; background: var(--bg-soft); font-weight: 700; color: var(--text); font-size: 0.85rem; }
.rgpd dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; }
.rgpd dt, .rgpd dd { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line); }
.rgpd dt { font-weight: 650; color: var(--text); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; }
.form-status { font-size: 0.95rem; font-weight: 550; margin: 0; }
.form-status.is-ok { color: #0b7a57; }
.form-status.is-error { color: #b42318; }
.form-status.is-info { color: var(--muted); }

/* ---------- Textos legales ---------- */
.legal { max-width: 800px; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.08rem; margin-top: 1.5em; }
.legal p, .legal li { color: #2a344a; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 0.4em; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 0.97rem;
}
.data-table th, .data-table td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border: 1px solid var(--line);
}
.data-table th { width: 32%; background: var(--bg-soft); font-weight: 650; }
.updated { font-size: 0.9rem; color: var(--muted); margin-top: 2.5em; }

/* ---------- Pie ---------- */
.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  padding-top: clamp(56px, 7vw, 88px);
  font-size: 0.96rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 48px;
}
.site-footer .brand { color: #fff; }
.site-footer .brand-tag { color: var(--on-ink-muted); }
.footer-about { margin-top: 16px; max-width: 340px; }
.site-footer h2 {
  font: 700 0.8rem/1.2 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin: 6px 0 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .i { color: #52c7ff; width: 1.1em; height: 1.1em; margin-top: 4px; }
.footer-bottom {
  border-top: 1px solid var(--ink-line);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}
.site-footer .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }

/* ---------- Página 404 ---------- */
.notfound { text-align: center; max-width: 620px; margin-inline: auto; }
.notfound-code {
  font: 800 clamp(5rem, 14vw, 9rem)/1 var(--font-head);
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.notfound .hero-ctas { justify-content: center; }

/* ---------- Animación al aparecer ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-line::before { display: none; }
}

@media (max-width: 960px) {
  .hero-grid,
  .split,
  .service,
  .about-grid,
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: minmax(0, 1fr); }
  .cta-actions { justify-content: flex-start; }
  .diagram-card { max-width: 620px; }
  .portrait { max-width: 420px; }
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(14, 22, 40, 0.35);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 12px; font-size: 1.02rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { background: var(--primary-50); }
  .nav .btn { margin: 8px 0 0; }
  .header-inner { position: relative; }
  .service { scroll-margin-top: 140px; }
}

@media (max-width: 560px) {
  .hero-visual { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .grid-3,
  .grid-2,
  .grid-4,
  .footer-grid,
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-ctas .btn,
  .cta-actions .btn { width: 100%; }
  .brand-tag { display: none; }
  .rgpd dl { grid-template-columns: minmax(0, 1fr); }
  .rgpd dd { border-top: 0; padding-top: 0; }
  .data-table th { width: 40%; }
  .msg { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .subnav, .cta-band, .nav-toggle { display: none !important; }
  .hero { background: #fff; color: #000; }
  body { font-size: 11pt; }
}
