/* Hoja comercial de kordanza.com. Reproduce el diseño de Kordanza-Platform.pdf:
   franja oscura con el titular, fondo crema con tarjetas, franja oscura de cierre.
   Es autónoma (no carga estilos.css) y respeta la CSP del sitio: Inter propia,
   sin fuentes externas, sin estilos en línea, sin imágenes incrustadas.
   Todas las medidas están en «p», la unidad del PDF (1 p = 1 px de una página
   carta a 96 ppp). En pantalla 1 p = 1,2 px; en el teléfono 1 p = 1,12 px;
   al imprimir 1 p = 1 px, que es lo que hace caber la hoja en una carta.
   Contrastes medidos (fórmula WCAG): dorado #d9a86c sobre #0b1322 = 8,6:1; gris de
   bajada #aab4c9 sobre #0b1322 = 8,9:1; rótulo ocre #8a5f23 sobre crema #f5f2ec = 5,0:1
   y sobre tarjeta #fbfaf7 = 5,4:1; texto suave #4c566f sobre crema = 6,6:1; tinta
   #17203a sobre crema = 14,4:1; texto legal #93a0ba sobre #0b1322 = 7,1:1. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/recursos/fuentes/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/recursos/fuentes/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/recursos/fuentes/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --p: 0.075rem;
  --noche: #0b1322;
  --oro: #d9a86c;
  --crema: #f5f2ec;
  --tarjeta: #fbfaf7;
  --filo: #e3dfd5;
  --tinta: #17203a;
  --suave: #4c566f;
  --rotulo: #8a5f23;
  --bajada: #aab4c9;
  --margen: clamp(1.25rem, 5vw, calc(56 * var(--p)));
  --ancho: calc(704 * var(--p));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.hoja {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: calc(12 * var(--p));
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
.hoja :where(h1, h2, h3, p, ul, ol) { margin: 0; padding: 0; }
.hoja :where(ul, ol) { list-style: none; }
.hoja :where(h1, h2, h3) { font-weight: 700; letter-spacing: -0.022em; word-spacing: 0.06em; }
.hoja :where(a) { color: inherit; }
.hoja :focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
.hoja-crema :focus-visible { outline-color: var(--tinta); }

.saltar { position: absolute; left: 1rem; top: -5rem; z-index: 10; padding: 0.75rem 1rem; background: var(--oro); color: var(--noche); font-weight: 600; border-radius: 8px; text-decoration: none; }
.saltar:focus { top: 1rem; }
#contenido:focus { outline: none; }

.hoja-papel { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.hoja-in { width: min(100% - 2 * var(--margen), var(--ancho)); margin-inline: auto; }

/* ---------- Franja de entrada ---------- */
.hoja-hero {
  padding: calc(32 * var(--p)) 0 calc(21 * var(--p));
  color: #fff;
  background:
    radial-gradient(ellipse 47% 47% at 0 0, rgba(217, 168, 108, 0.18), rgba(217, 168, 108, 0) 100%),
    radial-gradient(ellipse 28% 62% at 100% 0, rgba(60, 110, 190, 0.11), rgba(60, 110, 190, 0) 100%),
    var(--noche);
}
.hoja-franja { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1rem; }
.hoja-marca { display: flex; align-items: center; gap: calc(12 * var(--p)); font-size: calc(10.5 * var(--p)); font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: #eef0f4; }
.hoja-logo { width: calc(27 * var(--p)); height: calc(27 * var(--p)); flex: none; overflow: visible; }
.hoja-logo .logo-marco { fill: none; stroke: var(--oro); stroke-width: 2.4; }
.hoja-logo .logo-k { fill: none; stroke: #eef0f4; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.hoja-logo .logo-nodo { fill: var(--oro); }

.hoja-pdf {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.5rem 0.95rem;
  border: 1px solid #66779a; border-radius: 999px; background: rgba(255, 255, 255, 0.04);
  color: #dfe5f1; font-size: calc(11.5 * var(--p)); font-weight: 600; letter-spacing: 0.01em; line-height: 1.25; text-decoration: none;
}
.hoja-pdf svg { width: 1rem; height: 1rem; flex: none; fill: none; stroke: var(--oro); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hoja-pdf-peso { font-weight: 400; color: var(--bajada); }
.hoja-pdf:hover { border-color: var(--oro); color: #fff; }

.hoja-hero h1 {
  margin-top: calc(24 * var(--p));
  max-width: 11.5em;
  font-size: calc(29.5 * var(--p));
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
}
.hoja-hero h1 em { font-style: normal; color: var(--oro); }
.hoja-bajada { margin-top: calc(13 * var(--p)); max-width: 40em; font-size: calc(13 * var(--p)); line-height: 1.55; color: var(--bajada); }
.hoja-pildoras { display: flex; flex-wrap: wrap; gap: calc(9 * var(--p)); margin-top: calc(17 * var(--p)); }
.hoja-pildoras li {
  padding: calc(6 * var(--p)) calc(15 * var(--p)); border: 1px solid #27344e; border-radius: 999px; background: rgba(255, 255, 255, 0.025);
  font-size: calc(8.8 * var(--p)); font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bajada);
}

/* ---------- Fondo crema ---------- */
.hoja-crema { flex: 1 0 auto; padding: calc(24 * var(--p)) 0 calc(12 * var(--p)); }
.hoja-seccion + .hoja-seccion { margin-top: calc(31 * var(--p)); }
.hoja-rotulo { font-size: calc(8.8 * var(--p)); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rotulo); line-height: 1.4; }
.hoja-seccion h2:not(.hoja-rotulo) { margin-top: calc(7 * var(--p)); font-size: calc(15.4 * var(--p)); line-height: 1.25; max-width: 44em; letter-spacing: -0.028em; }
.hoja-parrafo { margin-top: calc(6 * var(--p)); max-width: 62em; color: var(--suave); }

.hoja-modulo { font-size: calc(8.6 * var(--p)); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rotulo); line-height: 1.4; }
.hoja-tarjeta { background: var(--tarjeta); border: 1px solid var(--filo); border-radius: calc(10 * var(--p)); padding: calc(14 * var(--p)) calc(12 * var(--p)) calc(14 * var(--p)); min-width: 0; }
.hoja-tarjeta h3 { margin-top: calc(7 * var(--p)); font-size: calc(13.1 * var(--p)); line-height: 1.25; color: var(--tinta); }
.hoja-tarjeta h3 + p { margin-top: calc(6 * var(--p)); color: var(--suave); font-size: calc(10.8 * var(--p)); line-height: 1.55; }
.hoja-tarjeta-tope { border-top: calc(3 * var(--p)) solid var(--tinta); }
.hoja-tarjeta-tope.hoja-tarjeta-oro { border-top-color: var(--rotulo); }
.hoja-tarjeta-lado { padding-bottom: calc(11 * var(--p)); border-left: calc(3.5 * var(--p)) solid var(--rotulo); padding-left: calc(12 * var(--p)); }

/* El pedido: cuatro tarjetas unidas por flechas */
.hoja-flujo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr) calc(15 * var(--p))) minmax(0, 1fr); align-items: center; gap: 0 calc(6 * var(--p)); margin-top: calc(17 * var(--p)); }
.hoja-flujo .hoja-tarjeta { align-self: stretch; }
.hoja-flecha { display: flex; align-items: center; justify-content: center; width: calc(15 * var(--p)); }
.hoja-flecha svg { width: 100%; height: auto; fill: none; stroke: var(--rotulo); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Lo que un sistema genérico no cubre */
.hoja-brechas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(17 * var(--p)); margin-top: calc(15 * var(--p)); }

