/* ============================================================
   VARNHAM CONSULTING — ROOT STYLESHEET
   VAR/BR/17 · v4.0 · Canonical brand specification VAR/BR/15

   This stylesheet contains:
   - Foundation palette as CSS variables
   - Type system (DM Sans + Playfair Display)
   - Layout primitives (container, grids, spacing)
   - Shared components (nav, footer, wordmark, buttons, forms)

   Per-register accent overrides live in register-a.css / register-b.css /
   register-c.css. Pages link this file plus their register stylesheet.
   ============================================================ */

/* ============================================================
   1. CSS RESET — minimal
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: none; }
a { text-decoration: none; color: inherit; }

/* ============================================================
   2. FOUNDATION PALETTE — applies to every page
   ============================================================ */
:root {
  /* Foundation — five colours used on every register */
  --paper-warm: #f7f3ec;       /* print ground */
  --paper-cool: #faf8f4;       /* digital ground — default body */
  --ink: #111418;              /* primary text, wordmark */
  --ink-soft: #2d3138;         /* body prose */
  --muted: #7a7468;            /* secondary text, metadata */
  --rule: #d8d2c4;             /* dividers, borders */
  --stone: #8a8478;            /* tertiary text, alternative muted */

  /* Accent variables — register stylesheets override these */
  --accent: #6b1e2c;           /* default to oxblood */
  --accent-deep: #4a1219;      /* hover/active state */
  --accent-soft: #f4e8e8;      /* tinted backgrounds */
  --accent-on-dark: #f4e8e8;   /* accent text on dark grounds */

  /* Always-oxblood — the principal's name is always oxblood regardless of register */
  --oxblood: #6b1e2c;

  /* Layout tokens */
  --container-max: 1280px;
  --container-pad: 50px;

  /* Type tokens */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', Cambria, Georgia, 'Times New Roman', serif;

  /* Spacing scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 36px;
  --space-5: 50px;
  --space-6: 70px;
  --space-7: 100px;
  --space-8: 130px;
}

/* ============================================================
   3. BODY DEFAULTS
   ============================================================ */
body {
  background: var(--paper-cool);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   4. CONTAINER
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

@media (max-width: 800px) {
  :root { --container-pad: 24px; }
}

/* ============================================================
   5. WORDMARK
   ============================================================ */
.wm {
  font-family: var(--font-sans);
  line-height: 0.95;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.wm .v { font-weight: 600; }
.wm .c { font-weight: 300; margin-left: 0.5em; }

.wm-lockup {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
}
.wm-lockup .h-rule {
  height: 1px;
  background: var(--ink);
}
.wm-lockup .tag {
  font-family: var(--font-sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-size: 9px;
}

/* ============================================================
   6. PRINCIPAL NAME — Playfair italic, always oxblood
   This is the only place Playfair appears.
   ============================================================ */
.pf-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--oxblood);
}

/* ============================================================
   7. TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

h1 { font-size: clamp(44px, 5.5vw, 72px); line-height: 1; letter-spacing: -0.025em; }
h2 { font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; }
h3 { font-size: clamp(28px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.02em; }
h4 { font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
h5 { font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }

/* Headline emphasis — DM Sans italic on operative word or phrase
   Per VAR/BR/15.3 §3 the headline-emphasis rule. Use within h1/h2 only.
   Distinct from .pf-name (Playfair italic for principal's name only). */
h1 em.emph,
h2 em.emph,
h1 .emph,
h2 .emph {
  font-family: var(--font-sans);
  font-style: italic;
  font-weight: 600;
  color: inherit;
}

p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
p strong { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
}
.standfirst {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.metadata {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

/* ============================================================
   8. NAV — shared across all pages, accent varies by register
   ============================================================ */
.nav {
  background: rgba(250, 248, 244, 0.92);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}
.nav .wm { font-size: 14px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

.nav-cta {
  color: var(--paper-cool) !important;
  font-weight: 600;
  background: var(--accent);
  padding: 12px 18px;
  transition: background 0.2s ease;
}
.nav-cta:hover {
  background: var(--accent-deep);
  color: var(--paper-cool) !important;
}

@media (max-width: 800px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ============================================================
   9. PAGE STRIP — register signal at top of certain pages
   ============================================================ */
.page-strip {
  padding: 14px 0;
  color: var(--paper-cool);
}
.strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.strip-inner .label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(250, 248, 244, 0.65);
}
.strip-inner .meta {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(250, 248, 244, 0.5);
}

/* ============================================================
   10. SECTION SHELL
   ============================================================ */
.section {
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--rule);
}
.section.no-border { border-bottom: none; }

.section.dark {
  background: var(--ink);
  color: var(--paper-cool);
  border-bottom-color: var(--ink);
}
.section.dark p { color: rgba(250, 248, 244, 0.78); }
.section.dark p strong { color: var(--paper-cool); }
.section.dark h1, .section.dark h2, .section.dark h3, .section.dark h4 { color: var(--paper-cool); }

@media (max-width: 800px) {
  .section { padding: var(--space-6) 0; }
}

/* ============================================================
   11. SECTION HEADERS
   ============================================================ */
.section-head {
  margin-bottom: var(--space-5);
}
.section-head .eyebrow {
  display: block;
  margin-bottom: 18px;
}
.section-head h2 {
  margin-bottom: 24px;
  max-width: 800px;
}
.section-head .section-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 720px;
}
.section.dark .section-head .section-intro {
  color: rgba(250, 248, 244, 0.78);
}

/* ============================================================
   12. BUTTONS
   ============================================================ */
.btn-primary,
.btn-secondary,
.btn-tertiary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  padding: 16px 28px;
  background: var(--accent);
  color: var(--paper-cool);
}
.btn-primary:hover { background: var(--accent-deep); color: var(--paper-cool); }

.btn-secondary {
  padding: 14px 0 14px 18px;
  border-left: 2px solid var(--accent);
  color: var(--accent);
}
.btn-secondary:hover { color: var(--accent-deep); border-left-color: var(--accent-deep); }

.btn-tertiary {
  padding: 16px 28px;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn-tertiary:hover { background: var(--ink); color: var(--paper-cool); }

.section.dark .btn-tertiary {
  border-color: var(--paper-cool);
  color: var(--paper-cool);
}
.section.dark .btn-tertiary:hover { background: var(--paper-cool); color: var(--ink); }

/* ============================================================
   13. PRINCIPAL CARD — used on home page hero, about pages
   ============================================================ */
.principal-card {
  background: var(--paper-cool);
  border: 1px solid var(--rule);
  position: relative;
  box-shadow: 0 30px 60px -25px rgba(74, 18, 25, 0.12);
}
.principal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent);
}
.pc-portrait {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #d8d2c4 0%, #b9b1a0 50%, #8a8478 100%);
  position: relative;
  overflow: hidden;
}
.pc-portrait::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 35% 35%, rgba(255, 255, 255, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 0, 0, 0.18) 0%, transparent 50%);
}
.pc-portrait::after {
  content: 'PORTRAIT';
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.7);
}
.pc-body { padding: 32px 36px 36px; }
.pc-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 38px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.pc-role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 24px;
}
.pc-bio {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 22px;
}
.pc-creds {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  line-height: 1.9;
}
.pc-creds strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   14. ATTRIBUTION BAR — institution beneath principal
   ============================================================ */
