/* ===========================================================================
   RRHH Simple — sistema de diseño
   Modo claro. Un solo sistema de tokens: color, tipografía, espacio, motion.
   =========================================================================== */

/* Tipografías servidas desde el propio dominio: más rápido que Google Fonts
   y sin enviar la IP de quien visita a un tercero (RGPD). */
@font-face{
  font-family:'Poppins'; font-style:normal; font-weight:500; font-display:swap;
  src:url('assets/fonts/poppins-latin-500-normal.woff2') format('woff2');
}
@font-face{
  font-family:'Poppins'; font-style:normal; font-weight:600; font-display:swap;
  src:url('assets/fonts/poppins-latin-600-normal.woff2') format('woff2');
}
@font-face{
  font-family:'Poppins'; font-style:normal; font-weight:700; font-display:swap;
  src:url('assets/fonts/poppins-latin-700-normal.woff2') format('woff2');
}
@font-face{
  font-family:'Atkinson Hyperlegible'; font-style:normal; font-weight:400; font-display:swap;
  src:url('assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
}
@font-face{
  font-family:'Atkinson Hyperlegible'; font-style:italic; font-weight:400; font-display:swap;
  src:url('assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2') format('woff2');
}
@font-face{
  font-family:'Atkinson Hyperlegible'; font-style:normal; font-weight:700; font-display:swap;
  src:url('assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
}

:root{
  /* --- Color: roles, no nombres de color ------------------------------- */
  --paper:      #faf8f3;   /* fondo base, blanco cálido de marca */
  --paper-2:    #f1ede1;   /* escalón de tono para separar superficies */
  --paper-3:    #e7e2d2;   /* escalón hondo: separadores, rellenos */
  --edge-ink:   #8d856f;   /* borde de control sobre papel — 3.46:1 */
  --edge-field: #929289;   /* borde de control sobre campo oscuro — 3.64:1 */
  --ink:        #1a1a1a;   /* texto principal */
  --ink-2:      #4a4732;   /* texto secundario (oliva) */
  --ink-3:      #6b6752;   /* notas y metadatos */
  --field:      #2e2e2e;   /* campo oscuro de contraste */
  --field-2:    #3a3a37;   /* superficie sobre el campo oscuro */
  --on-field:   #faf8f3;   /* texto sobre campo oscuro */
  --on-field-2: #cfcabb;   /* texto secundario sobre campo oscuro */
  --accent:     #ffde59;   /* amarillo: SOLO superficie de acción */
  --accent-ink: #1a1a1a;   /* tinta sobre el amarillo */
  --warm:       #e8a87c;   /* terracota: SOLO superficie, nunca texto */
  --warm-ink:   #8d4a16;   /* terracota legible, para texto sobre papel */

  /* --- Tipografía: cinco pasos, ni uno más ----------------------------- */
  --display: clamp(2rem, 7.4vw, 5.75rem);  /* 32 → 92 — el suelo bajó de 44 a 32: en un móvil de 360-390 px el titular más largo de Inicio no cabía y se salía por la derecha */
  --title:   clamp(1.875rem, 3.9vw, 3.25rem); /* 30 → 52 */
  --lead:    clamp(1.25rem, 1.9vw, 1.625rem); /* 20 → 26 */
  --body:    1.0625rem;                       /* 17 */
  --small:   0.875rem;                        /* 14 */
  --sans: 'Poppins', system-ui, sans-serif;
  --text: 'Atkinson Hyperlegible', system-ui, sans-serif;

  /* --- Espacio: escala de 4 -------------------------------------------- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --section: clamp(5rem, 11vw, 11rem);   /* 80 → 176: hueco entre secciones */
  --gutter:  clamp(1rem, 4vw, 2rem);     /* margen de página */
  --measure: 62ch;

  /* --- Forma: decidida una vez ----------------------------------------- */
  --pill: 999px;   /* controles: completamente redondos */
  --edge: 0px;     /* superficies y medios: cuadrados */

  /* --- Motion ----------------------------------------------------------- */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-soft:   cubic-bezier(0.32, 0.72, 0, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-enter: 520ms;
}

/* ===========================================================================
   Base
   =========================================================================== */

*, *::before, *::after{ box-sizing: border-box; }
* { margin: 0; }

html{
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Superficies del navegador: también son parte del diseño */
  scrollbar-color: var(--ink-2) var(--paper-2);
  caret-color: var(--ink-2);
  accent-color: var(--ink-2);
}

body{
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection{ background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar{ width: 12px; height: 12px; }
::-webkit-scrollbar-track{ background: var(--paper-2); }
::-webkit-scrollbar-thumb{ background: var(--ink-2); border: 3px solid var(--paper-2); border-radius: var(--pill); }
::-webkit-scrollbar-thumb:hover{ background: var(--ink); }

h1, h2, h3, h4{
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
p{ text-wrap: pretty; }

a{ color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

img, svg{ display: block; max-width: 100%; }

:focus-visible{
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-field :focus-visible{ outline-color: var(--accent); }

.skip-link{
  position: absolute; left: -9999px; top: var(--s2); z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: var(--s3) var(--s5); border-radius: var(--pill);
  font-family: var(--sans); font-weight: 600; text-decoration: none;
}
.skip-link:focus{ left: var(--s4); }

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

/* ===========================================================================
   Rejilla
   =========================================================================== */

.wrap{
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow{ max-width: 760px; }

.grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.c-1-7  { grid-column: 1 / span 7; }
.c-1-6  { grid-column: 1 / span 6; }
.c-1-5  { grid-column: 1 / span 5; }
.c-2-6  { grid-column: 2 / span 5; }
.c-6-12 { grid-column: 6 / span 7; }
.c-7-12 { grid-column: 7 / span 6; }
.c-8-12 { grid-column: 8 / span 5; }
.c-full { grid-column: 1 / -1; }

section{ scroll-margin-top: var(--s8); }
.band{ padding-block: var(--section); }
.band-tight{ padding-block: clamp(3rem, 7vw, 6rem); }

/* Campo oscuro: la página respira en dos registros */
.field{
  background: var(--field);
  color: var(--on-field);
}
.field h1, .field h2, .field h3{ color: var(--on-field); }
.field p{ color: var(--on-field-2); }

/* ===========================================================================
   Tipografía de página
   =========================================================================== */

.display{ font-size: var(--display); }
.title  { font-size: var(--title); }
.lead{
  font-family: var(--text);
  font-size: var(--lead);
  line-height: 1.38;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 24ch;
  text-wrap: balance;
}
.body-lg{ font-size: 1.1875rem; line-height: 1.6; }
.prose{ max-width: var(--measure); }
.prose p + p{ margin-top: var(--s5); }
.muted{ color: var(--ink-2); }
.note{ font-size: var(--small); color: var(--ink-3); line-height: 1.55; }
.field .note{ color: var(--on-field-2); }

.mark{ background: var(--accent); color: var(--accent-ink); padding: 0 0.18em; }

.link{
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--paper-3);
  transition: text-decoration-color var(--t-hover) ease;
}
.link:hover{ text-decoration-color: var(--ink); }
.field .link{ color: var(--on-field); text-decoration-color: var(--edge-field); }
.field .link:hover{ text-decoration-color: var(--accent); }
.field{ accent-color: var(--accent); }

/* ===========================================================================
   Navegación — barra plana, sin cristal, sin sombra
   =========================================================================== */

.site-head{
  position: relative;
  z-index: 40;
  view-transition-name: site-head;
}
.nav{
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5);
  padding-block: var(--s5);
}
.brand{ display: inline-flex; flex-shrink: 0; }
.brand img{ height: 40px; width: auto; }

.nav-links{
  display: flex; align-items: center; gap: var(--s6);
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 500;
}
.nav-links a{
  text-decoration: none;
  color: var(--ink-2);
  padding-block: var(--s3);          /* área de pulsación cómoda, no solo el texto */
  transition: color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine){ .nav-links a:hover{ color: var(--ink); } }
.nav-links a[aria-current="page"]{
  color: var(--ink);
  box-shadow: inset 0 -0.42em 0 var(--accent); /* taste-skill-ignore: subrayado, no sombra */
}

.menu-toggle{
  display: none;
  background: none; border: 0; cursor: pointer;
  color: var(--ink); padding: var(--s2);
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 600;
}

/* ===========================================================================
   Botones — tres niveles, forma decidida una vez
   =========================================================================== */

.btn{
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5em;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  line-height: 1;
  padding: 1.0625rem 1.75rem;
  min-height: 52px;
  border: 0; border-radius: var(--pill);
  text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  transition: transform var(--t-press) var(--ease-out),
              background-color var(--t-hover) ease,
              color var(--t-hover) ease;
}
.btn:active{ transform: scale(0.97); }

/* Secundario: fantasma, sin fondo */
.btn-ghost{
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--edge-ink); /* taste-skill-ignore: borde sin desplazar la caja */
}
@media (hover: hover) and (pointer: fine){ .btn-ghost:hover{ box-shadow: inset 0 0 0 1.5px var(--ink); } /* taste-skill-ignore: borde */ }
.field .btn-ghost{
  color: var(--on-field);
  box-shadow: inset 0 0 0 1.5px var(--edge-field); /* taste-skill-ignore: borde */
}
@media (hover: hover) and (pointer: fine){ .field .btn-ghost:hover{ box-shadow: inset 0 0 0 1.5px var(--on-field); } /* taste-skill-ignore: borde */ }

.btn-sm{ font-size: 0.9375rem; padding: 0.75rem 1.25rem; min-height: 44px; }

/* Terciario: enlace con subrayado que crece */
.btn-text{
  position: relative;
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  color: var(--ink); text-decoration: none;
  padding-bottom: 3px;
}
.btn-text::after{
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 280ms var(--ease-out);
}
.btn-text:focus-visible::after{ transform: scaleX(1); }
@media (hover: hover) and (pointer: fine){ .btn-text:hover::after{ transform: scaleX(1); } }
.field .btn-text{ color: var(--on-field); }
.field .btn-text::after{ background: var(--accent); }

.btn-row{ display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

@media (hover: hover) and (pointer: fine){
  .btn:hover{ background: #ffd62e; }
  .btn-ghost:hover{ background: transparent; }
}

/* ===========================================================================
   Portada
   =========================================================================== */

.hero{ padding-top: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: clamp(3.5rem, 8vw, 7rem); }
.hero .grid{ row-gap: var(--s7); align-items: start; margin-top: var(--s7); }
.hero .lead{ color: var(--ink-2); margin-bottom: var(--s6); max-width: 30ch; }

/* El retrato sobre un campo plano de color: el recorte real de la foto,
   apoyado en el borde inferior. Sin máscara geométrica. */
.portrait{
  position: relative;
  background: var(--field);
  aspect-ratio: 5 / 6;
  overflow: hidden;
}
.portrait img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; object-position: 50% 100%;
}
.portrait-tag{
  position: absolute; left: 0; top: 0;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--sans); font-weight: 600; font-size: var(--small);
  padding: var(--s3) var(--s4);
  z-index: 2;
}

/* ===========================================================================
   Fila de hechos — la primera consulta gratis vive aquí, no en una franja
   =========================================================================== */

.facts{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s8) var(--gutter);
}
.fact dt{
  font-family: var(--sans);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1;
  margin-bottom: var(--s3);
}
.fact dd{ margin: 0; font-size: var(--small); color: var(--ink-2); max-width: 26ch; }
.field .fact dd{ color: var(--on-field-2); }

/* En la portada los hechos van apilados, llenando la columna junto al retrato */
.facts-stack{
  grid-template-columns: max-content 1fr;
  gap: var(--s5) var(--s5);
  align-items: baseline;
}
.facts-stack .fact{ display: contents; }
.facts-stack dt{ font-size: 1.75rem; margin-bottom: 0; }
.facts-stack dd{ max-width: 34ch; }

/* ===========================================================================
   Ramas de servicio — anchos alternos, sin tarjetas iguales, sin numeración
   =========================================================================== */

.branch{ row-gap: var(--s5); padding-block: var(--s7); align-items: start; }
.branch + .branch{ padding-top: var(--s7); }
.branch h3{
  font-size: clamp(1.375rem, 2.1vw, 1.75rem);
  margin-top: var(--s4);
}
.branch > div > p{ color: var(--ink-2); max-width: 52ch; }
.branch-mark{ font-size: 2.25rem; line-height: 1; display: block; }

/* Lo que incluye cada rama, con su precio: contenido real, no un resumen */
.branch-list{
  list-style: none; padding: 0;
  margin: var(--s5) 0 var(--s6);
  display: grid; gap: var(--s3);
  max-width: 44ch;
}
.branch-list li{
  display: flex; align-items: baseline; gap: var(--s3);
  font-size: 0.9375rem;
}
.branch-list .leader{
  flex: 1 1 auto; min-width: var(--s5);
  border-bottom: 3px dotted #d6cfb9;
  transform: translateY(-0.28em);
}
.branch-list .amount{
  flex-shrink: 0; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ===========================================================================
   La nómina — el objeto impreso de este oficio, dibujado en código
   =========================================================================== */

.payslip{
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--small);
  padding: var(--s6);
}
.payslip-head{
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s4);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--paper-3); /* taste-skill-ignore: cabecera de la nómina (data-ui) */
  margin-bottom: var(--s4);
}
.payslip-head strong{ font-family: var(--sans); font-size: 0.9375rem; letter-spacing: -0.01em; }
.payslip-head span{ color: var(--ink-3); font-size: 0.8125rem; }
.payslip table{ width: 100%; border-collapse: collapse; }
.payslip th{
  text-align: left; font-weight: 400; color: var(--ink-3);
  font-size: 0.8125rem; padding-bottom: var(--s2);
}
.payslip th:last-child, .payslip td:last-child{ text-align: right; }
.payslip td{
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--paper-2);
  font-variant-numeric: tabular-nums;
}
.payslip tr:last-child td{ border-bottom: 0; }
.payslip .row-total td{
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  padding-top: var(--s3);
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
}
.payslip .flag{
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent); /* taste-skill-ignore: marcador de rotulador, sin desenfoque */
}
.payslip-notes{ margin-top: var(--s5); display: grid; gap: var(--s3); }
.payslip-note{
  display: grid; grid-template-columns: auto 1fr; gap: var(--s3);
  align-items: start;
  font-size: 0.8125rem; color: var(--ink-2); line-height: 1.5;
}
.payslip-note b{
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 700;
  background: var(--accent); color: var(--accent-ink);
  width: 1.4rem; height: 1.4rem; border-radius: var(--pill);
  display: grid; place-items: center;
}

/* ===========================================================================
   Carta de tarifas — hojas impresas con guía de puntos
   =========================================================================== */

.menu-sheet{
  background: var(--paper-2);
  padding: clamp(var(--s6), 5vw, var(--s8));
  max-width: 940px;
}
.menu-group + .menu-group{ margin-top: var(--s8); }
.menu-group > h3{
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  margin-bottom: var(--s2);
}
.menu-group > .note{ margin-bottom: var(--s6); }

.menu-item + .menu-item{ margin-top: var(--s6); }
.menu-line{
  display: flex; align-items: baseline; gap: var(--s3);
  font-family: var(--sans); font-weight: 600;
  font-size: 1.0625rem;
}
.menu-line .leader{
  flex: 1 1 auto;
  min-width: var(--s7);
  border-bottom: 3px dotted #d6cfb9;
  transform: translateY(-0.28em);
}
.menu-line .amount{
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.menu-line .amount .std{ color: var(--ink-3); font-weight: 500; }
.menu-item p:not(.menu-line){
  font-size: var(--small); color: var(--ink-2);
  max-width: 58ch; margin-top: var(--s2);
}

/* ===========================================================================
   Pasos — lista ordenada real
   =========================================================================== */

.steps{
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s8) var(--gutter);
  counter-reset: step;
}
.steps li{ counter-increment: step; }
.steps li::before{
  content: counter(step);
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--pill);
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--sans); font-weight: 700; font-size: 0.9375rem;
  margin-bottom: var(--s4);
}
.steps h3{ font-size: 1.1875rem; margin-bottom: var(--s3); }
.steps p{ font-size: var(--small); }

