/* Pasarela Nebulae — © 2026 Bijan Berahimi S. · BBS Comunicaciones. Todos los derechos reservados. */
/*
 * Pasarela Nebulae — Tema 2026 (v2)
 * Tipografías:
 *   - Onest (sans-serif geométrico bold, estilo nebulae.cr)
 *   - Instrument Serif (display elegante con itálica)
 *   - JetBrains Mono (código/secrets)
 * Paleta: blanco / negro / acentos suaves
 * Estética: editorial moderno + identidad visual Nebulae
 */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* ──── Base ──── */
    --white:        #ffffff;
    --off-white:    #fbfbfa;
    --gray-50:      #f7f6f3;
    --gray-100:     #ededeb;
    --gray-150:     #e4e4e2;
    --gray-200:     #d4d4d2;
    --gray-300:     #a3a3a1;
    --gray-400:     #6b6b6a;
    --gray-500:     #45453f;
    --gray-700:     #1f1f1d;
    --black:        #0a0a09;

    /* Acentos suaves (uso ocasional) */
    --sand:         #ebe4d6;
    --sand-deep:    #c2b8a3;
    --moss:         #4a5d3a;

    /* ──── Roles ──── */
    --bg:           var(--off-white);
    --bg-elevated:  var(--white);
    --bg-subtle:    var(--gray-50);
    --bg-card:      var(--white);
    --bg-hover:     var(--gray-50);

    --text:         var(--black);
    --text-soft:    var(--gray-500);
    --text-muted:   var(--gray-400);
    --text-faint:   var(--gray-300);
    --text-invert:  var(--white);

    --bd:           var(--gray-100);
    --bd-strong:    var(--gray-200);
    --bd-dark:      var(--black);

    --accent:       var(--black);
    --accent-hover: var(--gray-700);

    /* ──── Estados ──── */
    --ok:           #2d6a4f;
    --warn:         #b45309;
    --err:          #b91c1c;
    --info:         #1e40af;

    /* ──── Tipografía ──── */
    --font-body:    'Onest', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-display: 'Instrument Serif', 'Times New Roman', serif;
    --font-sans-bold: 'Onest', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

    /* ──── Geometría ──── */
    --r:    8px;
    --r-sm: 4px;
    --r-lg: 14px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(10,10,9,0.04);
    --shadow:    0 4px 24px rgba(10,10,9,0.06);
    --shadow-lg: 0 16px 48px rgba(10,10,9,0.08);

    --container: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

/* H1 elegante: Instrument Serif para el "Nebulae" iconic look */
h1 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.0;
    font-size: clamp(48px, 7vw, 92px);
}

/* H2 — el corazón del look "Nebulae": Onest 800 bold */
h2 {
    font-family: var(--font-sans-bold);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.035em;
    line-height: 1.0;
    font-size: clamp(32px, 4.5vw, 56px);
}

h3 {
    font-family: var(--font-sans-bold);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-size: clamp(22px, 2.8vw, 30px);
}

h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: -0.01em;
}

p { color: var(--text-soft); }

/* Italic stylized - usado para acentos en titles */
.italic, em {
    font-style: italic;
    font-family: var(--font-display);
    font-weight: 400;
}

a { color: var(--text); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: 0.55; }

code, kbd, .mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
    letter-spacing: -0.01em;
}

::selection { background: var(--black); color: var(--white); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

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

/* utilities */
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.center { text-align: center; }


/* ════════════════════════════════════════════════════════════════════════
 *  TIPOGRAFÍA — Refuerzos de prioridad
 *  Garantiza que TODOS los h2 (incluyendo los del wizard y dashboard) usen
 *  Onest 800 bold, y que el acento italic solo aplique a .em explícito.
 * ════════════════════════════════════════════════════════════════════════ */

/* h2 explícito siempre Onest bold, fuerza con !important para vencer cualquier herencia */
h2,
.card h2,
.wizard h2,
.page-head h2,
.section-head h2,
main h2 {
    font-family: 'Onest', system-ui, sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em !important;
}

/* Solo .em explícito dentro de h1/h2 toma el serif italic */
h1 .em, h2 .em, h3 .em {
    font-family: 'Instrument Serif', 'Times New Roman', serif !important;
    font-style: italic !important;
    font-weight: 400 !important;
    color: var(--text-soft);
}

/* <em> dentro de body text mantiene italic pero NO cambia familia */
p em, li em, td em, span em:not(.em) {
    font-family: inherit !important;
    font-style: italic;
    font-weight: inherit;
}

/* Hero del home: H1 con serif, mantener */
.brand-hero h1 {
    font-family: 'Instrument Serif', 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — añadido (no romper desktop)
   ═══════════════════════════════════════════════════════════ */
img, svg, video, canvas { max-width: 100%; height: auto; }
table { max-width: 100%; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
.table-scroll > table { min-width: 480px; }

@media (max-width: 640px) {
    h1 { font-size: clamp(30px, 9vw, 46px) !important; }
    h2 { font-size: clamp(23px, 6.5vw, 34px) !important; }
    h3 { font-size: clamp(18px, 5vw, 24px) !important; }
    .brand-hero .subtitle { font-size: 14.5px; }
    .container { padding-left: 16px; padding-right: 16px; }
    .card { padding: 20px 16px; }
}
@media (max-width: 400px) {
    h1 { font-size: clamp(26px, 11vw, 40px) !important; }
}

/* ═══════════════════════════════════════════════════════════
   ANCHO POR PRESENTACIÓN (5 tramos)
   celular → tablet 10" → laptop 13" → laptop 17" → monitor grande
   El contenedor (header, main, footer) escala con la pantalla.
   ═══════════════════════════════════════════════════════════ */
/* Base 1180px = celular (fluye) + tablet 10" (llena el viewport) */
@media (min-width: 1440px) { :root { --container: 1320px; } }  /* laptop 13"/15" */
@media (min-width: 1680px) { :root { --container: 1480px; } }  /* laptop 17" */
@media (min-width: 1920px) { :root { --container: 1660px; } }  /* full HD / monitor */
@media (min-width: 2400px) { :root { --container: 1880px; } }  /* monitores grandes / 4K */
