/* ============================================================
   K-mer Labs — hoja de estilos
   La misma base que alangomezforero.com.ar: sin frameworks, tokens en
   :root, tema claro/oscuro con override. La identidad sale de la tarjeta:
   rojo #8E1322, tinta #231F20, serif en los títulos y una sans de corte
   DIN para todo lo demás.
   ============================================================ */

/* ---------- Tipografías ---------- */
/* La tarjeta usa Sitka Heading y Bahnschrift, que vienen con Windows y no
   tienen licencia para web. Source Serif 4 y Barlow son las libres más
   parecidas. Se sirven desde el sitio: ninguna visita le pide nada a Google. */
@font-face {
    font-family: "Source Serif 4";
    src: url("fonts/source-serif-4-var.woff2") format("woff2");
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Source Serif 4";
    src: url("fonts/source-serif-4-italic-400.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Barlow";
    src: url("fonts/barlow-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Barlow";
    src: url("fonts/barlow-500.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Barlow";
    src: url("fonts/barlow-600.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

/* IBM Plex Mono, para lo que en un sistema serían datos: rótulos, números y
   códigos. Es la pieza que le da al sitio el aire de instrumento. */
@font-face {
    font-family: "IBM Plex Mono";
    src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

/* ---------- Tokens: tema claro (base) ---------- */
:root {
    color-scheme: light;   /* barras de scroll y controles nativos del mismo tema */

    --paper: #ffffff;
    --paper-raised: #ffffff;
    --paper-sunken: #f6f3f2;
    --ink: #231f20;
    --ink-soft: #4a4446;
    --ink-muted: #6f6769;
    --rule: #e7e2e1;
    --rule-strong: #cfc8c7;
    --accent: #8e1322;
    --accent-hover: #6f0e1a;
    --accent-wash: #f7eced;
    --on-accent: #ffffff;
    --shadow: 0 1px 2px rgba(35, 31, 32, .05), 0 8px 24px -12px rgba(35, 31, 32, .12);

    /* El logo: en claro, los colores exactos de la tarjeta */
    --mark-red: #8e1322;
    --mark-line: #231f20;

    /* El rojo de fondo del dorso de la tarjeta: no cambia con el tema. Lo usan el
       contacto y el botón principal; --accent, que sí cambia, queda para texto. */
    --brand: #8e1322;
    --brand-hover: #6f0e1a;

    /* Árbol familiar: el lenguaje canónico es blanco y negro */
    --ped-line: #4a4446;
    --ped-fill: #231f20;

    /* La retícula de fondo y las líneas de construcción del logo */
    --grid: rgba(35, 31, 32, .07);
    --guide: rgba(35, 31, 32, .32);

    /* Esquinas casi rectas, como el cuadrado del logo */
    --radius: 2px;

    --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --measure: 66ch;
    --gutter: clamp(1rem, 5vw, 3rem);

    /* Movimiento: una curva y dos duraciones para todo el sitio. El logo
       del inicio tiene sus propios tiempos, trazo por trazo (index.html). */
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --dur-quick: 150ms;   /* respuesta a un gesto: hover, foco */
    --dur-base: 300ms;    /* cambio de estado */
}

/* ---------- Tokens: tema oscuro por preferencia del sistema ---------- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --paper: #141213;
        --paper-raised: #1d1a1b;
        --paper-sunken: #0f0d0e;
        --ink: #f3eeee;
        --ink-soft: #cdc5c6;
        --ink-muted: #968d8f;
        --rule: #332e30;
        --rule-strong: #4b4446;
        --accent: #e8828c;
        --accent-hover: #f09ba3;
        --accent-wash: #2b1a1d;
        --on-accent: #1c0a0d;
        --brand-hover: #a81b2e;   /* en oscuro el hover aclara */
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);

        /* el rojo de la tarjeta se pierde sobre negro: sube un poco, sin irse al rosa */
        --mark-red: #c23345;
        --mark-line: #f3eeee;

        --ped-line: #cdc5c6;
        --ped-fill: #f3eeee;

        --grid: rgba(243, 238, 238, .06);
        --guide: rgba(243, 238, 238, .3);
    }
}

/* ---------- Tokens: tema oscuro por elección explícita ---------- */
:root[data-theme="dark"] {
    color-scheme: dark;

    --paper: #141213;
    --paper-raised: #1d1a1b;
    --paper-sunken: #0f0d0e;
    --ink: #f3eeee;
    --ink-soft: #cdc5c6;
    --ink-muted: #968d8f;
    --rule: #332e30;
    --rule-strong: #4b4446;
    --accent: #e8828c;
    --accent-hover: #f09ba3;
    --accent-wash: #2b1a1d;
    --on-accent: #1c0a0d;
    --brand-hover: #a81b2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);

    --mark-red: #c23345;
    --mark-line: #f3eeee;

    --ped-line: #cdc5c6;
    --ped-fill: #f3eeee;

    --grid: rgba(243, 238, 238, .06);
    --guide: rgba(243, 238, 238, .3);
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Peso 400-500 como el nombre de la tarjeta: la serif se sostiene sola */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.015em;
    margin: 0;
    text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }   /* que un #ancla no quede bajo la barra */

/* Sin transiciones en vez de transiciones cortas, y las animaciones corren
   una sola vez y sin demora: con la demora intacta, lo que se dibuja por
   partes (el logo del inicio) quedaría invisible hasta que le toque. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }
}

/* ---------- Layout ---------- */
.wrap {
    width: 100%;
    max-width: 66rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 46rem; }

.section { padding-block: clamp(4rem, 10vw, 7rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section--sunken { background: var(--paper-sunken); }

/* El rótulo en mayúsculas espaciadas es el de la tarjeta, en mono, numerado
   y con una línea fina hasta el borde: «01 / QUÉ HACEMOS ———». El número lo
   pone un contador, así que reordenar secciones no obliga a renumerar. El
   rótulo de la portada no está en una .section y no lleva número. */
.section__label {
    display: flex;
    align-items: center;
    gap: .9rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 1.1rem;
}

.section__label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

body { counter-reset: seccion; }

.section .section__label::before {
    counter-increment: seccion;
    content: counter(seccion, decimal-leading-zero) " /";
    color: var(--accent);
}

.section__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.2rem;
    color: var(--ink-soft);
    max-width: var(--measure);
}

/* ---------- Logo chico (barra y pie) ---------- */
/* Usa el <symbol> del principio del body. A este tamaño el trazo de la
   tarjeta quedaría en medio píxel, por eso --mark-stroke lo engrosa. */
.brand-mark {
    --mark-stroke: 5;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
}

/* ---------- Navegación ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}

.nav__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--ink);
    text-decoration: none;
}

.nav__brand:hover { color: var(--ink); }

.nav__right { display: flex; align-items: center; gap: .35rem; }

.nav__links { display: flex; align-items: center; gap: 1.75rem; margin-right: .75rem; }

.nav__links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
}

.nav__links a:hover { color: var(--accent); }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out);
}

.icon-btn:hover { background: var(--paper-sunken); color: var(--ink); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }

/* El icono del toggle depende del tema activo */
.icon-sun { display: none; }
.icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-sun { display: block; }
    :root:not([data-theme="light"]) .icon-moon { display: none; }
}

:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

.nav__toggle { display: none; }

.nav__mobile {
    display: none;
    border-top: 1px solid var(--rule);
    padding-block: .5rem 1rem;
}

.nav__mobile.is-open { display: block; }

.nav__mobile a {
    display: block;
    padding: .7rem .25rem;
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--rule);
}

.nav__mobile a:last-child { border-bottom: 0; }

/* Con cinco enlaces el menú deja de entrar en una línea cerca de los 860px */
@media (max-width: 54rem) {
    .nav__links { display: none; }
    .nav__toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    isolation: isolate;
    padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

/* La retícula de fondo: fina y concentrada alrededor del logo; hacia el texto
   se desvanece para no competir con la lectura */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 2.5rem 2.5rem;
    background-position: center;
    -webkit-mask-image: radial-gradient(ellipse 55% 80% at 78% 50%, #000 25%, transparent 72%);
    mask-image: radial-gradient(ellipse 55% 80% at 78% 50%, #000 25%, transparent 72%);
}

@media (max-width: 46rem) {
    .hero::before {
        -webkit-mask-image: radial-gradient(ellipse 70% 40% at 15% 12%, #000 20%, transparent 70%);
        mask-image: radial-gradient(ellipse 70% 40% at 15% 12%, #000 20%, transparent 70%);
    }
}

/* El texto a la izquierda y el logo grande a la derecha, que se dibuja
   solo. En el celular el logo va arriba, chico, como en la tarjeta. */
.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.hero .section__label { color: var(--ink); }

.hero__title {
    font-size: clamp(2.1rem, 5.6vw, 3.7rem);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -.02em;
    margin-bottom: 1.5rem;
}

.hero .lead { margin-bottom: 2.25rem; }

.hero__mark {
    display: block;
    width: clamp(11rem, 26vw, 18.5rem);
    height: auto;
    overflow: visible;
}

@media (max-width: 46rem) {
    .hero__grid { grid-template-columns: minmax(0, 1fr); }
    .hero__mark { order: -1; width: 5.5rem; }
}

/* ---------- Logo del inicio, trazo por trazo ---------- */
/* pathLength="1" en cada trazo: un guion de largo 1 lo cubre entero y
   correrlo de 1 a 0 lo dibuja de punta a punta. Primero el marco, después
   el eje y al final las dos curvas de la K. --d es cuándo empieza cada
   pieza y --t cuánto tarda. Sin animación se ve entero. */
.hero__mark .mk-frame,
.hero__mark .mk-axis {
    fill: none;
    stroke-width: 1.9;
    stroke-dasharray: 1;
    animation: mark-draw var(--t, .8s) var(--ease-out) var(--d, 0s) both;
}

.hero__mark .mk-frame { stroke: var(--mark-red); }
.hero__mark .mk-axis { stroke: var(--mark-line); }

.hero__mark .mk-fill {
    fill: var(--mark-red);
    animation: mark-ink var(--t, .6s) var(--ease-out) var(--d, 0s) both;
}

/* La construcción aparece primero y el logo se dibuja encima. En el celular,
   con el logo chico, las guías sobran. */
.hero__mark .mk-guide {
    fill: none;
    stroke: var(--guide);
    stroke-width: .3;
    animation: mark-ink .9s var(--ease-out) both;
}

.hero__mark .mk-guide--dash { stroke-dasharray: 1.2 1.2; }

@media (max-width: 46rem) {
    .hero__mark .mk-guide { display: none; }
}

@keyframes mark-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mark-ink { from { opacity: 0; } }

/* ---------- La franja del nombre: un k-mer recorriendo la secuencia ---------- */
.kmer {
    border-block: 1px solid var(--rule);
    padding-block: clamp(2rem, 5vw, 2.75rem);
}

.kmer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem clamp(2rem, 5vw, 4rem);
}

/* Cada base ocupa una celda fija, así la ventana avanza de a una base
   exacta. --n es cuántas bases se ven y --steps las posiciones de la
   ventana (n - k + 1); van por separado porque steps() no acepta calc()
   en todos los navegadores. Las bases que sobran quedan recortadas. */
.kmer__seq {
    --cell: 1.45em;
    --k: 5;
    --n: 16;
    --steps: 12;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-shrink: 0;
    width: calc(var(--n) * var(--cell));
    overflow: hidden;
    padding-top: 1.8em;   /* lugar para el rótulo «k = 5» */
    font-family: var(--font-mono);
    font-size: clamp(.75rem, 3.6vw, 1rem);
    color: var(--ink-soft);
}

.kmer__seq > span:not(.kmer__win) {
    flex: 0 0 var(--cell);
    text-align: center;
    line-height: 2.3;
}

/* La ventana va detrás de las letras para no taparlas */
.kmer__win {
    position: absolute;
    z-index: -1;
    left: 0;
    top: 1.8em;
    bottom: 0;
    width: calc(var(--k) * var(--cell));
    border: 1.5px solid var(--accent);
    border-radius: 1px;
    background: var(--accent-wash);
    animation: kmer-slide calc(var(--steps) * .6s) steps(var(--steps), jump-none) infinite;
}

.kmer__k {
    position: absolute;
    bottom: 100%;
    left: -1.5px;
    margin-bottom: .35em;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
}

@keyframes kmer-slide { to { translate: calc((var(--n) - var(--k)) * var(--cell)) 0; } }

@media (min-width: 46rem) {
    .kmer__seq { --n: 24; --steps: 20; }
}

.kmer__def {
    flex: 1 1 18rem;
    margin: 0;
    font-size: .95rem;
    color: var(--ink-muted);
    max-width: 42ch;
}

.kmer__def dfn {
    font-family: var(--font-display);
    font-style: normal;
    font-size: 1.1rem;
    color: var(--ink);
}

/* ---------- Botones ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.4rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--dur-quick) var(--ease-out), border-color var(--dur-quick) var(--ease-out),
        color var(--dur-quick) var(--ease-out);
}

.btn svg { width: 1.05em; height: 1.05em; flex-shrink: 0; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }

.btn--ghost { border-color: var(--rule-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--paper-sunken); color: var(--ink); border-color: var(--ink-muted); }

/* ---------- Servicios ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.card {
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* El número va en el rojo de la tarjeta, como los rótulos CEL / MAIL / WEB */
.card__num {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .14em;
    color: var(--accent);
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.card h3 { font-size: 1.35rem; }

.card p { font-size: 1rem; color: var(--ink-soft); margin: 0; }

.card__stack {
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px solid var(--rule);
    font-size: .92rem;
    line-height: 1.55;
}

/* «YA CONSTRUIDO» como rótulo de ficha técnica, y abajo la prueba en letra normal */
.card__meta {
    display: block;
    margin-bottom: .35rem;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}

.card .card__stack { color: var(--ink-muted); }

/* ---------- Para quién ---------- */
/* Cuatro columnas en la pantalla ancha, cada una bajo una línea roja corta,
   como la de la tarjeta de imprenta */
.audience {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
    gap: 2rem clamp(1.5rem, 3vw, 2.25rem);
}

.audience li {
    padding-top: 1.25rem;
    border-top: 2px solid var(--accent);
}

.audience h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.audience p { margin: 0; font-size: 1rem; color: var(--ink-soft); }

/* ---------- La herramienta: constructor de árboles ---------- */
.tool {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 4.5rem);
    align-items: center;
}

@media (max-width: 46rem) {
    .tool { grid-template-columns: minmax(0, 1fr); }
}

.tool .lead { margin-bottom: 2rem; }

.tool__figure {
    margin: 0;
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: var(--shadow);
}

.ped { display: block; width: 100%; height: auto; }

.ped .tr {
    fill: none;
    stroke: var(--ped-line);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ped .tf { fill: var(--ped-fill); stroke: var(--ped-line); stroke-width: 1.4; }
.ped .tc { fill: var(--ped-line); }
.ped .tr--accent { stroke: var(--accent); stroke-width: 1.6; }
.ped .tf--accent { fill: var(--accent); stroke: none; }

.ped .tl {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    fill: var(--ink-muted);
    text-anchor: middle;
}

.ped .tl--proband { fill: var(--accent); font-weight: 600; }

/* Leyenda de símbolos: para leer el árbol de al lado */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin: 1.25rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--rule);
    font-size: .8rem;
    color: var(--ink-muted);
    list-style: none;
}

.legend li { display: flex; align-items: center; gap: .4rem; }
.legend svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- Cómo trabajamos ---------- */
/* Los pasos: el número en el margen, en el renglón del título */
.steps {
    list-style: none;
    margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    gap: clamp(2rem, 5vw, 2.75rem) clamp(2rem, 5vw, 3.5rem);
    counter-reset: paso;
}

.steps__item {
    counter-increment: paso;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 1rem;
}

.steps__item > * { grid-column: 2; }

.steps__item::before {
    content: counter(paso, decimal-leading-zero);
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.75rem;   /* el renglón del título, para que compartan línea */
    color: var(--accent);
}

.steps__item h3 { font-size: 1.3rem; line-height: 1.35; margin-bottom: .5rem; }
.steps__item p { color: var(--ink-soft); }

/* ---------- Seguridad y datos: la franja oscura ---------- */
/* Tinta de la tarjeta de fondo, con colores fijos: en el tema oscuro sigue
   siendo un poco más clara que el papel, así que se distingue igual. */
.section--ink {
    background-color: #231f20;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 2.5rem 2.5rem;
    background-position: center top;
    color: #f3eeee;
}

.section + .section--ink,
.section--ink + .section { border-top: 0; }

.section--ink .section__label { color: #b8adaf; }
.section--ink .section__label::before { color: #e8828c; }
.section--ink .section__label::after { background: rgba(255, 255, 255, .14); }
.section--ink .section__title { color: #fff; }
.section--ink .lead { color: #d9d0d1; }
.section--ink :focus-visible { outline-color: #fff; }

.practices {
    list-style: none;
    margin: clamp(2.5rem, 6vw, 3.25rem) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 1.75rem clamp(2rem, 5vw, 3rem);
}

/* el tilde al margen, a la altura del título */
.practices li {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    column-gap: .85rem;
    align-items: start;
    align-content: start;   /* sin esto, el ítem corto reparte el alto de su vecino entre sus filas */
}

.practices svg {
    grid-row: 1 / span 2;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: .2rem;
    color: #e8828c;
}

.practices h3 { font-size: 1.2rem; color: #fff; margin-bottom: .3rem; }
.practices p { margin: 0; font-size: 1rem; color: #cbc2c3; }

.compliance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 2rem clamp(2rem, 6vw, 4rem);
    margin-top: clamp(3rem, 7vw, 4rem);
    padding-top: 2.25rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.compliance h3 {
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #b8adaf;
    margin-bottom: .85rem;
}

.compliance p { color: #d9d0d1; margin-bottom: 1rem; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }

.tags li {
    padding: .3rem .85rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 500;
    color: #f3eeee;
}

/* ---------- Quién ---------- */
.profile {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
}

@media (max-width: 46rem) {
    .profile { grid-template-columns: 1fr; }
}

.profile p { color: var(--ink-soft); }
.profile .lead { color: var(--ink); }

.facts {
    list-style: none;
    margin: 0;
    padding: 1.5rem;
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-size: .95rem;
}

.facts li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-block: .55rem;
    border-bottom: 1px solid var(--rule);
}

.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts .k {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.facts .v { font-weight: 600; text-align: right; }

/* ---------- Contacto: el dorso de la tarjeta ---------- */
.contact {
    background: var(--brand);
    color: #fff;
}

.section + .contact { border-top: 0; }

.contact .section__label { color: rgba(255, 255, 255, .75); }
.contact .section__label::before { color: #fff; }
.contact .section__label::after { background: rgba(255, 255, 255, .3); }
.contact .section__title { color: #fff; }
.contact .lead { color: rgba(255, 255, 255, .88); margin-bottom: 2rem; }

/* Sobre el rojo el foco rojo no se ve */
.contact :focus-visible { outline-color: #fff; }

.contact__mail {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4.5vw, 2.4rem);
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, .5);
    padding-bottom: .15rem;
    overflow-wrap: anywhere;
}

.contact__mail:hover { color: #fff; border-bottom-color: #fff; }

.contact__phone {
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, .88);
}

.contact__phone a { color: #fff; font-weight: 600; }
.contact__phone a:hover { color: #fff; }

.contact .btn-row { margin-top: 2.25rem; }

.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { background: #f3e4e6; color: var(--brand); }

.btn--outline-light { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }

/* ---------- Pie ---------- */
/* La marca a la izquierda y tres columnas; en el celular la marca ocupa la
   fila de arriba y las columnas quedan de a dos */
.foot {
    padding-block: clamp(3rem, 7vw, 4rem) 2rem;
    font-size: .92rem;
    color: var(--ink-muted);
}

.foot__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2rem clamp(1.5rem, 4vw, 3rem);
}

@media (max-width: 46rem) {
    .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot__grid > :first-child { grid-column: 1 / -1; }
}

.foot__brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 600;
}

.foot__tag { margin: .9rem 0 0; line-height: 1.55; }

.foot__h {
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0 0 .85rem;
}

.foot__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot__list a { overflow-wrap: anywhere; }

.foot a { color: var(--ink-muted); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }

.foot__legal {
    margin: clamp(2rem, 5vw, 3rem) 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: .74rem;
}

/* ---------- Página legal ---------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.35rem; margin: 2.5rem 0 .75rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.25rem; margin: 0 0 1.15em; }
.prose li + li { margin-top: .35rem; }
.prose__date { font-size: .9rem; color: var(--ink-muted); }

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

.skip-link {
    position: absolute;
    left: .5rem;
    top: -3rem;
    z-index: 100;
    background: var(--accent);
    color: var(--on-accent);
    padding: .55rem 1rem;
    border-radius: .4rem;
    text-decoration: none;
    transition: top var(--dur-quick) var(--ease-out);
}

.skip-link:focus { top: .5rem; color: var(--on-accent); }

/* ---------- Aparición al bajar ---------- */
/* Lo que está más abajo sube y se aclara al entrar en pantalla. Lo maneja el
   scroll, no un reloj: termina cuando el elemento ya subió un quinto de la
   pantalla y un enlace a #quien llega con la sección completa. Sin soporte
   (Firefox, por ahora), con movimiento reducido o al imprimir, todo está
   quieto desde el principio. */
@supports (animation-timeline: view()) {
    @media screen and (prefers-reduced-motion: no-preference) {
        .section .section__label,
        .section .section__title,
        .section .lead,
        .audience li,
        .facts,
        .steps__item,
        .tool__figure,
        .card {
            animation: rise var(--ease-out) both;
            animation-timeline: view();   /* después del atajo: animation lo resetea */
            animation-range: cover 0% cover 20%;
        }

        /* las piezas de una misma fila, escalonadas */
        .card:nth-child(even),
        .steps__item:nth-child(even) { animation-range: cover 3% cover 23%; }
    }
}

@keyframes rise { from { opacity: 0; translate: 0 1.5rem; } }