/* ===========================================================================
   Carta — el "sobre mí" en primera persona
   =========================================================================== */

.letter{
  background: var(--paper-2);
  padding: clamp(var(--s6), 5vw, var(--s9));
}
.letter .prose p{ font-size: 1.125rem; line-height: 1.62; color: var(--ink); }
.letter .sign{
  margin-top: var(--s7);
  font-family: var(--sans); font-weight: 600; font-size: 1.25rem;
}
.letter .sign span{
  display: block;
  font-family: var(--text); font-weight: 400; font-size: var(--small);
  color: var(--ink-2); margin-top: var(--s1);
}

/* ===========================================================================
   Credenciales
   =========================================================================== */

.creds{ display: grid; gap: var(--s8) var(--gutter); grid-template-columns: repeat(3, minmax(0,1fr)); }
.cred h3{ font-size: 1.0625rem; margin-bottom: var(--s3); line-height: 1.25; }
.cred p{ font-size: var(--small); color: var(--ink-2); }

/* ===========================================================================
   Formularios
   =========================================================================== */

.form{ display: grid; gap: var(--s5); max-width: 620px; }
.field-row{ display: grid; gap: var(--s2); }
label, legend{
  font-family: var(--sans); font-weight: 600; font-size: 0.9375rem;
  color: var(--ink);
}
.field label, .field legend{ color: var(--on-field); }
fieldset{ border: 0; padding: 0; margin: 0; }

