/* ============================================================
   BITS · PÁGINAS DE VERTICAL
   ------------------------------------------------------------
   Un solo archivo para los dos mundos. Aquí sí puede vivir el
   tema en un atributo global, porque cada vertical es su propio
   documento: [data-mundo="sec"] o [data-mundo="dev"] en <html>.

   Todo lo demás —retícula, escalas, componentes— es común. Lo
   único que cambia entre mundos es el bloque de tokens y el
   elemento firma del hero.
   ============================================================ */

   :root {
    --h: 266;                       /* #430098 */
    --brand: hsl(var(--h) 100% 30%);

    --font-display: "Archivo", "Helvetica Neue", sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", "Courier New", monospace;

    --fs-hero: clamp(2.4rem, 5vw, 4.2rem);
    --fs-h2: clamp(1.6rem, 3vw, 2.35rem);
    --fs-h3: clamp(1.1rem, 1.7vw, 1.35rem);
    --fs-micro: .72rem;

    --gutter: clamp(1.25rem, 4vw, 3rem);
    --maxw: 1200px;
    --bloque: clamp(4.5rem, 9vw, 8rem);

    --r: 4px;
    --r-sm: 2px;

    --ease: 480ms cubic-bezier(.22, .78, .3, 1);
    --ease-lento: 900ms cubic-bezier(.16, .84, .44, 1);
}

/* ---------- Mundo oscuro: seguridad ---------- */
[data-mundo="sec"] {
    --bg: #14131b;
    --elev-1: #1a1823;
    --elev-2: #22202d;
    --text: #e7e5ee;
    --muted: #a09bad;
    --dim: #6d6879;
    --line: hsl(var(--h) 26% 60% / .17);
    --line-fuerte: hsl(var(--h) 30% 64% / .34);
    --accent: hsl(var(--h) 88% 68%);
    --accent-on: #14131b;
    --sombra: 0 24px 60px -24px rgba(0, 0, 0, .8);
    --grid: hsl(var(--h) 30% 60% / .05);
}

/* ---------- Mundo claro: desarrollo ---------- */
[data-mundo="dev"] {
    --bg: #eceaf1;
    --elev-1: #f4f3f8;
    --elev-2: #e4e1ea;
    --text: #191823;
    --muted: #56525f;
    --dim: #8b8794;
    --line: hsl(var(--h) 14% 40% / .18);
    --line-fuerte: hsl(var(--h) 18% 38% / .32);
    --accent: var(--brand);
    --accent-on: #ffffff;
    --sombra: 0 24px 60px -28px hsl(var(--h) 40% 20% / .3);
    --grid: hsl(var(--h) 20% 40% / .06);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1vw, 1.05rem);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.025em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-on); }

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

.contenedor {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.bloque { padding-block: var(--bloque); position: relative; z-index: 2; }

/* Retícula de fondo, común a los dos mundos */
.reticula {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 76px 76px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 62%);
    mask-image: linear-gradient(180deg, #000, transparent 62%);
}

/* ---------- Encabezado de sección ---------- */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--accent);
}

.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }

.cabeza { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.cabeza h2 { font-size: var(--fs-h2); margin: 1rem 0 .9rem; text-wrap: balance; }
.cabeza p { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--ease), color var(--ease),
                border-color var(--ease), gap var(--ease);
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn--solido { background: var(--accent); color: var(--accent-on); }
.btn--solido:hover { filter: brightness(1.1); gap: 1rem; }

.btn--linea { border-color: var(--line-fuerte); color: var(--text); }
.btn--linea:hover { border-color: var(--accent); color: var(--accent); gap: 1rem; }

/* ============================================================
   BARRA SUPERIOR
   ============================================================ */
.barra {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .9rem var(--gutter);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color var(--ease), background-color var(--ease);
}

.barra.pegada {
    border-bottom-color: var(--line);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.barra__marca { display: flex; align-items: center; gap: .8rem; }

.barra__marca img { height: 26px; width: auto; }

/* El logo es negro con acento violeta: sobre el mundo oscuro
   necesita invertirse el negro sin arrastrar el violeta a verde.
   Un filtro de luminosidad lo resuelve sin tocar el archivo. */
[data-mundo="sec"] .barra__marca img { filter: invert(1) hue-rotate(180deg) saturate(1.35); }

.barra__vertical {
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--dim);
    padding-left: .8rem;
    border-left: 1px solid var(--line);
}

.barra__nav { display: flex; align-items: center; gap: 1.9rem; }

.barra__nav a {
    position: relative;
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--muted);
    padding: .2rem 0;
    transition: color var(--ease);
}

