:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --text: #222831;
  --muted: #5d6674;
  --primary: #2b61ad;
  --primary-dark: #204d8c;
  --border: #d5dbe5;
  --container: 1120px;
  /* Type scale + hero rhythm */
  --fs-hero: clamp(3rem, 5vw + 1rem, 4.85rem);
  --fs-xl: clamp(1.9375rem, 3vw + 0.85rem, 3rem);
  --fs-panel: clamp(1.375rem, 2.1vw + 0.4rem, 2rem);
  --fs-large: clamp(1.0625rem, 1.3vw + 0.65rem, 1.3125rem);
  --fs-legal-page: clamp(2rem, 3.5vw, 2.75rem);
  /* Compact header: logo drives bar height; anchors need extra padding than bar height */
  --header-logo-size: 156px;
  --sticky-header-visual-height: calc(var(--header-logo-size) + 14px);
  /* Generous offset so in-page links clear sticky bar (scroll-padding is most reliable) */
  --header-anchor-offset: calc(var(--sticky-header-visual-height) + 1.75rem);
}

* {
  box-sizing: border-box;
}

/* In-page #top must not sit on a sticky element (browsers miscalculate scroll). */
.page-top-anchor {
  position: static;
  height: 0;
  width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Single source for anchor jumps: inset scrollport so fragments clear sticky header */
html {
  scroll-padding-top: var(--header-anchor-offset);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background: radial-gradient(circle at top left, #fbfdff 0%, var(--bg) 58%);
  color: var(--text);
}

body {
  line-height: 1.62;
  font-size: clamp(1rem, 0.35vw + 0.93rem, 1.0825rem);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(213, 219, 229, 0.9);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--sticky-header-visual-height);
  padding-block: 0.35rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  display: block;
  flex-shrink: 0;
  width: var(--header-logo-size);
  height: var(--header-logo-size);
  object-fit: contain;
  background: transparent;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.95rem;
  row-gap: 0.35rem;
  max-width: min(100%, 54rem);
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: clamp(0.984375rem, 0.61875vw + 0.8775rem, 1.125rem);
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background-color: #ecf2fc;
  color: var(--primary) !important;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 1.0546875rem;
}

a.return-home,
a.return-home-inline {
  text-decoration: none;
}

a.return-home:hover,
a.return-home-inline:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.return-home-header {
  position: sticky;
  top: 0;
  z-index: 19;
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(213, 219, 229, 0.9);
  backdrop-filter: blur(8px);
}

.return-home-header-inner {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  padding: 0.65rem 0;
}

.return-home-header .return-home {
  font-size: clamp(0.95rem, 0.55vw + 0.88rem, 1.0625rem);
  font-weight: 600;
  color: var(--primary);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: #2e3640;
}

.hero {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  font-size: clamp(0.8125rem, 0.5vw + 0.73rem, 0.96875rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.875rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.022em;
  color: var(--text);
}

h2,
h3 {
  line-height: 1.22;
}

h1 {
  line-height: 1.06;
}

/* Standalone/legal page titles only (homepage hero overrides below) */
main.section:not(.hero) > .container > h1 {
  font-size: var(--fs-legal-page);
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* Primary section headings (with eyebrow) */
.section-title-wrap h2,
.contact-grid > div:first-child h2 {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: 0;
}

h3 {
  font-size: var(--fs-large);
  font-weight: 600;
}

/* Hero side panel title — one step smaller than primary section headings */
.hero-card h2 {
  font-size: var(--fs-panel);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.hero-card .card-stat-grid h3 {
  font-size: clamp(0.96875rem, 0.95vw + 0.76rem, 1.09375rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.profile-card h3:first-of-type {
  font-size: clamp(1.25rem, 1.7vw + 0.72rem, 1.5625rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-text {
  max-width: 54ch;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.hero-card {
  background: linear-gradient(145deg, #2f65b0 0%, #204d8c 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.25rem, 2vw + 0.85rem, 1.85rem);
}

.hero-card h3 {
  color: #ffffff;
}

.hero-card p {
  color: #e9f1ff;
}

.card-stat-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.card-stat-grid article {
  padding: 0.7rem;
  border: 1px solid rgba(233, 241, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.card-stat-grid h3 {
  margin-bottom: 0.2rem;
}

.card-stat-grid p {
  margin: 0;
  font-size: 0.9rem;
  color: #edf3ff;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: #e8edf4;
  border-top: 1px solid rgba(213, 219, 229, 0.8);
  border-bottom: 1px solid rgba(213, 219, 229, 0.8);
}

.section-title-wrap {
  max-width: 70ch;
  margin-bottom: 1.6rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.about-grid p {
  margin: 0;
  color: var(--muted);
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.partner-grid,
.principals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.card p {
  color: var(--muted);
  margin-bottom: 0;
}

.profile-card .profile-role {
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: #3e4652;
}

.profile-card a {
  color: var(--primary);
  font-weight: 600;
}

.expertise-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.expertise-list li + li {
  margin-top: 0.4rem;
}

.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.pill-wrap span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  background: var(--surface);
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.contact-form {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.field-honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form-status:empty {
  display: none;
}

.contact-form-status {
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 10px;
  background: #e9f6ed;
  color: #244c35;
}

.contact-form-status.is-error {
  background: #fdf0f2;
  color: #7a2935;
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(43, 97, 173, 0.25);
  border-color: var(--primary);
}

.full-width {
  width: 100%;
}

.site-footer {
  border-top: 1px solid rgba(213, 219, 229, 0.9);
  padding: 1.2rem 0 1.4rem;
}

.footer-content {
  display: grid;
  gap: 0.75rem;
  align-items: start;
  color: var(--muted);
  font-size: 0.95rem;
}

.firm-descriptor {
  margin: 0;
  max-width: 70ch;
}

.firm-location {
  margin: 0;
  font-weight: 600;
  color: #3e4652;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--primary);
}

@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .strategy-grid,
  .partner-grid,
  .principals-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 4%;
    right: 4%;
    top: var(--sticky-header-visual-height);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .footer-links {
    gap: 0.7rem;
  }
}
