/* ============================================
   Design Tokens — Agencia Kururu
   Sistema de diseño centralizado
   ============================================ */

/* ---- Reset Moderno ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* ---- Tokens ---- */
:root {
  /* Colores — Paleta Agencia Kururu
     Base: #333b55 (navy), #6b892e (verde oliva), #f3f3f3 (off-white) */
  --color-primary: #333b55;
  --color-primary-light: #4a5478;
  --color-primary-dark: #232940;

  --color-accent: #6b892e;
  --color-accent-light: #84a645;

  --color-dark: #1c2035;
  --color-dark-soft: #272d47;
  --color-surface: #f3f3f3;
  --color-surface-alt: #e8e8e8;
  --color-white: #ffffff;
  --color-black: #111320;

  --color-text: #2a2f42;
  --color-text-muted: #6b7190;
  --color-text-light: #9ca2b5;
  --color-text-on-dark: #e4e6ec;
  --color-text-on-primary: #ffffff;

  --color-border: #d8dae2;
  --color-border-light: #ecedf1;

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #333b55 0%, #4a5478 100%);
  --gradient-accent: linear-gradient(135deg, #6b892e 0%, #84a645 100%);
  --gradient-dark: linear-gradient(135deg, #1c2035 0%, #333b55 100%);
  --gradient-hero: linear-gradient(160deg, rgba(51, 59, 85, 0.92) 0%, rgba(28, 32, 53, 0.88) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);

  /* Tipografía */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-md: 1.125rem;
  /* 18px */
  --text-lg: 1.25rem;
  /* 20px */
  --text-xl: 1.5rem;
  /* 24px */
  --text-2xl: 2rem;
  /* 32px */
  --text-3xl: 2.5rem;
  /* 40px */
  --text-4xl: 3rem;
  /* 48px */
  --text-5xl: 3.75rem;
  /* 60px */
  --text-hero: 4.5rem;
  /* 72px */

  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing — Escala 4px */
  --space-1: 0.25rem;
  /* 4px  */
  --space-2: 0.5rem;
  /* 8px  */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.25rem;
  /* 20px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-10: 2.5rem;
  /* 40px */
  --space-12: 3rem;
  /* 48px */
  --space-16: 4rem;
  /* 64px */
  --space-20: 5rem;
  /* 80px */
  --space-24: 6rem;
  /* 96px */
  --space-32: 8rem;
  /* 128px */

  /* Sombras — Escala de elevación */
  --shadow-xs: 0 1px 2px rgba(28, 32, 53, 0.05);
  --shadow-sm: 0 2px 8px rgba(28, 32, 53, 0.08);
  --shadow-md: 0 4px 16px rgba(28, 32, 53, 0.10);
  --shadow-lg: 0 8px 32px rgba(28, 32, 53, 0.12);
  --shadow-xl: 0 16px 48px rgba(28, 32, 53, 0.16);
  --shadow-glow: 0 0 24px rgba(35, 41, 64, 0.30);

  /* Radii */
  --radius-sm: 0.375rem;
  /* 6px  */
  --radius-md: 0.5rem;
  /* 8px  */
  --radius-lg: 0.75rem;
  /* 12px */
  --radius-xl: 1rem;
  /* 16px */
  --radius-2xl: 1.5rem;
  /* 24px */
  --radius-full: 9999px;

  /* Transiciones */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-overlay: 40;
  --z-modal: 50;
  --z-toast: 100;

  /* Container */
  --container-max: 1200px;
  --container-pad: var(--space-6);
}

/* ---- Base Styles ---- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-dark);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ---- Utilidades ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section-padding {
  padding-block: var(--space-24);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---- Animaciones de Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 100ms;
}

.reveal-delay-2 {
  transition-delay: 200ms;
}

.reveal-delay-3 {
  transition-delay: 300ms;
}

.reveal-delay-4 {
  transition-delay: 400ms;
}

.reveal-delay-5 {
  transition-delay: 500ms;
}

/* ---- Focus Accesible ---- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Scrollbar Custom ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}
