/* ==========================================================================
   Kligers — Direction A "Before & after"
   Public Sans for everything, IBM Plex Mono for spreadsheet cells, small
   labels and tool lists. Ink navy, highlighter yellow (sparingly), white.
   Every colour goes through the tokens below.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --panel: #f6f8f9;
  --card: #ffffff;
  --ink: #17273a;
  --ink-2: #33475b;
  --muted: #56687a;
  --grid: #d5dde3;
  --line: #e8ecef;
  --hl: #ffe14d;
  --hl-ink: #17273a;
  --ok: #1d7a4b;
  --ok-bg: #e3f2ea;
  --wait: #b26a00;
  --wait-bg: #fbefd9;
  --flag: #b2382a;
  --btn: #17273a;
  --btn-ink: #ffffff;
  --btn-hover: #2a3f57;
  --sheet-head: #f1f4f6;
  --shadow-sheet: 0 2px 0 #e9edf0;
  --shadow-app: 0 14px 30px -16px rgba(23, 39, 58, 0.35);
  --focus: #17273a;

  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 6px;
  --radius-sm: 4px;
  --wrap: 1180px;
  --gutter: 24px;
  --header-h: 72px;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #0e1721;
  --panel: #132029;
  --card: #172633;
  --ink: #e6ecf1;
  --ink-2: #c3ced8;
  --muted: #95a6b6;
  --grid: #2b3c4c;
  --line: #1f2f3d;
  --hl: #ffe14d;
  --hl-ink: #17273a;
  --ok: #6fcf9a;
  --ok-bg: rgba(111, 207, 154, 0.14);
  --wait: #f2b65a;
  --wait-bg: rgba(242, 182, 90, 0.15);
  --flag: #f08a7b;
  --btn: #e6ecf1;
  --btn-ink: #0e1721;
  --btn-hover: #ffffff;
  --sheet-head: #1d2e3d;
  --shadow-sheet: 0 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-app: 0 18px 36px -18px rgba(0, 0, 0, 0.75);
  --focus: #ffe14d;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.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: 16px;
  top: -60px;
  z-index: 100;
  background: var(--btn);
  color: var(--btn-ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Highlighter mark: a marker stroke on light, a solid block with dark text on dark */
mark.hl {
  background: linear-gradient(
    transparent 58%,
    var(--hl) 58%,
    var(--hl) 92%,
    transparent 92%
  );
  color: inherit;
  padding: 0 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

[data-theme='dark'] mark.hl {
  background: var(--hl);
  color: var(--hl-ink);
  padding: 0 0.12em;
  border-radius: 2px;
}

/* ── Buttons & links ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--btn);
  color: var(--btn-ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

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

.btn svg {
  flex-shrink: 0;
}

.btn-sm {
  font-size: 15px;
  font-weight: 600;
  padding: 9px 16px;
}

.link-alt {
  font-weight: 600;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.link-alt:hover {
  text-decoration-thickness: 2.5px;
}

.link-arrow {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  margin-right: auto;
}

.brand-name {
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.015em;
}

.brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

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

.nav .nav-mobile-only {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.nav-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

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

.icon-sun {
  display: none;
}

[data-theme='dark'] .icon-sun {
  display: block;
}

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

.nav-toggle {
  display: none;
  gap: 4px;
  align-content: center;
  justify-items: center;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Hero ── */
.hero {
  padding: 72px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
}

.kicker {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(40px, 5.2vw, 62px);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.04;
  margin-bottom: 24px;
}

.hero h1 span {
  display: block;
}

.hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 26px;
  font-size: 15px;
  color: var(--muted);
  max-width: 46ch;
}

/* Before/after illustration (static HTML, no images) */
.demo {
  position: relative;
  padding: 16px 10px 0 0;
}

.demo-label {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet {
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 13px;
  transform: rotate(-1.2deg);
  box-shadow: var(--shadow-sheet);
  overflow: hidden;
}

.sheet .demo-label {
  padding: 9px 12px;
}

.sheet .demo-label code {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}

.sheet table {
  border-collapse: collapse;
  width: 100%;
}

.sheet th,
.sheet td {
  border: 1px solid var(--grid);
  padding: 6px 10px;
  white-space: nowrap;
  text-align: left;
  font-weight: 400;
}

.sheet tr > :first-child {
  border-left: 0;
}

.sheet tr > :last-child {
  border-right: 0;
}

.sheet tbody tr:last-child td {
  border-bottom: 0;
}

.sheet thead th {
  background: var(--sheet-head);
  color: var(--muted);
}

.sheet .h {
  background: var(--hl);
  color: var(--hl-ink);
}

.sheet .x {
  color: var(--flag);
  text-decoration: line-through;
}

.sheet .q {
  color: var(--muted);
}

.scrawl {
  position: absolute;
  right: -2px;
  top: 0;
  background: var(--card);
  border: 1.5px solid var(--flag);
  color: var(--flag);
  font: italic 500 13px/1.3 var(--mono);
  padding: 3px 9px;
  border-radius: 3px;
  transform: rotate(3deg);
}

.demo-arrow {
  padding: 18px 0 12px 22px;
}

.demo-arrow::before {
  content: '↓ ';
}

.app {
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-app);
  margin-left: 32px;
}

