/*
 * Tokens de diseño — Reserva Princesa
 * Fuente de verdad: DESIGN.md (raíz del proyecto), secciones 3-5.
 * Dirección visual "Mesa cálida" (NO Liquid Glass — ver DESIGN.md sección 2).
 *
 * Este archivo es compartido por Fase 1 (público), Fase 2 (admin) y Fase 3
 * (vista consolidada). No dupliques estos valores en otros CSS: importá este
 * archivo y usá las variables.
 */

/* Fraunces 500/600 + Inter 400/500/600: se cargan con <link rel="stylesheet">
   + <link rel="preconnect"> en el <head> de cada página (no @import, que
   bloquea el parser de CSS y retrasa el render en conexiones móviles
   lentas). font-display: swap ya viene en la URL de Google Fonts. */

:root {
  /* Color */
  --bg: #FAF6F1;
  --bg-alt: #F3ECE2;
  --surface: #FFFFFF;
  --surface-sunken: #F6F0E8;
  --border: #E8DFD1;
  --border-strong: #D8CBB6;
  --text-primary: #2B2420;
  --text-secondary: #6B6058;
  --text-muted: #9A8F84;
  --accent: #C1502E;
  --accent-hover: #A63F22;
  --accent-tint: #F5E1D8;
  --success: #3F6B3E;
  --success-tint: #E4EBDF;
  --warning: #B8791E;
  --warning-tint: #F6E8D3;
  --error: #B3261E;
  --error-tint: #F5DEDC;
  --overlay: rgba(43, 36, 32, 0.45);
  /* Panel admin (Fase 2, DESIGN.md sección 3): badge "No-show" — deliberadamente
     distinto de --error. Bug fix Fase 3: estaban documentados y usados en
     admin.css (.badge--no_show) pero nunca definidos acá, ver DECISIONS.md. */
  --noshow: #7A5C3E;
  --noshow-tint: #EDE3D6;

  /* Tipografía */
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Inter", -apple-system, "Segoe UI", sans-serif;

  /* Espaciado (grid 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-8: 3rem;
  --space-10: 4rem;

  /* Radios */
  --radius-input: 12px;
  --radius-card: 12px;
  --radius-button: 12px;
  --radius-chip: 10px;
  --radius-modal: 16px;
  --radius-circle: 50%;

  /* Elevación (sombras sólidas, sin blur de fondo) */
  --shadow-1: 0 1px 2px rgba(43, 36, 32, 0.06);
  --shadow-2: 0 4px 12px rgba(43, 36, 32, 0.10);
  --shadow-3: 0 12px 32px rgba(43, 36, 32, 0.18);
  --shadow-sticky: 0 -2px 8px rgba(43, 36, 32, 0.08);

  /* Layout */
  --content-max-width: 560px;
  --breakpoint-desktop: 768px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.3;
  margin: 0;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  text-wrap: balance;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

h3 {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.125rem;
  }
}

a {
  color: var(--accent-hover);
}

button,
a {
  touch-action: manipulation;
}

button {
  font-family: inherit;
}

/* Foco visible siempre — accesibilidad no negociable (DESIGN.md sección 10) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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