:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --brand: #1d4ed8;
  --brand-deep: #1e3a8a;
  --on-brand: #eff6ff;
  --on-brand-muted: #bfdbfe;
  --on-brand-faint: #93c5fd;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1120;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --faint: #64748b;
    --line: #1e293b;
    --accent: #60a5fa;
    --accent-ink: #0b1120;
    --brand-deep: #172554;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Geist,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

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

p,
h1,
h2,
h3,
dl,
dd,
ol {
  margin: 0;
}

.page {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 0 24px;
}

/* Masthead: the original Kuberlabs blue */

.masthead {
  background: linear-gradient(165deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: var(--on-brand);
}

.masthead ::selection {
  background: var(--on-brand);
  color: var(--brand);
}

.masthead :focus-visible {
  outline-color: var(--on-brand);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.site-header nav {
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--on-brand-muted);
}

.site-header nav a:hover {
  color: var(--on-brand);
}

/* Hero */

.hero {
  padding: 72px 0 88px;
}

.meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-brand-muted);
}

.meta span {
  margin: 0 6px;
  color: var(--on-brand-faint);
}

h1 {
  max-width: 15ch;
  margin-top: 28px;
  font-size: clamp(42px, 8vw, 84px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1 em {
  font-style: normal;
  color: var(--on-brand-faint);
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  margin-top: 48px;
}

.hero-copy {
  max-width: 460px;
  color: var(--on-brand-muted);
  font-size: 17px;
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border-radius: 6px;
  background: var(--on-brand);
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 160ms ease;
}

.button:hover {
  background: #ffffff;
}

.button span {
  transition: transform 160ms ease;
}

.button:hover span {
  transform: translateX(3px);
}

/* Section rows: label on the left, content on the right */

.row {
  display: grid;
  gap: 24px;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 760px) {
  .row {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
  }
}

h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

h2 span {
  margin-right: 8px;
  color: var(--accent);
}

/* Work */

.statement {
  max-width: 34ch;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.services {
  display: grid;
  gap: 0 40px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
  counter-reset: service;
}

@media (min-width: 640px) {
  .services {
    grid-template-columns: 1fr 1fr;
  }
}

.services li {
  padding: 20px 0 24px;
  border-top: 1px solid var(--line);
  counter-increment: service;
}

.services h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.services h3::before {
  content: counter(service, decimal-leading-zero);
  margin-right: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
}

.services p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.services .tags {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

/* Approach */

.principles > div {
  display: grid;
  gap: 4px 32px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.principles > div:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 640px) {
  .principles > div {
    grid-template-columns: 220px 1fr;
  }
}

.principles dt {
  font-weight: 600;
}

.principles dd {
  color: var(--muted);
}

/* Contact */

.contact-copy {
  max-width: 480px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.big-link {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(30px, 6vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

.big-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.big-link span {
  font-size: 0.6em;
  vertical-align: 0.35em;
}

/* Footer */

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 40px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* 404 */

.not-found {
  min-height: 100vh;
}
