/* ==========================================================================
   Point Land - sistema de diseño (marca.css)
   Estilo claro, cartografico y tecnico. Todo sale de las variables de :root.
   Uso: <link rel="stylesheet" href="/css/marca.css"> + fuentes Space Grotesk e Inter.
   Los efectos (aparecer, parallax, inclinar, contar, topografia) los activa
   /js/interacciones.js; sin JS la pagina se ve completa y estatica.
   ========================================================================== */

/* ---------- 1. Variables ---------- */
:root {
    /* Colores */
    --fondo:          #FFFFFF;
    --fondo-suave:    #F4F8FC;
    --fondo-celeste:  #E8F1FA;
    --azul-profundo:  #0B1F3A;   /* titulos y textos fuertes */
    --texto:          #1E2F45;
    --texto-suave:    #5A6B80;
    --azul:           #162B4E;   /* acento principal: botones, enlaces, foco */
    --azul-oscuro:    #0E1D36;
    --turquesa:       #14B8B8;   /* acento secundario: lineas, brillos */
    --linea:          #DCE6F0;
    --exito:          #16A34A;
    --alerta:         #F59E0B;
    --error:          #DC2626;

    /* Tintes derivados (para fondos de etiquetas y avisos) */
    --azul-tinte:      #E8EDF5;
    --turquesa-tinte:  #E3F7F7;
    --exito-tinte:     #E8F7EE;
    --alerta-tinte:    #FEF4E2;
    --error-tinte:     #FDECEC;
    --alerta-texto:    #92400E;   /* texto legible sobre el tinte de alerta */

    /* Tipografia */
    --fuente-titulo: 'Space Grotesk', system-ui, sans-serif;
    --fuente-texto:  'Inter', system-ui, sans-serif;
    --t-xs:   0.75rem;
    --t-sm:   0.875rem;
    --t-base: 1rem;
    --t-lg:   clamp(1.075rem, 1rem + 0.35vw, 1.2rem);
    --t-xl:   clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
    --t-2xl:  clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem);
    --t-3xl:  clamp(2.2rem, 1.5rem + 3vw, 3.6rem);

    /* Espacios */
    --e-1: 4px;  --e-2: 8px;  --e-3: 12px; --e-4: 16px;
    --e-5: 24px; --e-6: 32px; --e-7: 48px; --e-8: 72px;

    /* Radios */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 26px;
    --r-pastilla: 999px;

    /* Sombras suaves en capas, con tinte azul */
    --sombra-1: 0 1px 2px rgba(11, 31, 58, .05), 0 2px 6px rgba(22, 43, 78, .04);
    --sombra-2: 0 1px 2px rgba(11, 31, 58, .05), 0 8px 24px -8px rgba(22, 43, 78, .14);
    --sombra-3: 0 2px 4px rgba(11, 31, 58, .05), 0 22px 48px -18px rgba(22, 43, 78, .26);
    --sombra-luz: 0 8px 22px -8px rgba(22, 43, 78, .55);   /* brillo bajo botones */
    --foco: 0 0 0 4px rgba(22, 43, 78, .18), 0 0 18px rgba(22, 43, 78, .25);

    /* Vidrio */
    --vidrio-fondo: rgba(255, 255, 255, .62);
    --vidrio-celeste: rgba(232, 241, 250, .55);
    --vidrio-borde: rgba(255, 255, 255, .75);
    --vidrio-blur: blur(16px) saturate(140%);

    /* Movimiento */
    --curva: cubic-bezier(.2, .7, .2, 1);
    --rapido: .18s;
    --medio: .35s;
    --lento: .7s;

    color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font: 400 var(--t-base)/1.6 var(--fuente-texto);
    -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--azul); text-decoration: none; }
a:hover { color: var(--azul-oscuro); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: var(--r-sm); }
::selection { background: rgba(22, 43, 78, .16); }

h1, h2, h3, h4 {
    font-family: var(--fuente-titulo);
    color: var(--azul-profundo);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 var(--e-3);
    text-wrap: balance;
}
h1 { font-size: var(--t-3xl); font-weight: 700; }
h2 { font-size: var(--t-2xl); font-weight: 700; }
h3 { font-size: var(--t-xl); font-weight: 600; }
h4 { font-size: var(--t-lg); font-weight: 600; }
p  { margin: 0 0 var(--e-4); max-width: 68ch; }
.texto-suave { color: var(--texto-suave); }
.texto-grande { font-size: var(--t-lg); }
.cifra { font-family: var(--fuente-titulo); font-variant-numeric: tabular-nums; }

