/* =========================================================
   Torvexa AI — Estilos del sitio
   Layout: retícula alineada a la izquierda, contenido máx. 1180px;
   las secciones alternan blanco y gris frío para marcar el ritmo.
   Tema: claro corporativo (un solo tema, colores explícitos).
   ========================================================= */

:root {
  /* Color */
  --bg: #FFFFFF;
  --surface: #F4F6FA;
  --surface-2: #E9EEF6;
  --ink: #0E1A2E;            /* títulos */
  --text: #3B475A;           /* texto corrido */
  --muted: #687589;          /* etiquetas y notas */
  --line: #DFE5EE;
  --line-strong: #C9D2E0;
  --connector: #A9C4EC;
  --grid-dot: #CBD3E1;
  --accent: #0A5AD6;         /* azul del logo (tono profundo) */
  --accent-strong: #0847AE;
  --accent-soft: #E7F1FF;
  --accent-bright: #0A93F5;  /* azul medio del logo */
  --accent-cyan: #06CBFF;    /* cian del vértice de la A */
  --accent-on-dark: #5CC8FF;
  --on-accent: #FFFFFF;
  --brand-night: #01030B;    /* fondo del banner del logo */
  --signal: #0B8457;         /* estados completados */
  --signal-soft: #E2F4EB;
  --warn: #D49400;
  --danger: #C2362B;
  --danger-soft: #FCEBEA;
  --whatsapp: #168A43;
  --header-bg: rgba(255, 255, 255, 0.9);
  --footer-bg: #050B18;
  --footer-ink: #FFFFFF;
  --footer-text: #A9B5C8;
  --footer-line: #1A2539;

  /* Tipografía */
  --font-brand: "Michroma", "Eurostile", "Segoe UI", system-ui, sans-serif;
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-h1: clamp(2.3rem, 1.45rem + 3.4vw, 3.85rem);
  --fs-h2: clamp(1.8rem, 1.3rem + 2vw, 2.65rem);
  --fs-h3: 1.15rem;
  --fs-base: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.78rem;

  /* Forma */
  --radius: 12px;
  --radius-lg: 16px;
  --header-h: 72px;
  --gutter: clamp(16px, 4vw, 32px);
  --shadow-card: 0 1px 2px rgba(14, 26, 46, 0.05), 0 18px 40px -18px rgba(14, 26, 46, 0.22);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.07; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; 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: -80px; z-index: 100;
  background: var(--ink); color: var(--on-accent);
  padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

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

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 0.98rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn .icon { width: 1.1em; height: 1.1em; transition: transform 0.15s ease; }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 0.65rem 1rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { height: 42px; width: auto; aspect-ratio: 822 / 418; flex: none; overflow: visible; }
.brand-name {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  -webkit-text-stroke: 0.35px currentColor;
  line-height: 1;
  white-space: nowrap;
}
.brand-name span { color: var(--accent); }

@media (max-width: 380px) {
  .brand-mark { height: 34px; }
  .brand-name { font-size: 0.88rem; }
}

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) {
  position: relative;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.btn):hover,
.site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -20px rgba(14, 26, 46, 0.25);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav a.is-active::after { display: none; }
  .site-nav .btn { margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--grid-dot) 1.1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 80%);
  mask-image: linear-gradient(90deg, transparent 35%, #000 80%);
  pointer-events: none;
}
.hero > .container { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 1.35rem; min-width: 0; }
.lead { font-size: 1.15rem; max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }
.hero-points {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: var(--fs-sm);
}
.hero-points li { display: flex; align-items: center; gap: 0.45rem; }
.hero-points .icon { width: 1.05em; height: 1.05em; color: var(--signal); stroke-width: 2.4; }

/* Tarjeta de flujo automatizado */
.flow-card {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.flow-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font: 500 0.76rem/1 var(--font-mono);
  white-space: nowrap;
}
.pill-live { background: var(--signal-soft); color: var(--signal); }
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.2s ease-in-out infinite;
}