.barra__nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    width: 0; height: 1.5px;
    background: var(--accent);
    transition: width var(--ease);
}

.barra__nav a:hover { color: var(--text); }
.barra__nav a:hover::after { width: 100%; }

.barra__acciones { display: flex; align-items: center; gap: .9rem; }

/* ---------- Cruce al otro mundo ---------- */
.cruce {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .85rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dim);
    transition: border-color var(--ease), color var(--ease), gap var(--ease);
}

.cruce__punto {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.cruce:hover { border-color: var(--accent); color: var(--accent); gap: .85rem; }

.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ============================================================
   HERO — común a los dos mundos
   ============================================================ */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    overflow: hidden;
}

.hero__inner { position: relative; z-index: 5; }

.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.hero__meta {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dim);
}

.hero__meta span { display: inline-flex; align-items: center; gap: .5rem; }
.hero__meta span::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 1px; }

.hero h1 { font-size: var(--fs-hero); margin: 1.5rem 0; max-width: 15ch; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }

.hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 48ch; }

.hero__cta { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2.4rem; }

.hero__creds {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.6rem;
}

.hero__cred strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.hero__cred span {
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dim);
}

/* ============================================================
   FIRMA · SEGURIDAD — el perímetro
   ============================================================ */
.perimetro { position: relative; aspect-ratio: 1; width: 100%; max-width: 30rem; margin-inline: auto; }

.perimetro canvas { width: 100%; height: 100%; display: block; }

.perimetro__hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    font-family: var(--font-mono);
    font-size: .62rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}

.perimetro__hud span { position: absolute; }
.perimetro__hud span:nth-child(1) { top: 2%;  left: 50%; transform: translateX(-50%); }
.perimetro__hud span:nth-child(2) { right: 1%; top: 50%; transform: translateY(-50%); }
.perimetro__hud span:nth-child(3) { bottom: 2%; left: 50%; transform: translateX(-50%); }
.perimetro__hud span:nth-child(4) { left: 1%;  top: 50%; transform: translateY(-50%); }

