:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --text: #181d1f;
  --muted: #657074;
  --line: #d8ddd8;
  --panel: #ffffff;
  --ink: #0f2628;
  --accent: #237c68;
  --accent-2: #a94429;
  --soft: #e8efe8;
  --header-bg: rgba(247, 248, 245, 0.9);
  --lead: #394346;
  --section-alt: #eef2ee;
  --image-border: rgba(15, 38, 40, 0.12);
  --focus: rgba(35, 124, 104, 0.72);
  --link-decoration: rgba(35, 124, 104, 0.45);
  --toggle-hover: #e1e9e2;
  --shadow: 0 18px 50px rgba(15, 38, 40, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101716;
  --text: #edf3f0;
  --muted: #aebdb8;
  --line: #30403d;
  --panel: #172220;
  --ink: #d8eee7;
  --accent: #69c7ae;
  --accent-2: #f09173;
  --soft: #1c2b28;
  --header-bg: rgba(16, 23, 22, 0.9);
  --lead: #c6d2ce;
  --section-alt: #141e1c;
  --image-border: rgba(216, 238, 231, 0.15);
  --focus: rgba(105, 199, 174, 0.9);
  --link-decoration: rgba(105, 199, 174, 0.55);
  --toggle-hover: #243430;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration-color: var(--link-decoration);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 24px);
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
}

.theme-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.theme-toggle:hover {
  background: var(--toggle-hover);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero {
  min-height: calc(76vh - 72px);
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(520px, 1.14fr);
  align-items: center;
  gap: clamp(32px, 5vw, 76px);
  padding: clamp(42px, 5vw, 72px) clamp(18px, 5vw, 72px) clamp(40px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.section-label {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 3.2vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.12;
}

h4 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.lead {
  max-width: 670px;
  color: var(--lead);
  font-size: clamp(1.2rem, 2vw, 1.72rem);
  line-height: 1.32;
}

.hero-image {
  display: block;
  width: 100%;
  min-width: 0;
  max-height: min(62vh, 680px);
  aspect-ratio: 16 / 10;
  justify-self: end;
  object-fit: cover;
  object-position: center bottom;
  border: 1px solid var(--image-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section {
  scroll-margin-top: 92px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 78px);
  padding: clamp(56px, 8vw, 112px) clamp(18px, 6vw, 84px);
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: var(--section-alt);
}

.section-stack,
.section-body {
  max-width: 900px;
}

.section-stack {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
}

.section-intro {
  max-width: 900px;
}

.with-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 340px);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

.section-image,
.topic-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--image-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .hero-image,
:root[data-theme="dark"] .section-image,
:root[data-theme="dark"] .topic-image {
  filter: invert(0.86) hue-rotate(145deg) brightness(0.9) saturate(0.85);
}

.section-image {
  aspect-ratio: 4 / 3;
}

.topic-image {
  aspect-ratio: 16 / 10;
  margin-bottom: 22px;
  box-shadow: none;
}

.section-body p,
.section-stack p,
.work-list p,
.legal-content p {
  color: var(--muted);
  font-size: 1.06rem;
}

.service-group {
  display: grid;
  gap: 16px;
}

.compact {
  max-width: 760px;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.work-list article {
  min-height: 430px;
  padding: 28px;
  background: var(--panel);
}

.work-list article.priority {
  grid-column: span 2;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 46px);
}

.work-list article.priority .topic-image {
  margin-bottom: 0;
}

.work-list article p:last-child {
  margin-bottom: 0;
}

.contact-line {
  margin-top: 28px;
  font-weight: 760;
}

.footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  padding: 28px clamp(18px, 6vw, 84px);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer span {
  margin-right: auto;
}

.legal-page {
  padding: clamp(48px, 8vw, 96px) clamp(18px, 6vw, 84px);
}

.legal-content {
  max-width: 820px;
}

.legal-content h1 {
  font-size: clamp(3rem, 9vw, 6.8rem);
}

.legal-content h2 {
  margin-top: 44px;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

@media (max-width: 860px) {
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-end;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-image {
    justify-self: start;
    width: min(100%, 620px);
    height: clamp(210px, 48vw, 340px);
    max-height: 42vh;
    aspect-ratio: auto;
  }

  .section-image,
  .topic-image {
    height: clamp(170px, 48vw, 260px);
    aspect-ratio: auto;
  }

  .section {
    grid-template-columns: 1fr;
  }

  .with-image {
    grid-template-columns: 1fr;
  }

  .work-list {
    grid-template-columns: 1fr;
  }

  .work-list article.priority {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .work-list article.priority .topic-image {
    margin-bottom: 22px;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 64px;
    padding: 10px 18px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav {
    gap: 8px 9px;
    font-size: 0.84rem;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.04;
  }

  .eyebrow,
  .section-label {
    font-size: 0.76rem;
  }

  .section-image,
  .topic-image {
    height: clamp(150px, 46vw, 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body,
  .site-header,
  .section-alt,
  .work-list article,
  .theme-toggle {
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  }

  .hero-image,
  .section-image,
  .topic-image {
    transition: filter 180ms ease;
  }
}
