/* ============================================
   JCH Architecture & Design — Design Tokens
   Sistema base. Reutilizable Sprint 2.
   ============================================ */

:root {
  /* ----- Paleta JCH (vigente) ----- */
  --jch-black: #000000;
  --jch-white: #FFFFFF;
  --jch-taupe: #A69F95;
  --jch-taupe-light: #BCB5A7;
  --jch-gray: #7A7A7A;
  --jch-slate: #606B73;

  /* Derivados sutiles para superficies */
  --jch-bone: #FAF8F5;
  --jch-pearl: #F2EFEA;
  --jch-charcoal: #1A1A1A;

  /* ----- Roles semánticos ----- */
  --color-bg: var(--jch-bone);
  --color-bg-alt: var(--jch-pearl);
  --color-bg-dark: var(--jch-charcoal);
  --color-bg-taupe: var(--jch-taupe);
  --color-bg-slate: var(--jch-slate);

  --color-text: var(--jch-charcoal);
  --color-text-muted: var(--jch-gray);
  --color-text-inverse: var(--jch-bone);
  --color-text-on-taupe: var(--jch-charcoal);
  --color-text-on-slate: var(--jch-bone);

  --color-rule: rgba(26, 26, 26, 0.12);
  --color-rule-strong: rgba(26, 26, 26, 0.25);
  --color-rule-inverse: rgba(250, 248, 245, 0.18);

  --color-accent-warm: var(--jch-taupe);
  --color-accent-cool: var(--jch-slate);

  /* ----- Tipografía ----- */
  --font-display: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Escala tipográfica — proporción 1.25 (mayor third) ajustada */
  --text-xs: 0.75rem;     /* 12px — labels, tags */
  --text-sm: 0.875rem;    /* 14px — meta, captions */
  --text-base: 1rem;      /* 16px — body */
  --text-md: 1.125rem;    /* 18px — body grande */
  --text-lg: 1.375rem;    /* 22px — subtítulos */
  --text-xl: 1.75rem;     /* 28px — h3 */
  --text-2xl: 2.5rem;     /* 40px — h2 */
  --text-3xl: 3.5rem;     /* 56px — h1 secciones */
  --text-4xl: 5rem;       /* 80px — hero */
  --text-5xl: 7rem;       /* 112px — display */

  /* Pesos */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Tracking (letter-spacing) */
  --track-tight: -0.02em;
  --track-normal: 0;
  --track-wide: 0.04em;
  --track-wider: 0.12em;
  --track-widest: 0.2em;

  /* Line heights */
  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;
  --leading-loose: 1.85;

  /* ----- Espaciado (escala 8px) ----- */
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.5rem;      /* 24px */
  --space-6: 2rem;        /* 32px */
  --space-7: 3rem;        /* 48px */
  --space-8: 4rem;        /* 64px */
  --space-9: 6rem;        /* 96px */
  --space-10: 8rem;       /* 128px */
  --space-11: 10rem;      /* 160px */
  --space-12: 12rem;      /* 192px */

  /* ----- Layout ----- */
  --container-max: 1440px;
  --container-narrow: 960px;
  --container-content: 720px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* ----- Bordes y radios ----- */
  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 4px;

  /* ----- Transiciones ----- */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* ----- Sombras (sutiles, editorial) ----- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);

  /* ----- Z-index ----- */
  --z-base: 1;
  --z-header: 100;
  --z-overlay: 200;
}

/* Soporte responsivo de la escala tipográfica */
@media (max-width: 768px) {
  :root {
    --text-2xl: 2rem;     /* 32px */
    --text-3xl: 2.5rem;   /* 40px */
    --text-4xl: 3.25rem;  /* 52px */
    --text-5xl: 4rem;     /* 64px */
  }
}

@media (max-width: 480px) {
  :root {
    --text-2xl: 1.75rem;
    --text-3xl: 2.125rem;
    --text-4xl: 2.625rem;
    --text-5xl: 3rem;
  }
}