input, select, textarea{
  width: 100%;
  font-family: var(--text); font-size: 1rem;
  color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--edge-ink);
  border-radius: 6px;
  padding: 0.8125rem var(--s4);
  min-height: 52px;
  transition: border-color var(--t-hover) ease;
}
.field input, .field select, .field textarea{
  background: var(--field-2);
  color: var(--on-field);
  border-color: var(--edge-field);
}
input::placeholder, textarea::placeholder{ color: var(--ink-3); }
.field input::placeholder, .field textarea::placeholder{ color: #b0ac9f; }
@media (hover: hover) and (pointer: fine){ input:hover, select:hover, textarea:hover{ border-color: var(--ink-2); } }
input:focus, select:focus, textarea:focus{ border-color: var(--ink-2); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus{ border-color: var(--accent); }
textarea{ min-height: 140px; resize: vertical; line-height: 1.55; }
select{ appearance: none; background-image: none; cursor: pointer; }

.choice-row{ display: flex; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s2); }
.choice{
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--text); font-weight: 400; font-size: 1rem;
  cursor: pointer;
}
.choice input{ width: auto; min-height: 0; margin: 0; cursor: pointer; }

/* Estados del envío */
.btn[aria-busy="true"]{ pointer-events: none; }
.spinner{
  width: 1rem; height: 1rem; flex-shrink: 0;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: var(--pill);
  animation: spin 620ms linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.form-status{
  display: flex; align-items: flex-start; gap: var(--s3);
  background: var(--paper-2);
  padding: var(--s5);
  font-size: 0.9375rem; line-height: 1.55;
}
.field .form-status{ background: var(--field-2); color: var(--on-field); }
.form-status[data-tone="error"]{ background: var(--warm); color: var(--ink); }
.form-status[data-tone="error"] strong{ color: var(--ink); }
.field .form-status[data-tone="error"] .link,
.form-status[data-tone="error"] .link{
  color: var(--ink);
  text-decoration-color: var(--warm-ink);
}
.field .form-status[data-tone="error"] .link:hover,
.form-status[data-tone="error"] .link:hover{ text-decoration-color: var(--ink); }
.form-status[data-tone="error"] :focus-visible{ outline-color: var(--ink); }
.form-status .ico{ font-size: 1.125rem; line-height: 1.3; }

/* ===========================================================================
   Calculadora
   =========================================================================== */

.calc-form{
  display: grid; gap: var(--s5);
  grid-template-columns: repeat(3, minmax(0,1fr));
  align-items: start;
}
.calc-form .field-row{ min-width: 0; }
.calc-hint, .calc-form .btn, .calc-error{ grid-column: 1 / -1; }
.calc-form .btn{ justify-self: start; }
.calc-error{ color: var(--warm-ink); font-family: var(--sans); font-weight: 600; font-size: 0.9375rem; }
.field .calc-error{ color: var(--warm); }

.result-meta{
  display: flex; flex-wrap: wrap; gap: var(--s3) var(--s8);
  font-size: 0.9375rem; color: var(--on-field-2);
  margin-bottom: var(--s6);
}
.result-meta b{ font-family: var(--sans); color: var(--on-field); font-variant-numeric: tabular-nums; }

.result-grid{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--gutter); }
.result{ background: var(--field-2); padding: var(--s6); }

