:root {
  /* Surfaces */
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-soft: #f1f3f7;

  /* Text */
  --text: #0e0f12;
  --text-dim: #454748;
  --text-faint: #868689;

  /* Brand accent — navy blue from M logo left peak */
  --accent: #1c3d80;         /* primary brand blue */
  --accent-hover: #2d5aa8;
  --accent-dark: #0d2458;    /* darker navy for text on light surfaces */
  --accent-on: #ffffff;      /* text color on solid accent (white) */
  --accent-soft: #e0e7f3;    /* light blue tint surface */
  --accent-mid: #5a7dc9;
  --accent-rgb: 28, 61, 128;

  /* Silver (from M logo right peak) — secondary metallic */
  --silver: #c5cdd8;
  --silver-dark: #7e8289;
  --silver-light: #eaedf2;

  /* Semantic */
  --danger: #d03238;
  --warning: #ffc107;
  --info: #3498db;

  /* Surfaces / lines */
  --line: rgba(14, 15, 18, 0.12);
  --line-soft: rgba(14, 15, 18, 0.08);

  /* Typography */
  --font-display: 'Inter', 'Inter Tight', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  font-feature-settings: "calt" 1, "ss01" 1;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.015em;
}

/* Wise display utility — extreme weight 900, ultra-tight 0.85 line-height */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.02em;
  font-feature-settings: "calt" 1;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: normal;
  letter-spacing: -0.01em;
}

/* Pill tag (section numbers, small category tags) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}
.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Shared em-pill treatment for display headings (used across hero, slab-head, contact, etc.) */
.display-em,
.hero-title em,
.slab-head h2 em,
.plaque h2 em,
.contact h2 em,
.ds-page-hero h1 em,
.case-copy h3 em {
  background: var(--accent);
  color: var(--accent-on);
  font-style: normal;
  padding: 0.04em 0.26em;
  border-radius: 0.32em;
  /* Keep the pill atomic — never split across a line break. The surrounding
     heading wraps around it as a single unit, avoiding orphan characters and
     the half-pill-on-next-line look. */
  white-space: nowrap;
  display: inline-block;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Reveal — gated by html.js-ready so FOUC-safe */
html.js-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s cubic-bezier(.2,.8,.2,1),
              transform .9s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--d, 0ms);
}
html.js-ready .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js-ready .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
