/*
 * Old Chessnut — brand tokens
 *
 * Drop this into the WordPress theme (e.g. as `style.css` partial, enqueued
 * via wp_enqueue_style, or pasted into Customizer additional CSS). The
 * --oc-* variables are the single source of truth for colour and type.
 * Override at .dark or [data-theme="dark"] if/when a dark theme is added.
 */

:root {
  /* ─── Colour · Midnight Royal ─── */
  --oc-ink:       #0e1230;   /* primary text, logo frame */
  --oc-indigo:    #2a3a8a;   /* secondary text, hover states */
  --oc-violet:    #6b3bd6;   /* accent — buttons, links, the rook */
  --oc-lilac:     #e2dcf2;   /* paper / card surfaces */
  --oc-mist:      #f1eef9;   /* page background */
  --oc-white:     #ffffff;
  --oc-violet-contrast: #ffffff;  /* text on violet buttons */

  /* ─── Type families ─── */
  --oc-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --oc-font-body:    "Lora", Georgia, "Times New Roman", serif;
  --oc-font-ui:      "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --oc-font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ─── Type scale (modular, 1.25 ratio) ─── */
  --oc-text-xs:   12px;
  --oc-text-sm:   14px;
  --oc-text-base: 17px;     /* body — generous for readable long-form */
  --oc-text-lg:   20px;
  --oc-text-xl:   26px;
  --oc-text-2xl:  34px;
  --oc-text-3xl:  44px;
  --oc-text-4xl:  56px;
  --oc-text-5xl:  72px;     /* hero headline */
  --oc-text-6xl:  96px;

  /* ─── Type weights ─── */
  --oc-w-regular:  400;
  --oc-w-medium:   500;
  --oc-w-semibold: 600;
  --oc-w-bold:     700;
  --oc-w-display:  800;     /* Fraunces display weight */

  /* ─── Line heights ─── */
  --oc-lh-tight:   1.05;    /* large display */
  --oc-lh-snug:    1.2;
  --oc-lh-normal:  1.55;    /* body */
  --oc-lh-relaxed: 1.7;

  /* ─── Letter spacing ─── */
  --oc-tracking-display:  -0.025em;
  --oc-tracking-headline: -0.02em;
  --oc-tracking-normal:    0;
  --oc-tracking-wide:      0.18em;   /* eyebrows, labels */
  --oc-tracking-widest:    0.24em;   /* mono labels */

  /* ─── Radii ─── */
  --oc-radius-sm:  6px;
  --oc-radius-md:  10px;
  --oc-radius-lg:  14px;
  --oc-radius-xl:  22px;
  --oc-radius-pill: 999px;

  /* ─── Spacing scale (in px) ─── */
  --oc-space-1: 4px;
  --oc-space-2: 8px;
  --oc-space-3: 12px;
  --oc-space-4: 16px;
  --oc-space-5: 20px;
  --oc-space-6: 24px;
  --oc-space-8: 32px;
  --oc-space-10: 40px;
  --oc-space-12: 48px;
  --oc-space-16: 64px;
  --oc-space-20: 80px;

  /* ─── Shadows ─── */
  --oc-shadow-card: 0 1px 0 rgba(14, 18, 48, 0.04), 0 12px 32px -16px rgba(14, 18, 48, 0.18);
}

/* ─── Base resets ─── */
body {
  background: var(--oc-mist);
  color: var(--oc-ink);
  font-family: var(--oc-font-body);
  font-size: var(--oc-text-base);
  line-height: var(--oc-lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── Headings · Fraunces ─── */
h1, h2, h3, h4, h5, h6,
.oc-display {
  font-family: var(--oc-font-display);
  font-weight: var(--oc-w-bold);
  letter-spacing: var(--oc-tracking-headline);
  line-height: var(--oc-lh-tight);
  color: var(--oc-ink);
  text-wrap: balance;
}
h1 { font-size: var(--oc-text-5xl); font-weight: var(--oc-w-display); letter-spacing: var(--oc-tracking-display); }
h2 { font-size: var(--oc-text-3xl); }
h3 { font-size: var(--oc-text-2xl); }
h4 { font-size: var(--oc-text-xl); }

/* ─── Body · Lora ─── */
p, li {
  font-family: var(--oc-font-body);
  font-size: var(--oc-text-base);
  line-height: var(--oc-lh-normal);
  text-wrap: pretty;
}

/* ─── Links ─── */
a {
  color: var(--oc-violet);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--oc-indigo); }

/* ─── Eyebrows / mono labels ─── */
.oc-eyebrow,
.oc-mono {
  font-family: var(--oc-font-mono);
  font-size: var(--oc-text-xs);
  letter-spacing: var(--oc-tracking-wide);
  text-transform: uppercase;
  font-weight: var(--oc-w-medium);
  color: var(--oc-violet);
}

/* ─── UI / Buttons · Inter ─── */
button,
.oc-button {
  font-family: var(--oc-font-ui);
  font-weight: var(--oc-w-semibold);
  font-size: var(--oc-text-sm);
  border-radius: var(--oc-radius-md);
  padding: 12px 22px;
  border: 0;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, color 0.15s ease;
}
.oc-button--primary {
  background: var(--oc-ink);
  color: var(--oc-mist);
}
.oc-button--primary:hover { background: var(--oc-indigo); }
.oc-button--secondary {
  background: var(--oc-lilac);
  color: var(--oc-ink);
}
.oc-button--ghost {
  background: transparent;
  color: var(--oc-ink);
  border: 1.5px solid var(--oc-ink);
}
.oc-button--accent {
  background: var(--oc-violet);
  color: var(--oc-violet-contrast);
}
.oc-button:active { transform: translateY(1px); }

/* ─── Cards ─── */
.oc-card {
  background: var(--oc-lilac);
  border-radius: var(--oc-radius-lg);
  padding: var(--oc-space-6);
}

/* ─── Navigation ─── */
.oc-nav {
  font-family: var(--oc-font-ui);
  font-weight: var(--oc-w-medium);
  font-size: var(--oc-text-sm);
}

/* ─── Chess move formatting (for PGN snippets, blog posts) ─── */
.oc-pgn,
code.move {
  font-family: var(--oc-font-mono);
  font-weight: var(--oc-w-medium);
  font-size: 0.92em;
}