/* Rotulo pequeno en mayusculas, estilo leyenda de plano */
.rotulo {
    display: inline-flex; align-items: center; gap: var(--e-2);
    font: 600 var(--t-xs)/1 var(--fuente-titulo);
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--azul);
}
.rotulo::before {
    content: ''; width: 18px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--azul), var(--turquesa));
}
/* Coordenadas como en un plano: 18°12'N 66°35'W */
.coordenada {
    font: 500 var(--t-xs)/1 var(--fuente-titulo);
    letter-spacing: .08em; color: var(--texto-suave);
    font-variant-numeric: tabular-nums;
}

/* ---------- 3. Contenedores y secciones ---------- */
.contenedor { width: min(1180px, 100% - 32px); margin-inline: auto; }
.seccion { padding-block: clamp(48px, 7vw, 96px); position: relative; }
.seccion-suave   { background: var(--fondo-suave); }
.seccion-celeste { background: var(--fondo-celeste); }
/* Cuadricula de coordenadas muy tenue, para fondos de seccion */
.fondo-reticula {
    background-image:
        linear-gradient(rgba(22, 43, 78, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 43, 78, .055) 1px, transparent 1px);
    background-size: 56px 56px;
}
.rejilla { display: grid; gap: var(--e-5); }
.rejilla-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.rejilla-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rejilla-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.fila { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3); }

/* ---------- 4. Botones ---------- */
.btn {
    --btn-fondo: var(--fondo);
    --btn-texto: var(--azul-profundo);
    --btn-borde: var(--linea);
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: var(--e-2);
    min-height: 44px; padding: 10px 20px;
    font: 600 var(--t-sm)/1.2 var(--fuente-titulo); letter-spacing: .01em;
    color: var(--btn-texto); background: var(--btn-fondo);
    border: 1.5px solid var(--btn-borde); border-radius: var(--r-md);
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background var(--rapido), border-color var(--rapido), color var(--rapido),
                box-shadow var(--medio) var(--curva), transform var(--rapido) var(--curva);
}
.btn:hover { text-decoration: none; color: var(--btn-texto); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
/* Destello que cruza el boton al pasar el mouse */
.btn::before {
    content: ''; position: absolute; z-index: -1; inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
    transform: translateX(-120%);
}
.btn:hover::before { transform: translateX(120%); transition: transform .75s var(--curva); }

.btn-primario {
    --btn-fondo: linear-gradient(180deg, #2B4A7E, var(--azul));
    --btn-texto: #fff; --btn-borde: transparent;
    background: var(--btn-fondo);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, var(--sombra-1);
}
.btn-primario:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, var(--sombra-luz); }
.btn-primario:active { background: var(--azul-oscuro); }

.btn-secundario { --btn-borde: rgba(22, 43, 78, .35); --btn-texto: var(--azul); }
.btn-secundario:hover { --btn-fondo: var(--azul-tinte); border-color: var(--azul); box-shadow: 0 6px 18px -10px rgba(22, 43, 78, .5); }
.btn-secundario::before { background: linear-gradient(105deg, transparent 30%, rgba(22, 43, 78, .12) 50%, transparent 70%); }

.btn-fantasma { --btn-borde: transparent; --btn-fondo: transparent; --btn-texto: var(--texto); }
.btn-fantasma:hover { --btn-fondo: var(--fondo-celeste); --btn-texto: var(--azul-profundo); }
.btn-fantasma::before { display: none; }

.btn-peligro { --btn-borde: rgba(220, 38, 38, .35); --btn-texto: var(--error); }
.btn-peligro:hover { --btn-fondo: var(--error-tinte); border-color: var(--error); }

.btn-chico  { min-height: 36px; padding: 6px 14px; font-size: var(--t-xs); border-radius: var(--r-sm); }
.btn-grande { min-height: 52px; padding: 14px 28px; font-size: var(--t-base); border-radius: var(--r-lg); }
.btn-ancho  { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 5. Tarjetas y vidrio ---------- */
.tarjeta {
    position: relative;
    background: var(--fondo);
    border: 1px solid var(--linea);
    border-radius: var(--r-lg);
    box-shadow: var(--sombra-2);
    padding: var(--e-5);
}
.tarjeta-cabeza {
    display: flex; align-items: center; justify-content: space-between; gap: var(--e-3);
    padding-bottom: var(--e-4); margin-bottom: var(--e-4); border-bottom: 1px solid var(--linea);
}
.tarjeta-cabeza h3 { margin: 0; font-size: var(--t-lg); }
.tarjeta-icono {
    width: 46px; height: 46px; border-radius: var(--r-md);
    display: grid; place-items: center; margin-bottom: var(--e-4);
    color: var(--azul); background: linear-gradient(135deg, var(--azul-tinte), var(--turquesa-tinte));
    box-shadow: inset 0 0 0 1px rgba(22, 43, 78, .12);
}
.tarjeta-icono svg { width: 22px; height: 22px; }

/* Tarjeta que se inclina con el cursor (JS pone --rx, --ry, --mx, --my) */
[data-inclinar] {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: transform var(--medio) var(--curva), box-shadow var(--medio) var(--curva), border-color var(--medio);
    transform-style: preserve-3d;
    will-change: transform;
}
[data-inclinar]::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(20, 184, 184, .16), rgba(22, 43, 78, .06) 35%, transparent 60%);
    opacity: 0; transition: opacity var(--medio);
}
[data-inclinar].inclinando { transition: transform .08s linear, box-shadow var(--medio), border-color var(--medio); box-shadow: var(--sombra-3); border-color: rgba(22, 43, 78, .3); }
[data-inclinar].inclinando::after { opacity: 1; }

