/* HALE & MARROW tokens: the single source of truth. Re-skin here first. */

@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/caslon-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/caslon-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/caslon-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* primitives. Obsidian luxe: two dark grounds, one ivory ground,
     no chromatic accent. Platinum carries hairlines and labels only. */
  --obsidian: #0b0b10;
  --obsidian-2: #12121a;
  --obsidian-3: #191926;
  --ivory: #efebdf;
  --ivory-2: #e5e0d0;
  --white: #ffffff;
  --platinum: #a8a8b4;      /* hairlines + labels on obsidian, AA 8.3:1 at label sizes */
  --platinum-deep: #63636e; /* labels on ivory, AA 5.0:1 at label sizes */

  /* semantic (obsidian theme is the default) */
  --bg: var(--obsidian);
  --bg-2: var(--obsidian-2);
  --bg-3: var(--obsidian-3);
  --fg: #ece8dc;
  --muted: #a5a094;
  --line: rgba(168, 168, 180, 0.32);
  --line-strong: rgba(168, 168, 180, 0.62);
  --accent: var(--platinum);
  --focus: #f5f2ea;

  /* glass (the pill nav; the only glass site in the panel) */
  --glass: rgba(18, 18, 26, 0.58);
  --glass-line: rgba(236, 232, 220, 0.16);
  --glass-blur: 16px;

  /* type: serif display, sans utility */
  --font-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-sans: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --t-display: clamp(2.35rem, 6.4vw, 5.6rem);
  --t-h1: clamp(2rem, 4.8vw, 4rem);
  --t-h2: clamp(1.65rem, 3.2vw, 2.7rem);
  --t-h3: clamp(1.2rem, 1.9vw, 1.55rem);
  --t-lead: clamp(1.1rem, 1.55vw, 1.3rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-label: 0.75rem;
  --lh-display: 1.12;
  --lh-heading: 1.18;
  --lh-body: 1.6;
  --track-label: 0.18em;

  /* space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 9rem;
  --section-pad: clamp(5.5rem, 13vh, 10rem);
  --gutter: clamp(1rem, 2.5vw, 1.5rem);
  --edge: clamp(1.25rem, 4vw, 4rem);
  --measure: 40rem;
  --max-w: 84rem;

  /* shape + depth */
  --r-1: 3px;
  --r-2: 8px;
  --r-3: 18px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 44px rgba(0, 0, 0, 0.4);

  /* motion */
  --dur-1: 150ms;
  --dur-2: 320ms;
  --dur-3: 650ms;
  --dur-4: 1100ms;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.83, 0, 0.17, 1);

  /* layers */
  --z-nav: 40;
  --z-menu: 50;
  --z-skip: 60;
}

/* print: obsidian yields to paper; every theme flips to ink on white */
@media print {
  :root, [data-theme="ivory"] {
    --bg: #fff;
    --bg-2: #fff;
    --bg-3: #f2f2f2;
    --fg: #000;
    --muted: #333;
    --line: #bbb;
    --line-strong: #777;
    --accent: #333;
    --focus: #000;
  }
}

/* ivory theme: any element with data-theme="ivory" flips the semantic set */
[data-theme="ivory"] {
  --bg: var(--ivory);
  --bg-2: var(--ivory-2);
  --bg-3: #dcd6c3;
  --fg: #16161e;
  --muted: #5c5749;
  --line: rgba(99, 99, 110, 0.34);
  --line-strong: rgba(99, 99, 110, 0.6);
  --accent: var(--platinum-deep);
  --focus: #0b0b10;
}
