/* =========================================================
   NOESOR - ESTILOS GLOBALES
   Variables, tipografía, reinicio y comportamiento general.
   ========================================================= */

:root {
    --font-body: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Plus Jakarta Sans", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Fondos */
    --background: #07111f;
    --background-deep: #030914;
    --background-soft: #0b1729;
    --background-elevated: #0f1d32;
    /* Superficies */
    --surface: rgba(13, 27, 48, 0.82);
    --surface-solid: #0f1d32;
    --surface-light: #152640;
    --surface-hover: #192c49;
    --surface-glass: rgba(11, 24, 43, 0.72);
    /* Bordes */
    --border: rgba(148, 163, 184, 0.15);
    --border-soft: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(56, 189, 248, 0.32);
    --border-strong: rgba(59, 130, 246, 0.48);
    /* Texto */
    --text: #f8fafc;
    --text-soft: #b9c5d8;
    --text-muted: #7f8da5;
    --text-disabled: #526078;
    /* Identidad Noesor */
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --secondary-light: #a78bfa;
    --secondary-dark: #5b21b6;
    --cyan: #22d3ee;
    --cyan-light: #67e8f9;
    --cyan-dark: #0891b2;
    /* Estados */
    --success: #34d399;
    --success-dark: #059669;
    --danger: #fb7185;
    --danger-dark: #e11d48;
    --warning: #fbbf24;
    --warning-dark: #d97706;
    /* Degradados */
    --gradient-primary: linear-gradient( 135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100% );
    --gradient-brand: linear-gradient( 110deg, #f8fafc 0%, #dbeafe 30%, #60a5fa 66%, #22d3ee 100% );
    --gradient-surface: linear-gradient( 145deg, rgba(19, 40, 68, 0.85), rgba(8, 20, 37, 0.92) );
    /* Sombras */
    --shadow-small: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    --shadow-large: 0 40px 100px rgba(0, 0, 0, 0.42);
    --shadow-primary: 0 18px 45px rgba(37, 99, 235, 0.25);
    --shadow-cyan: 0 18px 45px rgba(34, 211, 238, 0.15);
    /* Radios */
    --radius-xs: 8px;
    --radius-small: 12px;
    --radius-medium: 18px;
    --radius-large: 28px;
    --radius-pill: 999px;
    /* Dimensiones */
    --container: 1240px;
    --header-height: 82px;
    /* Animaciones */
    --transition-fast: 150ms ease;
    --transition: 220ms ease;
    --transition-slow: 350ms ease;
}

/* =========================================================
   REINICIO
   ========================================================= */

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background: radial-gradient( circle at 8% 8%, rgba(91, 33, 182, 0.17), transparent 34% ), radial-gradient( circle at 92% 12%, rgba(8, 145, 178, 0.13), transparent 31% ), radial-gradient( circle at 52% 95%, rgba(37, 99, 235, 0.08), transparent 40% ), var(--background);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

    body::before {
        position: fixed;
        inset: 0;
        z-index: -2;
        content: "";
        pointer-events: none;
        background-image: linear-gradient( rgba(148, 163, 184, 0.025) 1px, transparent 1px ), linear-gradient( 90deg, rgba(148, 163, 184, 0.025) 1px, transparent 1px );
        background-size: 64px 64px;
        -webkit-mask-image: linear-gradient( to bottom, rgba(0, 0, 0, 0.8), transparent 85% );
        mask-image: linear-gradient( to bottom, rgba(0, 0, 0, 0.8), transparent 85% );
    }

    body::after {
        position: fixed;
        inset: 0;
        z-index: -1;
        content: "";
        pointer-events: none;
        background: linear-gradient( to bottom, rgba(3, 9, 20, 0.02), rgba(3, 9, 20, 0.16) );
    }

/* =========================================================
   TIPOGRAFÍA
   ========================================================= */

body,
button,
input,
textarea,
select,
a {
    font-family: var(--font-body);
}

button,
input,
textarea,
select {
    font-size: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

h1 {
    font-weight: 800;
    letter-spacing: -0.045em;
}

p {
    color: inherit;
}

strong {
    font-weight: 750;
}

small {
    font-size: 0.8rem;
}

/* =========================================================
   ELEMENTOS GENERALES
   ========================================================= */

a {
    color: inherit;
    text-decoration: none;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

button,
select {
    cursor: pointer;
}

    button:disabled,
    select:disabled,
    input:disabled,
    textarea:disabled {
        cursor: not-allowed;
    }

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

img {
    display: block;
}

ul,
ol {
    padding-left: 1.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

textarea {
    resize: vertical;
}

input,
textarea,
select {
    color: var(--text);
}

    input::placeholder,
    textarea::placeholder {
        color: var(--text-disabled);
        opacity: 1;
    }

/* =========================================================
   SELECCIÓN Y FOCO
   ========================================================= */

::selection {
    color: white;
    background: rgba(37, 99, 235, 0.48);
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    border-radius: 6px;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background: var(--background-deep);
}

::-webkit-scrollbar-thumb {
    border: 3px solid var(--background-deep);
    border-radius: var(--radius-pill);
    background: rgba(127, 141, 165, 0.35);
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient( 180deg, rgba(96, 165, 250, 0.62), rgba(34, 211, 238, 0.55) );
    }

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   FASE 4 · PULIDO PREMIUM
   ========================================================= */
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 5000;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 12px 28px rgba(0,0,0,.35);
    transform: translateY(-160%);
    transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }
.page-shell:focus { outline: none; }

/* Superficies y controles con una respuesta más consistente. */
button, .button, a[class*="button"], .pricing-button {
    transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}
button:not(:disabled):active, .button:not(.disabled):active, a[class*="button"]:active {
    transform: translateY(1px);
}
input, textarea, select { min-height: 44px; }
textarea { min-height: 110px; }

/* Evita saltos visuales y mejora la lectura en pantallas anchas. */
.page-shell > section { animation: premium-page-in .24s ease-out both; }
@keyframes premium-page-in { from { opacity: .72; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Tablas utilizables en móvil sin romper el layout. */
.table-responsive, .pricing-table-wrap { overscroll-behavior-inline: contain; scrollbar-gutter: stable; }

/* Estados deshabilitados inequívocos para el plan Free. */
button:disabled, input:disabled, textarea:disabled, select:disabled,
.is-locked, .feature-locked { opacity: .62; filter: saturate(.72); }

/* Branding uniforme para selección y foco. */
:focus-visible { box-shadow: 0 0 0 4px rgba(34,211,238,.14); }

/* QA Bloque 3 · utilidades de accesibilidad y contenido extenso */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:where(p, li, td, th, label, small, strong) {
    overflow-wrap: anywhere;
}

:where(button, a, input, select, textarea):focus-visible {
    outline: 3px solid rgba(56, 189, 248, .55);
    outline-offset: 3px;
}
