/* mipiace.es · Ancora Labs
   Marca Mi Piace: tinta, piedra, un solo acento coral (los dos puntos). DM Sans autoalojada.
   B1: radios de 4/8/12/16/24 px (más el 50% de los círculos), movimiento de 300 ms como máximo,
   contenido visible por defecto y contraste mínimo de 4,5:1. Ningún color fuera de :root. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Color de marca */
  --coral: #e97058; --coral-dark: #b24a35; --coral-soft: #fdeae3;
  --ink: #1f2937; --ink-2: #151c27; --ink-soft: #374151; --muted: #5b6472;
  --stone: #f8f6f3; --stone-2: #efebe5; --line: #e4dfd8; --white: #fff;
  /* Texto y bordes sobre fondo oscuro (pie) */
  --on-ink: #c4cad3; --on-ink-strong: #e5e7eb; --on-ink-muted: #8b94a3; --line-ink: #2b3442;
  /* Estados del formulario */
  --ok: #047857; --ok-bg: #ecfdf5; --err: #b91c1c; --err-bg: #fef2f2;
  /* Velos y focos (derivados de coral y piedra) */
  --coral-ring: rgba(233, 112, 88, .35); --coral-ring-soft: rgba(233, 112, 88, .18);
  --stone-veil: rgba(248, 246, 243, .88);
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1280px; --gutter: clamp(16px, 4vw, 40px); --tap: 44px;
  /* alias para páginas legales */
  --mp-coral: var(--coral); --mp-coral-dark: var(--coral-dark); --mp-ink: var(--ink); --mp-ink-soft: var(--ink-soft);
  --mp-muted: var(--muted); --mp-stone: var(--stone); --mp-stone-2: var(--stone-2); --mp-border: var(--line); --mp-font: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
/* `hidden` por encima de cualquier display de clase: si no, un .form-grid o un
   .field-err con el atributo puesto se seguirían viendo (la regla del navegador
   pierde contra cualquier selector de clase) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: 88px; }
/* Controles: sin retraso de doble toque (sistema visual §6bis) */
button, a, [role="button"], summary { touch-action: manipulation; }
body { margin: 0; font-family: var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  background: var(--stone); color: var(--ink); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--coral-dark); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--coral-dark); } }
:focus-visible { outline: 2px solid var(--coral-dark); outline-offset: 3px; border-radius: 8px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.05; }
::selection { background: var(--coral); color: var(--ink-2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--white); display: inline-flex; align-items: center;
  min-height: var(--tap); padding: 0 16px; border-radius: 12px; z-index: 200; }
.skip:focus { left: 8px; color: var(--white); }

.muted { color: var(--muted); }
/* Titulares: sin overflow ni máscaras, con hueco para g, j, p e y */
.display-1 { font-size: clamp(48px, 9vw, 132px); letter-spacing: -.05em; line-height: 1; padding-bottom: .06em; }
.display-2 { font-size: clamp(34px, 5.4vw, 76px); letter-spacing: -.04em; line-height: 1.04; padding-bottom: .06em; }
.display-3 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -.03em; line-height: 1.12; padding-bottom: .06em; }

/* Dos puntos: tú y nosotros */
.dots { display: inline-flex; gap: .22em; vertical-align: middle; margin-right: .5em; }
.dots i { width: .42em; height: .42em; border-radius: 50%; background: var(--coral); display: block; }
.dots-lg { margin: 0 0 0 .08em; vertical-align: baseline; gap: .12em; }
.dots-lg i { width: .16em; height: .16em; }

/* Botones · zona táctil mínima de 44 px */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 16px;
  border: 1px solid transparent; font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer; position: relative;
  transition: background-color .2s, color .2s, border-color .2s, transform 120ms var(--ease); }
/* Feedback de pulsado (sistema visual §6.3) */
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .btn:hover svg { transform: translateX(4px); } }
/* Coral de marca con texto tinta: 5,6:1. El blanco sobre coral solo llega a 3:1 */
.btn-primary { background: var(--coral); color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--coral-dark); color: var(--white); } }
/* El relleno se estrecha a 320 px para que la etiqueta no parta en dos líneas */
.btn-xl { min-height: 64px; padding: 0 clamp(20px, 5vw, 30px); font-size: 16.5px; border-radius: 16px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: 4px; margin-top: 32px; }
.link-arrow span { transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover { color: var(--coral-dark); border-color: var(--coral); } }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover span { transform: translateX(4px); } }

