:root {
  color-scheme: light dark;
  --ink: #141716;
  --muted: #5c6460;
  --line: #dcd8cf;
  --paper: #fbfaf7;
  --paper-soft: #f1f0eb;
  --paper-strong: #ffffff;
  --teal: #2f6f6f;
  --teal-dark: #1f5050;
  --amber: #d58b2c;
  --charcoal: #202423;
  --brand-mark-color: #ffffff;
  --hero-copy: #303633;
  --nav-color: #5c6460;
  --nav-hover: #141716;
  --primary-text: #ffffff;
  --secondary-bg: rgba(255, 255, 255, 0.68);
  --secondary-border: rgba(20, 23, 22, 0.18);
  --secondary-hover-bg: rgba(255, 255, 255, 0.84);
  --secondary-hover-border: rgba(31, 80, 80, 0.28);
  --approach-bg: #202423;
  --approach-step: #252a28;
  --approach-step-copy: #d4d9d4;
  --body-glow: rgba(47, 111, 111, 0.08);
  --hero-overlay-desktop:
    linear-gradient(
      90deg,
      rgba(251, 250, 247, 0.98) 0%,
      rgba(251, 250, 247, 0.9) 34%,
      rgba(251, 250, 247, 0.44) 58%,
      rgba(251, 250, 247, 0.12) 100%
    );
  --hero-overlay-mobile:
    linear-gradient(
      180deg,
      rgba(251, 250, 247, 0.94) 0%,
      rgba(251, 250, 247, 0.88) 48%,
      rgba(251, 250, 247, 0.56) 100%
    );
  --shadow: 0 24px 60px rgba(31, 37, 35, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f7f5;
  --muted: #a9b4af;
  --line: rgba(255, 255, 255, 0.12);
  --paper: #080d0f;
  --paper-soft: #0d1416;
  --paper-strong: #121b1e;
  --teal: #67c3bc;
  --teal-dark: #91d8d2;
  --amber: #f0aa4f;
  --charcoal: #0b1113;
  --brand-mark-color: #061012;
  --hero-copy: #d0d8d5;
  --nav-color: #c1cbc7;
  --nav-hover: #91d8d2;
  --primary-text: #061012;
  --secondary-bg: rgba(255, 255, 255, 0.08);
  --secondary-border: rgba(255, 255, 255, 0.18);
  --secondary-hover-bg: rgba(255, 255, 255, 0.13);
  --secondary-hover-border: rgba(145, 216, 210, 0.45);
  --approach-bg: #0b1113;
  --approach-step: #11191c;
  --approach-step-copy: #c2ccc8;
  --body-glow: rgba(103, 195, 188, 0.12);
  --hero-overlay-desktop:
    linear-gradient(
      90deg,
      rgba(8, 13, 15, 0.98) 0%,
      rgba(8, 13, 15, 0.9) 36%,
      rgba(8, 13, 15, 0.58) 62%,
      rgba(8, 13, 15, 0.22) 100%
    );
  --hero-overlay-mobile:
    linear-gradient(
      180deg,
      rgba(8, 13, 15, 0.96) 0%,
      rgba(8, 13, 15, 0.88) 52%,
      rgba(8, 13, 15, 0.66) 100%
    );
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--body-glow), transparent 34rem),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

.hero {
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  background:
    var(--hero-overlay-desktop),
    url("assets/hero-binaryworks.png");
  background-size: cover;
  background-position: center right;
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links,
.hero-actions,
.contact-panel {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-mark-color);
  background: var(--teal);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.75rem;
}

.nav-links {
  gap: 28px;
  color: var(--nav-color);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a {
  transition: color 160ms ease;
}

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

.theme-toggle {
  width: 44px;
  height: 28px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px;
  color: var(--ink);
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-border);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle::after {
  content: "";
  width: 20px;
  height: 20px;
  position: absolute;
  left: 3px;
  top: 3px;
  background: var(--teal-dark);
  border-radius: 50%;
  transition: transform 180ms ease;
}

:root[data-theme="dark"] .theme-toggle::after {
  transform: translateX(16px);
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
}

.theme-toggle-sun {
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: scale(0.68);
}

.theme-toggle-moon {
  border-radius: 50%;
  box-shadow: inset 5px -2px 0 0 currentColor;
}

.hero-content {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 44px 0 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: 4.75rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 2.2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 560px;
  margin-bottom: 30px;
  color: var(--hero-copy);
  font-size: 1.2rem;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--primary-text);
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button.primary:hover {
  background: var(--teal);
  border-color: var(--teal);
}

.button.secondary {
  color: var(--ink);
  background: var(--secondary-bg);
  border-color: var(--secondary-border);
  backdrop-filter: blur(10px);
}

.button.secondary:hover {
  background: var(--secondary-hover-bg);
  border-color: var(--secondary-hover-border);
}

.section {
  padding: 82px 0;
}

.section-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.intro {
  background: var(--paper);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: start;
}

.split > p {
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.services {
  background: var(--paper-soft);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  min-height: 250px;
  padding: 24px;
  background: var(--paper-strong);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.service-index {
  display: block;
  margin-bottom: 56px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
}

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

.approach {
  background:
    linear-gradient(180deg, rgba(103, 195, 188, 0.08), transparent 52%),
    var(--approach-bg);
  color: var(--ink);
}

.approach .eyebrow {
  color: var(--teal-dark);
}

.approach-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
}

.steps {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.step {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  background: var(--approach-step);
}

.step span {
  color: #f2b35d;
  font-weight: 900;
}

.step p {
  color: var(--approach-step-copy);
}

.contact {
  padding: 70px 0;
  background: var(--paper);
}

.contact-panel {
  justify-content: space-between;
  gap: 30px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact h2 {
  max-width: 720px;
}

@media (max-width: 840px) {
  .hero {
    min-height: 84svh;
    background:
      var(--hero-overlay-mobile),
      url("assets/hero-binaryworks.png");
    background-size: cover;
    background-position: 58% center;
  }

  .nav {
    min-height: 68px;
  }

  .nav-links {
    gap: 16px;
    font-size: 0.9rem;
  }

  .hero-content {
    padding: 32px 0 56px;
  }

  h1 {
    font-size: 3.4rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .split,
  .approach-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .split > p {
    margin-top: 0;
  }

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

  .service-index {
    margin-bottom: 32px;
  }
}

@media (max-width: 560px) {
  .nav,
  .section-inner,
  .hero-content {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    min-height: 82svh;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .hero-content {
    padding: 22px 0 42px;
  }

  h1 {
    font-size: 2.85rem;
  }

  h2 {
    font-size: 1.62rem;
  }

  .section {
    padding: 58px 0;
  }

  .button {
    min-height: 44px;
    width: 100%;
  }

  .hero-actions,
  .contact-panel {
    align-items: stretch;
    width: 100%;
  }

  .contact-panel {
    flex-direction: column;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
