:root {
  --ink: #06080c;
  --surface: #0e1218;
  --paper: #f2f4f7;
  --mute: #8a93a3;
  --accent: #3ddcb4;
  --accent-glow: #5eead4;
  --line: rgb(255 255 255 / 0.08);
  --font-display: "Syne", sans-serif;
  --font-sans: "Outfit", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --max: 72rem;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--paper);
}

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

.sr-only {
  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:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 80;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  background: var(--surface);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
  min-width: 0;
}

@media (min-width: 1024px) {
  .wrap {
    padding-inline: 2rem;
  }
}

.kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--accent);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wordmark img {
  width: 2rem;
  height: 2rem;
}

.wordmark strong,
.wordmark-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.28em;
  line-height: 1;
}

.wordmark span,
.wordmark-sub {
  display: block;
  font-weight: 300;
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  color: var(--mute);
  line-height: 1.4;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 1rem 0;
  border-bottom: 1px solid transparent;
  transition:
    background-color 300ms ease,
    backdrop-filter 300ms ease,
    border-color 300ms ease;
}

.site-header.is-scrolled {
  background: rgb(6 8 12 / 0.85);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.875rem;
  color: var(--mute);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  font-weight: 500;
}

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

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.cta-header {
  display: none;
}

.menu-toggle {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.menu-toggle i {
  display: block;
  width: 1rem;
  height: 1px;
  background: var(--paper);
}

.menu-mobile {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background: rgb(6 8 12 / 0.96);
  padding: 6rem 1.5rem 2rem;
}

.menu-mobile.is-open {
  display: block;
}

.menu-mobile nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow-x: clip;
}

.bg-grid,
.bg-vignette,
.logo-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-grid {
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
}

.bg-vignette {
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgb(61 220 180 / 0.07), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgb(6 8 12 / 0.9), transparent 60%);
}

.logo-watermark {
  inset: auto;
  left: 50%;
  top: 50%;
  width: min(80vw, 640px);
  transform: translate(-50%, -50%);
  opacity: 0.04;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: 7rem 0 5rem;
  min-width: 0;
}

.hero-inner > .reveal {
  min-width: 0;
  max-width: 100%;
}

.hero-kicker {
  margin: 0 0 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--mute);
}

.hero .wordmark-title {
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: 0.34em;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero .wordmark-sub {
  margin-top: 0.25rem;
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  letter-spacing: 0.32em;
}

.hero h1 {
  max-width: 40rem;
  margin: 2.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lede {
  max-width: 36rem;
  margin: 1rem 0 0;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--mute);
}

.support {
  max-width: min(32rem, 100%);
  width: 100%;
  margin: 1.5rem 0 0;
  color: var(--mute);
  line-height: 1.6;
  overflow-wrap: break-word;
}

.support-follow {
  margin-top: 0.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.section {
  border-top: 1px solid var(--line);
  padding: 5rem 0;
  scroll-margin-top: 5.5rem;
}

.stats {
  display: grid;
  gap: 2rem;
  padding-block: 4rem;
}

.stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--mute);
}

.section h2 {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 600;
}

.section h3 {
  margin: 0;
  font-family: var(--font-display);
}

.split {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.prose {
  max-width: 40rem;
}

.prose p,
.muted {
  color: var(--mute);
  line-height: 1.7;
}

.callout {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 2rem;
}

.callout p:first-child {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.35;
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

.card,
.pattern,
.step {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.5rem;
  transition:
    border-color 250ms ease,
    box-shadow 250ms ease;
}

.card:hover,
.pattern:hover,
.step:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 40px rgb(61 220 180 / 0.08);
}

.card p,
.pattern p,
.step p {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--mute);
  line-height: 1.65;
}

.pattern {
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.pattern h3 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
}

.pattern p {
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.perf {
  margin-top: 2.5rem;
}

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

.step-index {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.contact {
  text-align: center;
}

.contact .prose-center {
  max-width: 32rem;
  margin: 1rem auto 0;
}

.email-link {
  margin: 2rem 0 0;
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
}

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

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem 0;
}

.copyright {
  margin: 0;
  font-size: 0.75rem;
  color: var(--mute);
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.js .reveal.is-visible,
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.tag-cloud-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

#tagcloud {
  margin: 0 auto;
}

#tagcloud ul {
  margin: 0;
  padding: 0;
}

#tagcloud li,
#tagcloud a {
  font-family: var(--font-mono);
  color: var(--paper);
  white-space: nowrap;
  cursor: default;
}

#tagcloud a:hover,
#tagcloud a:focus-visible {
  color: var(--accent);
}

#tagcloud.is-static {
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
}

#tagcloud.is-static ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1rem;
}

#tagcloud.is-static li {
  position: static !important;
  font-size: 0.95rem;
  opacity: 1 !important;
}

@media (max-width: 767px) {
  .hero .wordmark-title {
    letter-spacing: 0.16em;
    font-size: 1.65rem;
  }

  .hero h1,
  .lede,
  .support {
    max-width: 100%;
  }

  .support {
    font-size: 0.9rem;
    max-width: 28ch;
  }
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .nav-desktop,
  .cta-header {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

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

  .card-grid.services {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid.patterns {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .section {
    padding: 7rem 0;
  }
}

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

  .reveal,
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card,
  .pattern,
  .step,
  .site-header {
    transition: none;
  }
}
