:root {
  color-scheme: dark light;
  --paper: #0b0d10;
  --paper-strong: #12161b;
  --ink: #f5f2ea;
  --ink-soft: rgba(245, 242, 234, 0.8);
  --navy: #0b0d10;
  --navy-strong: #060708;
  --surface: rgba(245, 242, 234, 0.052);
  --surface-strong: rgba(245, 242, 234, 0.09);
  --line: rgba(245, 242, 234, 0.14);
  --line-dark: rgba(245, 242, 234, 0.2);
  --muted: rgba(245, 242, 234, 0.58);
  --accent: #f5f2ea;
  --accent-strong: #f5f2ea;
  --accent-soft: rgba(245, 242, 234, 0.12);
  --gold-soft: rgba(245, 242, 234, 0.12);
  --grid-line: rgba(245, 242, 234, 0.026);
  --nav-bg: rgba(11, 13, 16, 0.82);
  --nav-bg-scrolled: rgba(11, 13, 16, 0.94);
  --hero-wash: rgba(245, 242, 234, 0.045);
  --hero-grid-x: rgba(245, 242, 234, 0.048);
  --hero-grid-y: rgba(245, 242, 234, 0.04);
  --neutral-hover: rgba(245, 242, 234, 0.08);
  --shot-bg: rgba(245, 242, 234, 0.9);
  --ghost-ink: rgba(245, 242, 234, 0.18);
  --low-ink: rgba(245, 242, 234, 0.5);
  --cue-ink: rgba(245, 242, 234, 0.56);
  --cue-line: rgba(245, 242, 234, 0.2);
  --panel-bg: rgba(245, 242, 234, 0.03);
  --panel-bg-strong: rgba(245, 242, 234, 0.065);
  --panel-bg-soft: rgba(245, 242, 234, 0.045);
  --tag-muted: rgba(245, 242, 234, 0.42);
  --shadow-soft: 0 1.4rem 3.8rem rgba(9, 17, 31, 0.09);
  --radius: 0.35rem;
  --container: 76rem;
  --narrow: 46rem;
  --scroll: 0;
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f6f4ef;
  --paper-strong: #ffffff;
  --ink: #111418;
  --ink-soft: rgba(17, 20, 24, 0.78);
  --navy: #f6f4ef;
  --navy-strong: #ebe7dd;
  --surface: rgba(17, 20, 24, 0.045);
  --surface-strong: rgba(17, 20, 24, 0.07);
  --line: rgba(17, 20, 24, 0.14);
  --line-dark: rgba(17, 20, 24, 0.22);
  --muted: rgba(17, 20, 24, 0.58);
  --accent: #111418;
  --accent-strong: #111418;
  --accent-soft: rgba(17, 20, 24, 0.1);
  --gold-soft: rgba(17, 20, 24, 0.08);
  --grid-line: rgba(17, 20, 24, 0.035);
  --nav-bg: rgba(246, 244, 239, 0.84);
  --nav-bg-scrolled: rgba(246, 244, 239, 0.96);
  --hero-wash: rgba(17, 20, 24, 0.035);
  --hero-grid-x: rgba(17, 20, 24, 0.042);
  --hero-grid-y: rgba(17, 20, 24, 0.035);
  --neutral-hover: rgba(17, 20, 24, 0.07);
  --shot-bg: #ffffff;
  --ghost-ink: rgba(17, 20, 24, 0.16);
  --low-ink: rgba(17, 20, 24, 0.5);
  --cue-ink: rgba(17, 20, 24, 0.56);
  --cue-line: rgba(17, 20, 24, 0.2);
  --panel-bg: rgba(17, 20, 24, 0.035);
  --panel-bg-strong: rgba(17, 20, 24, 0.07);
  --panel-bg-soft: rgba(17, 20, 24, 0.045);
  --tag-muted: rgba(17, 20, 24, 0.42);
  --shadow-soft: 0 1.4rem 3.8rem rgba(17, 20, 24, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--paper);
  background-size: 6rem 100%;
  color: var(--ink);
  line-height: 1.52;
  transition: background-color 0.18s ease, color 0.18s ease;
}

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

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

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