.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px 10px;
}

.app-bar strong {
  font-size: 16px;
}

.app-bar span {
  font-size: 13px;
  color: var(--muted);
}

.app-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.4;
  align-items: center;
}

.app-row em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.chip.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.chip.wait {
  background: var(--wait-bg);
  color: var(--wait);
}

.chip.plain {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--grid);
}

/* ── Sections ── */
.section {
  padding: 92px 0;
  border-top: 1px solid var(--line);
}

.section--panel {
  background: var(--panel);
}

.section-head {
  max-width: 760px;
  margin-bottom: 48px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.022em;
}

.section-intro {
  font-size: 18px;
  color: var(--ink-2);
  margin-top: 16px;
  max-width: 64ch;
}

.mono-line {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Sound familiar? (before → after pairs) ── */
.pairs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pair {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 18px;
  border-top: 1px solid var(--grid);
}

.pair-before {
  font-size: 16px;
  color: var(--muted);
}

.pair-after {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.pair-after::before {
  content: '→ ';
  color: var(--ok);
}

.pair-how {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ── Team ── */
.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
}

.person {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.person img {
  width: 136px;
  height: 136px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.person h3 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.role {
  font-size: 15px;
  color: var(--muted);
  margin: 4px 0 12px;
}

.bio {
  color: var(--ink-2);
}

.skills {
  margin-top: 12px;
  font-size: 14px;
}

.person-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
  text-underline-offset: 3px;
}

.team-foot {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--grid);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: baseline;
  justify-content: space-between;
}

.team-foot p {
  color: var(--ink-2);
  font-size: 16px;
}

/* ── What we build ── */
.caps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
}

.cap {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.cap h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
}

.cap p {
  font-size: 16px;
  color: var(--ink-2);
}

.cap .mono-line {
  margin-top: 12px;
}

.tools {
  margin-top: 56px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 28px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
}

.tools .eyebrow {
  margin: 0;
}

.tools .mono-line {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.8;
}

/* ── Recent work ── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
  margin-bottom: 24px;
}

.stat {
  padding: 24px 24px 26px 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.stat + .stat {
  padding-left: 28px;
  border-left: 1px solid var(--grid);
}

.stat-num {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.stat-label {
  font-size: 16px;
  color: var(--ink-2);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 20px 56px;
  padding: 44px 0;
  border-bottom: 1px solid var(--grid);
}

.project:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.project-side h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.project-side .link-arrow {
  margin-top: 6px;
  font-size: 15px;
  justify-self: start;
}

.ba {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin-bottom: 18px;
  font-size: 16px;
}

.ba dt {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 3px;
}

.ba dd {
  margin: 0;
}

.ba .b-label {
  color: var(--muted);
}

.ba .b-text {
  color: var(--muted);
}

.ba .a-label {
  color: var(--ok);
}

.ba .a-text {
  font-weight: 700;
}

.project-outcome {
  color: var(--ink-2);
}

.project-outcome strong {
  color: var(--ink);
  font-weight: 700;
}

.project-tech {
  margin-top: 18px;
}

.project-tech b {
  font-family: var(--font);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 6px;
}

/* Details ("How we solved it") */
.project-details {
  margin-top: 22px;
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  background: var(--card);
}

.project-details summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}

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

.project-details summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}

.project-details[open] summary::after {
  content: '–';
}

.project-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.project-details summary:hover {
  background: var(--panel);
}

.details-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s ease-out;
}

.project-details[open] .details-body {
  grid-template-rows: 1fr;
}

.details-body > div {
  min-height: 0;
  overflow: hidden;
}

.details-inner {
  padding: 18px 18px 20px;
  display: grid;
  gap: 14px;
  color: var(--ink-2);
  font-size: 16px;
}

.details-inner strong {
  color: var(--ink);
}

