/* ==========================================================================
   gijoro · Grandes ideas, juntos, son oro · Hoja de estilos (versión 4, multipágina)
   Enfoque mobile first: los estilos base son para celular; las media queries
   (min-width) agregan ajustes para tablet (48rem) y escritorio (64rem).

   Índice
   1. Variables          7. Inicio: preguntas y rutas
   2. Base               8. Páginas de ruta: necesidades y servicios
   3. Botones y textos   9. Crecimiento integral
   4. Encabezado        10. Contacto y formulario
   5. Encabezados de página (hero)   11. Franja de llamado a la acción
   6. Secciones y tarjetas           12. Pie de página y WhatsApp
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES — cambia aquí la paleta, la tipografía y los espaciados
      La paleta y la tipografía salen del manual de marca definitivo de gijoro
      (logo 4A · versión final). La página tiene dos modos: claro = logo
      principal sobre crema y oscuro = versión negativa sobre verde tinta.
      Los componentes usan solo los tokens de rol (--bg, --text, --mkt-ink…),
      nunca la paleta directamente, para que ambos modos funcionen solos.
      tests/contraste.test.js comprueba el contraste de estos pares.
   -------------------------------------------------------------------------- */
:root {
  /* Paleta de marca */
  --base: #163A32;        /* Verde tinta: texto, "gij" del logo, fondo oscuro */
  --ident: #147D6F;       /* Jade: slogan, tecnología e IA; acentos de texto sobre claro */
  --colab: #E9914C;       /* Naranja: "oro" del logo, energía, botones (con texto en verde tinta) */
  --valor: #F4CC68;       /* Oro: solo detalles (pepitas y datos, 5–10 % de la pieza). Nunca texto sobre crema */
  --fondo: #FBF7EC;       /* Crema: fondo base */
  --piedra: #8C857A;      /* Piedra: neutro de apoyo para líneas */
  --evo: #B6D3C4;         /* Apoyo suave (no está en el manual): hover del botón principal en oscuro */
  --menta: #DFEDE6;       /* Apoyo suave (no está en el manual): fondos alternos */
  --naranja-claro: #F0A66A; /* Naranja al pasar el cursor por el botón de acento */

  /* Modo claro (positivo) */
  color-scheme: light;
  --bg: var(--fondo);
  --surface: var(--menta);   /* Fondo alterno de secciones */
  --card: #FFFFFF;
  --text: var(--base);
  --muted: #56665F;
  --line: #E4DCCB;
  --field-border: #7F8F88;
  --header-bg: rgba(251, 247, 236, .96);
  --hero-home: #FBF1E4;
  --inverse: var(--base);    /* Bloques destacados en verde base */
  --inverse-2: #1F4A43;
  --on-inverse: var(--fondo);
  --on-inverse-muted: #C9DAD3;
  --footer-bg: #102D28;
  --mkt: var(--colab);       /* Marketing: relleno (puntos, insignias) */
  --mkt-ink: #A14F17;        /* Marketing: TEXTO sobre fondos claros (contraste 4.5:1) */
  --mkt-tint: #FCEBDD;
  --tec: var(--ident);       /* Tecnología: relleno */
  --tec-ink: #0F6B60;        /* Tecnología: texto y enlaces */
  --tec-tint: var(--menta);
  --accent-ink: #0F6B60;     /* Palabra destacada del titular: jade, nunca naranja ni oro sobre claro */
  --btn-primary-hover: var(--ident);
  --focus: var(--ident);
  --danger: #B42318;
  --success: #11703A;
  --shadow-sm: 0 1px 2px rgba(22, 58, 50, .08);
  --shadow: 0 2px 4px rgba(22, 58, 50, .06), 0 12px 32px rgba(22, 58, 50, .10);

  /* Tipografía del manual: Archivo ExtraBold en títulos, Inter en textos (Arial de respaldo) */
  --font: "Inter", Arial, system-ui, -apple-system, sans-serif;
  --font-display: "Archivo", Arial, system-ui, sans-serif;

  /* Formas y espacios */
  --gutter: 1.25rem;
  --radius: 18px;
  --radius-sm: 12px;
  --section-y: 4rem;
  --header-h: 4rem;
}

