/* ============================================================
   Ian Aman Official: design tokens
   The one source for colour, type, space and motion.
   Custom properties and font faces only. No element or class
   rules live here, so this file is safe to load on any page.
   Palette and type come from the 2025 Brand Style Guide.
   ============================================================ */

@font-face {
  font-family: "Bebas Neue";
  src: url("/assets/fonts/bebas-neue-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-latin-italic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-latin-var.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Brand palette ---- */
  --ia-midnight: #0E0E0E;   /* backgrounds */
  --ia-bone: #F5F2EB;       /* primary type */
  --ia-ember: #C94B1A;      /* the only accent */
  --ia-smoke: #7A7672;      /* borders, large labels */
  --ia-whiskey: #D9A94B;    /* depth only: glows */
  --ia-ash: #3A3835;        /* cards, secondary surfaces */
  --ia-chair-blue: #3472AF; /* the chair, nothing else */

  /* ---- Derived for contrast and depth. Not new brand colours. ----
     Measured against WCAG 2.2 AA (see test-contrast.mjs):
     Smoke on Midnight is 4.29:1 and Ember on Midnight is 4.14:1,
     so neither may carry small text. */
  --ia-smoke-text: #9A958F;     /* small labels and citations on Midnight, 6.5:1 */
  --ia-bone-soft: #CFCBC3;      /* secondary text on Ash cards, 7.0:1 */
  --ia-raised: #171615;         /* panels one step above Midnight */
  --ia-line: rgba(245, 242, 235, 0.14);
  --ia-line-strong: rgba(245, 242, 235, 0.32);
  --ia-ember-soft: rgba(201, 75, 26, 0.16);
  --ia-ember-glow: rgba(201, 75, 26, 0.42);
  --ia-whiskey-glow: rgba(217, 169, 75, 0.22);

  /* ---- Roles: components use these, never the raw palette ---- */
  --ia-bg: var(--ia-midnight);
  --ia-surface: var(--ia-raised);
  --ia-card: var(--ia-ash);
  --ia-text: var(--ia-bone);
  --ia-text-muted: var(--ia-smoke-text);
  --ia-text-on-card: var(--ia-bone);
  --ia-text-muted-on-card: var(--ia-bone-soft);
  --ia-accent: var(--ia-ember);        /* large type, fills, rules */
  --ia-on-accent: var(--ia-bone);      /* labels on Ember: large and bold only */
  --ia-border: var(--ia-line);
  --ia-focus: var(--ia-bone);

  /* ---- Type ---- */
  --ia-font-display: "Bebas Neue", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --ia-font-voice: "Lora", Georgia, "Times New Roman", serif;
  --ia-font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --ia-fs-hero: clamp(3.25rem, 7vw, 5.9rem);
  --ia-fs-h2: clamp(2.75rem, 6.6vw, 5.25rem);
  --ia-fs-h3: clamp(1.75rem, 3.1vw, 2.5rem);
  --ia-fs-stat: clamp(4.25rem, 10vw, 8.5rem);
  --ia-fs-quote: clamp(1.5rem, 3.1vw, 2.5rem);
  --ia-fs-lead: clamp(1.15rem, 1.65vw, 1.4rem);
  --ia-fs-body: 1.0625rem;   /* 17px */
  --ia-fs-small: 0.9375rem;  /* 15px, the floor for running text */
  --ia-fs-label: 1.25rem;    /* Bebas labels */
  --ia-lh-tight: 0.92;
  --ia-lh-body: 1.6;

  /* ---- Space and shape ---- */
  --ia-max: 1200px;
  --ia-pad: clamp(1.25rem, 5vw, 3rem);
  --ia-section: clamp(4.5rem, 11vw, 9rem);
  --ia-radius: 16px;
  --ia-radius-sm: 10px;
  --ia-nav-h: 64px;

  /* ---- Motion: slow side, and only when the visitor acts ---- */
  --ia-ease: cubic-bezier(0.16, 0.84, 0.44, 1);
  --ia-dur: 700ms;
  --ia-dur-fast: 220ms;
}

/* Print and light variants swap roles, not components. */
[data-theme="print"] {
  --ia-bg: var(--ia-bone);
  --ia-surface: #ECE8DF;
  --ia-card: #E6E1D6;
  --ia-text: var(--ia-midnight);
  --ia-text-muted: var(--ia-ash);
  --ia-text-on-card: var(--ia-midnight);
  --ia-text-muted-on-card: var(--ia-ash);
  --ia-on-accent: var(--ia-bone);
  --ia-border: rgba(14, 14, 14, 0.18);
  --ia-line: rgba(14, 14, 14, 0.18);
  --ia-line-strong: rgba(14, 14, 14, 0.4);
  --ia-focus: var(--ia-midnight);
}