p {
  margin: 0;
}

.container {
  width: min(var(--container), calc(100% - 3rem));
  margin: 0 auto;
}

.container-narrow {
  width: min(var(--narrow), calc(100% - 3rem));
}

.container-legal {
  width: min(64rem, calc(100% - 3rem));
}

.kicker,
.mini-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker {
  color: var(--accent);
}

.kicker-dark,
.mini-label {
  color: var(--muted);
}

.display,
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.98;
}

h2 {
  font-size: 2.75rem;
}

h3 {
  font-size: 1.42rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav.is-scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: 0 0.7rem 2rem rgba(0, 0, 0, 0.18);
}

.nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  gap: 0.58rem;
  align-items: center;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 1.95rem;
  height: 1.05rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
}

.brand-mark span {
  position: absolute;
  top: 0;
}

.brand-mark span:first-child {
  left: 0;
}

.brand-mark span:last-child {
  left: 0.62rem;
  opacity: 0.72;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.is-active,
.text-link:hover,
.back-link:hover {
  color: var(--ink);
}

.nav-links a {
  position: relative;
  padding: 0.3rem 0;
}

.nav-icon-link {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.nav-icon-link:hover,
.theme-toggle:hover {
  color: var(--muted);
}

.nav-icon-link::after {
  display: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a.is-active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  min-height: 2.7rem;
  padding: 0.68rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.2);
}

.button-solid {
  background: var(--ink);
  color: var(--navy);
  border-color: var(--ink);
}

.nav-cta {
  position: relative;
  gap: 0.55rem;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--navy);
}

.nav-cta::after {
  content: "→";
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.nav-cta:hover::after {
  transform: translateX(0.18rem);
}

.button-solid:hover {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
}

.button-outline {
  border-color: var(--line);
  color: var(--ink);
  background: var(--neutral-hover);
}

.button-outline:hover {
  border-color: var(--ink-soft);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.theme-toggle:hover {
  transform: none;
  background: transparent;
}

.theme-icon {
  width: 1.12rem;
  height: 1.12rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-icon-moon {
  display: block;
}

.windows-mark {
  display: grid;
  grid-template-columns: repeat(2, 0.42rem);
  grid-template-rows: repeat(2, 0.42rem);
  gap: 0.1rem;
}

.windows-mark span {
  background: currentColor;
}

.github-mark {
  width: 1.12rem;
  height: 1.12rem;
  fill: currentColor;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-top: 1.15rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.text-link::after {
  content: "↗";
  margin-left: 0.03rem;
  font-size: 0.8rem;
}

.action-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.action-icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-link-light {
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.8rem 0 4.4rem;
  background:
    linear-gradient(180deg, var(--hero-wash), transparent 52%),
    var(--navy);
  color: var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--hero-grid-x) 1px, transparent 1px),
    linear-gradient(180deg, var(--hero-grid-y) 1px, transparent 1px);
  background-size: 5.5rem 5.5rem;
  -webkit-mask-image: linear-gradient(180deg, black, transparent 78%);
  mask-image: linear-gradient(180deg, black, transparent 78%);
  opacity: 0.5;
  transform: translateY(calc(var(--scroll) * 4rem));
}

.hero::after {
  content: "";
  position: absolute;
  left: max(1.5rem, calc((100vw - var(--container)) / 2));
  right: max(1.5rem, calc((100vw - var(--container)) / 2));
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--ink), transparent);
  opacity: 0.75;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.68fr);
  gap: 2.25rem;
  align-items: start;
}

.display {
  max-width: 13.5ch;
  margin-top: 0.8rem;
  font-size: 6.7rem;
  line-height: 0.88;
}

.text-reveal-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.24em;
}

.title-word {
  position: relative;
  display: inline-block;
  color: transparent;
}

.title-word-ghost {
  color: var(--ghost-ink);
}