.attribution {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-cool);
}
.attribution-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.attribution .left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.attribution .of {
  font-size: 11px;
  color: var(--muted);
}
.attribution .wm { font-size: 12px; }
.attribution .meta {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

/* ============================================================
   15. CARDS — used for service tiles, sector cards, principles
   ============================================================ */
.card {
  background: var(--paper-cool);
  border: 1px solid var(--rule);
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .card-grid, .card-grid.two, .card-grid.four { grid-template-columns: 1fr; }
}

.card .card-num {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 14px;
}
.card h4 {
  margin-bottom: 14px;
}
.card p {
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
}
.card .card-link {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
}

/* ============================================================
   16. STAT BLOCKS — used on dark sections with stats
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(250, 248, 244, 0.12);
  border: 1px solid rgba(250, 248, 244, 0.12);
}
.stat {
  background: var(--ink);
  padding: 36px 32px;
}
.stat .num {
  font-weight: 600;
  font-size: 48px;
  color: var(--paper-cool);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.stat .num .unit {
  font-size: 0.45em;
  color: var(--accent-on-dark);
  margin-left: 4px;
  font-weight: 500;
}
.stat .desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(250, 248, 244, 0.7);
}

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   17. FORM ELEMENTS
   ============================================================ */
.form-row {
  display: grid;
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper-warm);
  margin: 0 auto;
  max-width: 520px;
}
.form-row.inline {
  grid-template-columns: 1fr auto;
}
.form-row input,
.form-row textarea {
  border: none;
  padding: 16px 20px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.form-row input:focus,
.form-row textarea:focus { background: rgba(255, 255, 255, 0.4); }
.form-row button {
  padding: 16px 28px;
  background: var(--accent);
  color: var(--paper-cool);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.form-row button:hover { background: var(--accent-deep); }

@media (max-width: 600px) {
  .form-row.inline { grid-template-columns: 1fr; }
}

/* ============================================================
   18. CONTACT CARD — used on contact band sections
   ============================================================ */
.contact-card {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 44px 40px;
  border-left: 4px solid var(--accent);
}
.contact-card .label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 22px;
}
.contact-card .row {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: baseline;
}
.contact-card .row:last-child { border-bottom: none; padding-bottom: 0; }
.contact-card .row .k {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.contact-card .row .v {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.contact-card .row .v a { color: var(--accent); }
.contact-card .row .v a:hover { color: var(--accent-deep); }

/* ============================================================
   18b. INTAKE CARD — replaces direct-contact card on home/about
   Per brand reference section 12, no direct contact details
   are displayed; the intake card directs to the form.
   ============================================================ */
.intake-card {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 44px 40px;
  border-left: 4px solid var(--accent);
}
.intake-card .label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 22px;
}
.intake-card h4 {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}
.intake-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.intake-card p strong { color: var(--ink); font-weight: 600; }
.intake-card .intake-steps {
  margin: 22px 0 26px 0;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.intake-card .intake-steps .step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.intake-card .intake-steps .step:last-child { margin-bottom: 0; }
.intake-card .intake-steps .step .num {
  font-weight: 600;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.intake-card .intake-steps .step strong { color: var(--ink); font-weight: 600; }
.intake-card .btn-primary {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   19. FOOTER — shared across all pages
   ============================================================ */
.footer {
  background: var(--paper-warm);
  padding: 70px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 50px;
}
.footer-brand .wm-line {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.footer-brand .wm { font-size: 13px; }
.footer-brand .h-rule {
  width: 80px;
  height: 1px;
  background: var(--ink);
}
.footer-brand .tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
}
.footer-brand .principal-line {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.footer-brand .principal-line .label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 6px;
}
.footer-brand .principal-line .name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--ink);
}
.footer-col h5 {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--ink);
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }
.footer-legal {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   20. UTILITY CLASSES
   ============================================================ */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.split-12-10 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; }
.split-13-10 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px; align-items: center; }

@media (max-width: 1100px) {
  .split-2, .split-12-10, .split-13-10 { grid-template-columns: 1fr; gap: 50px; }
}

.divider-rule {
  height: 1px;
  background: var(--rule);
  margin: var(--space-5) 0;
}

.text-center { text-align: center; }
.max-580 { max-width: 580px; }
.max-720 { max-width: 720px; }
.max-840 { max-width: 840px; }

.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

/* ============================================================
   21. PROSE — for legal pages, long-form content
   ============================================================ */
.prose {
  max-width: 720px;
}
.prose h1 { font-size: clamp(36px, 4.5vw, 56px); margin-bottom: 24px; }
.prose h2 {
  font-size: 28px;
  margin: 48px 0 16px;
}
.prose h3 {
  font-size: 20px;
  margin: 32px 0 14px;
}
.prose p {
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.75;
}
.prose ul, .prose ol {
  margin: 18px 0 18px 24px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; color: var(--ink); }
.prose a { color: var(--accent); border-bottom: 1px solid var(--accent); }
.prose a:hover { color: var(--accent-deep); border-bottom-color: var(--accent-deep); }

.prose .meta {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ============================================================
   END OF ROOT STYLESHEET
   ============================================================ */
