/* ---------------------------------------------------------
   CANVAS — Puig Consumer Intelligence
   Design tokens derived from Puig Brand Guidelines v1
   Warm-gray paper palette (PMS 7527 / 7534 / 7536 / 419)
   --------------------------------------------------------- */

@font-face {
  font-family: 'Lettera';
  src: url('../fonts/LetteraTextLL-Light.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lettera';
  src: url('../fonts/LetteraTextLL-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lettera';
  src: url('../fonts/LetteraTextLL-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lettera';
  src: url('../fonts/LetteraTextLL-Italic.otf') format('opentype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Lettera';
  src: url('../fonts/LetteraTextLL-LightItalic.otf') format('opentype');
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Lettera';
  src: url('../fonts/LetteraTextLL-MediumItalic.otf') format('opentype');
  font-weight: 500; font-style: italic; font-display: swap;
}

:root {
  /* Puig warm-gray paper palette → converted to oklch for nuance */
  --paper-00: #FAFAF7;          /* lighter than 7527, pure canvas */
  --paper-10: #EDECE9;          /* PMS 7527 */
  --paper-20: #D0CAC2;          /* PMS 7534 */
  --paper-30: #87867A;          /* PMS 7536 */
  --ink-90:   #585855;          /* PMS 419 dark */
  --ink-100:  #1A1A18;          /* near black for text */
  --ink-70:   oklch(40% 0.005 90);
  --ink-50:   oklch(55% 0.005 90);
  --ink-30:   oklch(72% 0.005 90);

  /* Editorial hairlines */
  --rule:     oklch(82% 0.006 90);
  --rule-soft: oklch(90% 0.006 90);

  /* Accent — exposed via Tweaks. Default: Puig pigment (warm red) */
  --accent-h: 25;               /* hue */
  --accent-c: 0.14;             /* chroma */
  --accent:    oklch(55% var(--accent-c) var(--accent-h));
  --accent-ink: oklch(38% var(--accent-c) var(--accent-h));
  --accent-tint: oklch(96% 0.02 var(--accent-h));
  --accent-wash: oklch(92% 0.04 var(--accent-h));

  /* Spacing */
  --gutter: 32px;
  --rail: 240px;

  /* Type */
  --font-body: 'Lettera', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Instrument Serif', 'Lettera', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Lettera', ui-monospace, monospace;

  /* Radii — mostly sharp; one radius for cards */
  --r-card: 2px;
  --r-pill: 999px;

  /* Shadows — editorial, almost none */
  --shadow-1: 0 1px 0 oklch(0% 0 0 / 0.04);
  --shadow-card: 0 1px 2px oklch(0% 0 0 / 0.04), 0 8px 24px oklch(0% 0 0 / 0.03);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-100);
  background: var(--paper-00);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Typography primitives */
.t-display   { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.02; }
.t-serif     { font-family: var(--font-display); }
.t-mono      { font-family: var(--font-mono); letter-spacing: 0.02em; }
.t-eyebrow   { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-50); }
.t-caps      { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
hr.rule-soft { border: 0; border-top: 1px solid var(--rule-soft); margin: 0; }

button { font: inherit; color: inherit; }

/* Reusable bits */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--rule);
  border-radius: var(--r-pill); font-size: 12px; color: var(--ink-70);
  background: var(--paper-00);
}
.chip.accent { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-tint); }
.chip.solid { background: var(--ink-100); color: var(--paper-00); border-color: var(--ink-100); }

.kbd {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--rule);
  border-radius: 3px; background: var(--paper-00); font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-70);
}

/* Placeholder image pattern (used for persona portraits, brand shots, etc.) */
.placeholder-img {
  background:
    repeating-linear-gradient(135deg, var(--paper-10) 0 8px, var(--paper-20) 8px 9px);
  color: var(--ink-70);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex; align-items: center; justify-content: center;
}

/* Sparkline helper */
.spark { display: block; width: 100%; height: 28px; }

/* Grid/editorial column markers used for Bloomberg-terminal feel */
.grid-lines {
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px);
  background-size: 8.3333% 100%;
}