.title-word-fill {
  position: absolute;
  inset: 0;
  color: var(--ink);
  opacity: 0.18;
  transition: opacity 0.16s linear;
}

.lede {
  max-width: 39rem;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 1.14rem;
  line-height: 1.56;
}

.sublede {
  max-width: 29rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.54;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-top: 1.55rem;
}

.hero-actions-center {
  justify-content: center;
}

.hero-actions .text-link {
  margin-top: 0;
}

.hero-aside {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.proof-panel {
  padding: 0.9rem 0 1rem;
  border-top: 1px solid var(--line-dark);
}

.proof-panel h2 {
  margin-top: 0.45rem;
  font-size: 1.45rem;
  line-height: 1;
}

.proof-panel p:last-child {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.proof-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.72rem;
}

.proof-list li {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.proof-list span {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.hero .mini-label {
  color: var(--low-ink);
}

.section {
  scroll-margin-top: 5rem;
  padding: 5.2rem 0;
}

.section-header {
  margin-bottom: 1.7rem;
}

.section-header h2 {
  max-width: 16ch;
  margin-top: 0.55rem;
}

.section-intro {
  max-width: 42rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.56;
}

.proof-strip {
  border-block: 1px solid var(--line);
  background: var(--navy-strong);
}

.proof-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.proof-strip-grid div {
  min-height: 7rem;
  padding: 1rem;
  border-right: 1px solid var(--line);
  background: var(--panel-bg);
}

.proof-strip-grid div:last-child {
  border-right: 0;
}

.proof-strip-grid strong,
.featured-case-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.1;
}

.proof-strip-grid span,
.featured-case-stats span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.section-testimonials {
  background: var(--paper);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg-soft);
}

.testimonial-card blockquote {
  margin: 0;
  padding: 0;
  border: 0;
}

.testimonial-card blockquote p {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.55;
  font-style: italic;
}

.testimonial-card blockquote p::before {
  content: "\201C";
  color: var(--accent);
  font-style: normal;
  margin-right: 0.18em;
}

.testimonial-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.testimonial-card figcaption span {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-bg);
}

.fit-panel {
  position: relative;
  padding: 1.2rem;
}

.fit-panel:first-child {
  border-right: 1px solid var(--line);
}

.fit-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cue-line);
}

.fit-panel:first-child::before {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.fit-panel ul {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.fit-panel li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.fit-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 0.32rem;
  height: 0.32rem;
  background: var(--accent);
}

.fit-panel-muted li::before {
  background: var(--tag-muted);
}

.section-services {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}

.section-services::before {
  content: "";
  position: absolute;
  inset: 1px 0 auto;
  height: 1px;
  background: var(--cue-line);
}

.services-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(18rem, 0.74fr) minmax(0, 1.26fr);
  gap: 2rem;
  align-items: start;
}

.services-lead {
  position: sticky;
  top: 6.2rem;
  display: grid;
  gap: 1rem;
}

.services-lead .section-header {
  margin-bottom: 0;
}

.services-lead .section-header h2 {
  max-width: 11ch;
}

.pain-panel {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg-soft);
}

.pain-panel::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.75;
}

