:root {
  --bg: #0c1110;
  --bg-elevated: #141b19;
  --bg-soft: #1a2320;
  --line: rgba(232, 238, 232, 0.1);
  --line-strong: rgba(232, 238, 232, 0.18);
  --text: #e8eee8;
  --muted: #8d9b93;
  --accent: #9fd4b8;
  --accent-deep: #6fa88d;
  --gold: #d4b483;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 72rem;
  --header: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1.02rem, 0.96rem + 0.28vw, 1.125rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  padding: 0.6rem 0.9rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header);
  overflow: visible;
  border-bottom: 1px solid transparent;
  background: var(--bg);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner,
.footer-inner,
.section-inner,
.hero-inner {
  width: min(100% - var(--pad) * 2, var(--max));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--text);
}

.brand svg {
  width: 1.45rem;
  height: 1.45rem;
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: currentColor;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 0;
  width: 1.05rem;
  height: 1.5px;
  background: currentColor;
  content: "";
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.site-nav {
  position: fixed;
  top: 0;
  right: max(var(--pad), calc((100vw - var(--max)) / 2));
  z-index: 25;
  display: flex;
  align-items: center;
  height: var(--header);
}

.site-nav ul {
  display: flex;
  gap: 1.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(4rem, 9vw, 8rem);
  border-bottom: 1px solid var(--line);
}

.ridge {
  position: absolute;
  inset: auto 0 -8% auto;
  width: min(54rem, 92vw);
  height: auto;
  color: rgba(159, 212, 184, 0.13);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 2rem;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  margin: 0;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero h1 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 2.1rem + 5.4vw, 7.1rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #10201a;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms var(--ease), background 160ms var(--ease);
}

.button:hover {
  color: #10201a;
  background: #b7e3cb;
  transform: translateY(-1px);
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.button-ghost:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.meta-line {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header) + 0.5rem);
}

.section-kicker {
  margin: 0 0 0.8rem;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 1.5rem;
  max-width: 16ch;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
}

.section-intro {
  max-width: 40rem;
  margin: 0 0 2.8rem;
  color: var(--muted);
}

.service-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.service-list li {
  display: grid;
  grid-template-columns: 4.5rem minmax(12rem, 0.7fr) minmax(16rem, 1.2fr);
  gap: 1.2rem 2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}

.service-index {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding-top: 0.45rem;
}

.service-list h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.service-list p {
  margin: 0;
  color: var(--muted);
}

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

.panel {
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.panel h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
}

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

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.about-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
}

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

.stat-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(159, 212, 184, 0.05), transparent 42%),
    var(--bg-elevated);
}

.stat-list div {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.stat-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.stat-list dt {
  margin: 0 0 0.25rem;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-list dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.15;
}

.capability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.capability-grid li {
  list-style: none;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.capability-grid {
  margin: 0;
  padding: 0;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.contact-email {
  display: inline-block;
  margin: 0.4rem 0 1.2rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
  line-height: 1.1;
  text-decoration: none;
}

.contact-note {
  margin: 0;
  color: var(--muted);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  background: var(--bg);
}

.contact-aside p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  padding: 1.6rem 0 2.2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.page-404 {
  min-height: calc(100vh - var(--header) - 6rem);
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 4rem 0;
}

.page-404 h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 2rem + 6vw, 6rem);
  line-height: 0.9;
}

.page-404 p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  max-width: 34rem;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    top: var(--header);
    right: 0;
    left: 0;
    height: calc(100dvh - var(--header));
    padding: 1.6rem var(--pad) 2rem;
    background: var(--bg);
    align-items: flex-start;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    overflow: auto;
    transition: opacity 180ms var(--ease), visibility 180ms var(--ease);
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 1.1rem;
  }

  .site-nav a {
    font-size: 1.4rem;
    color: var(--text);
  }

  .service-list li,
  .about-layout,
  .contact-card,
  .approach-grid,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .service-index {
    padding-top: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