/* Control y propiedad */
.hoja-control { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(20 * var(--p)); margin-top: calc(12 * var(--p)); padding-top: calc(10 * var(--p)); border-top: 1px solid var(--filo); }
.hoja-control h3 { font-size: calc(12.5 * var(--p)); line-height: 1.3; }
.hoja-control p { margin-top: calc(4 * var(--p)); color: var(--suave); font-size: calc(11 * var(--p)); line-height: 1.5; }

/* ---------- Franja de cierre ---------- */
.hoja-pie { padding: calc(20 * var(--p)) 0 calc(16 * var(--p)); background: var(--noche); color: #fff; }
.hoja-pie-fila { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem calc(20 * var(--p)); }
.hoja-pie-contacto { flex: 1 1 auto; }
.hoja-pie-texto { color: var(--bajada); font-size: calc(11.5 * var(--p)); line-height: 1.55; max-width: 30em; }
.hoja-vias { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem calc(16 * var(--p)); margin-top: calc(8 * var(--p)); }
.hoja-correo { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: calc(16 * var(--p)); font-weight: 700; letter-spacing: -0.015em; color: #fff; text-decoration: none; }
.hoja-correo:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.hoja-wa {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.4rem 0.95rem;
  border: 1px solid #66779a; border-radius: 999px; color: #dfe5f1; font-size: calc(11 * var(--p)); font-weight: 600; text-decoration: none;
}
.hoja-wa span { font-weight: 400; color: var(--bajada); }
.hoja-wa:hover { border-color: var(--oro); color: #fff; }
.hoja-pie-firma { flex: none; display: flex; flex-direction: column; gap: 0; text-align: right; color: var(--bajada); font-size: calc(10.5 * var(--p)); line-height: 1.6; }
.hoja-pie-linea { display: block; }
.hoja-pie-dominios strong { color: var(--oro); font-weight: 700; }
.hoja-pie-dominios a { text-decoration: none; }
.hoja-pie-dominios a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.hoja-legal { margin-top: calc(12 * var(--p)); padding-top: calc(8 * var(--p)); border-top: 1px solid #1f2b44; color: #93a0ba; font-size: calc(9.5 * var(--p)); line-height: 1.5; }
.hoja-legal a { color: #b4bfd5; text-underline-offset: 0.2em; }

/* ---------- Intermedio y teléfono ---------- */
@media (max-width: 52rem) {
  .hoja-flujo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .hoja-flecha { display: none; }
  .hoja-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  :root { --p: 0.07rem; }
  .hoja-hero h1 { max-width: none; }
  .hoja-tarjeta h3 + p, .hoja-control p { font-size: 0.875rem; }
  .hoja-modulo, .hoja-rotulo, .hoja-pildoras li { font-size: 0.72rem; }
  .hoja-legal { font-size: 0.75rem; }
  .hoja-seccion h2:not(.hoja-rotulo), .hoja-prueba h2 { font-size: 1.2rem; }
  .hoja-pie-dominios a, .hoja-legal a { display: inline-block; padding: 0.6rem 0; }
  .hoja-seccion + .hoja-seccion { margin-top: 1.75rem; }
  .hoja-tarjeta h3, .hoja-control h3 { font-size: 1.0625rem; }
  .hoja-pie-texto { font-size: 0.9rem; }
  .hoja-pie-firma { font-size: 0.8rem; }
  .hoja-flujo { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hoja-flecha { display: flex; width: auto; height: calc(22 * var(--p)); }
  .hoja-flecha svg { width: calc(15 * var(--p)); transform: rotate(90deg); }
  .hoja-brechas, .hoja-control { grid-template-columns: minmax(0, 1fr); }
  .hoja-brechas { gap: 0.75rem; }
  .hoja-control { gap: calc(18 * var(--p)); }
  .hoja-pie-fila { flex-direction: column; align-items: flex-start; }
  .hoja-pie-firma { text-align: left; max-width: none; }
  .hoja-correo { font-size: 1.15rem; }
  .hoja-pdf, .hoja-wa { font-size: 0.85rem; }
}

/* ---------- Impresión: una página carta como el PDF ---------- */
@page { size: letter; margin: 0; }
@media print {
  :root { --p: 1px; --margen: 56px; }
  html { font-size: 16px; }
  body.hoja { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hoja-papel { min-height: 100vh; }
  .hoja-pdf, .saltar { display: none; }
  .hoja-wa { min-height: 0; padding: calc(3 * var(--p)) calc(11 * var(--p)); font-size: calc(9.5 * var(--p)); }
  .hoja-vias { margin-top: calc(6 * var(--p)); }
  .hoja-correo { min-height: 0; }
  .hoja-hero, .hoja-tarjeta { break-inside: avoid; }
  .hoja-flujo { grid-template-columns: repeat(3, minmax(0, 1fr) calc(15 * var(--p))) minmax(0, 1fr); gap: 0 calc(6 * var(--p)); }
  .hoja-flecha { display: flex; }
  .hoja-brechas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hoja-control { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hoja-pie-fila { flex-direction: row; align-items: flex-end; }
  .hoja-pie-firma { text-align: right; }
}