/* Cabecera */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background-color .2s, box-shadow .2s; }
.site-header.is-open { background: var(--stone); box-shadow: 0 1px 0 var(--line); }
.site-header.is-scrolled:not(.is-open) { background: var(--stone-veil); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); box-shadow: 0 1px 0 var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); }
.brand img { height: 26px; width: auto; }

/* Menú: panel de un solo nivel en móvil, fila en escritorio */
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: var(--tap); min-height: var(--tap);
  padding: 0 12px; background: transparent; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font: 500 14.5px/1 var(--font); cursor: pointer;
  transition: background-color .2s, border-color .2s; }
@media (hover: hover) and (pointer: fine) { .nav-toggle:hover { background: var(--stone-2); } }
.nav-toggle i { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 4px; position: relative; }
.nav-toggle i::before, .nav-toggle i::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 4px; transition: transform .2s var(--ease); }
.nav-toggle i::before { top: -6px; }
.nav-toggle i::after { top: 6px; }
.is-open .nav-toggle i { background: transparent; }
.is-open .nav-toggle i::before { transform: translateY(6px) rotate(45deg); }
.is-open .nav-toggle i::after { transform: translateY(-6px) rotate(-45deg); }
.nav { display: none; }
.site-header.is-open .nav { display: flex; }
/* Panel opaco: el translúcido dejaba leer el titular detrás de los enlaces (auditoría 27/09) */
.nav { position: absolute; left: 0; right: 0; top: 76px; flex-direction: column; gap: 4px; padding: 8px var(--gutter) 20px;
  background: var(--stone);
  box-shadow: 0 1px 0 var(--line); max-height: calc(100svh - 76px); overflow-y: auto; }
.nav a { display: flex; align-items: center; min-height: var(--tap); color: var(--ink-soft); text-decoration: none; font-size: 16px; font-weight: 500;
  padding: 10px 12px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); background: var(--stone-2); } }