.perimetro__estado {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.perimetro__estado b {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.perimetro__estado span {
    font-family: var(--font-mono);
    font-size: .58rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ============================================================
   FIRMA · DESARROLLO — el plano
   ============================================================ */
.plano { position: relative; width: 100%; }
.plano svg { width: 100%; height: auto; display: block; overflow: visible; }

.plano__caja rect {
    fill: var(--elev-1);
    stroke: var(--line-fuerte);
    stroke-width: 1;
}

.plano__caja text {
    font-family: var(--font-mono);
    font-size: 8.5px;
    letter-spacing: .06em;
    fill: var(--text);
    text-anchor: middle;
    dominant-baseline: middle;
}

.plano__caja tspan.sub { font-size: 6.5px; fill: var(--dim); }

.plano__via { fill: none; stroke: var(--line-fuerte); stroke-width: 1; }

.plano__flujo {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.6;
    stroke-linecap: round;
}

.plano__nota {
    font-family: var(--font-mono);
    font-size: 6px;
    letter-spacing: .14em;
    text-transform: uppercase;
    fill: var(--dim);
}

/* Las cajas y las vías entran dibujándose cuando el plano es visible */
.plano__caja { opacity: 0; transform: translateY(8px); }
.plano.montado .plano__caja {
    animation: plano-caja 620ms cubic-bezier(.2, .9, .3, 1) both;
}

.plano.montado .plano__caja:nth-of-type(1) { animation-delay: 120ms; }
.plano.montado .plano__caja:nth-of-type(2) { animation-delay: 260ms; }
.plano.montado .plano__caja:nth-of-type(3) { animation-delay: 400ms; }
.plano.montado .plano__caja:nth-of-type(4) { animation-delay: 540ms; }
.plano.montado .plano__caja:nth-of-type(5) { animation-delay: 680ms; }

@keyframes plano-caja {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.plano__via { stroke-dasharray: 200; stroke-dashoffset: 200; }
.plano.montado .plano__via {
    animation: plano-via 900ms cubic-bezier(.4, 0, .2, 1) 300ms both;
}

@keyframes plano-via { to { stroke-dashoffset: 0; } }

/* ============================================================
   CAPACIDADES — índice numerado
   El número aquí sí informa: es el orden en que se abordan.
   ============================================================ */
.indice { border-top: 1px solid var(--line); }

.cap {
    display: grid;
    grid-template-columns: 74px 1fr auto;
    gap: 1.8rem;
    align-items: start;
    padding: 2rem 0;
    border-bottom: 1px solid var(--line);
    position: relative;
    transition: padding var(--ease);
}

.cap::before {
    content: "";
    position: absolute;
    left: -1.5rem; top: 0; bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--ease);
}

.cap:hover { padding-left: 1.5rem; }
.cap:hover::before { transform: scaleY(1); }

.cap__idx { font-family: var(--font-mono); font-size: .8rem; color: var(--dim); padding-top: .3rem; }
.cap__main { max-width: 62ch; }
.cap__icono { width: 24px; height: 24px; color: var(--accent); margin-bottom: .9rem; }
.cap__icono svg { width: 100%; height: 100%; }
.cap h3 { font-size: var(--fs-h3); margin-bottom: .45rem; }
.cap p { color: var(--muted); font-size: .97rem; }
.cap__flecha { color: var(--dim); padding-top: .3rem; transition: color var(--ease), transform var(--ease); }
.cap:hover .cap__flecha { color: var(--accent); transform: translateX(4px); }

@media (max-width: 720px) {
    .cap { grid-template-columns: 46px 1fr; }
    .cap__flecha { display: none; }
}

/* ============================================================
   ENFOQUE — imagen + texto
   ============================================================ */
.enfoque {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.enfoque + .enfoque { margin-top: var(--bloque); }
.enfoque--invertido .enfoque__media { order: 2; }

.enfoque__media {
    position: relative;
    border: 1px solid var(--line-fuerte);
    border-radius: var(--r);
    overflow: hidden;
    aspect-ratio: 5 / 4;
}

.enfoque__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
    transition: filter var(--ease-lento), transform var(--ease-lento);
}

.enfoque__media::before {
    content: "";
    position: absolute; inset: 0; z-index: 2;
    mix-blend-mode: color;
    background: var(--brand);
    opacity: .55;
    transition: opacity var(--ease-lento);
}

.enfoque__media:hover img { filter: grayscale(.5); transform: scale(1.025); }
.enfoque__media:hover::before { opacity: .3; }

.esquina { position: absolute; z-index: 3; width: 14px; height: 14px; border-color: var(--accent); }
.esquina--ti { top: 12px; left: 12px; border-top: 1.5px solid; border-left: 1.5px solid; }
.esquina--bd { bottom: 12px; right: 12px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.enfoque__tag {
    position: absolute;
    bottom: 12px; left: 12px; z-index: 3;
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: .1em;
    color: #fff;
    background: rgba(0, 0, 0, .58);
    padding: .3rem .6rem;
    border-radius: var(--r-sm);
    backdrop-filter: blur(4px);
}

.enfoque__body h2 { font-size: var(--fs-h2); margin: 1rem 0; }
.enfoque__body > p { color: var(--muted); margin-bottom: 1.4rem; }

.lista { list-style: none; }

.lista li {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .85rem 0;
    font-size: .97rem;
    border-top: 1px solid var(--line);
}

.lista li:last-child { border-bottom: 1px solid var(--line); }
.lista li svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--accent); }

/* ============================================================
   CIFRAS
   ============================================================ */
.cifras { background: var(--elev-1); border-block: 1px solid var(--line); }
.cifras__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.cifra { padding: clamp(2rem, 4vw, 3rem) 1.5rem; border-left: 1px solid var(--line); }
.cifra:first-child { border-left: 0; }

.cifra strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cifra span {
    display: block;
    margin-top: .6rem;
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dim);
}

@media (max-width: 620px) {
    .cifra { border-left: 0; border-top: 1px solid var(--line); }
    .cifra:first-child { border-top: 0; }
}

/* ============================================================
   PROCESO
   ============================================================ */
.pasos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    border: 1px solid var(--line);
}

.paso { padding: 2rem 1.7rem; border-right: 1px solid var(--line); }
.paso:last-child { border-right: 0; }

.paso__n {
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .12em;
    color: var(--accent);
    margin-bottom: 1.3rem;
}

.paso__n::before { content: ""; display: block; width: 30px; height: 2px; background: var(--accent); margin-bottom: 1rem; }
.paso h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.paso p { color: var(--muted); font-size: .93rem; }

@media (max-width: 700px) {
    .paso { border-right: 0; border-bottom: 1px solid var(--line); }
    .paso:last-child { border-bottom: 0; }
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto {
    border: 1px solid var(--line-fuerte);
    border-radius: var(--r);
    background: var(--elev-1);
    padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter);
}

.contacto__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contacto h2 { font-size: var(--fs-h2); margin: 1rem 0; }
.contacto__grid > div > p { color: var(--muted); max-width: 44ch; }

.form { display: grid; gap: 1rem; }
.form__fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.campo { display: flex; flex-direction: column; gap: .4rem; }