/* Los tres escenarios entran escalonados: se ve de dónde sale el número */
.js .results .result,
.js .results .result-meta,
.js .results .calc-notes{
  opacity: 0; transform: translateY(14px);
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.js .results.is-shown .result,
.js .results.is-shown .result-meta,
.js .results.is-shown .calc-notes{ opacity: 1; transform: none; }
.js .results.is-shown .result:nth-child(1){ transition-delay: 60ms; }
.js .results.is-shown .result:nth-child(2){ transition-delay: 130ms; }
.js .results.is-shown .result:nth-child(3){ transition-delay: 200ms; }
.js .results.is-shown .calc-notes{ transition-delay: 280ms; }
@media (prefers-reduced-motion: reduce){
  .js .results .result,
  .js .results .result-meta,
  .js .results .calc-notes{ opacity: 1; transform: none; }
}
.result.is-main{ background: var(--accent); color: var(--accent-ink); }
.result h3{ font-size: 0.9375rem; font-weight: 600; margin-bottom: var(--s4); line-height: 1.3; }
.result.is-main h3, .result.is-main .amount{ color: var(--accent-ink); }
.result .amount{
  color: var(--on-field);
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.035em; line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s3);
}
.result p{ font-size: 0.8125rem; color: var(--on-field-2); }
.result.is-main p{ color: #5a5236; }

.calc-notes{ margin-top: var(--s7); display: grid; gap: var(--s4); }
.calc-notes li{ font-size: 0.9375rem; color: var(--on-field-2); line-height: 1.55; }
.calc-notes b{ color: var(--on-field); }
.calc-notes ul{ list-style: none; padding: 0; display: grid; gap: var(--s4); }

/* ===========================================================================
   Reservas
   =========================================================================== */

.cal-holder{ position: relative; margin-top: var(--s7); scroll-margin-top: var(--s5); }
.cal-frame{ display: block; width: 100%; height: 680px; border: 0; background: var(--paper); }
.cal-skeleton{ /* se superpone al iframe mientras carga, sin impedir que cargue */
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center; gap: var(--s4);
  background: var(--paper-2);
  color: var(--ink-2); font-size: 0.9375rem;
}

/* ===========================================================================
   Páginas legales
   =========================================================================== */

.legal{ max-width: 68ch; }
.legal h2{ font-size: 1.375rem; margin: var(--s8) 0 var(--s4); }
.legal p, .legal li{ color: var(--ink-2); margin-bottom: var(--s4); }
.legal ul{ padding-left: var(--s5); }
.legal a{ color: var(--ink); text-decoration: underline; }

/* ===========================================================================
   Pie — cierre diseñado, el nombre vuelve a tamaño completo
   =========================================================================== */

.site-foot{ background: var(--field); color: var(--on-field); padding-block: var(--section) var(--s8); }
.foot-word{
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(2.5rem, 11vw, 8.5rem);
  letter-spacing: -0.045em; line-height: 0.9;
  margin-bottom: var(--s9);
}
.foot-cols{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s8) var(--gutter); }
.foot-col h2{ font-family: var(--sans); font-size: var(--small); font-weight: 600; color: var(--on-field-2); margin-bottom: var(--s4); letter-spacing: 0; }
.foot-col ul{ list-style: none; padding: 0; display: grid; gap: var(--s3); }
.foot-col a{ text-decoration: none; color: var(--on-field); transition: color var(--t-hover) ease; }
.foot-col a:hover{ color: var(--accent); }
.foot-base{ margin-top: var(--s9); display: grid; gap: var(--s4); }
.foot-base p{ font-size: 0.8125rem; color: #a5a096; max-width: 78ch; line-height: 1.55; }

/* ===========================================================================
   Movimiento
   =========================================================================== */

/* El contenido es visible por defecto. El script sólo activa la entrada. */
.js [data-rise]{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-enter) var(--ease-out),
              transform var(--t-enter) var(--ease-out);
  transition-delay: var(--rise-delay, 0ms);
}
.js [data-rise].is-in{ opacity: 1; transform: none; }
.rise-all [data-rise]{ opacity: 1 !important; transform: none !important; } /* red de seguridad si main.js no llega */

