/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --white:    #FAFAF8;
  --black:    #1A1A1A;
  --accent:   #2C4A6E;
  --accent-light: #E8EDF3;
  --mid:      #8A8A85;
  --border:   #E2E2DE;
  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-md:    1.125rem;
  --fs-lg:    1.375rem;
  --fs-xl:    2rem;
  --fs-2xl:   2.75rem;
  --fs-3xl:   3.75rem;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semi:   600;
  --radius:   2px;
  --max-w:    1100px;
  --gap:      2rem;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--black);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
.display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
.section {
  padding: 5rem 0;
}
.section--grey {
  background: #F3F3F0;
}
.section--accent {
  background: var(--accent);
  color: var(--white);
}

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
.nav__logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.2;
}
.nav__logo > div {
  display: flex;
  flex-direction: column;
}
.nav__logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.nav__logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
}
.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav__links a {
  font-size: var(--fs-sm);
  color: var(--black);
  font-weight: var(--fw-medium);
  transition: color 0.15s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--accent); }
.nav__cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: var(--fs-sm) !important;
  transition: opacity 0.15s !important;
}
.nav__cta:hover { opacity: 0.85; }

/* ─── MOBILE NAV ─────────────────────────────────────────── */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: all 0.2s;
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem 1.5rem;
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--black);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 0;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}
.footer__brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.footer__brand-tag {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}
.footer__col-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1rem;
}
.footer__col a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--black);
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--mid);
}

@media (max-width: 640px) {
  .footer__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ─── CONTACT BAR ────────────────────────────────────────── */
.contact-bar {
  background: var(--accent);
  color: var(--white);
  padding: 0.65rem 0;
  text-align: center;
  font-size: var(--fs-sm);
}
.contact-bar a {
  color: var(--white);
  font-weight: var(--fw-medium);
  margin: 0 1rem;
  opacity: 0.92;
  transition: opacity 0.15s;
}
.contact-bar a:hover { opacity: 1; }
.contact-bar__sep { opacity: 0.4; }

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  padding: 7rem 0 6rem;
  border-bottom: 1px solid var(--border);
}
.hero__rule {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 1.75rem;
}
.hero__eyebrow { margin-bottom: 1.25rem; }
.hero__heading {
  font-size: clamp(var(--fs-2xl), 5vw, var(--fs-3xl));
  max-width: 700px;
  margin-bottom: 1.5rem;
}
.hero__sub {
  font-size: var(--fs-md);
  color: #555;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  font-family: 'Inter', sans-serif;
}
.btn--primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn--primary:hover { opacity: 0.88; }
.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--outline:hover {
  background: var(--accent-light);
}

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(44,74,110,0.08);
}
.card__icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 1.25rem;
}
.card__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--fs-xl);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.card__text { font-size: var(--fs-sm); color: #555; line-height: 1.7; }

/* ─── GRID ───────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ─── SIGNATURE ELEMENT: rule + tagline ──────────────────── */
.tagline-rule {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 3rem 0;
}
.tagline-rule__text {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
}
.tagline-rule__line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── PAGE HEADER (inner pages) ──────────────────────────── */
.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.page-header__eyebrow { margin-bottom: 1rem; }
.page-header__heading {
  font-size: clamp(var(--fs-xl), 4vw, var(--fs-2xl));
  max-width: 600px;
  margin-bottom: 1rem;
}
.page-header__sub {
  font-size: var(--fs-md);
  color: #555;
  max-width: 500px;
  line-height: 1.7;
}

/* ─── UTILITY ────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-mid { color: var(--mid); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ─── MOBILE OPTIMIZATIONS ───────────────────────────────── */
@media (max-width: 720px) {

  /* Contact bar */
  .contact-bar { font-size: 0.7rem; padding: 0.5rem 1rem; line-height: 1.8; }
  .contact-bar a { margin: 0 0.4rem; }
  .contact-bar__sep { display: none; }

  /* Spacing */
  .section { padding: 3rem 0; }
  .container { padding: 0 1.25rem; }

  /* Hero */
  .hero { padding: 3.5rem 0 3rem; }
  .hero__heading { font-size: 2rem; }
  .hero__sub { font-size: var(--fs-base); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  /* Page headers */
  .page-header { padding: 2.5rem 0 2rem; }
  .page-header__heading { font-size: 1.75rem; }
  .page-header__sub { font-size: var(--fs-base); }

  /* Cards */
  .card { padding: 1.5rem; }
  .card__title { font-size: 1.5rem; }

  /* Grids */
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }

  /* Tagline rule */
  .tagline-rule__line { display: none; }
  .tagline-rule { justify-content: center; }

  /* Nav */
  .nav__logo-name { font-size: 1rem; }
  .nav__logo-sub { display: none; }
  .nav__logo img { height: 32px !important; }
  .nav__inner { height: 58px; padding: 0 1.25rem; }

  /* Footer */
  .footer { padding: 2rem 0 1.5rem; }
}

/* ─── INLINE GRID MOBILE OVERRIDES ──────────────────────── */
/* These target the inline style grids used throughout the HTML */
@media (max-width: 720px) {

  /* Services sidebar layout */
  .container > div[style*="grid-template-columns:280px"] {
    display: block !important;
  }
  .container > div[style*="grid-template-columns:280px"] > div:first-child {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  /* Two-col layouts (why section, about bio) */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns:1fr 1.6fr"] {
    display: block !important;
  }
  div[style*="grid-template-columns:1fr 1fr"] > div:first-child,
  div[style*="grid-template-columns:1fr 1.6fr"] > div:first-child {
    margin-bottom: 2rem;
  }

  /* Hide tall photo placeholder */
  div[style*="aspect-ratio:4/5"] { display: none !important; }

  /* Repeat-3 inline grids */
  div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* CTA button rows */
  div[style*="justify-content:center"][style*="flex-wrap:wrap"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  div[style*="justify-content:center"][style*="flex-wrap:wrap"] .btn,
  div[style*="justify-content:center"][style*="flex-wrap:wrap"] a {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box;
  }

  /* Two-col competency panels on home */
  .grid-2[style*="margin-bottom"] { gap: 1rem; }
}
