:root {
  /* Brand colours - fixed across themes (used on always-dark surfaces). */
  --brand-navy: #1c2b3a;
  --brand-navy-700: #243a4f;
  --gold: #b08d4f;
  --gold-dark: #94762f;

  /* Semantic tokens - overridden in dark mode. */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f5f7f9;
  --text: #222a31;
  --text-muted: #5b6770;
  --heading: #1c2b3a;
  --line: #e2e6ea;
  --link: #94762f;

  --max: 1140px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark theme: explicit user choice. */
html[data-theme="dark"] {
  --bg: #11171d;
  --surface: #1b232b;
  --surface-muted: #161d24;
  --text: #d6dde3;
  --text-muted: #9aa6b0;
  --heading: #e8edf1;
  --line: #2b3640;
  --link: #d8b877;
  --gold-dark: #d8b877;
}

/* No-JS fallback: honour the OS preference when no choice has been stored. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #11171d;
    --surface: #1b232b;
    --surface-muted: #161d24;
    --text: #d6dde3;
    --text-muted: #9aa6b0;
    --heading: #e8edf1;
    --line: #2b3640;
    --link: #d8b877;
    --gold-dark: #d8b877;
  }
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 { font-family: var(--serif); color: var(--heading); line-height: 1.2; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 820px; }

/* ---- Top bar ---- */
.topbar { background: var(--brand-navy); color: #cdd6df; font-size: .85rem; }
.topbar__inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center;
  padding: .5rem 1.25rem;
}
.topbar a { color: #e7edf2; }
.topbar__item { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.topbar__label { text-transform: uppercase; letter-spacing: .06em; color: var(--gold); font-weight: 600; }
.topbar__cta {
  margin-left: auto; background: var(--gold); color: #fff !important;
  padding: .35rem .9rem; border-radius: 3px; font-weight: 600;
}
.topbar__cta:hover { background: var(--gold-dark); text-decoration: none; }

/* ---- Dark-mode toggle ---- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 4px;
  background: transparent; color: #e7edf2; cursor: pointer;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .14); }
.theme-toggle svg { width: 16px; height: 16px; display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: block; }
html:not([data-theme="dark"]) .theme-toggle__moon { display: block; }

/* ---- Masthead / nav ---- */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; flex-wrap: wrap; }
.masthead__logo img { height: 64px; width: auto; }
.mainnav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.mainnav a { color: var(--text); font-weight: 600; font-size: .95rem; padding: .35rem 0; }
.mainnav a.is-active { color: var(--gold-dark); border-bottom: 2px solid var(--gold); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--heading); margin: 4px 0; border-radius: 2px; }

/* ---- Buttons ---- */
.btn { display: inline-block; padding: .65rem 1.4rem; border-radius: 3px; font-weight: 600; font-size: .95rem; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--gold); color: #fff; }
.btn--primary:hover { background: var(--gold-dark); }
.btn--ghost { border: 2px solid var(--text); color: var(--text); }
.btn--ghost:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ---- Hero ---- */
.hero { background: var(--brand-navy); color: #fff; padding: 4.5rem 0; }
.hero h1 { color: #fff; font-size: 2.6rem; max-width: 18ch; margin: 0 0 1.5rem; }
.consult { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero .consult .btn--ghost { border-color: #fff; color: #fff; }
.hero .consult .btn--ghost:hover { background: #fff; color: var(--brand-navy); }

/* ---- Sections ---- */
.section { padding: 3.5rem 0; }
.section--muted { background: var(--surface-muted); }
.section__title { font-size: 1.9rem; margin: 0 0 1.75rem; }
.section__more { margin-top: 2rem; }
.page-head { background: var(--surface-muted); border-bottom: 1px solid var(--line); padding: 2.5rem 0; }
.page-head h1 { font-size: 2.3rem; margin: 0; }
.page-head__eyebrow { text-transform: uppercase; letter-spacing: .08em; color: var(--gold-dark); font-weight: 600; margin: 0 0 .25rem; font-size: .8rem; }

/* ---- Prose ---- */
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.prose h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; color: var(--heading); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: .3rem 0; }
.footnote { color: var(--text-muted); font-size: .85rem; font-style: italic; }

/* ---- Practice grid ---- */
.practice-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.practice-grid a { display: block; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 1rem 1.1rem; color: var(--text); font-weight: 600; }
.practice-grid a:hover { background: var(--brand-navy); color: #fff; text-decoration: none; border-left-color: var(--gold); }
.practice-grid--cards a { min-height: 64px; display: flex; align-items: center; }

/* ---- People grid ---- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; }
.person-card { display: flex; flex-direction: column; text-align: center; color: var(--text); }
.person-card:hover { text-decoration: none; }
.person-card__photo { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-muted); border-radius: 4px; margin-bottom: .75rem; }
.person-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.person-card:hover .person-card__name { color: var(--link); }
.person-card__name { font-weight: 700; font-family: var(--serif); color: var(--heading); }
.person-card__title { color: var(--text-muted); font-size: .88rem; }

/* ---- News ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.75rem; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.news-card__image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-muted); }
.news-card__image img { width: 100%; height: 100%; object-fit: cover; }
.news-card__date { color: var(--gold-dark); font-size: .8rem; font-weight: 600; margin: 1rem 1rem 0; text-transform: uppercase; letter-spacing: .05em; }
.news-card h2, .news-card h3 { font-size: 1.1rem; margin: .35rem 1rem 1.25rem; }
.post__image { margin: 0 0 1.5rem; border-radius: 4px; }
.byline { color: var(--text-muted); font-size: .9rem; }

/* ---- Bio ---- */
.bio { padding: 3rem 0 0; }
.bio__head { display: grid; grid-template-columns: 260px 1fr; gap: 2.5rem; align-items: start; }
.bio__photo img { border-radius: 4px; width: 100%; }
.bio__intro h1 { font-size: 2rem; margin: 0 0 .25rem; }
.bio__star { color: var(--gold); }
.bio__role { color: var(--text-muted); font-weight: 600; margin: 0 0 1rem; }
.bio__contact { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.bio__areas h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.bio__areas ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.bio__areas li a { background: var(--surface-muted); border: 1px solid var(--line); padding: .3rem .7rem; border-radius: 3px; font-size: .85rem; }

/* ---- Callout / contact ---- */
.callout { background: var(--brand-navy); color: #fff; padding: 2.5rem 0; text-align: center; }
.callout h2 { color: #fff; margin: 0 0 .25rem; }
.callout p { margin: 0 0 1rem; color: #cdd6df; }
.callout__phone { display: inline-block; color: #fff; font-size: 1.3rem; font-weight: 700; font-family: var(--serif); margin: 0 .75rem; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 2.5rem; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1.5rem; }
.contact-card h2 { margin-top: 0; }
.contact-card__firm { font-weight: 600; }
.contact-card__map { margin-top: 1rem; }
.contact-email { background: var(--surface-muted); border: 1px solid var(--line); border-radius: 4px; padding: 2rem; max-width: 640px; }
.contact-email h2 { margin-top: 0; }
.contact-email__hours { color: var(--text-muted); }

/* ---- Lists / logos ---- */
.col-list { columns: 2; list-style: none; padding: 0; }
.col-list--three { columns: 3; }
.col-list li { margin: .25rem 0; break-inside: avoid; }
.logo-row { list-style: none; display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center; padding: 1.5rem 0; margin: 0; }
.logo-row img { max-height: 80px; width: auto; }

/* ---- Footer ---- */
.sitefooter { background: var(--brand-navy); color: #cdd6df; margin-top: 2rem; }
.sitefooter__grid { display: grid; grid-template-columns: 1.5fr 1.5fr 1fr; gap: 2.5rem; padding: 3rem 1.25rem; }
.sitefooter h2 { color: #fff; font-size: 1.1rem; border-bottom: 2px solid var(--gold); padding-bottom: .4rem; margin: 0 0 1rem; }
.sitefooter a { color: #e7edf2; }
.sitefooter__logo { height: 56px; margin-bottom: 1rem; }
.sitefooter__about p { font-size: .9rem; }
.office { font-size: .9rem; }
.sitefooter__legal { border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; padding: 1rem 0; }
.sitefooter__legal p { margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .mainnav { flex-basis: 100%; display: none; }
  .mainnav.is-open { display: block; }
  .mainnav ul { flex-direction: column; gap: .25rem; padding-top: .75rem; }
  .bio__head { grid-template-columns: 1fr; }
  .bio__photo { max-width: 240px; }
  .col-list, .col-list--three { columns: 1; }
  .sitefooter__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero h1 { font-size: 2rem; }
}
