/* ==========================================================================
   Global Conect V2.2 — Design Tokens (Light/Dark Glassmorphism + Motion)
   Paleta oficial Global Conect (Azul Marino + Verde Lima + Cian Voluntarios)
   con contraste verificado WCAG AA/AAA en modo claro y modo oscuro.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Paleta institucional */
  --ink-navy: #0b2239;
  --abyss-navy: #051220;
  --slate-navy: #12314f;
  --canvas-white: #ffffff;
  --mist-surface: #eef4f9;
  --line-subtle: rgba(11, 34, 57, 0.11);
  --line-strong: rgba(11, 34, 57, 0.22);

  /* Superficies dinámicas por tema */
  --bg-page: #ffffff;
  --bg-section-alt: linear-gradient(180deg, #f6f9fc 0%, #edf3f8 100%);
  --bg-input: rgba(255, 255, 255, 0.9);
  --bg-input-focus: #ffffff;
  --bg-modal: rgba(255, 255, 255, 0.95);
  --bg-header-scrolled: rgba(255, 255, 255, 0.94);
  --border-header-scrolled: rgba(11, 34, 57, 0.09);

  /* Texto */
  --heading-color: #0b2239;
  --text-primary: #0d1d2d;
  --text-secondary: #3f5368;
  --text-muted: #5b6f84;
  --text-on-dark: #f4f8fc;
  --text-on-dark-muted: #b7c8da;

  /* Acentos de marca */
  --leaf-lime: #83dd64;
  --leaf-lime-bright: #9beb7e;
  --leaf-lime-glow: rgba(131, 221, 100, 0.28);
  --forest-action: #146c38;
  --forest-action-hover: #0e542b;
  --forest-tint: #e7f6ec;
  --link-accent: #146c38;
  --link-accent-hover: #0e542b;

  /* Acento sub-marca Voluntarios */
  --vol-cyan: #18c4d8;
  --vol-cyan-bright: #49ddf0;
  --vol-cyan-deep: #0b7c8b;
  --vol-cyan-glow: rgba(24, 196, 216, 0.28);
  --vol-accent-text: #0b7c8b;

  /* Acentos oficiales por área (extraídos de assets/img/Areas) */
  --area-comunicaciones: #b8124b;
  --area-proyectos: #f07838;
  --area-salud: #7545ad;
  --area-voluntarios: #24c4d8;

  /* Glassmorphism — Superficies translúcidas adaptables al tema */
  --glass-light-bg: rgba(255, 255, 255, 0.72);
  --glass-light-bg-hover: rgba(255, 255, 255, 0.88);
  --glass-light-border: rgba(255, 255, 255, 0.92);
  --glass-light-stroke: rgba(11, 34, 57, 0.09);
  --glass-light-sheen: rgba(255, 255, 255, 0.52);
  --glass-light-shadow:
    0 12px 34px rgba(11, 34, 57, 0.08),
    0 2px 6px rgba(11, 34, 57, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-light-shadow-hover:
    0 20px 48px rgba(11, 34, 57, 0.14),
    0 4px 12px rgba(20, 108, 56, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);

  /* Glassmorphism — Superficies oscuras fijas (Hero / Proyectos) */
  --glass-dark-bg: rgba(255, 255, 255, 0.065);
  --glass-dark-bg-hover: rgba(255, 255, 255, 0.11);
  --glass-dark-border: rgba(255, 255, 255, 0.16);
  --glass-dark-border-hover: rgba(131, 221, 100, 0.45);
  --glass-dark-shadow:
    0 16px 42px rgba(3, 10, 19, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);

  --glass-blur: blur(18px) saturate(160%);

  /* Estados */
  --status-error: #b91c1c;
  --status-error-bg: rgba(254, 242, 242, 0.94);
  --status-success: #146c38;
  --status-success-bg: rgba(236, 253, 243, 0.94);

  /* Tipografía */
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;

  /* Escala fluida */
  --text-xs: 0.875rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.2rem;
  --text-xl: clamp(1.375rem, 1.2rem + 0.6vw, 1.65rem);
  --text-2xl: clamp(1.9rem, 1.5rem + 1.5vw, 2.75rem);
  --text-hero: clamp(2.45rem, 1.85rem + 2.5vw, 4rem);

  /* Layout y ritmo (8pt grid) */
  --container-max: 1220px;
  --container-pad: clamp(1.25rem, 3vw, 2.5rem);
  --section-py: clamp(4.5rem, 7.5vw, 7rem);
  --header-h: 78px;

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Sombras de foco y modales */
  --shadow-focus: 0 0 0 3px rgba(20, 108, 56, 0.28);
  --shadow-focus-cyan: 0 0 0 3px rgba(24, 196, 216, 0.32);
  --shadow-modal: 0 28px 80px rgba(5, 18, 32, 0.48);

  /* Movimiento */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --dur-fast: 180ms;
  --dur-base: 300ms;
  --dur-slow: 620ms;
}

/* ==========================================================================
   Modo Oscuro Glassmorphism ([data-theme="dark"])
   ========================================================================== */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-page: #071525;
  --bg-section-alt: linear-gradient(180deg, #0a1b2e 0%, #071525 100%);
  --mist-surface: #0f243b;
  --bg-input: rgba(15, 36, 59, 0.86);
  --bg-input-focus: rgba(18, 44, 72, 0.98);
  --bg-modal: rgba(10, 27, 46, 0.96);
  --bg-header-scrolled: rgba(5, 18, 32, 0.88);
  --border-header-scrolled: rgba(255, 255, 255, 0.12);

  --line-subtle: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.24);

  --heading-color: #f4f8fc;
  --text-primary: #eef4fa;
  --text-secondary: #b7c8da;
  --text-muted: #8ea5bc;

  --link-accent: #83dd64;
  --link-accent-hover: #9beb7e;
  --forest-tint: rgba(131, 221, 100, 0.14);
  --vol-accent-text: #49ddf0;

  --glass-light-bg: rgba(16, 38, 63, 0.66);
  --glass-light-bg-hover: rgba(22, 50, 82, 0.82);
  --glass-light-border: rgba(255, 255, 255, 0.15);
  --glass-light-stroke: rgba(131, 221, 100, 0.12);
  --glass-light-sheen: rgba(131, 221, 100, 0.14);
  --glass-light-shadow:
    0 16px 40px rgba(2, 8, 16, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --glass-light-shadow-hover:
    0 24px 56px rgba(2, 8, 16, 0.62),
    0 0 0 1px rgba(131, 221, 100, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  --status-error: #fca5a5;
  --status-error-bg: rgba(127, 29, 29, 0.42);
  --status-success: #86efac;
  --status-success-bg: rgba(20, 83, 45, 0.45);
}
