/* ==========================================================================
   tokens.css — BAMA Asesoría Inmobiliaria · Puerto Peñasco, Sonora
   Identidad: el techo rojo y negro del logotipo + la arena del desierto
   sonorense + el azul profundo del Mar de Cortés como superficie nocturna.
   Ejes: sobrio 2/5 · cálido 4/5 · contemporáneo 4/5 · aireado 4/5 · accesible.
   Verificado con: node scripts/contrast.mjs tokens.css
   ========================================================================== */

/* Fuentes alojadas en el sitio (subconjunto latino: incluye ñ, acentos, ¿ ¡). Sin dependencia de Google. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* ---------- Neutros (tintados hacia arena) ---------- */
  --bg:            #F7F3EC;  /* arena clara: fondo principal */
  --surface:       #FFFFFF;  /* tarjetas, campos */
  --muted:         #EFE8DD;  /* sección alterna (adobe) */
  --muted-2:       #E4DACB;  /* rellenos suaves, pistas de slider */
  --border:        #E2D9CB;  /* separadores 1px */
  --border-strong: #C2B5A2;  /* contorno de botones secundarios */
  --border-input:  #857A6B;  /* contorno de campos ≥ 3:1 sobre surface */

  --ink:   #1B1815;          /* titulares (negro del techo) */
  --ink-2: #36302A;          /* lectura */
  --ink-3: #5A5147;          /* secundario */
  --ink-4: #6E6457;          /* metadatos */

  /* ---------- Marca: rojo del techo BAMA ---------- */
  --brand-50:  #FBEDEC;
  --brand-100: #F5D3D1;
  --brand-300: #E0787A;
  --brand-500: #C0282F;      /* rojo BAMA (ajustado para AA con blanco) */
  --brand-600: #A11F25;
  --brand-700: #8C1B20;
  --brand: var(--brand-500);
  --on-brand: #FFFFFF;
  --brand-hover:       var(--brand-600);
  --brand-soft:        var(--brand-50);
  --brand-soft-border: var(--brand-100);
  --brand-text:        var(--brand-700);
  --brand-on-inverse:  #F08A86;  /* rojo legible sobre la banda oscura */

  /* Acento: Mar de Cortés (enlaces informativos, mapas, datos) */
  --accent:    #1E5A62;
  --on-accent: #FFFFFF;

  /* WhatsApp: verde oscuro para que el texto blanco cumpla AA */
  --wa:       #0F7A45;
  --wa-hover: #0B6538;
  --on-wa:    #FFFFFF;
  --wa-signal: #25D366;      /* solo como punto/ícono decorativo */

  /* ---------- Semánticos ---------- */
  --ok: #1D7A46;     --ok-50: #E8F4EC;     --ok-700: #176039;
  --warn: #9A5B0B;   --warn-50: #FBF1E1;
  --danger: #B42318; --danger-50: #FDECEA; --danger-700: #A11D14;

  /* ---------- Superficie inversa (Mar de Cortés de noche) ---------- */
  --inverse:        #12262A;
  --inverse-2:      #1A3236;
  --inverse-3:      #234045;
  --inverse-border: rgba(255, 255, 255, 0.14);
  --on-inverse:     #FFFFFF;
  --on-inverse-2:   rgba(255, 255, 255, 0.76);
  --scrim:          rgba(18, 22, 24, 0.5);

  /* ---------- Tipografía ---------- */
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans:    "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; /* voz meta: misma familia, mayúsculas espaciadas */
  --display-weight:   650;
  --display-tracking: -0.028em;
  --display-leading:  1.02;
  --display-settings: "opsz" 72;
  --display-style:    normal;

  --fs-hero:  clamp(40px, 5.3vw, 76px);
  --fs-h2:    clamp(31px, 4.1vw, 54px);
  --fs-h3:    clamp(20px, 1.8vw, 24px);
  --fs-lead:  clamp(17px, 1.3vw, 19px);
  --fs-body:  16px;
  --fs-small: 14px;
  --fs-meta:  12px;

  /* ---------- Espaciado (escala 4) ---------- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  /* ---------- Forma ---------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 30px;
  --r-pill: 999px;

  /* ---------- Elevación (sombras tintadas, cortas) ---------- */
  --shadow-rgb: 46, 34, 22;
  --sh-xs: 0 1px 2px rgba(var(--shadow-rgb), 0.05);
  --sh-sm: 0 2px 4px rgba(var(--shadow-rgb), 0.05), 0 1px 2px rgba(var(--shadow-rgb), 0.04);
  --sh-md: 0 8px 18px -4px rgba(var(--shadow-rgb), 0.10), 0 2px 6px -1px rgba(var(--shadow-rgb), 0.05);
  --sh-lg: 0 18px 36px -10px rgba(var(--shadow-rgb), 0.18), 0 4px 10px -2px rgba(var(--shadow-rgb), 0.06);
  --sh-xl: 0 30px 60px -18px rgba(var(--shadow-rgb), 0.28);
  --sh-btn: inset 0 0 0 1px rgba(0, 0, 0, 0.14), inset 0 -2px 0 rgba(0, 0, 0, 0.10), 0 2px 4px rgba(var(--shadow-rgb), 0.10);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 26%, transparent);

  /* ---------- Movimiento (fuente única; motion.js usa expo.out = --ease-out) ---------- */
  --ease:        cubic-bezier(0.2, 0.8, 0.2, 1);   /* micro */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);    /* entradas */
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);       /* salidas */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);   /* fundidos cruzados */
  --dur-press: 0.12s;
  --dur-1: 0.16s;   /* color, opacidad */
  --dur-2: 0.24s;   /* hover: elevación −2px */
  --dur-3: 0.36s;   /* capas: drawer, diálogo */
  --dur-4: 0.7s;    /* zoom de imagen */
  --lift: -2px;

  /* ---------- Capas ---------- */
  --z-header: 50;
  --z-float: 60;
  --z-overlay: 80;
  --z-layer: 90;
  --z-toast: 120;

  /* ---------- Layout ---------- */
  --header-h: 72px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 9vw, 120px);
  --head-gap: clamp(32px, 4vw, 52px);
  --grid-gap: clamp(16px, 2vw, 24px);
}
