/* ==========================================================================
   David J. Ferguson — site stylesheet
   Aesthetic: formal / editorial, in the spirit of royal.uk — generous
   whitespace, serif headlines, tracked uppercase labels, card-based grids —
   recolored into gold, royal blue, and black.
   ========================================================================== */

:root {
  color-scheme: light;

  /* -- palette -- */
  --black: #0b0c10;
  --royal: #1d2d6b;
  --royal-deep: #11183f;
  --gold: #c9a227;
  --gold-light: #e3bb4d;
  --gold-pale: #f6e3ab;

  --bg: #faf7f0;
  --surface: #ffffff;
  --ink: #15161a;
  --ink-soft: #53565f;
  --line: rgba(11, 12, 16, 0.12);

  --accent-soft: rgba(201, 162, 39, 0.16);
  --accent-line: rgba(201, 162, 39, 0.45);
  --accent-ink: #8a6a12;

  --radius: 10px;
  --shadow: 0 12px 30px rgba(11, 12, 16, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  color: var(--black);
  margin: 0;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.25;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--royal);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--gold);
}

main p a,
.section-intro a,
.card p a,
li a,
.disclaimer p a {
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 3px;
}

::selection {
  background: var(--gold);
  color: var(--black);
}

em {
  font-style: italic;
}

strong {
  font-weight: 700;
}

/* -- eyebrow / small labels -- */
.eyebrow {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--royal);
  margin-bottom: 10px;
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 2px solid var(--gold);
}

.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--black);
}

.wordmark span {
  color: var(--royal);
}

.wordmark:hover {
  color: var(--black);
}

.core-values {
  padding-left: 44px;
  font-family: 'DM Sans', sans-serif;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}

.pages {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.pages a {
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.pages a:hover {
  color: var(--royal);
}

.pages a.active {
  color: var(--black);
  border-bottom-color: var(--gold);
}

/* ==========================================================================
   Main / layout
   ========================================================================== */

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 90px;
}

/* -- hero -- */
.hero {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin: 8px 0 18px;
}

.hero .lede {
  max-width: 680px;
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.hero .contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: .9rem;
  color: var(--ink-soft);
}

.hero .contact a {
  color: var(--royal);
  font-weight: 700;
}

/* -- generic content block -- */
.block {
  margin-bottom: 64px;
}

.section-head {
  margin-bottom: 24px;
  max-width: 720px;
}

.section-head h2 {
  font-size: 1.65rem;
  margin: 4px 0 10px;
}

.section-intro {
  color: var(--ink-soft);
  margin: 0;
  max-width: 680px;
}

/* ==========================================================================
   Grids, stacks, cards
   ========================================================================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 8px;
}

.card-head h3,
.card > h3 {
  font-size: 1.05rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card p,
.card > p {
  color: var(--ink-soft);
}

.meta {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--royal);
  white-space: nowrap;
}

.tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.spaced-card {
  margin-top: 16px;
}

.slightly-spaced-card {
  margin-top: 14px;
}

/* ==========================================================================
   Stats, pills, links, lists
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats .num {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.85rem;
  color: var(--royal);
}

.stats .label {
  display: block;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin-top: 4px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  font-size: .8rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 14px;
}

.links a {
  font-weight: 700;
  font-size: .92rem;
  border-bottom: 1px solid transparent;
}

.links a:hover {
  border-bottom-color: var(--gold);
}

ul.plain,
ol.plain {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

ul.plain li,
ol.plain li {
  padding-left: 20px;
  position: relative;
  color: var(--ink-soft);
}

ul.plain li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold);
}

ol.plain {
  counter-reset: item;
}

ol.plain li {
  counter-increment: item;
}

ol.plain li::before {
  content: counter(item) ".";
  color: var(--royal);
  font-weight: 700;
  position: absolute;
  left: 0;
}

/* ==========================================================================
   Timeline (Education)
   ========================================================================== */

.timeline {
  display: grid;
  gap: 24px;
  border-left: 2px solid var(--gold);
  padding-left: 26px;
}

.timeline .item {
  position: relative;
}

.timeline .item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--royal);
  border: 2px solid var(--gold);
}

.timeline .when {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--royal);
}

.timeline h3 {
  margin: 4px 0 2px;
  font-size: 1.05rem;
}

.timeline .where {
  font-size: .88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 6px;
}

.timeline p {
  color: var(--ink-soft);
  margin: 0;
}

/* -- side note (story-grid aside) -- */
.side-note {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--royal);
  border-left: 3px solid var(--gold);
  padding-left: 18px;
}

/* ==========================================================================
   Media
   ========================================================================== */

.media-frame {
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.family-photo {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* ==========================================================================
   Disclaimer box
   ========================================================================== */

.disclaimer {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.disclaimer .eyebrow {
  color: var(--accent-ink);
}

.disclaimer p {
  color: var(--ink-soft);
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Call-to-action row (page footer navigation)
   ========================================================================== */

.cta-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.cta {
  display: block;
  background: linear-gradient(155deg, var(--black), var(--royal-deep));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px 24px;
  color: #fff;
  transition: border-color .2s ease, transform .2s ease;
}

.cta:hover {
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

.cta .eyebrow {
  color: var(--gold);
}

.cta h3 {
  color: #fff;
  font-size: 1.25rem;
  margin: 6px 0 8px;
}

.cta p {
  color: rgba(255, 255, 255, .74);
  margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: var(--black);
  color: var(--gold-pale);
  text-align: center;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .85rem;
  border-top: 3px solid var(--gold);
}

footer span:first-child {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  letter-spacing: .05em;
  color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px) {
  .grid-2,
  .cta-row,
  .stats {
    grid-template-columns: 1fr;
  }

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .core-values {
    white-space: normal;
    padding-left: 0;
  }

  .hero {
    padding: 52px 0 40px;
  }
}
