/*
 * base.css
 * ------------------------------------------------------------
 * Fundaciones globales: custom properties, reset universal,
 * tipografía base. Cargar ANTES que layout, components y admin.
 *
 * Paleta: marca Biox Innovation. Navy + teal + verde hoja
 * derivados del logo. Editar variables abajo para rebrand.
 * ------------------------------------------------------------
 */

/* ==========================================================
   Custom properties
   ========================================================== */
:root {
    /* Marca Biox */
    --biox-navy:              #14375E;
    --biox-navy-deep:         #0F2A48;
    --biox-teal:              #2BA9A4;
    --biox-teal-light:        #4DC4BC;
    --biox-leaf:              #7CB342;
    --biox-bubble:            #2BA9A4;

    /* Texto */
    --color-text:             #0F2A48;
    --color-text-muted:       #5A6B7E;
    --color-text-subtle:      #94A3B5;

    /* Fondos */
    --color-bg:               #ffffff;
    --color-bg-alt:           #F4F8FB;
    --color-bg-hover:         #E9F1F6;
    --color-bg-dark:          #0F2A48;

    /* Bordes */
    --color-border:           #DEE6EE;
    --color-border-strong:    #BFCCD9;

    /* Marca (primary = navy Biox) */
    --color-primary:          var(--biox-navy);
    --color-primary-hover:    var(--biox-navy-deep);
    --color-primary-text:     #ffffff;
    --color-accent:           var(--biox-teal);
    --color-accent-hover:     #208581;
    --color-leaf:             var(--biox-leaf);

    /* Tipografía */
    --font-family:            "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-family-display:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-family-mono:       ui-monospace, "SFMono-Regular", Menlo, monospace;
    --font-size-base:         16px;
    --line-height-base:       1.65;

    /* Espaciado */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2.5rem;
    --space-2xl: 4rem;

    /* Tamaños */
    --container-max: 1180px;
    --radius:        6px;
    --radius-lg:     12px;
    --radius-xl:     20px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(15, 42, 72, 0.05);
    --shadow-md: 0 6px 18px rgba(15, 42, 72, 0.08);
    --shadow-lg: 0 18px 40px rgba(15, 42, 72, 0.12);

    /* Transiciones */
    --transition: 150ms ease;
}

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

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

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ==========================================================
   Tipografía
   ========================================================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    margin: 0 0 var(--space-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: 1.8rem; letter-spacing: -0.015em; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

@media (max-width: 720px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

p {
    margin: 0 0 var(--space-md);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

small {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

code {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
    background: var(--color-bg-hover);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

pre {
    font-family: var(--font-family-mono);
    font-size: 0.9rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-md);
    overflow-x: auto;
    margin: 0 0 var(--space-md);
    white-space: pre-wrap;
}

hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: var(--space-lg) 0;
}

/* ==========================================================
   Utilities
   ========================================================== */
.text-muted   { color: var(--color-text-muted); }
.text-subtle  { color: var(--color-text-subtle); }
