/* ============================================= */
/*          ARCHIVO DE ESTILOS GLOBALES          */
/* ============================================= */
/*
 * Este archivo es la única fuente de verdad para los estilos
 * y variables de diseño de NogaCode.
 *
 * CONVENCIONES:
 * 1. Tailwind CSS Base: Se importan las capas base de Tailwind.
 * 2. Variables CSS (:root): Todas las variables de diseño
 *    se definen aquí, agrupadas por categoría.
 *    - Nomenclatura semántica para desacoplar el valor del propósito.
 *    - Unidades relativas (rem) para escalabilidad y accesibilidad.
 * 3. Estilos Base: Se aplican estilos globales a elementos HTML
 *    (body, h1-h6, a, etc.) para asegurar consistencia.
 * 4. Clases de Utilidad: Clases reutilizables para patrones
 *    comunes como contenedores.
*/

/* 1. Capas base de Tailwind CSS */
@tailwind base;
@tailwind components;
@tailwind utilities;


/* 2. Variables CSS Globales - REDISEÑADO CON LA NUEVA PALETA */
:root {
  /* === Paleta de Colores - Rediseño === */
  --color-brand-primary: #cc3e4e;         /* Rojo principal, fuerte y corporativo */
  --color-brand-primary-hover: #d0353a;   /* Rojo un poco más brillante para hovers */
  --color-brand-accent: #e68d7f;          /* Salmón/coral, para acentos y hovers */
  --color-brand-highlight: #f4d6be;       /* Beige/durazno claro, para textos sutiles o highlights */

  --color-background: #111111;            /* Fondo principal, gris muy oscuro */
  --color-surface-1: #1A1A1A;             /* Superficies primarias (tarjetas) */
  --color-surface-2: #242424;             /* Superficies secundarias (modales, hovers de fondos) */
  
  --color-text-base: #f0f0f0;             /* Texto principal, blanco roto suave */
  --color-text-muted: #a0a0a0;            /* Texto secundario, descripciones */
  --color-text-inverted: #000000;         /* Texto sobre fondos claros (usado en pocos sitios) */

  --color-interactive: var(--color-brand-primary);        /* Elementos clickeables (botones principales) */
  --color-interactive-hover: var(--color-brand-primary-hover); /* Hover para elementos interactivos */
  
  --color-border: rgba(255, 255, 255, 0.1); /* Bordes sutiles */
  --color-border-hover: rgba(230, 141, 127, 0.5); /* Bordes en hover con color de acento */


  /* === Tipografía === */
  --font-family-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.125rem; /* 18px */
  --font-size-lg: 1.25rem;  /* 20px */
  --font-size-xl: 1.5rem;   /* 24px */
  --font-size-2xl: 2rem;    /* 32px */
  --font-size-3xl: 2.5rem;  /* 40px */
  
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  --line-height-tight: 1.2;
  --line-height-base: 1.6;
  

  /* === Espaciado (Layout) === */
  --spacing-1: 0.25rem; /* 4px */
  --spacing-2: 0.5rem;  /* 8px */
  --spacing-3: 1rem;    /* 16px */
  --spacing-4: 1.5rem;  /* 24px */
  --spacing-5: 2rem;    /* 32px */
  --spacing-6: 4rem;    /* 64px */
  --container-width: 1400px;
  --container-padding: var(--spacing-5);


  /* === Bordes y Sombras === */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-brand: 0 8px 25px rgba(204, 62, 78, 0.25);


  /* === Transiciones y Animaciones === */
  --transition-short: all 0.2s ease-in-out;
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);


  /* === Z-Index (Capas) === */
  --z-index-base: 1;
  --z-index-content: 10;
  --z-index-header: 100;
  --z-index-modal: 1000;
  --z-index-chatbot: 999;
}


/* 3. Estilos Base para Elementos HTML */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-background);
  color: var(--color-text-base);
  font-family: var(--font-family-sans);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-3);
}

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

a:hover {
  color: var(--color-brand-highlight);
  opacity: 1;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}


/* 4. Clases de Utilidad Globales */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

@media (max-width: 768px) {
  :root {
    --container-padding: calc(var(--spacing-5) / 1.5); /* 21px */
  }
}

article h1,
aside h1,
nav h1,
section h1 {
  font-size: var(--font-size-3xl);
}