.campo label {
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dim);
}

.campo input, .campo textarea {
    padding: .85rem 1rem;
    border: 1px solid var(--line-fuerte);
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: .97rem;
    transition: border-color var(--ease);
}

.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--accent); }
.campo textarea { resize: vertical; }

@media (max-width: 860px) {
    .contacto__grid, .form__fila { grid-template-columns: 1fr; }
}

/* ============================================================
   PIE
   ============================================================ */
.pie { background: var(--elev-1); border-top: 1px solid var(--line); padding-block: var(--bloque) 1.6rem; position: relative; z-index: 2; }
.pie__grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 2.4rem; margin-bottom: 2.6rem; }
.pie__marca img { height: 30px; width: auto; margin-bottom: 1rem; }
[data-mundo="sec"] .pie__marca img { filter: invert(1) hue-rotate(180deg) saturate(1.35); }
.pie p { color: var(--muted); font-size: .92rem; max-width: 34ch; }

.pie h4 {
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 1.1rem;
}

.pie ul { list-style: none; display: grid; gap: .65rem; }
.pie ul a { color: var(--muted); font-size: .92rem; transition: color var(--ease); }
.pie ul a:hover { color: var(--accent); }

.pie__redes { display: flex; gap: .55rem; margin-top: 1.3rem; }

.pie__redes a {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border: 1px solid var(--line-fuerte);
    border-radius: var(--r-sm);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .78rem;
    transition: border-color var(--ease), color var(--ease);
}

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

.pie__base {
    border-top: 1px solid var(--line);
    padding-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--dim);
}

@media (max-width: 940px) { .pie__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .pie__grid { grid-template-columns: 1fr; } }

/* ============================================================
   REVELADO AL DESPLAZAR
   ============================================================ */
[data-revelar] { opacity: 0; }

[data-mundo="sec"] [data-revelar] {
    clip-path: inset(0 0 99% 0); /* Evita colapso absoluto a 0px */
    transition: opacity 520ms ease, clip-path 820ms cubic-bezier(.2, .9, .3, 1);
}

[data-mundo="dev"] [data-revelar] {
    transform: translateY(18px);
    transition: opacity 620ms ease, transform 760ms cubic-bezier(.16, .84, .44, 1);
}

/* Forzar la apertura completa del clip-path */
[data-revelar].visible { 
    opacity: 1 !important; 
    clip-path: inset(0 0 0 0) !important; 
    transform: none !important; 
}
/* ============================================================
   CRUCE ENTRE MUNDOS
   Una cortina que barre la pantalla con la misma curva de la
   frontera del welcome: la metáfora no se rompe al navegar.
   ============================================================ */
.cortina {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.cortina.activa { opacity: 1; visibility: visible; }
.cortina canvas { width: 100%; height: 100%; display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .hero__grid, .enfoque, .enfoque + .enfoque { grid-template-columns: 1fr; }
    .enfoque--invertido .enfoque__media { order: 0; }
    .perimetro { max-width: 22rem; }
}

@media (max-width: 820px) {
    .barra__nav {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(80vw, 330px);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 1.8rem;
        padding: 2rem;
        background: var(--elev-1);
        border-left: 1px solid var(--line);
        transform: translateX(100%);
        transition: transform var(--ease);
        z-index: 95;
    }

    .barra__nav.abierta { transform: none; }
    .barra__nav a { font-size: 1.05rem; }
    .menu-btn { display: grid; place-items: center; z-index: 96; }
    .cruce span:not(.cruce__punto) { display: none; }
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    [data-revelar] { opacity: 1; clip-path: none; transform: none; }
}

/* =========================================================
   BITS · BOTÓN FLOTANTE DE WHATSAPP
   ========================================================= */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.1rem;
    background: #101014;
    border: 1px solid #25d366;
    border-radius: 50px;
    color: #ffffff;
    font-family: var(--font-mono, monospace);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.2);
    transition: all 0.3s ease;
}

.whatsapp-float svg {
    width: 20px;
    height: 20px;
    fill: #25d366;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    background: #25d366;
    color: #000000;
    border-color: #25d366;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.45);
    transform: translateY(-3px);
}

.whatsapp-float:hover svg {
    fill: #000000;
    transform: scale(1.1);
}

/* Ocultar texto en pantallas muy pequeñas para no obstruir */
@media (max-width: 480px) {
    .whatsapp-float span {
        display: none;
    }
    .whatsapp-float {
        padding: 0.85rem;
        border-radius: 50%;
        bottom: 18px;
        right: 18px;
    }
}
