/*
  Tokens del sistema de diseño de La Ñapa Stickers (ver docs/brand-spec.md).
  Paleta tierra: terracota para acciones, ocre para el foco y el número premiado.
  Breakpoints (no pueden ser variables en @media): md ≥ 768px · lg ≥ 1024px · xl ≥ 1280px.
  Tema oscuro inicial y tema claro a elección del visitante.
*/
:root {
  color-scheme: dark;

  /* Color */
  --color-bg: #1e1b16;
  --color-surface: #28241d;
  --color-surface-raised: #322d24;
  --color-border: #463f33;
  --color-border-strong: #7a6d58;
  --color-text: #f3ebdd;
  --color-text-body: #dcd1be;
  --color-text-muted: #a89c88;
  --color-brand: #e08a5c;
  --color-brand-hover: #eba57f;
  --color-brand-active: #c9744a;
  --color-on-brand: #1e1b16;
  --color-brand-tint: rgb(224 138 92 / 0.12);
  --color-flow: #9db394;
  --color-decision: #e0b25a;
  --color-success: #9fcf86;
  --color-error: #f08a7a;
  --color-focus: var(--color-decision);
  --color-resalte: #36d7b7;
  --sello-borde: #f3ebdd;
  --grano-opacidad: 0.05;

  /* Tipografía */
  --font-display: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter Variable', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Escala fluida 360px → 1440px */
  --text-display: clamp(2.25rem, 1.75rem + 2.22vw, 3.75rem);
  --text-h1: clamp(2rem, 1.667rem + 1.48vw, 3rem);
  --text-h2: clamp(1.625rem, 1.417rem + 0.93vw, 2.25rem);
  --text-h3: clamp(1.25rem, 1.167rem + 0.37vw, 1.5rem);
  --text-lead: clamp(1.125rem, 1.083rem + 0.185vw, 1.25rem);
  --text-body: clamp(1rem, 0.958rem + 0.185vw, 1.125rem);
  --text-small: 0.875rem;
  --text-label: 0.75rem;

  --leading-display: 1.1;
  --leading-h1: 1.15;
  --leading-h2: 1.2;
  --leading-h3: 1.3;
  --leading-lead: 1.6;
  --leading-body: 1.65;

  --measure: 68ch;

  /* Espaciado (base 4px) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --space-section: clamp(4rem, 3rem + 4.44vw, 7rem);

  /* Retícula */
  --container-max: 1200px;
  --gutter: 16px;
  --header-height: 68px;

  /* Forma */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;
  --border-width: 1px;

  /* Elevación */
  --highlight-1: inset 0 1px 0 rgb(255 255 255 / 0.06);
  --shadow-2: 0 12px 32px rgb(0 0 0 / 0.4);

  /* Movimiento */
  --motion-fast: 150ms;
  --motion-base: 200ms;
  --motion-reveal: 400ms;
  --motion-draw: 1000ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --stagger: 40ms;

  /* Capas */
  --z-header: 100;
  --z-fab: 200;
  --z-banner: 300;
  --z-menu: 400;

  /* Accesibilidad */
  --target-min: 44px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 40px;
  }
}

/* Tema claro (selector opcional de interfaz, contraste verificado WCAG AA) */
:root[data-theme='claro'] {
  color-scheme: light;
  --color-bg: #e8dcc7;
  --color-surface: #eee4d1;
  --color-surface-raised: #eee4d1;
  --color-border: #cfc0a4;
  --color-border-strong: #8c7b60;
  --color-text: #2a2118;
  --color-text-body: #3e3326;
  --color-text-muted: #6b5d48;
  --color-brand: #8f4220;
  --color-brand-hover: #7a381a;
  --color-brand-active: #66301a;
  --color-on-brand: #ffffff;
  --color-brand-tint: rgb(198 107 61 / 0.14);
  --color-flow: #475f3e;
  --color-decision: #7a5512;
  --color-success: #3f6b2a;
  --color-error: #a8322a;
  --color-focus: var(--color-decision);
  --color-resalte: #0a7f6c;
  --sello-borde: #fbf6ec;
  --grano-opacidad: 0.07;
  --highlight-1: none;
  --shadow-2: 0 12px 32px rgb(42 33 24 / 0.14);
}
