/*
 * base.css
 * ------------------------------------------------------------
 * Fundaciones globales: custom properties, reset universal,
 * tipografía base. Cargar ANTES que layout, components y admin.
 *
 * Paleta: grayscale puro. Reemplazar --color-primary con el
 * color de marca del cliente. Todo lo demás se adapta via vars.
 * ------------------------------------------------------------
 */

/* ==========================================================
   Custom properties
   ========================================================== */
:root {
    /* Texto */
    --color-text:             #171717;
    --color-text-muted:       #737373;
    --color-text-subtle:      #a3a3a3;

    /* Fondos */
    --color-bg:               #ffffff;
    --color-bg-alt:           #fafafa;
    --color-bg-hover:         #f5f5f5;

    /* Bordes */
    --color-border:           #e5e5e5;
    --color-border-strong:    #d4d4d4;

    /* Marca (placeholder — cambiar por cliente) */
    --color-primary:          #431321;
    --color-primary-hover:    #2f0a15;
    --color-primary-text:     #ffffff;

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

    /* 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: 1040px;
    --radius:        6px;
    --radius-lg:     10px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);

    /* 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: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

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

a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-text-muted);
}

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); }