.header-cta { min-height: var(--tap); padding: 0 18px; font-size: 14.5px; }
/* .nav a pisaba el color del botón: vuelve a la tinta de todos los botones coral (5,6:1) */
.nav .btn-primary { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .nav .btn-primary:hover { background: var(--coral-dark); color: var(--white); } }
.nav .header-cta { margin-top: 8px; justify-content: center; }
.nav-desktop-cta { display: none; }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav, .site-header.is-open .nav { display: flex; position: static; flex-direction: row; gap: 2px; padding: 0; background: none;
    backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; max-height: none; overflow: visible; }
  .nav a { font-size: 14.5px; padding: 0 14px; }
  @media (hover: hover) and (pointer: fine) { .nav a:hover { background: transparent; } }
  .nav .header-cta { display: none; }
  .nav-desktop-cta { display: inline-flex; }
}
.legal-page .site-header { position: sticky; background: var(--stone-veil); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Secciones */
.section { padding: clamp(88px, 14vw, 180px) 0; }
.section-tight { padding-top: clamp(40px, 6vw, 80px); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* Portada · primera pantalla: titular, párrafo y botón. Los textos salen de build.py */
.hero { display: flex; align-items: center; min-height: 100vh; min-height: 100svh;
  padding: calc(76px + clamp(24px, 6vw, 56px)) 0 clamp(48px, 8vw, 88px); }
/* Sin vídeo (VIDEO_LISTO = False) la portada no ocupa la pantalla entera: ver build.py */
.hero-sin-video { min-height: 0; }
/* Línea de contexto sobre el h1: frase normal, no etiqueta en mayúsculas (sistema visual §2, 27/09).
   En móvil, dos líneas limpias y sin el «·» colgando */
.hero-kicker { margin: 0 0 clamp(16px, 2vw, 24px); font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.hero-kicker span { white-space: nowrap; }
@media (max-width: 479px) { .hero-kicker .sep { display: none; } .hero-kicker span:not(.sep) { display: block; } }
.hero-title { max-width: 19ch; }
.hero-text { margin: clamp(18px, 2.6vw, 28px) 0 0; max-width: 42ch; color: var(--ink-soft);
  font-size: clamp(17px, 1.5vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(26px, 3.6vw, 40px); }
/* Botón del vídeo: solo se pinta con VIDEO_LISTO = True. El triángulo no se desplaza al pasar el ratón */
.btn-video svg { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) { .btn-video:hover svg { transform: none; } }

/* ¿Qué te está quitando tiempo? · siete tarjetas: título, esquema y una línea */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(20px, 3vw, 28px); display: grid; grid-template-areas: "t" "f" "x" "c"; align-content: start; }
.card-title { grid-area: t; font-size: clamp(19px, 1.9vw, 22px); letter-spacing: -.02em; line-height: 1.22; padding-bottom: .04em; }
.card-fig { grid-area: f; margin: clamp(18px, 2.6vw, 26px) 0 0; }
.card-text { grid-area: x; margin: clamp(16px, 2.2vw, 22px) 0 0; color: var(--ink-soft); font-size: 15.5px; }
.card-clip { grid-area: c; margin: 18px 0 0; }
/* Esquemas: el lío de hoy en gris, el resultado en tinta, un solo toque de coral.
   Mismo grosor de trazo en los siete. El coral nunca lleva texto: sobre blanco da 3:1,
   que vale para un dibujo pero no para una letra */
.fig { width: 100%; height: auto; max-width: 420px; margin: 0 auto; }
.fig g { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Los tamaños de letra del dibujo van en clase, no en atributo: una regla CSS
   gana siempre a un font-size suelto dentro del SVG */
.fig text { fill: currentColor; stroke: none; font: 500 13px var(--font); }
.fig .sm { font-size: 12px; }
.fig .q { font-size: 32px; }
.fig .solid { fill: currentColor; stroke: none; }
.fig-was, .fig-arrow { color: var(--muted); }
.fig-now { color: var(--ink); }
.fig-key { color: var(--coral); }
/* Botón del clip: solo se pinta con CLIPS_LISTOS = True */
.btn-clip { min-height: var(--tap); font-size: 14.5px; }
.btn-clip svg { width: 13px; height: 13px; }
@media (hover: hover) and (pointer: fine) { .btn-clip:hover svg { transform: none; } }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .card-wide { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; grid-template-areas: "t f" "x f" "c f";
    column-gap: clamp(32px, 5vw, 72px); align-content: center; padding: clamp(28px, 3.4vw, 44px); }
  .card-wide .card-title { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; }
  .card-wide .card-text { font-size: 17px; max-width: 34em; }
  .card-wide .card-fig { margin: 0; align-self: center; }
}

/* Cómo empezamos · tres pasos: en vertical en móvil, en horizontal en escritorio.
   Numeración grande y ninguna ilustración: el paso es el número y la frase */
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step { padding: clamp(20px, 3vw, 28px) 0 clamp(26px, 4vw, 40px); border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
/* coral-dark sobre piedra da 4,96:1; el coral de marca se queda en 2,81:1 y no vale para letra */
.step-num { margin: 0; font-size: clamp(52px, 11vw, 80px); font-weight: 600; letter-spacing: -.05em; line-height: 1;
  color: var(--coral-dark); font-variant-numeric: tabular-nums; }
.step-title { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.03em; line-height: 1.14; margin: clamp(10px, 1.4vw, 16px) 0 0; padding-bottom: .04em; }
.step-text { margin: 10px 0 0; color: var(--ink-soft); font-size: clamp(16px, 1.3vw, 17px); max-width: 32em; }
/* Las dos cursivas del brief son letra pequeña del paso, no un paso más */
.step-fine { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; font-style: italic; line-height: 1.5; max-width: 34em; }
.steps-cta { margin: clamp(32px, 5vw, 56px) 0 0; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); column-gap: clamp(28px, 4vw, 64px); }
  .step, .step:last-child { border-bottom: none; }
}

/* Qué cuesta · tres tarjetas, el plan destacado y en el centro en escritorio.
   Ninguna cifra vive aquí ni en el HTML: salen de PRECIOS, en build.py (ADR-3) */
.prices { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 520px; }
.price-card { background: var(--white); border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(22px, 3.4vw, 32px); display: flex; flex-direction: column; }
/* Destacada: fondo coral suave y borde coral-dark (4,6:1 sobre el fondo, 4,96:1 sobre la piedra) */
.price-card.is-featured { background: var(--coral-soft); border: 2px solid var(--coral-dark); }
.price-name { font-size: clamp(19px, 1.9vw, 22px); letter-spacing: -.02em; line-height: 1.22; padding-bottom: .04em; }
.price { margin: clamp(12px, 1.6vw, 18px) 0 0; font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; letter-spacing: -.035em;
  line-height: 1.1; color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
/* Precio antiguo: <s> con su texto, no un text-decoration suelto, y con "Antes:" para el lector */
.price-old { color: var(--muted); font-size: .52em; font-weight: 500; letter-spacing: -.02em; }
.price-pre, .price-tax { color: var(--muted); font-size: .42em; font-weight: 500; letter-spacing: 0; }
/* Cuota mensual: es una frase, no una cifra, así que no pide el mismo cuerpo */
.price-words { font-size: clamp(21px, 2.1vw, 26px); letter-spacing: -.025em; line-height: 1.2; display: block; }
.num { font-variant-numeric: tabular-nums; }
.price-cond { margin: 10px 0 0; font-size: 13.5px; font-style: italic; color: var(--muted); line-height: 1.5; font-variant-numeric: tabular-nums; }
.price-text { margin: clamp(14px, 2vw, 20px) 0 0; color: var(--ink-soft); font-size: 15.5px; max-width: 42em; }
.price-fine { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; font-style: italic; line-height: 1.5; max-width: 48em; }
.price-cta { margin: clamp(20px, 2.6vw, 28px) 0 0; }
.price-cta .btn { width: 100%; max-width: 340px; padding: 0 18px; white-space: nowrap; }
.price-card > :last-child { margin-bottom: 0; }
.prices-note { margin: clamp(20px, 2.6vw, 28px) 0 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prices-note strong { font-weight: 600; color: var(--ink); }
/* Tablet: dos columnas y el plan a lo ancho arriba. Con tres tarjetas en una sola
   columna estrecha sobraba media pantalla a la derecha */
@media (min-width: 620px) {
  .prices { grid-template-columns: 1fr 1fr; gap: 20px; max-width: none; }
  .price-plan { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .prices { grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
  /* El plan va en el centro; en el HTML va el primero, que es donde tiene que leerse en móvil */
  .price-implantacion { grid-area: 1 / 1; }
  .price-plan { grid-area: 1 / 2; }
  .price-soporte { grid-area: 1 / 3; }
}
@media (min-width: 1080px) { .price-text { font-size: 16px; } }

/* Contacto · el formulario de nueve campos del brief §6.
   Etiqueta visible siempre: ningún campo lleva el texto solo dentro. Los
   placeholder que hay son ejemplos, no etiquetas, y se pueden borrar sin perder
   nada. Zona táctil de 44 px en campos, selectores y casilla */
.contact-sec { background: var(--stone-2); padding: clamp(96px, 14vw, 180px) 0; }
.contact { display: grid; gap: 40px; }
.contact-info h2 { margin-bottom: 28px; }
.contact-info > p:not(.eyebrow) { font-size: 18px; color: var(--ink-soft); max-width: 26em; }
.contact-lines { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 6px; }
.contact-lines a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; background: linear-gradient(var(--coral), var(--coral)) 0 100% / 0 2px no-repeat; transition: background-size .3s var(--ease), color .2s; }
@media (hover: hover) and (pointer: fine) { .contact-lines a:hover { background-size: 100% 2px; color: var(--ink); } }
/* El teléfono y su WhatsApp van en la misma línea: el número llama y el enlace de
   al lado abre la conversación. Si se ofrece WhatsApp, tiene que poder abrirse.
   Se envuelven con `flex-wrap` para que a 320 px el enlace caiga debajo del
   número en vez de estrecharlo. */
.contact-tel { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.contact-lines a.wa { gap: 8px; padding: 0 16px; font-size: 15px; font-weight: 500; letter-spacing: 0;
  color: var(--ink); background: var(--coral-soft); border-radius: 12px; transition: background-color .2s; }
.contact-lines a.wa svg { width: 18px; height: 18px; color: var(--coral-dark); }
@media (hover: hover) and (pointer: fine) { .contact-lines a.wa:hover { background: var(--white); color: var(--ink); } }
/* El email y el teléfono son el titular de la columna; esta línea es la letra
   pequeña que dice qué hacer con el teléfono, así que no compite con ellos */
.contact-info p.contact-fine { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; max-width: 30em; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 3vw, 40px); }
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.field .opt { color: var(--muted); font-weight: 400; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-height: 54px; padding: 14px 16px; font: 400 16px/1.4 var(--font); color: var(--ink);
  background: var(--stone); border: 1px solid transparent; border-radius: 16px; transition: background-color .2s, border-color .2s, box-shadow .2s; }
.field textarea { min-height: 136px; resize: vertical; }
.field input:not([type="checkbox"]):focus, .field select:focus, .field textarea:focus { outline: none; background: var(--white); border-color: var(--coral-ring); box-shadow: 0 0 0 4px var(--coral-ring-soft); }
/* El anillo coral suave es el foco de raton: sobre la tarjeta blanca da 1,26:1 y
   con el teclado no se ve. Por teclado manda el mismo contorno que el resto del
   sitio (--coral-dark, 4,96:1). Va despues porque tiene la misma especificidad */
.field input:not([type="checkbox"]):focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--coral-dark); outline-offset: 2px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
/* Selector: chevron dibujado con dos bordes en --muted, no un SVG de fondo, que
   obligaría a escribir un color en hexadecimal dentro de la URL */
.select-wrap { position: relative; display: block; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 46px; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
/* Error junto al campo: borde rojo y una línea debajo. El texto lo pone site.js
   desde el data-err del propio campo, y se lee por aria-describedby */
.field-err { margin: 6px 0 0; font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--err); }
.field.has-error input:not([type="checkbox"]), .field.has-error select, .field.has-error textarea { background: var(--err-bg); border-color: var(--err); }
/* `label.consent` y no `.consent` a secas: `.field label` es más específico
   y, si no, deja la etiqueta en display:block y la casilla salta de línea */
.field label.consent { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 0;
  font-size: 13.5px; font-weight: 400; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
/* La casilla se ve de 24 px pero se pulsa en 44: el relleno del envoltorio es la
   diferencia. El primer renglón del texto se alinea con ella */
.consent-box { flex: none; width: var(--tap); height: var(--tap); display: flex; align-items: center; justify-content: center; margin-left: -10px; }
.consent-box input { width: 24px; height: 24px; margin: 0; accent-color: var(--coral-dark); }
.consent > span:last-child { padding-top: 10px; }
.field-consent.has-error .consent-box input { outline: 2px solid var(--err); outline-offset: 3px; border-radius: 4px; }
/* El error de la casilla se alinea con su texto, no con el borde: 44 px de
   zona táctil menos los 10 px que la casilla sobresale, más los 8 px de hueco */
.field-consent .field-err { margin-left: calc(var(--tap) - 10px + 8px); }
.legal-first { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.legal-first summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; font-size: 13.5px; color: var(--ink-soft); }
.legal-first summary::-webkit-details-marker { display: none; }
.legal-first summary::before { content: "+"; font-weight: 500; color: var(--coral-dark); width: 1ch; }
.legal-first[open] summary::before { content: "−"; }
.legal-first summary:focus-visible { outline: 2px solid var(--coral-dark); outline-offset: 2px; border-radius: 4px; }
.legal-first p { margin: 4px 0 0; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-card .btn { width: 100%; min-height: 60px; }
/* Enviando: el botón se desactiva, cambia de texto y pierde la flecha, para que
   se vea que ya ha recogido el clic. Nunca un botón vivo esperando al servidor */
.btn[disabled] { cursor: progress; background: var(--stone-2); color: var(--ink-soft); }
.btn[disabled] svg { display: none; }
@media (hover: hover) and (pointer: fine) { .btn[disabled]:hover { background: var(--stone-2); color: var(--ink-soft); } }
.alert { border-radius: 16px; padding: 14px 16px; font-size: 14.5px; margin-bottom: 16px; display: none; }
.alert.is-ok { display: block; background: var(--ok-bg); color: var(--ok); }
.alert.is-err { display: block; background: var(--err-bg); color: var(--err); }
.alert a, .alert-link { color: inherit; font: inherit; font-weight: 500; text-decoration: underline; }
/* El enlace del vídeo es un <button>, porque abre el modal y no lleva a ninguna
   URL; se pinta como el resto del aviso para que se lea como una frase */
.alert-link { background: none; border: 0; padding: 0; cursor: pointer; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .contact { grid-template-columns: 1fr 1.05fr; gap: 80px; align-items: start; } .contact-info { position: sticky; top: 120px; } }

/* Pie */
.site-footer { background: var(--ink-2); color: var(--on-ink); padding: 72px 0 32px; font-size: 14px; }
.site-footer a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--on-ink-strong); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { color: var(--white); text-decoration: underline; } }
.foot-grid { display: grid; gap: 32px; }
.foot-brand img { height: 26px; width: auto; margin-bottom: 14px; }
/* El pie es un landmark hermano de main, asi que sus rotulos son h2: con h4 la
   pagina saltaba de h2 a h4 (y en el 404, de h1 a h4). El tamano no cambia */
.foot-grid h2 { margin: 0 0 12px; font-size: 11px; font-weight: 500; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-muted); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-about { margin: 0 0 12px; max-width: 30em; }
.foot-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-ink); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13px; color: var(--on-ink-muted); }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* Páginas legales */
.legal { padding: 56px 0 96px; }
.legal .wrap { max-width: 800px; }
.legal h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -.04em; line-height: 1.04; margin-bottom: 10px; padding-bottom: .06em; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-size: 21px; letter-spacing: -.015em; margin: 44px 0 12px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal .card { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 20px 24px; }
.legal .card dl { display: grid; grid-template-columns: 1fr; gap: 4px 20px; margin: 0; }
.legal .card dt { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 10px; }
.legal .card dd { margin: 0; color: var(--ink); }
.legal .table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--white); border: 1px solid var(--line); min-width: 520px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--stone-2); font-weight: 500; font-size: 13px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-size: 14px; text-decoration: none; margin-bottom: 28px; font-weight: 500; }
@media (min-width: 640px) { .legal .card dl { grid-template-columns: 180px 1fr; } .legal .card dt { margin-top: 0; } }

