/*
 * base.css
 * ------------------------------------------------------------
 * Fundaciones globales: custom properties, reset universal,
 * tipografía base. Cargar ANTES que layout, components y admin.
 *
 * Paleta: tomada del logo SFG (Servicios Forestales Group).
 * ------------------------------------------------------------
 */

/* ==========================================================
   Custom properties
   ========================================================== */
:root {
    /* Texto */
    --color-text:             #1a2e22;
    --color-text-muted:       #5c6f64;
    --color-text-subtle:      #8fa497;

    /* Fondos */
    --color-bg:               #ffffff;
    --color-bg-alt:           #f4f7f3;
    --color-bg-hover:         #e8f0e6;

    /* Bordes */
    --color-border:           #dce5d8;
    --color-border-strong:    #b7c8b0;

    /* Marca (verdes del logo SFG) */
    --color-primary:          #0f9d40;
    --color-primary-hover:    #0b7d32;
    --color-primary-text:     #ffffff;
    --color-accent:           #8bc43c;
    --color-accent-hover:     #6fa82a;

    /* Forest / secciones oscuras */
    --color-forest:           #0d3b23;
    --color-forest-deep:      #082818;
    --color-forest-light:     #1a5233;

    /* Tipografía */
    --font-family:            system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --font-family-mono:       ui-monospace, "SFMono-Regular", Menlo, monospace;
    --font-size-base:         16px;
    --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;
    --space-3xl: 6rem;

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

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(13, 59, 35, 0.05);
    --shadow-md: 0 6px 20px rgba(13, 59, 35, 0.08);
    --shadow-lg: 0 12px 40px rgba(13, 59, 35, 0.12);

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

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

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

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;
    display: block;
}

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

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

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

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

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

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

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); }
.text-center  { text-align: center; }

/* Icons (SVG inline helper — ver lib/icons.php) */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
}
