/* ==========================================================================
   Grupo Mahema — Design tokens
   Dirección: "taller editorial". Papel cálido, tinta azul marino, filetes
   finos y una tipografía serif con carácter. Un solo acento por apartado,
   usado con contención (nunca los tres a la vez como relleno).
   ========================================================================== */
:root {
  /* Neutros: papel y tinta */
  --paper: #f7f4ee;
  --paper-2: #efe9df;      /* secciones alternas */
  --paper-3: #e6dfd2;
  --card: #fcfbf8;
  --ink-900: #0e1a2b;      /* tinta principal */
  --ink-800: #16243a;      /* secciones oscuras */
  --ink-700: #2b3a50;
  --ink-500: #586577;      /* 5.4:1 sobre papel */
  --ink-300: #9aa3b1;
  --line: rgb(14 26 43 / 0.12);
  --line-strong: rgb(14 26 43 / 0.22);
  --bg: var(--paper-2);
  --surface: var(--paper);

  /* Marca paraguas (logo Grupo Mahema) */
  --brand: #1f4fb5;
  --brand-600: #183f93;
  --brand-soft: #e4e9f4;

  /* Site Web — azul acero + esfera granate */
  --web: #1f5a99;
  --web-600: #15426f;
  --web-soft: #e3eaf1;
  --web-sphere: #7a2e3a;

  /* Publicidad Sublimada — verde lima + gris */
  --sub-bright: #8cc63f;  /* solo decorativo */
  --sub: #3b7012;         /* texto y botones: 5.6:1 sobre papel */
  --sub-600: #2d560d;
  --sub-soft: #e9eedc;

  /* Instalación de Cámaras — rojo + azul rey */
  --cam: #c0161c;
  --cam-600: #9c1015;
  --cam-blue: #1e3a9e;
  --cam-soft: #f4e3df;

  /* WhatsApp (solo en botones de WhatsApp) */
  --wa: #25d366;
  --wa-ink: #07341a;

  /* Acento activo (cada página lo redefine con body[data-section]) */
  --accent: var(--brand);
  --accent-600: var(--brand-600);
  --accent-soft: var(--brand-soft);
  --accent-deco: var(--brand);
  --accent-on-ink: #8fb0ff;   /* acento legible sobre tinta */

  /* Tipografía */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --fs-2xl: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --fs-3xl: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);

  /* Espaciado (escala 4/8) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 7rem;

  /* Forma y elevación: filetes antes que sombras */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 0 rgb(14 26 43 / 0.04);
  --shadow-2: 0 1px 2px rgb(14 26 43 / 0.05), 0 8px 24px -12px rgb(14 26 43 / 0.18);
  --shadow-3: 0 2px 4px rgb(14 26 43 / 0.06), 0 24px 48px -20px rgb(14 26 43 / 0.32);

  /* Movimiento */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 260ms;
  --dur-slow: 700ms;

  /* Capas */
  --z-header: 40;
  --z-float: 50;
  --z-grain: 60;
  --z-modal: 100;

  --container: 1200px;
  --header-h: 68px;
  --mbar-h: 0px;

  /* Grano de papel (SVG feTurbulence, ~0.6 KB) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body[data-section="web"] {
  --accent: var(--web);
  --accent-600: var(--web-600);
  --accent-soft: var(--web-soft);
  --accent-deco: var(--web-sphere);
  --accent-on-ink: #9cc3ec;
}
body[data-section="sublimada"] {
  --accent: var(--sub);
  --accent-600: var(--sub-600);
  --accent-soft: var(--sub-soft);
  --accent-deco: var(--sub-bright);
  --accent-on-ink: #b5df7c;
}
body[data-section="camaras"] {
  --accent: var(--cam);
  --accent-600: var(--cam-600);
  --accent-soft: var(--cam-soft);
  --accent-deco: var(--cam-blue);
  --accent-on-ink: #ff9a9d;
}