.pain-panel ul {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.pain-panel li {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.pain-panel span {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-bg);
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 15.5rem;
  padding: 1.15rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.service-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.service-card:hover,
.service-card.is-active,
.build-card:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.service-card:hover::after,
.service-card.is-active::after {
  opacity: 1;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.service-card:hover,
.service-card.is-active {
  background: var(--panel-bg-strong);
}

.service-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.service-card-top span {
  color: var(--tag-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-tag {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.service-card h3 {
  max-width: 16ch;
  margin-top: 1.4rem;
}

.service-card > p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
}

.service-card-bottom {
  display: grid;
  gap: 0.28rem;
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.service-card-bottom strong {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-card-bottom span {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.42;
}

.service-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.service-flow span {
  position: relative;
  min-height: 4.4rem;
  padding: 0.95rem;
  border-right: 1px solid var(--line);
  color: var(--low-ink);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}

.service-flow span:last-child {
  border-right: 0;
}

.service-flow span::before {
  content: "";
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--accent);
  opacity: 0.75;
}

.section-projects {
  background: var(--paper);
}

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

.build-card {
  display: grid;
  align-content: start;
  gap: 0.68rem;
  min-height: 100%;
  padding: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.build-card h3 {
  max-width: 16ch;
}

.build-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.build-card p strong {
  color: var(--ink);
  font-weight: 600;
}

.build-card .service-tag {
  color: var(--accent);
}

.build-card ul {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 0.15rem 0 0;
  list-style: none;
}

.build-card li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.42;
}

.build-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.32rem;
  height: 0.32rem;
  background: var(--accent);
}

.build-card-dark {
  background: var(--surface-strong);
  color: var(--ink);
}

.build-card-dark p,
.build-card-dark li {
  color: var(--ink-soft);
}

.build-card-dark .service-tag {
  color: var(--accent);
}

ul.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  padding: 0;
  margin: 0.15rem 0 0;
  list-style: none;
  width: auto;
}

ul.stack-chips li {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  align-items: center;
  padding: 0.18rem 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  line-height: 1.4;
}

.build-card .stack-chips li,
.build-card .build-metrics li {
  padding-left: 0.5rem;
}

.build-card .stack-chips li::before,
.build-card .build-metrics li::before {
  content: none;
}

.stack-chips-light li {
  background: rgba(245, 242, 234, 0.16);
  border-color: rgba(245, 242, 234, 0.28);
  color: var(--ink);
}

ul.build-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  padding: 0.7rem 0 0;
  margin: 0.2rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  width: auto;
}

ul.build-metrics li {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0;
  min-width: 5rem;
  width: auto;
}

.build-metrics li strong {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}

.build-metrics li span {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.featured-case .stack-chips {
  margin-top: 0.85rem;
}

.section-engagements {
  background: var(--paper);
}

.section-fit {
  background: var(--paper);
}

.fit-panel h2 {
  max-width: 12ch;
  margin-top: 0.55rem;
  font-size: 2rem;
}

.fit-panel-muted {
  background: var(--panel-bg);
}

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

.engagement-card {
  padding: 1rem;
  border-top: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.engagement-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.engagement-card h3 {
  margin-top: 0.52rem;
}

.engagement-card h3 + p {
  margin-top: 0.62rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
}

.featured-case-grid span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.contact-block h2 {
  margin-top: 0.5rem;
}

.section-stories {
  background: var(--paper);
}

.featured-case {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg-soft);
}

.featured-case-copy {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.featured-case-copy h3 {
  max-width: 24ch;
  font-size: 2rem;
}

.featured-case-copy p:last-child {
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.52;
}

.featured-case-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.featured-case-stats div {
  min-height: 7rem;
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.featured-case-stats div:nth-child(2n) {
  border-right: 0;
}

.featured-case-stats div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.featured-case-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.featured-case-grid div {
  padding: 1rem 1rem 0;
  border-right: 1px solid var(--line);
}

.featured-case-grid div:last-child {
  border-right: 0;
}

.featured-case-grid p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.faq-item {
  padding: 0.9rem 0;
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

.faq-item summary span {
  color: var(--muted);
  transition: transform 0.18s ease;
}

.faq-item[open] summary span {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 0.7rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.contact-section {
  background: var(--navy-strong);
  color: var(--ink);
}

.contact-block {
  text-align: center;
}

.contact-block p:nth-of-type(2) {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.54;
}

.contact-meta {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.case-hero {
  padding: 6rem 0 2.4rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.case-title {
  margin-top: 0.7rem;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.case-lede {
  margin-top: 1.05rem;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.55;
}

.case-hero .stack-chips {
  margin-top: 1.4rem;
}

.case-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  margin: 1.6rem 0 0;
  padding: 1.05rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.case-metrics li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 6rem;
}

.case-metrics li strong {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.case-metrics li span {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.case-article {
  padding: 2.6rem 0 4rem;
  background: var(--paper);
}

.case-section {
  margin-top: 2.4rem;
}

.case-section:first-child {
  margin-top: 0;
}

.case-section h2 {
  font-size: 1.7rem;
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin-bottom: 0.85rem;
}

.case-section h3 {
  font-size: 1.12rem;
  margin-top: 1.6rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
}

.case-section p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
  margin-top: 0.7rem;
}

.case-section ul,
.case-section ol {
  margin: 0.85rem 0 0;
  padding-left: 1.3rem;
  color: var(--ink-soft);
}

.case-section li {
  margin: 0.5rem 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.case-section li strong {
  color: var(--ink);
  font-weight: 600;
}

.case-section .stack-chips {
  margin: 0.4rem 0 1rem;
}

.case-cta {
  margin-top: 3rem;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg-soft);
}

.case-cta h2 {
  margin-bottom: 0.4rem;
  font-size: 1.4rem;
}

.case-cta .hero-actions {
  margin-top: 1.1rem;
}

.case-link-row {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
  background: var(--paper);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-meta a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-meta a:hover {
  color: var(--ink);
}

.footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(1.35rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.legal-body {
  background: var(--paper);
}

.legal-main {
  padding-top: 3rem;
  padding-bottom: 3.4rem;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.legal-hero,
.legal-card,
.notice-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-hero {
  margin-top: 1.35rem;
}

.legal-hero p:last-child,
.legal-copy p,
.notice-card li {
  color: var(--muted);
}

.legal-grid,
.legal-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

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

.legal-card h2,
.notice-card h2 {
  font-size: 1.28rem;
}

.legal-copy {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.muted-inline {
  color: var(--muted);
}

.notice-card {
  background: var(--accent-soft);
  border-color: var(--line-dark);
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.8rem;
}

@media (max-width: 1080px) {
  .hero-layout,
  .featured-case {
    grid-template-columns: 1fr;
  }

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

  .proof-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proof-strip-grid div:nth-child(2) {
    border-right: 0;
  }

  .proof-strip-grid div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .services-shell {
    grid-template-columns: 1fr;
  }

  .services-lead {
    position: static;
  }

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

  .build-grid,
  .engagement-grid,
  .featured-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-case-grid div:nth-child(2) {
    border-right: 0;
  }

  .featured-case-grid div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .nav-row {
    grid-template-columns: auto 1fr auto;
  }

  .nav-cta {
    display: none;
  }

  .display {
    font-size: 5.2rem;
  }

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

@media (max-width: 760px) {
  .container,
  .container-narrow,
  .container-legal {
    width: min(var(--container), calc(100% - 1.5rem));
  }

  .nav-row {
    grid-template-columns: 1fr auto;
    gap: 0.8rem;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 3.2rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  h3 {
    font-size: 1.24rem;
  }

  .display {
    font-size: 3.05rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .text-link {
    width: 100%;
    justify-content: center;
  }

  .proof-strip-grid,
  .fit-grid,
  .featured-case-stats,
  .featured-case-grid {
    grid-template-columns: 1fr;
  }

  .proof-strip-grid div,
  .fit-panel:first-child,
  .featured-case-stats div,
  .featured-case-grid div {
    border-right: 0;
  }

  .proof-strip-grid div,
  .fit-panel:first-child,
  .featured-case-stats div,
  .featured-case-grid div {
    border-bottom: 1px solid var(--line);
  }

  .proof-strip-grid div:last-child,
  .featured-case-stats div:last-child,
  .featured-case-grid div:last-child {
    border-bottom: 0;
  }

  .featured-case-grid div:last-child {
    grid-column: auto;
    border-top: 0;
  }

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

  .service-card {
    min-height: auto;
  }

  .service-card h3 {
    max-width: 18ch;
    margin-top: 1.05rem;
  }

  .service-flow {
    grid-template-columns: 1fr;
  }

  .service-flow span {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-flow span:last-child {
    border-bottom: 0;
  }

  .build-grid,
  .engagement-grid {
    grid-template-columns: 1fr;
  }

}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