.vidrio {
    background: var(--vidrio-fondo);
    -webkit-backdrop-filter: var(--vidrio-blur);
            backdrop-filter: var(--vidrio-blur);
    border: 1px solid var(--vidrio-borde);
    box-shadow: var(--sombra-2), inset 0 1px 0 rgba(255, 255, 255, .8);
    border-radius: var(--r-lg);
}
.vidrio-celeste { background: var(--vidrio-celeste); }

/* Vidrio sobre fotos: transparente, sin color, con un poco de opacidad y desenfoque.
   La letra va en blanco con una sombra suave para leerse sobre cielo, arena o rocas. */
.vidrio-foto {
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
            backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
    border-radius: var(--r-lg);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 0, 0, .28);
}
.vidrio-foto h1, .vidrio-foto h2, .vidrio-foto h3, .vidrio-foto h4 { color: #fff; }
.vidrio-foto p { color: rgba(255, 255, 255, .92); }
.vidrio-foto a:not(.btn) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.vidrio-foto a:not(.btn):hover { color: #fff; }
.vidrio-foto .rotulo { color: #fff; }
.vidrio-foto .rotulo::before { background: #fff; }
.vidrio-foto .btn { text-shadow: none; }

/* Fondo de curvas de nivel que cubre toda la pantalla */
.topografia.topografia-fija { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Marcador de vertice (como un punto de control en un plano) */
.vertice {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--turquesa); box-shadow: 0 0 0 4px rgba(20, 184, 184, .18);
}

/* ---------- 6. Etiquetas, pastillas e insignias ---------- */
.pastilla {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: var(--r-pastilla);
    font: 600 var(--t-xs)/1.4 var(--fuente-texto);
    background: var(--fondo-celeste); color: var(--azul-profundo);
    border: 1px solid transparent; white-space: nowrap;
}
.pastilla::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pastilla-azul     { background: var(--azul-tinte);     color: var(--azul-oscuro); }
.pastilla-turquesa { background: var(--turquesa-tinte); color: #0B7A7A; }
.pastilla-exito    { background: var(--exito-tinte);    color: #11743A; }
.pastilla-alerta   { background: var(--alerta-tinte);   color: var(--alerta-texto); }
.pastilla-error    { background: var(--error-tinte);    color: #B11F1F; }
.pastilla-linea    { background: var(--fondo); border-color: var(--linea); color: var(--texto-suave); }
.pastilla-linea::before { display: none; }

.insignia {
    display: inline-grid; place-items: center;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pastilla);
    font: 700 11px/1 var(--fuente-titulo); color: #fff; background: var(--azul);
    box-shadow: 0 0 0 2px var(--fondo);
}
.insignia-turquesa { background: var(--turquesa); }
.insignia-alerta   { background: var(--alerta); color: var(--azul-profundo); }

/* ---------- 7. Formularios ---------- */
.campo { display: grid; gap: 6px; margin-bottom: var(--e-4); }
.campo label { font: 600 var(--t-sm)/1.3 var(--fuente-texto); color: var(--azul-profundo); }
.campo .ayuda { font-size: var(--t-xs); color: var(--texto-suave); }
.campo .req { color: var(--error); }
.control,
.campo input:not([type=checkbox]):not([type=radio]),
.campo select,
.campo textarea {
    width: 100%; min-height: 46px; padding: 11px 14px;
    font: 400 var(--t-base)/1.4 var(--fuente-texto); color: var(--texto);
    background: var(--fondo); border: 1.5px solid var(--linea); border-radius: var(--r-md);
    transition: border-color var(--rapido), box-shadow var(--medio) var(--curva), background var(--rapido);
}
.campo textarea { min-height: 110px; resize: vertical; }
.campo input::placeholder, .campo textarea::placeholder { color: #93A3B5; }
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: #C3D3E4; }
/* Foco luminoso azul */
.control:focus, .campo input:focus, .campo select:focus, .campo textarea:focus {
    outline: none; border-color: var(--azul); box-shadow: var(--foco); background: #FCFDFF;
}
.campo.con-error input, .campo.con-error select, .campo.con-error textarea { border-color: var(--error); }
.campo .mensaje-error { font-size: var(--t-xs); color: var(--error); font-weight: 600; }
.opcion { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); cursor: pointer; }
.opcion input { width: 18px; height: 18px; accent-color: var(--azul); }

/* Interruptor */
.interruptor { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--t-sm); }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor .pista {
    width: 42px; height: 24px; border-radius: 999px; background: #CBD8E6; position: relative;
    transition: background var(--rapido);
}
.interruptor .pista::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(11, 31, 58, .3); transition: transform var(--medio) var(--curva);
}
.interruptor input:checked + .pista { background: var(--azul); }
.interruptor input:checked + .pista::after { transform: translateX(18px); }
.interruptor input:focus-visible + .pista { box-shadow: var(--foco); }

/* ---------- 8. Tablas ---------- */
.tabla-marco { overflow-x: auto; border: 1px solid var(--linea); border-radius: var(--r-lg); background: var(--fondo); box-shadow: var(--sombra-1); }
.tabla { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tabla th {
    text-align: left; padding: 12px 18px; white-space: nowrap;
    font: 600 11px/1.2 var(--fuente-titulo); letter-spacing: .1em; text-transform: uppercase;
    color: var(--texto-suave); background: var(--fondo-suave); border-bottom: 1px solid var(--linea);
}
.tabla td { padding: 14px 18px; border-bottom: 1px solid #EDF2F7; vertical-align: middle; }
.tabla tbody tr { transition: background var(--rapido); }
.tabla tbody tr:hover { background: #F7FAFE; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla .clave { font-family: var(--fuente-titulo); font-weight: 600; color: var(--azul-profundo); }

/* ---------- 9. Avisos (en linea y toasts) ---------- */
.aviso {
    display: flex; gap: var(--e-3); align-items: flex-start;
    padding: 14px 16px; border-radius: var(--r-md);
    border: 1px solid var(--linea); border-left-width: 4px;
    background: var(--fondo-suave); color: var(--texto); font-size: var(--t-sm);
}
.aviso svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.aviso strong { color: var(--azul-profundo); }
.aviso-info   { border-color: rgba(22, 43, 78, .25);  border-left-color: var(--azul);   background: var(--azul-tinte); }
.aviso-exito  { border-color: rgba(22, 163, 74, .25);   border-left-color: var(--exito);  background: var(--exito-tinte); }
.aviso-alerta { border-color: rgba(245, 158, 11, .35);  border-left-color: var(--alerta); background: var(--alerta-tinte); }
.aviso-error  { border-color: rgba(220, 38, 38, .25);   border-left-color: var(--error);  background: var(--error-tinte); }
.aviso-info svg   { color: var(--azul); }
.aviso-exito svg  { color: var(--exito); }
.aviso-alerta svg { color: var(--alerta-texto); }
.aviso-error svg  { color: var(--error); }

.toasts {
    position: fixed; z-index: 1000; right: 16px; bottom: 16px;
    display: grid; gap: 10px; width: min(380px, calc(100% - 32px));
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--r-md);
    background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: var(--vidrio-blur); backdrop-filter: var(--vidrio-blur);
    border: 1px solid var(--linea); box-shadow: var(--sombra-3);
    font-size: var(--t-sm); color: var(--texto);
    animation: toast-entra var(--medio) var(--curva);
}
.toast::before { content: ''; flex: none; width: 4px; align-self: stretch; border-radius: 4px; background: var(--azul); }
.toast-exito::before  { background: var(--exito); }
.toast-alerta::before { background: var(--alerta); }
.toast-error::before  { background: var(--error); }
.toast .cerrar { margin-left: auto; border: 0; background: none; color: var(--texto-suave); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.toast.saliendo { animation: toast-sale var(--medio) var(--curva) forwards; }
@keyframes toast-entra { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-sale  { to   { opacity: 0; transform: translateX(24px); } }

/* ---------- 10. Pestanas ---------- */
.pestanas-lista {
    display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-md);
    background: var(--fondo-celeste); border: 1px solid var(--linea);
    max-width: 100%; overflow-x: auto;
}
.pestana {
    border: 0; background: transparent; cursor: pointer; white-space: nowrap;
    padding: 8px 16px; border-radius: 9px;
    font: 600 var(--t-sm)/1.2 var(--fuente-titulo); color: var(--texto-suave);
    transition: background var(--rapido), color var(--rapido), box-shadow var(--rapido);
}
.pestana:hover { color: var(--azul-profundo); }
.pestana[aria-selected="true"] { background: var(--fondo); color: var(--azul); box-shadow: var(--sombra-1); }
.pestana-panel { padding-top: var(--e-5); }
.pestana-panel[hidden] { display: none; }

/* ---------- 11. Modal (<dialog>) ---------- */
.modal {
    width: min(560px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--r-xl);
    background: var(--fondo); color: var(--texto); box-shadow: 0 40px 80px -24px rgba(11, 31, 58, .45);
}
.modal::backdrop { background: rgba(11, 31, 58, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-entra var(--medio) var(--curva); }
.modal-cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.modal-cabeza h3 { margin: 0; }
.modal-cuerpo { padding: 14px 24px 8px; }
.modal-pie { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; flex-wrap: wrap; }
.modal-cerrar {
    flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--fondo-suave); color: var(--texto-suave); display: grid; place-items: center; font-size: 20px;
}
.modal-cerrar:hover { background: var(--fondo-celeste); color: var(--azul-profundo); }
@keyframes modal-entra { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ---------- 12. Estadisticas (contadores) ---------- */
.dato-grande { display: grid; gap: 2px; }
.dato-grande .valor {
    font: 700 var(--t-2xl)/1 var(--fuente-titulo); color: var(--azul-profundo);
    font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.dato-grande .etiqueta { font-size: var(--t-sm); color: var(--texto-suave); }

/* ---------- 13. Fondo topografico (canvas) ---------- */
.topografia { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- 14. Efectos activados por JS ---------- */
/* Solo se esconden cuando el JS esta activo (clase .js en <html>) */
.js [data-aparecer] {
    opacity: 0; transform: translateY(24px);
    transition: opacity var(--lento) var(--curva), transform var(--lento) var(--curva);
    transition-delay: var(--retraso, 0ms);
}
.js [data-aparecer].visible { opacity: 1; transform: none; }
/* Si interacciones.js no llega a cargar, el aviso en <head> pone .sin-efectos y todo se muestra */
.sin-efectos [data-aparecer] { opacity: 1 !important; transform: none !important; }
/* Aparecer al llegar (interacciones.js agrega .por-llegar y luego .llegando) */
.por-llegar { opacity: 0; transform: translateY(26px); }
.llegando {
    transition: opacity .7s var(--curva), transform .8s var(--curva) !important;
    transition-delay: var(--retraso-llegar, 0ms) !important;
}
.sin-efectos .por-llegar { opacity: 1 !important; transform: none !important; }
[data-parallax] { will-change: transform; transform: translate3d(0, var(--desplazar, 0px), 0); }

/* Transiciones entre paginas (navegadores con View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-sale .22s var(--curva) both; }
::view-transition-new(root) { animation: vt-entra .32s var(--curva) both; }
@keyframes vt-sale  { to   { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-entra { from { opacity: 0; transform: translateY(8px); } }

/* ---------- 15. Movimiento reducido: sin animaciones ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js [data-aparecer] { opacity: 1; transform: none; }
    [data-parallax] { transform: none; }
    [data-inclinar] { transform: none; }
    .btn::before { display: none; }
    @view-transition { navigation: none; }
}

/* ---------- 16. Celular ---------- */
@media (max-width: 640px) {
    .tarjeta { padding: var(--e-4); border-radius: var(--r-md); }
    .tabla th, .tabla td { padding: 11px 12px; }
    .toasts { right: 16px; left: 16px; width: auto; }
    .modal-cabeza, .modal-cuerpo, .modal-pie { padding-inline: 18px; }
}