/* Transición entre páginas */
@view-transition{ navigation: auto; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .js [data-rise]{ opacity: 1; transform: none; transition: none; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .spinner{ animation-duration: 900ms !important; animation-iteration-count: infinite !important; }
  @view-transition{ navigation: none; }
}

/* ===========================================================================
   Adaptación
   =========================================================================== */

@media (max-width: 980px){
  .c-1-7, .c-1-6, .c-1-5, .c-2-6, .c-6-12, .c-7-12, .c-8-12{ grid-column: 1 / -1; }
  /* Al apilarse en una columna, las piezas necesitan su propio aire */
  .grid{ row-gap: var(--s5); }
  .branch.grid{ row-gap: var(--s4); }
  .hero .grid{ row-gap: var(--s7); }
  .facts, .steps, .creds, .result-grid, .foot-cols{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .calc-form{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lead{ max-width: 34ch; }
}

@media (max-width: 640px){
  :root{ --body: 1rem; }
  .facts, .steps, .creds, .result-grid, .foot-cols, .calc-form{ grid-template-columns: 1fr; }
  .nav-links{
    display: none;
    position: absolute; top: calc(100% - var(--s3)); right: var(--gutter); left: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-2);
    padding: var(--s3);
    z-index: 50;
  }
  .nav-links.is-open{ display: flex; }
  .nav-links a{ padding: var(--s4); font-size: 1.0625rem; }
  .nav-links a[aria-current="page"]{ box-shadow: none; background: var(--paper-3); } /* taste-skill-ignore: quita la sombra, no la añade */
  .menu-toggle{ display: block; }
  .btn{ width: 100%; }
  .btn-row .btn{ width: 100%; }
  .portrait{ aspect-ratio: 1 / 1; }
  .menu-line{ flex-wrap: wrap; }
  .menu-line .leader{ display: none; }
  .menu-line .amount{ width: 100%; margin-top: var(--s1); color: var(--ink-2); }
  .payslip{ padding: var(--s5); font-size: 0.8125rem; }
}

/* ---------------------------------------------------------------
   Utilidades (sustituyen a los antiguos style="" en línea).
   Llevan !important para conservar la prioridad que tenía el estilo en línea.
   --------------------------------------------------------------- */
.u-mt3{ margin-top: var(--s3) !important; }
.u-mt4{ margin-top: var(--s4) !important; }
.u-mt5{ margin-top: var(--s5) !important; }
.u-mt6{ margin-top: var(--s6) !important; }
.u-mt7{ margin-top: var(--s7) !important; }
.u-mt8{ margin-top: var(--s8) !important; }
.u-mt9{ margin-top: var(--s9) !important; }
.u-mb7{ margin-bottom: var(--s7) !important; }
.u-w11{ max-width: 11ch !important; }
.u-w12{ max-width: 12ch !important; }
.u-w13{ max-width: 13ch !important; }
.u-w14{ max-width: 14ch !important; }
.u-w15{ max-width: 15ch !important; }
.u-w16{ max-width: 16ch !important; }
.u-w17{ max-width: 17ch !important; }
.u-w34{ max-width: 34ch !important; }
.u-w36{ max-width: 36ch !important; }
.u-w38{ max-width: 38ch !important; }
.u-w40{ max-width: 40ch !important; }
.u-w42{ max-width: 42ch !important; }
.u-w44{ max-width: 44ch !important; }
.u-w46{ max-width: 46ch !important; }
.u-wnone{ max-width: none !important; }
.u-self-end{ align-self: end !important; }
.u-bg2{ background: var(--paper-2) !important; }
.u-col-2-10{ grid-column: 2 / span 10 !important; }
.u-pb-s{ padding-bottom: clamp(2rem,5vw,3rem) !important; }
.u-pb-m{ padding-bottom: clamp(2.5rem,6vw,4rem) !important; }
.u-pb-l{ padding-bottom: clamp(3rem,7vw,6rem) !important; }
.u-fs-h3{ font-size: clamp(1.375rem,2.1vw,1.75rem) !important; }
.u-label{ font-size: 1rem !important; font-family: var(--text) !important; font-weight: 700 !important; }
.u-grid-s6-end{ row-gap: var(--s6) !important; align-items: end !important; }
.u-grid-s7-end{ row-gap: var(--s7) !important; align-items: end !important; }
.u-grid-s8-start{ row-gap: var(--s8) !important; align-items: start !important; }

/* Preguntas frecuentes: lista abierta en dos columnas, sin acordeón */
.faq{ display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--s7) var(--s8); }
.faq-item h3{ font-size: 1.125rem; line-height: 1.3; text-wrap: balance; }
.faq-item p{ margin-top: var(--s3); max-width: 60ch; }
.form-status[hidden]{ display: none; } /* el display:flex anulaba el atributo hidden */

/* El menú flotante no debe tapar el elemento enfocado ni el destino de un ancla (WCAG 2.4.11) */
html{ scroll-padding-top: 96px; }