/* Modo oscuro (negativo · verde tinta). Lo activa el script del <head> o el botón del encabezado. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--base);
  --surface: #12332E;
  --card: #1F4A43;
  --text: var(--fondo);
  --muted: #C9DAD3;
  --line: #2F5C55;
  --field-border: #7FA097;
  --header-bg: rgba(22, 58, 50, .96);
  --hero-home: #0F2A25;
  --inverse: #0F2A25;
  --inverse-2: var(--base);
  --footer-bg: #0B211D;
  --mkt-ink: #F0A66A;
  --mkt-tint: #36493A;
  --tec-ink: #8ED3C2;
  --tec-tint: #16504A;
  --accent-ink: var(--valor);
  --btn-primary-hover: var(--evo);
  --focus: var(--valor);
  --danger: #FFA394;
  --success: #8FE0A8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .35);
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.18; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .page-hero--dark :focus-visible, .section--dark :focus-visible { outline-color: var(--valor); }

.visually-hidden {
  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: 1rem; top: -4rem; z-index: 100;
  background: var(--text); color: var(--bg); padding: .75rem 1rem;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

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

/* --------------------------------------------------------------------------
   3. BOTONES, ENLACES, ETIQUETAS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.5rem;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--btn-primary-hover); }
.btn--accent { background: var(--colab); color: var(--base); }
.btn--accent:hover { background: var(--naranja-claro); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn--ghost:hover { background: var(--text); color: var(--bg); }
.btn--light { background: var(--fondo); color: var(--base); }
.btn--light:hover { background: var(--naranja-claro); }
.btn--outline-light { background: transparent; color: var(--on-inverse); border-color: rgba(251, 247, 236, .6); }
.btn--outline-light:hover { background: var(--fondo); color: var(--base); }
.btn--small { min-height: 44px; padding: .5rem 1.1rem; font-size: .95rem; }
.btn--block { width: 100%; }

.text-link { color: var(--tec-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--text); }

/* Antetítulo: texto en mayúsculas precedido por las tres pepitas del logo
   (naranja, oro y jade): "tres pepitas en una", el concepto del manual. */
.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .9rem;
  font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mkt-ink);
}
.eyebrow::before {
  content: ""; flex: 0 0 auto; width: .45rem; height: .45rem; margin-right: 1.3rem;
  background: var(--colab); box-shadow: .65rem 0 0 var(--valor), 1.3rem 0 0 var(--ident);
}
.eyebrow--tec { color: var(--tec-ink); }
.eyebrow--light { color: var(--colab); }

.tag { display: inline-block; padding: .22rem .65rem; font-size: .75rem; font-weight: 700; border-radius: 999px; white-space: nowrap; }
.tag--mkt { background: var(--mkt-tint); color: var(--mkt-ink); }
.tag--tec { background: var(--tec-tint); color: var(--tec-ink); }
.tag--int { background: var(--inverse); color: var(--on-inverse); }

/* --------------------------------------------------------------------------
   4. ENCABEZADO Y NAVEGACIÓN
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }

/* Logo del encabezado: símbolo + nombre, sin slogan (a este tamaño no se lee).
   Son los trazos del logo (images/logo.svg e images/logo-nombre.svg), nunca texto con fuente.
   El nombre mide el 56 % del alto del símbolo y va centrado en vertical. */
.brand { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; text-decoration: none; border-radius: 6px; }
.brand-logo { width: auto; height: 2.35rem; }

/* Colores de los trazos del logo. Claro: logo principal; oscuro: versión negativa del manual
   (gij en crema, slogan en oro y crema). Los píxeles del símbolo usan .px--naranja/oro/jade. */
.logo-gij { fill: var(--base); }
.logo-oro { fill: var(--colab); }
.logo-slogan-jade { fill: var(--ident); }
.logo-slogan-tinta { fill: var(--base); }
[data-theme="dark"] .logo-gij, [data-theme="dark"] .logo-slogan-tinta { fill: var(--fondo); }
[data-theme="dark"] .logo-slogan-jade { fill: var(--valor); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: none; border: 0; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s, background-color .25s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Botón de modo claro / oscuro. Oculto sin JavaScript (el script le quita el atributo hidden). */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; margin-left: auto; margin-right: .25rem;
  background: none; border: 1.5px solid var(--line); border-radius: 50%;
  cursor: pointer; color: var(--text); transition: border-color .2s;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--text); }
.theme-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon--sun { display: none; }
[data-theme="dark"] .theme-icon--moon { display: none; }
[data-theme="dark"] .theme-icon--sun { display: block; }