/* Screenshot carousel (inside details) — driven by scripts/project-shot-carousel.js */
.project-shot-carousel {
  margin-top: 6px;
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.project-shot-carousel-viewport {
  position: relative;
  width: 100%;
  min-height: 120px;
  max-height: min(58vh, 520px);
  background: var(--panel);
  overflow: hidden;
  transition: height 0.35s ease;
}

.project-shot-carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.project-shot-carousel-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.project-shot-carousel-slides img.is-active {
  opacity: 1;
  z-index: 1;
}

.project-shot-carousel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--grid);
  background: var(--card);
}

.project-shot-carousel-nav {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.project-shot-carousel-nav:hover {
  border-color: var(--muted);
}

.project-shot-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.project-shot-carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--grid);
  cursor: pointer;
  flex-shrink: 0;
}

.project-shot-carousel-dot[aria-pressed='true'] {
  background: var(--ink);
}

.project-shot-carousel-hint {
  margin: 0;
  padding: 6px 12px 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  background: var(--card);
}

/* ── What we can add ── */
.services-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 44px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.service {
  padding: 22px 0 26px;
  border-top: 1px solid var(--grid);
}

.service h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.service p {
  font-size: 16px;
  color: var(--ink-2);
}

.service .mono-line {
  margin-top: 10px;
}

.services-note {
  margin-top: 28px;
  padding: 16px 0 0;
  border-top: 1px solid var(--grid);
  font-size: 16px;
  color: var(--ink-2);
  max-width: 74ch;
}

/* ── How we work ── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
}

.step {
  position: relative;
  padding-top: 52px;
}

.step::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 0;
  right: -28px;
  height: 2px;
  background: var(--grid);
}

.step:last-child::before {
  right: 0;
}

.step-num {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--btn);
  color: var(--btn-ink);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 16px;
}

.step h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
}

.step p {
  font-size: 16px;
  color: var(--ink-2);
}

/* ── Let's talk ── */
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 56px;
  align-items: end;
}

.contact .section-intro {
  max-width: 52ch;
}

.contact-side {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.contact-side p {
  font-size: 15px;
  color: var(--muted);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .nav {
    gap: 20px;
  }

  .caps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 36px;
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-grid;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--grid);
    padding: 8px var(--gutter) 16px;
    box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.4);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    font-size: 17px;
    color: var(--ink);
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav .nav-mobile-only {
    display: block;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .demo {
    max-width: 620px;
  }

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

  .people {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

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

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

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .step {
    padding: 0 0 28px 60px;
    min-height: 36px;
  }

  .step::before {
    top: 36px;
    bottom: 0;
    left: 17px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .step:last-child {
    padding-bottom: 0;
  }

  .step:last-child::before {
    display: none;
  }

  .step h3 {
    padding-top: 6px;
  }

  .contact-inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
  }

  body {
    font-size: 16px;
  }

  .header-inner {
    gap: 12px;
  }

  .brand-name {
    font-size: 21px;
  }

  .header-actions .btn {
    display: none;
  }

  .hero {
    padding: 44px 0 60px;
  }

  .hero-sub {
    font-size: 18px;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .section-intro {
    font-size: 17px;
  }

  .demo {
    padding-right: 4px;
  }

  .sheet {
    font-size: 11.5px;
  }

  .sheet th,
  .sheet td {
    padding: 5px 7px;
  }

  .scrawl {
    font-size: 12px;
    right: 0;
  }

  .app {
    margin-left: 12px;
  }

  .app-row {
    padding: 10px 12px;
    font-size: 13.5px;
  }

  .pairs,
  .caps,
  .services-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .pairs {
    gap: 32px;
  }

  .person {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
  }

  .person img {
    width: 88px;
    height: 88px;
  }

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

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

  .stat,
  .stat + .stat {
    padding: 18px 0;
    border-left: 0;
  }

  .stat + .stat {
    border-top: 1px solid var(--grid);
  }

  .stat-num {
    font-size: 38px;
  }

  .project {
    padding: 36px 0;
  }

  .project-side h3 {
    font-size: 22px;
  }

  .details-inner {
    padding: 16px 14px 18px;
  }

  .footer {
    padding-bottom: 88px; /* room for the chat bubble */
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .sheet {
    font-size: 10.5px;
  }

  .sheet th,
  .sheet td {
    padding: 5px 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .details-body,
  .project-shot-carousel-viewport,
  .project-shot-carousel-slides img,
  .nav-toggle span,
  .btn {
    transition: none;
  }
}