/* ─── /formacion/ (B8) · solo lo que no existía. Mismos tokens, radios de la escala
   y ningún color fuera de :root ─────────────────────────────────────────────── */
.section-sub { margin: clamp(16px, 2vw, 22px) 0 0; max-width: 40em; color: var(--ink-soft); font-size: clamp(16px, 1.4vw, 18px); }

/* La portada es flex: sin ancho, la .wrap se encoge al titular y se separa del resto de secciones */
.formacion .hero .wrap { width: 100%; }

/* ¿Qué es el crédito? · titular a un lado y las tres líneas al otro en escritorio */
.credit { display: grid; gap: clamp(20px, 3vw, 32px); }
.credit-lead { margin: 0; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; color: var(--ink); max-width: 34em; }
.credit-fine { margin: 16px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 40em; }
@media (min-width: 1000px) { .credit { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; } }

/* Áreas de formación · tarjeta sin esquema: área, resultado, una línea y para quién */
.card-plain { grid-template-areas: none; display: flex; flex-direction: column; }
.card-kicker { margin: 0 0 10px; font-size: 13.5px; font-weight: 500; color: var(--coral-dark); }
.card-plain .card-text { margin-top: 12px; }
.card-for { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.card-for span { font-weight: 500; color: var(--ink-soft); }
.card-link { margin: auto 0 0; padding-top: 8px; }
.card-link .link-arrow { margin-top: 12px; font-size: 15px; }

/* Cómo funciona con cuatro pasos: dos columnas en tableta, cuatro en escritorio ancho */
@media (min-width: 900px) {
  .steps-4 { grid-template-columns: repeat(2, 1fr); }
  .steps-4 .step:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (min-width: 1200px) {
  .steps-4 { grid-template-columns: repeat(4, 1fr); }
  .steps-4 .step:nth-last-child(-n+2) { border-bottom: none; }
}

/* ¿Por qué con nosotros? · tres pruebas; la del código de FUNDAE manda */
.proofs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.proof { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 28px); }
.proof-key { background: var(--coral-soft); border: 2px solid var(--coral-dark); }
.proof-title { font-size: clamp(19px, 1.9vw, 22px); letter-spacing: -.02em; line-height: 1.22; padding-bottom: .04em; }
.proof-code { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  font-size: clamp(30px, 3.6vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.proof-code-label { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-soft); }
.proof-text { margin: 14px 0 0; color: var(--ink-soft); font-size: 15.5px; }
@media (min-width: 900px) { .proofs { grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; } }

/* Preguntas frecuentes · <details> nativo: se abre sin JS y se lee con teclado */
.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 14px 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: clamp(17px, 1.7vw, 20px); font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.faq-item summary::after { content: "+"; flex: none; width: var(--tap); height: var(--tap); display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--white); border: 1px solid var(--line); color: var(--coral-dark); font-size: 22px; font-weight: 500; }
.faq-item[open] summary::after { content: "−"; }
@media (hover: hover) and (pointer: fine) { .faq-item summary:hover h3 { color: var(--coral-dark); } }
.faq-item p { margin: 0 0 22px; max-width: 46em; color: var(--ink-soft); font-size: 16px; }

/* [PENDIENTE] · tiene que verse en producción hasta que se resuelva: rojo de error y borde discontinuo */
.pendiente { display: inline; background: var(--err-bg); color: var(--err); font-weight: 500; font-style: normal;
  border: 1px dashed var(--err); border-radius: 4px; padding: 0 4px; }

/* Pie · enlace a la formación desde todas las páginas */
.foot-link { margin: 4px 0 0; }

/* Movimiento reducido: todo quieto. El contenido ya es visible por defecto */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:active { transform: none; }
}