/* Menú desplegable en móvil */
.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: none; background: var(--bg);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }
.site-nav ul { display: flex; flex-direction: column; padding: .5rem var(--gutter) 1.25rem; }
.site-nav a:not(.btn) {
  display: flex; align-items: center; gap: .6rem; padding: .9rem 0;
  font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line);
}
.site-nav a:not(.btn):hover { color: var(--tec-ink); }
/* Puntos de color que identifican cada ruta en el menú */
.nav-dot { width: .55rem; height: .55rem; border-radius: 50%; flex: 0 0 auto; }
.nav-dot--mkt { background: var(--mkt); }
.nav-dot--tec { background: var(--tec); }
.nav-dot--int { background: linear-gradient(90deg, var(--mkt) 50%, var(--tec) 50%); }
/* Página actual */
.site-nav a[aria-current="page"] { color: var(--tec-ink); }
.site-nav .btn { margin-top: 1rem; width: 100%; }
.site-nav a.btn[aria-current="page"] { color: var(--bg); box-shadow: none; }

/* --------------------------------------------------------------------------
   5. ENCABEZADOS DE PÁGINA (HERO). Cada página tiene su propio color de fondo
      para que el visitante sepa en qué ruta está.
   -------------------------------------------------------------------------- */
.page-hero { position: relative; padding: 2.5rem 0 3rem; overflow: hidden; }
.page-hero-inner { display: grid; gap: 2rem; align-items: center; }
.page-hero h1 { font-size: clamp(2rem, 7.5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1.1rem; }
.page-hero .lead { font-size: 1.125rem; max-width: 38rem; }
.page-hero-art { width: 100%; max-width: 15rem; margin: 0 auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Barra de dos colores al pie del hero: marketing + tecnología */
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--mkt) 0 50%, var(--tec) 50% 100%);
}

/* Variantes */
.page-hero--home { background: var(--hero-home); }
.page-hero--home .lead { color: var(--muted); }
.page-hero--home h1 { font-size: clamp(1.875rem, 5.5vw, 2.75rem); }
.page-hero--home h1 .accent { color: var(--accent-ink); }

/* Logo animado del inicio (logo 4A · versión final). Los 26 píxeles llegan desde posiciones
   dispersas (--dx, --dy, --r) y se arman en las tres pepitas; después aparecen el nombre y el
   slogan. La animación corre mientras exista [data-play]; js/script.js la repite al pasar el
   cursor o al tocar el logo. */
.hero-logo { width: 100%; max-width: 17rem; margin: 0 auto; cursor: default; user-select: none; }
.hero-logo-svg { width: 100%; overflow: visible; }
/* Valores por defecto; cada píxel trae los suyos en style="" (index.html) */
.hero-logo-svg .px { --dx: 0px; --dy: 0px; --r: 0deg; --dl: 0s; transform-box: fill-box; transform-origin: center; }
.px--naranja { fill: var(--colab); }
.px--oro { fill: var(--valor); }
.px--jade { fill: var(--ident); }
/* Nombre y slogan: grupos externos sin transform propio, para que la animación no pise la posición */
.hero-logo-name, .hero-logo-slogan { transform-box: fill-box; }

.hero-logo[data-play] .px { animation: px-armar 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--dl); }
.hero-logo[data-play] .hero-logo-name { animation: logo-subir .7s ease-out 1.05s both; }
.hero-logo[data-play] .hero-logo-slogan { animation: logo-subir .7s ease-out 1.4s both; }
@keyframes px-armar { from { transform: translate(var(--dx), var(--dy)) scale(.2) rotate(var(--r)); opacity: 0; } }
@keyframes logo-subir { from { opacity: 0; transform: translateY(10px); } }

.page-hero--mkt { background: var(--mkt-tint); }
.page-hero--mkt .lead { color: var(--muted); }
.page-hero--mkt::after { background: var(--mkt); }

.page-hero--dark { background: var(--inverse); color: var(--on-inverse); }
.page-hero--dark .lead { color: var(--on-inverse-muted); }
.page-hero--tec::after { background: var(--tec); }

.page-hero--contact { background: var(--tec-tint); }
.page-hero--contact .lead { color: var(--muted); }

/* Ruta de navegación (migas de pan) */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; font-size: .9rem; font-weight: 600; }
.breadcrumb a { text-decoration: none; opacity: .8; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }

/* --------------------------------------------------------------------------
   6. SECCIONES Y TARJETAS GENÉRICAS
   -------------------------------------------------------------------------- */
.section { padding: var(--section-y) 0; }
.section--surface { background: var(--surface); }
.section--dark { background: var(--inverse); color: var(--on-inverse); }
.section--mkt { background: var(--mkt-tint); }
.section--tec { background: var(--tec-tint); }

.section-head { max-width: 44rem; margin-bottom: 2rem; }
.section-title { margin-bottom: .75rem; }
.section-head h2, .section-title { font-size: clamp(1.7rem, 5.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: .75rem; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }
.section--dark .section-head p:not(.eyebrow) { color: var(--on-inverse-muted); }
.section-foot { margin-top: 1.75rem; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Dos columnas: imagen + texto */
.split { display: grid; gap: 2rem; align-items: center; }
.split-art { width: 100%; max-width: 26rem; margin: 0 auto; }

/* --------------------------------------------------------------------------
   7. INICIO: PREGUNTAS (puerta de entrada) Y RUTAS
   -------------------------------------------------------------------------- */
.filters { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1.25rem; scrollbar-width: thin; }
.chip {
  flex: 0 0 auto; min-height: 44px; padding: .5rem 1.05rem;
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--text);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

.q-grid { display: grid; gap: .75rem; }
.q-grid li[hidden] { display: none; }

/* Cada pregunta es un enlace a la sección de la página que la resuelve */
.q-link {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center;
  height: 100%; padding: 1.1rem 1.15rem;
  text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.q-link:hover { border-color: var(--text); box-shadow: var(--shadow); transform: translateY(-2px); }
.q-link .tag { grid-column: 1; justify-self: start; }
.q-link-text { grid-column: 1; font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.q-arrow {
  grid-column: 2; grid-row: 1 / span 2;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); color: var(--text); transition: background-color .2s, color .2s;
}
.q-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.q-link:hover .q-arrow { background: var(--text); color: var(--bg); }

/* Tarjetas de las tres rutas, con imagen */
.routes { display: grid; gap: 1rem; }
.route {
  display: flex; flex-direction: column; overflow: hidden;
  text-decoration: none; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.route:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.route-media { display: grid; place-items: center; padding: 1.25rem; }
.route-media img { width: 100%; max-width: 15rem; }
.route-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem; flex: 1; }
.route h3 { font-size: 1.45rem; font-weight: 800; }
.route p { color: var(--muted); }
.route-link { margin-top: auto; padding-top: .5rem; font-weight: 700; }
.route--mkt .route-media { background: var(--mkt-tint); }
.route--mkt .route-link { color: var(--mkt-ink); }
.route--tec .route-media { background: var(--inverse); }
.route--tec .route-link { color: var(--tec-ink); }

/* Ruta integral: destacada en verde base, a lo ancho */
.route--int { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.route--int .route-media { background: var(--inverse-2); }
.route--int p { color: var(--on-inverse-muted); }
.route--int .route-link { color: var(--on-inverse); }
.route-badge {
  align-self: flex-start; padding: .22rem .7rem; font-size: .75rem; font-weight: 700;
  color: var(--base); background: var(--mkt); border-radius: 999px;
}

/* Equipo */
.team { display: grid; gap: 1rem; margin-top: 1.5rem; }
.team-card { padding: 1.5rem; }
.team-card h3 { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.team-card h3::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; }
.team-card--mkt h3::before { background: var(--mkt); }
.team-card--tec h3::before { background: var(--tec); }
.team-card p { color: var(--muted); }
.team-note { margin-top: 1.25rem; font-weight: 600; }

/* --------------------------------------------------------------------------
   8. PÁGINAS DE RUTA: NECESIDADES Y SERVICIOS
      Cada necesidad (pregunta del cliente) es un bloque con su número,
      la pregunta, un ejemplo y las tarjetas de servicios.
   -------------------------------------------------------------------------- */
.need { padding: 3.25rem 0; }
.need:nth-of-type(even) { background: var(--surface); }
.need-inner { display: grid; gap: 1.5rem; }

.need-num {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1rem;
  font-weight: 800; border-radius: 50%;
}
.page--mkt .need-num { background: var(--mkt); color: var(--base); }
.page--tec .need-num { background: var(--tec); color: var(--fondo); }

.need-head h2 { font-size: clamp(1.45rem, 4.8vw, 2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: .6rem; }
.need-head p { color: var(--muted); }

.example {
  margin-top: 1.25rem; padding: 1rem 1.1rem;
  font-size: .95rem; border-radius: var(--radius-sm);
  background: var(--card); border: 1px dashed var(--line);
}
.need:nth-of-type(odd) .example { background: var(--surface); }
.example strong { display: block; margin-bottom: .2rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.service-grid { display: grid; gap: .75rem; align-content: start; }
.service {
  padding: 1.15rem 1.2rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.service h3 { display: flex; gap: .6rem; align-items: baseline; font-size: 1.05rem; font-weight: 700; margin-bottom: .3rem; }
.service h3::before { content: ""; flex: 0 0 auto; width: .5rem; height: .5rem; border-radius: 50%; transform: translateY(-.1rem); }
.page--mkt .service h3::before { background: var(--mkt); }
.page--tec .service h3::before { background: var(--tec); }
.service p { color: var(--muted); font-size: .95rem; }

.need-cta { grid-column: 1 / -1; margin-top: .5rem; }

/* Índice rápido de necesidades al inicio de la página */
.need-index { display: grid; gap: .5rem; }
.need-index a {
  display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .6rem .9rem;
  font-weight: 600; text-decoration: none;
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line);
}
.page-hero--dark .need-index a { background: rgba(251, 247, 236, .07); border-color: rgba(251, 247, 236, .16); }
.need-index a:hover { border-color: currentColor; }
.need-index span { font-weight: 800; opacity: .7; }

/* Puente hacia la ruta integral */
.bridge { display: grid; gap: 1.25rem; align-items: center; padding: 1.75rem; border-radius: var(--radius); background: var(--inverse); color: var(--on-inverse); }
.bridge h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .4rem; }
.bridge p { color: var(--on-inverse-muted); }

/* --------------------------------------------------------------------------
   9. CRECIMIENTO INTEGRAL
   -------------------------------------------------------------------------- */
.flow { display: grid; gap: .75rem; }
.flow-step { padding: 1.5rem; border-radius: var(--radius); }
.flow-step h3 { font-size: 1.5rem; font-weight: 800; margin: .3rem 0 .4rem; }
.flow-who { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.flow-step--mkt { background: var(--mkt); color: var(--base); }
.flow-step--mkt p { color: var(--base); }
.flow-step--tec { background: var(--tec); color: var(--fondo); }
.flow-step--tec p { color: var(--fondo); }
.flow-step--int { background: var(--inverse); color: var(--on-inverse); }
.flow-step--int p { color: var(--on-inverse-muted); }

.combos { display: grid; gap: 1rem; }
.combo-card { display: flex; flex-direction: column; padding: 1.5rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.combo-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: .3rem; }
.combo-for { color: var(--muted); margin-bottom: 1.1rem; }
.combo { display: grid; gap: .6rem; margin: 0 0 1.25rem; }
.combo div { padding: .75rem .9rem; border-radius: var(--radius-sm); }
.combo div:first-child { background: var(--mkt-tint); }
.combo div:last-child { background: var(--tec-tint); }
.combo dt { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.combo div:first-child dt { color: var(--mkt-ink); }
.combo div:last-child dt { color: var(--tec-ink); }
.combo dd { margin: .15rem 0 0; font-weight: 600; }
.combo-card .btn { margin-top: auto; align-self: flex-start; }
/* Resalta la combinación a la que se llegó desde una pregunta del inicio */
.combo-card:target { border-color: var(--mkt); box-shadow: 0 0 0 3px rgba(233, 145, 76, .4), var(--shadow); }

/* --------------------------------------------------------------------------
   10. CONTACTO Y FORMULARIO
   -------------------------------------------------------------------------- */
.contact-layout { display: grid; gap: 2rem; }

.form { display: grid; gap: 1.1rem; padding: 1.5rem 1.25rem; }
.field { display: grid; gap: .35rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; gap: 1.1rem; }
.field label, .field legend { font-weight: 600; font-size: .95rem; }
.field legend { margin-bottom: .5rem; padding: 0; }
.req { color: var(--mkt-ink); }

.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--card); border: 1.5px solid var(--field-border); border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { border-color: var(--tec); outline: none; box-shadow: 0 0 0 3px rgba(20, 125, 111, .25); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .875rem; font-weight: 600; }

.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.radio { position: relative; display: block; cursor: pointer; }
.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio span {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 48px; padding: .5rem .75rem; text-align: center; font-weight: 600; font-size: .95rem;
  background: var(--card); border: 1.5px solid var(--field-border); border-radius: var(--radius-sm);
  transition: background-color .2s, border-color .2s, color .2s;
}
.radio input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.radio input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.check { display: flex; gap: .75rem; align-items: flex-start; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin-top: .15rem; flex: 0 0 auto; accent-color: var(--tec); }

.form-hint { font-size: .85rem; color: var(--muted); }
.form-status { font-weight: 600; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }

/* Columna lateral del contacto */
.contact-aside { display: grid; gap: 1rem; align-content: start; }
.aside-card { padding: 1.5rem; }
.aside-card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: .5rem; }
.aside-card p { color: var(--muted); margin-bottom: 1rem; }
.aside-card--dark { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.aside-card--dark p { color: var(--on-inverse-muted); }

/* Pasos de trabajo (en la página de contacto) */
.steps { display: grid; gap: 1.1rem; counter-reset: step; }
.steps li { position: relative; padding-left: 3.25rem; counter-increment: step; min-height: 2.5rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  font-weight: 800; color: var(--base); background: var(--mkt); border-radius: 50%;
}
.steps h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .1rem; }
.steps p { color: var(--on-inverse-muted); }

/* --------------------------------------------------------------------------
   11. FRANJA DE LLAMADO A LA ACCIÓN (al final de cada página)
   -------------------------------------------------------------------------- */
/* Naranja colaboración de fondo, texto y botón en verde base (igual en ambos modos).
   Los círculos ámbar (las "pepitas de valor") quedan como decoración,
   lejos del texto, para no bajar el contraste. */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--colab); color: var(--base);
  padding: 4rem 0;
}
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.cta-band::before { width: 18rem; height: 18rem; right: -7rem; bottom: -9rem; background: var(--valor); }
.cta-band::after { width: 2rem; height: 2rem; right: 1.5rem; top: 1.25rem; background: var(--valor); }
@media (min-width: 48rem) { .cta-band::after { width: 2.25rem; height: 2.25rem; right: 9rem; top: 1.5rem; } }
.cta-inner { position: relative; z-index: 1; display: grid; gap: 1.75rem; align-items: center; }
.cta-band h2 { max-width: 34rem; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -0.025em; color: var(--base); }
.cta-band p { max-width: 36rem; margin-top: .6rem; font-size: 1.05rem; font-weight: 500; color: var(--base); }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.cta-band .btn--primary { background: var(--base); color: var(--fondo); }
.cta-band .btn--primary:hover { background: var(--inverse-2); }
.cta-band :focus-visible { outline-color: var(--base); }

/* --------------------------------------------------------------------------
   12. PIE DE PÁGINA Y BOTÓN DE WHATSAPP
   -------------------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--on-inverse-muted); padding: 3rem 0 6rem; }
.footer-inner { display: grid; gap: 2rem; }
.footer-brand { display: grid; gap: 1rem; justify-items: start; }
.footer-logo { width: auto; height: 2.75rem; }
/* El pie es oscuro en ambos modos: el logo va siempre en versión negativa (gij en crema) */
.site-footer .logo-gij { fill: var(--fondo); }
.footer-brand p { font-size: .95rem; }
.footer-motto { display: block; color: var(--valor); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer-links a { display: inline-block; padding: .5rem 0; color: var(--fondo); text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { font-size: .875rem; }

.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-width: 56px; height: 56px; padding: 0 1rem;
  color: #FFFFFF; background: #1F7A47; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  text-decoration: none; font-weight: 700;
  transition: transform .2s, background-color .2s;
}
.wa-float:hover { background: #17633A; transform: translateY(-2px); }
.wa-float svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wa-label { display: none; }

/* --------------------------------------------------------------------------
   PÁGINA LEGAL (política de tratamiento de datos)
   -------------------------------------------------------------------------- */
.legal-layout { display: grid; gap: 1.5rem; align-items: start; }
.legal-toc { padding: 1.5rem; }
.legal-toc h2 { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tec-ink); margin-bottom: .75rem; }
.legal-toc ol { list-style: decimal; padding-left: 1.25rem; display: grid; gap: .35rem; font-size: .95rem; }
.legal-toc a { color: var(--text); font-weight: 600; text-decoration: none; }
.legal-toc a:hover { color: var(--tec-ink); text-decoration: underline; }
.legal { padding: 1.5rem; max-width: 48rem; }
.legal-meta { font-size: .875rem; font-weight: 600; color: var(--muted); margin-bottom: 1.25rem; }
.legal h2 { font-size: clamp(1.25rem, 4vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; margin: 2.25rem 0 .75rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.legal h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: .35rem; }
.legal p, .legal li { color: var(--muted); }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: .75rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: .45rem; }
.legal strong { color: var(--text); }
.legal .legal-facts { list-style: none; padding: 1rem 1.25rem; background: var(--tec-tint); border-radius: var(--radius-sm); }
.legal-steps { display: grid; gap: 1rem; margin-top: 1rem; }
.legal-step { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-left: 4px solid var(--mkt); border-radius: var(--radius-sm); }
.legal-step + .legal-step { border-left-color: var(--tec); }
.legal-back { margin-top: 2.5rem; }
@media (min-width: 48rem) {
  .legal, .legal-toc { padding: 2.25rem; }
  .legal-steps { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 64rem) {
  .legal-layout { grid-template-columns: 16rem 1fr; gap: 3rem; }
  .legal-toc { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* ==========================================================================
   TABLET (≥ 48rem / 768px)
   ========================================================================== */
@media (min-width: 48rem) {
  :root { --gutter: 2rem; --section-y: 5rem; }

  .brand-logo { height: 2.6rem; }

  .page-hero { padding: 3.5rem 0 4rem; }
  .page-hero-inner { grid-template-columns: 1.3fr 1fr; gap: 3rem; }
  .page-hero-art { max-width: 24rem; }
  .hero-logo { max-width: 22rem; }

  .q-grid { grid-template-columns: 1fr 1fr; }
  .routes { grid-template-columns: 1fr 1fr; }
  .route--int { grid-column: 1 / -1; flex-direction: row; }
  .route--int .route-media { flex: 0 0 42%; }
  .route--int .route-body { justify-content: center; padding: 2rem; }
  .route--int h3 { font-size: 1.85rem; }

  .split { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .team { grid-template-columns: 1fr 1fr; }

  .need-index { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .bridge { grid-template-columns: 1fr auto; padding: 2.25rem; }

  .flow { grid-template-columns: repeat(3, 1fr); }
  .combos { grid-template-columns: 1fr 1fr; }

  .field-row { grid-template-columns: 1fr 1fr; }
  .radio-group { grid-template-columns: repeat(4, 1fr); }
  .form { padding: 2rem; }

  .cta-inner { grid-template-columns: 1fr auto; }

  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer-legal { grid-column: 1 / -1; }

  .wa-label { display: inline; }
  .wa-float { right: 1.5rem; bottom: 1.5rem; }
}

/* ==========================================================================
   ESCRITORIO (≥ 64rem / 1024px)
   ========================================================================== */
@media (min-width: 64rem) {
  :root { --header-h: 4.5rem; }
  .brand-logo { height: 2.75rem; }

  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; margin-left: auto; background: none; border: 0; box-shadow: none; }
  .theme-toggle { order: 3; margin: 0 0 0 1.25rem; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 1.75rem; padding: 0; }
  .site-nav a:not(.btn) { padding: .5rem 0; border: 0; }
  .site-nav a:not(.btn)[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--mkt); }
  .site-nav .btn { margin: 0; width: auto; }

  .page-hero { padding: 5rem 0 5.5rem; }
  .page-hero-inner { gap: 4rem; }
  .page-hero-art { max-width: 28rem; }
  .hero-logo { max-width: 26rem; }

  .q-grid { grid-template-columns: repeat(3, 1fr); }
  .routes { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  /* Necesidad: pregunta a la izquierda (fija al hacer scroll), servicios a la derecha */
  .need { padding: 4.5rem 0; }
  .need-inner { grid-template-columns: 1fr 1.5fr; gap: 3.5rem; align-items: start; }
  .need-head { position: sticky; top: calc(var(--header-h) + 2rem); }

  .combos { grid-template-columns: repeat(3, 1fr); }

  .contact-layout { grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
