/* =========================================================
   Tokens · Daniel & Asier · Webs con IA (DISENO.md §1, §2, §5.3)
   ========================================================= */

/* Fuentes locales (OFL), subconjunto latino */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-var-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Base */
  --tinta: #0B0B0A;
  --carbon: #1A1918;
  --hueso: #F2EFE9;
  --gris: #9C9890;        /* secundario SOLO sobre oscuro */
  --gris-claro: #57544F;  /* secundario SOLO sobre hueso */
  --hueso-hueco: #E6E2DA;
  --filete-osc: rgb(242 239 233 / .14);
  --filete-cla: rgb(11 11 10 / .16);

  /* Acento (≤ 5 % de cada pantalla) */
  --acento: #FF5B1F;
  --acento-hover: #FF6E38;
  --acento-tinta: #B83A0B; /* naranja para texto sobre hueso */
  --sobre-acento: #0B0B0A;

  /* Cristal (solo menú y comunidad) */
  --cristal-bg: rgb(26 25 24 / .55);
  --cristal-borde: rgb(242 239 233 / .18);
  --cristal-blur: 18px;
  --cristal-brillo: linear-gradient(180deg, rgb(255 255 255 / .08), transparent 40%);

  /* Niebla */
  --niebla: #D9D5CD;

  /* Tipografía */
  --f-grot: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  /* Ronda 4: letra fina (pie de datos, menú, píldora) y antetítulos en serif cursiva */
  --f-fina: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-ante: "Instrument Serif", Georgia, "Times New Roman", serif;

  --t-mono: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
  --t-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --t-h3: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  --t-h2: clamp(2.75rem, 1.6rem + 5vw, 6.5rem);
  --t-h2-serif: clamp(2.5rem, 1.5rem + 4.4vw, 5.75rem);
  --t-cifra: clamp(10rem, 4rem + 26vw, 24rem);

  /* Espaciado y rejilla */
  --e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px; --e-5: 24px;
  --e-6: 32px; --e-7: 48px; --e-8: 64px; --e-9: 96px; --e-10: 144px;
  --seccion: clamp(96px, 60px + 10vw, 200px);
  --margen: clamp(16px, 8px + 2.2vw, 40px);
  --gutter: clamp(16px, 12px + 1vw, 24px);
  --max: 1440px;

  /* Radios */
  --r-0: 0;
  --r-1: 6px;
  --r-pill: 999px;
  --r-cristal: 20px;

  /* Curvas y duraciones */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in: cubic-bezier(0.32, 0, 0.67, 0);
  --d-micro: 160ms;
  --d-corta: 350ms;
  --d-media: 600ms;
  --d-larga: 900ms;
  --d-cine: 1400ms;

  /* Cajas «Lámina en la niebla» (ronda 5 · negocio/inspiracion/CAJAS.md §2.1) */
  --caja-1: #121110;
  --caja-2: #191715;
  --caja-luz: linear-gradient(180deg, rgb(242 239 233 / .045), rgb(242 239 233 / 0) 38%);
  --caja-filo: linear-gradient(180deg, rgb(242 239 233 / .20), rgb(242 239 233 / .07) 30%, rgb(242 239 233 / .05));
  --caja-canto: inset 0 1px 0 rgb(242 239 233 / .06);
  --caja-sombra: 0 1px 2px rgb(0 0 0 / .5), 0 24px 48px -24px rgb(0 0 0 / .8), 0 0 0 1px rgb(0 0 0 / .35);
  --caja-grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.09'/%3E%3C/svg%3E");
  --led-borde: rgb(255 91 31 / .55);
  --led-halo: rgb(255 91 31 / .16);
  --r-caja: clamp(12px, 10px + .4vw, 16px);
  --r-interior: calc(var(--r-caja) - 6px);
  --p-caja: clamp(20px, 14px + 1.6vw, 40px);
}
@media (prefers-reduced-motion: reduce) {
  :root { --d-media: 200ms; --d-larga: 200ms; --d-cine: 200ms; }
}