.flow-log { list-style: none; margin: 0; padding: 0.6rem 1.25rem; }
.flow-log li {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  animation: log-in 0.5s ease both;
}
.flow-log li:nth-child(1) { animation-delay: 0.15s; }
.flow-log li:nth-child(2) { animation-delay: 0.35s; }
.flow-log li:nth-child(3) { animation-delay: 0.55s; }
.flow-log li:nth-child(4) { animation-delay: 0.75s; }
.flow-log li:nth-child(5) { animation-delay: 0.95s; }
.flow-log li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13.5px;
  top: calc(50% + 15px);
  height: calc(100% - 30px);
  width: 1px;
  background: var(--line-strong);
}
.log-check {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--signal-soft);
  color: var(--signal);
}
.log-check .icon { width: 15px; height: 15px; stroke-width: 2.5; }
.log-text { color: var(--ink); font-weight: 500; font-size: 0.95rem; line-height: 1.4; }
.flow-log time { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

.flow-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  padding: 0.9rem 1.25rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

@keyframes log-in {
  from { opacity: 0.3; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero::before {
    -webkit-mask-image: linear-gradient(180deg, transparent 45%, #000 90%);
    mask-image: linear-gradient(180deg, transparent 45%, #000 90%);
  }
}
@media (max-width: 480px) {
  .flow-log li { grid-template-columns: 28px minmax(0, 1fr); }
  .flow-log time { display: none; }
}

/* ---------- Franja de marca (logo original sobre fondo oscuro) ---------- */
.brand-band {
  background: var(--brand-night);
  overflow: hidden;
}
.brand-band picture {
  display: block;
  max-width: 1600px;
  margin-inline: auto;
}
.brand-band img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
@media (max-width: 640px) {
  .brand-band picture { max-width: 340px; padding-block: 1.5rem; }
  .brand-band img {
    -webkit-mask-image: radial-gradient(circle closest-side, #000 96%, transparent 100%);
    mask-image: radial-gradient(circle closest-side, #000 96%, transparent 100%);
  }
}

/* ---------- Sectores ---------- */
.sectors { border-block: 1px solid var(--line); }
.sectors-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 2rem;
  padding-block: 1.4rem;
}
.sectors-label {
  font: 500 var(--fs-xs) var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
}

/* ---------- Secciones ---------- */
.section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  scroll-margin-top: var(--header-h);
}
.section-alt { background: var(--surface); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section-head > p:not(.eyebrow) { font-size: 1.075rem; max-width: 62ch; }

/* ---------- Servicios ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 2rem 1.75rem 2.1rem;
  background: var(--bg);
  transition: background-color 0.2s ease;
}
.service:hover { background: var(--surface); }
.service-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.service-icon .icon { width: 22px; height: 22px; }
.service p { font-size: var(--fs-sm); }

@media (max-width: 960px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .services { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Enfoque: diagrama ---------- */
.bridge {
  --stub: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "lin  .   lout"
    "in   hub out";
  row-gap: 0.9rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.bridge-label {
  font: 500 var(--fs-xs) var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.bridge-label-in { grid-area: lin; }
.bridge-label-out { grid-area: lout; padding-left: calc(var(--stub) * 2); }

.bridge-side {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.bridge-in { grid-area: in; padding-right: calc(var(--stub) * 2); }
.bridge-out { grid-area: out; padding-left: calc(var(--stub) * 2); }

.bridge-side li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 54px;
  padding: 0.65rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
}
.bridge-side li .icon { width: 20px; height: 20px; color: var(--accent); }

/* conectores */
.bridge-in li::after,
.bridge-out li::before,
.bridge-in::after,
.bridge-out::after {
  content: "";
  position: absolute;
  top: 50%;
  width: var(--stub);
  border-top: 1.5px solid var(--connector);
}
.bridge-in li::after { left: calc(100% + 1px); }
.bridge-out li::before { right: calc(100% + 1px); }
.bridge-in::after { right: 0; }
.bridge-out::after { left: 0; }
.bridge-in::before,
.bridge-out::before {
  content: "";
  position: absolute;
  top: 27px;
  bottom: 27px;
}
.bridge-in::before { right: var(--stub); border-right: 1.5px solid var(--connector); }
.bridge-out::before { left: var(--stub); border-left: 1.5px solid var(--connector); }

.bridge-hub {
  grid-area: hub;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 220px;
  padding: 1.3rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--accent-bright) 0%, var(--accent) 60%, var(--accent-strong) 100%);
  color: var(--on-accent);
  text-align: center;
  box-shadow: 0 14px 30px -14px rgba(10, 90, 214, 0.7);
}
.bridge-hub strong { font-family: var(--font-brand); font-size: 0.98rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.bridge-hub span { font: 0.74rem/1.45 var(--font-mono); opacity: 0.88; }

@media (max-width: 760px) {
  .bridge {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lin" "in" "hub" "lout" "out";
    row-gap: 0.75rem;
  }
  .bridge-in, .bridge-out { padding: 0; }
  .bridge-label-out { padding-left: 0; }
  .bridge-in li::after, .bridge-out li::before,
  .bridge-in::after, .bridge-out::after,
  .bridge-in::before, .bridge-out::before { display: none; }
  .bridge-hub { max-width: none; margin-block: 1rem; }
  .bridge-hub::before,
  .bridge-hub::after {
    content: "";
    position: absolute;
    left: 50%;
    height: 1.75rem;
    border-left: 1.5px solid var(--connector);
  }
  .bridge-hub::before { bottom: 100%; }
  .bridge-hub::after { top: 100%; }
}

/* Beneficios */
.benefits {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
.benefits li { display: flex; flex-direction: column; gap: 0.6rem; }
.benefits .icon { width: 24px; height: 24px; color: var(--accent); }
.benefits h3 { font-size: 1.05rem; }
.benefits p { font-size: var(--fs-sm); }

@media (max-width: 960px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .benefits { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

/* ---------- Proceso ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 3.75rem;
}
.step::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 52px;
  right: calc(-2rem + 8px);
  height: 1.5px;
  background: var(--line-strong);
}
.step:last-child::before { display: none; }
.step-num {
  position: absolute;
  top: 0; left: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}
.step > p:not(.step-out) { font-size: var(--fs-sm); }
.step-out {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}
.step-out .mono {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 900px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { padding: 0.35rem 0 2.25rem 4.25rem; }
  .step:last-child { padding-bottom: 0; }
  .step::before {
    top: 52px; left: 21.5px; right: auto; bottom: 8px;
    width: 1.5px; height: auto;
  }
  .step-out { margin-top: 0.25rem; }
}

/* ---------- Proyectos ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.project {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.thumb {
  position: relative;
  height: 140px;
  padding: 1.1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
/* miniatura: tabla */
.thumb-table { display: grid; grid-template-rows: repeat(4, 1fr); gap: 7px; }
.thumb-table span { position: relative; background: var(--bg); border-radius: 6px; }
.thumb-table span::before {
  content: "";
  position: absolute;
  left: 10px; top: 50%;
  width: 52%; height: 6px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: var(--line-strong);
}
.thumb-table span:nth-child(2)::before { width: 38%; }
.thumb-table span:nth-child(3)::before { width: 60%; }
.thumb-table span:nth-child(4)::before { width: 44%; }
.thumb-table span::after {
  content: "";
  position: absolute;
  right: 10px; top: 50%;
  width: 8px; height: 8px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--signal);
}
.thumb-table span:nth-child(3)::after { background: var(--warn); }
/* miniatura: calendario */
.thumb-calendar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
}
.thumb-calendar span { background: var(--bg); border-radius: 5px; }
.thumb-calendar span.on { background: var(--accent); }
/* miniatura: factura */
.thumb-invoice {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 1.55rem calc(18% + 14px);
}
.thumb-invoice::before {
  content: "";
  position: absolute;
  inset: 12px 18%;
  background: var(--bg);
  border-radius: 6px;
  box-shadow: 0 6px 16px -10px rgba(14, 26, 46, 0.35);
}
.thumb-invoice span {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--line-strong);
}
.thumb-invoice span:nth-child(1) { width: 45%; background: var(--ink); }
.thumb-invoice span:nth-child(2) { width: 90%; }
.thumb-invoice span:nth-child(3) { width: 75%; }
.thumb-invoice span:nth-child(4) { width: 85%; }
.thumb-invoice span.total { width: 40%; height: 9px; margin-left: auto; margin-top: 3px; background: var(--accent); }
/* miniatura: ruta */
.thumb-route svg { width: 100%; height: 100%; display: block; }
.route-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 5 6; stroke-linecap: round; }
.route-dot { fill: var(--bg); stroke: var(--accent); stroke-width: 2.5; }
.route-dot-end { fill: var(--accent); }

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem 1.4rem;
}
.project-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.tag {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 500 0.68rem/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project h3 { font-size: 1.05rem; }
.project-body > p:not(.project-meta) { font-size: 0.93rem; }
.project-tags {
  list-style: none;
  margin: auto 0 0;
  padding: 0.4rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.project-tags li {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
}

@media (max-width: 1080px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .projects { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Preguntas frecuentes ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.faq-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 2rem); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.3rem 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 14px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 2px 14px no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 2.5rem 1.4rem 0; max-width: 62ch; }

@media (max-width: 860px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-head { position: static; }
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.contact-info > p:not(.eyebrow) { font-size: 1.075rem; }

.contact-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.contact-icon {
  width: 40px; height: 40px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.contact-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-label {
  font: 500 0.7rem var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-text a,
.contact-text [data-config] {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-text a:hover { color: var(--accent); }

.copy-btn {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn .icon { width: 17px; height: 17px; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.is-copied { color: var(--signal); border-color: var(--signal); }

/* Formulario */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field label { font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.field label span { color: var(--accent); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 19px) 52% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
    var(--bg);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.85; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.has-error input,
.field.has-error textarea { border-color: var(--danger); }
.field.has-error input:focus,
.field.has-error textarea:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.field-error { font-size: 0.82rem; color: var(--danger); }
.field-error:empty { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 0.25rem; }
.form-note { font-size: 0.82rem; color: var(--muted); }
.form-status {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.93rem;
}
.form-status.is-success { background: var(--signal-soft); border-color: var(--signal-soft); }
.form-status.is-error { background: var(--danger-soft); border-color: var(--danger-soft); }

@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pie de página ---------- */
.site-footer {
  padding-top: 3.5rem;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.75rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; max-width: 36ch; }
.brand-invert, .brand-invert:hover { color: var(--footer-ink); }
.brand-invert .brand-mark { height: 44px; }
.brand-invert .brand-name span { color: var(--accent-on-dark); }
.footer-title {
  margin-bottom: 0.35rem;
  font: 500 0.72rem var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--footer-ink);
}
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; }
.footer-contact > * { overflow-wrap: anywhere; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: var(--footer-ink); }
.footer-bottom {
  padding-block: 1.25rem;
  border-top: 1px solid var(--footer-line);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: var(--whatsapp);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 26px -10px rgba(14, 26, 46, 0.45);
}
.wa-float:hover { color: var(--on-accent); filter: brightness(1.05); }

/* ---------- Movimiento reducido ---------- */
@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;
  }
}
