/* ==========================================================================
   Kligers — Direction F "Two sides of the table"
   The tagline is the layout: the light half is the client's side
   ("You steer the business"), the dark half is ours ("We do the technology").
   Every colour goes through the tokens below.
   ========================================================================== */

:root {
  color-scheme: light;

  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --maxw: 1180px;
  --gutter: 24px;
  --radius: 8px;
  --header-h: 68px;

  /* Page */
  --bg: #ffffff;
  --surface: #f4f6f8;
  --ink: #1e2227;
  --muted: #5c6570;
  --line: #e1e6eb;
  --link: #4e6e90;
  --focus: #4e6e90;
  --header-bg: rgba(255, 255, 255, 0.94);

  /* The client's side (light half) */
  --client-bg: #e8eef4;
  --client-card: #ffffff;
  --client-ink: #1e2227;
  --client-quote: #2e3a47;
  --client-text: #46505b;
  --client-label: #4e6e90;

  /* Our side (dark half) */
  --our-bg: #1e2227;
  --our-card: #2a2f35;
  --our-ink: #ffffff;
  --our-text: #e3e8ed;
  --our-muted: #c9d0d8;
  --our-label: #8fbbe8;
  --our-line: #3a4148;
  --our-ring: #1e2227;

  /* Buttons */
  --btn-bg: #1e2227;
  --btn-ink: #ffffff;
  --btn-hover: #3a4148;
  --btn-light-bg: #ffffff;
  --btn-light-ink: #1e2227;
  --btn-light-hover: #e8eef4;

  --shadow: 0 1px 2px rgba(30, 34, 39, 0.06), 0 10px 28px -18px rgba(30, 34, 39, 0.35);
}

[data-theme='dark'] {
  color-scheme: dark;

  --bg: #15181c;
  --surface: #1b1f24;
  --ink: #e6eaee;
  --muted: #9ba4ae;
  --line: #2c3238;
  --link: #8fbbe8;
  --focus: #8fbbe8;
  --header-bg: rgba(21, 24, 28, 0.94);

  /* Client side becomes a dark slate blue … */
  --client-bg: #1f2b38;
  --client-card: #2a3847;
  --client-ink: #eef2f6;
  --client-quote: #dde6ef;
  --client-text: #bccad8;
  --client-label: #9dbbda;

  /* … our side goes deeper than the page, so the two halves stay distinct. */
  --our-bg: #0d1013;
  --our-card: #1c2126;
  --our-ink: #ffffff;
  --our-text: #e3e8ed;
  --our-muted: #b4bdc6;
  --our-label: #8fbbe8;
  --our-line: #2a3036;
  --our-ring: #0d1013;

  --btn-bg: #e6eaee;
  --btn-ink: #15181c;
  --btn-hover: #c9d0d8;
  --btn-light-bg: #e8eef4;
  --btn-light-ink: #15181c;
  --btn-light-hover: #c9d8e6;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -18px rgba(0, 0, 0, 0.6);
}

/* ── 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;
  overflow-x: hidden;
}

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

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

p {
  margin: 0;
}

a {
  color: var(--link);
}

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

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-ink);
  padding: 8px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

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

.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;
}

/* Small uppercase side labels ("You steer the business", "What we built", …) */
.k {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--our-label);
}

.k--client,
.side--client .k,
.person--client .k,
.contact-side--client .k {
  color: var(--client-label);
}

/* ── Buttons & links ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.btn--pill {
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
}

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

.btn--small {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}

.btn--light {
  background: var(--btn-light-bg);
  color: var(--btn-light-ink);
}

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

.btn--light:focus-visible,
.text-link--on-dark:focus-visible {
  outline-color: var(--our-label);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

.text-link--on-dark {
  color: var(--our-label);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.wordmark {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

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

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

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

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

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

.theme-toggle:hover,
.nav-toggle:hover {
  background: var(--surface);
}

.theme-toggle .icon-sun {
  display: none;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  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);
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.section {
  padding-block: 96px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 44px;
  justify-items: start;
}

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

.section-intro {
  color: var(--muted);
  font-size: 18px;
  max-width: 62ch;
}

/* Intro on the left, content on the right */
.side-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 56px;
  align-items: start;
}

.section-head--side {
  margin-bottom: 0;
  position: sticky;
  top: calc(var(--header-h) + 32px);
  padding: 28px;
  border-radius: var(--radius);
  background: var(--client-bg);
  color: var(--client-ink);
}

.section-head--side .section-intro {
  color: var(--client-text);
  font-size: 17px;
}

/* Plain lists of items: heading + paragraph, separated by a rule */
.item-grid {
  display: grid;
  gap: 0 40px;
}

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

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

.item {
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  align-content: start;
}

.item h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.item p {
  color: var(--muted);
  font-size: 16px;
}

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

/* ── Hero split ───────────────────────────────────────────────────────── */

/* Hard stop at 50%: light half / dark half, full bleed. Not a gradient. */
.hero {
  background: linear-gradient(to right, var(--client-bg) 50%, var(--our-bg) 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* label, title, three quote/answer rows, footer */
  grid-template-rows: auto auto auto auto auto auto;
  row-gap: 12px;
}

.side {
  grid-row: 1 / span 6;
  display: grid;
  grid-template-rows: subgrid;
  align-content: start;
  padding-block: 72px 76px;
}

.side--client {
  padding-right: 48px;
  color: var(--client-ink);
}

.side--our {
  padding-left: 48px;
  color: var(--our-text);
}

.hero-title {
  font-size: clamp(34px, 3.8vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 4px 0 20px;
}

.side--our .hero-title {
  color: var(--our-ink);
}

.pairs {
  grid-row: span 3;
  display: grid;
  grid-template-rows: subgrid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pairs li {
  display: flex;
  align-items: center;
  font-size: 18px;
  line-height: 1.45;
  padding: 16px 18px;
  border-radius: var(--radius);
}

.side--client .pairs li {
  background: var(--client-card);
  color: var(--client-quote);
  font-style: italic;
  font-weight: 500;
}

.side--our .pairs li {
  background: var(--our-card);
  color: var(--our-text);
}

.hero-foot {
  margin-top: 28px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.hero-motto {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.hero-sub {
  color: var(--client-text);
  max-width: 46ch;
}

.who {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--our-muted);
}

.who img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.who img + img {
  margin-left: -22px;
  border: 2px solid var(--our-ring);
  box-sizing: content-box;
}

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

/* ── Where we help: one row per situation, client's words → what we do ── */

.pair-table {
  display: grid;
  gap: 10px;
}

.pair-table-head,
.pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pair-table-head {
  padding: 0 22px 2px;
  column-gap: 54px;
}

.pair-row p {
  padding: 20px 22px;
  border-radius: var(--radius);
}

.say {
  background: var(--client-bg);
  color: var(--client-quote);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
}

.do {
  position: relative;
  background: var(--our-bg);
  color: var(--our-text);
  font-size: 16px;
}

/* ── Team split ───────────────────────────────────────────────────────── */

.team-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  overflow: hidden;
}

.person {
  padding: 40px 44px 44px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.person--client {
  background: var(--client-bg);
  color: var(--client-ink);
}

.person--our {
  background: var(--our-bg);
  color: var(--our-text);
}

.person-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 4px;
}

.person-top img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

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

.person--our h3 {
  color: var(--our-ink);
}

.person-role {
  font-size: 15px;
  margin-top: 4px;
}

.person--client .person-role,
.person--client > p {
  color: var(--client-text);
}

.person--our .person-role,
.person--our > p {
  color: var(--our-muted);
}

.person > p:not(.person-skills) {
  max-width: 52ch;
}

.person-skills {
  font-size: 15px;
  font-weight: 700;
}

.person--client .person-skills {
  color: var(--client-label) !important;
}

.person--our .person-skills {
  color: var(--our-label) !important;
}

.person-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.person-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.person--client .person-link {
  color: var(--client-label);
}

.person--our .person-link {
  color: var(--our-label);
}

/* ── What we build: tools row ─────────────────────────────────────────── */

.tools {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.tools-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}

.tools-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.tools-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.tools-list img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

/* ── Recent work ──────────────────────────────────────────────────────── */

.numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 56px;
  border-block: 1px solid var(--line);
}

.numbers > div {
  padding: 24px 28px 26px 0;
  display: grid;
  gap: 4px;
}

.numbers > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.numbers dt {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.numbers dd {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.project {
  display: grid;
  gap: 16px;
}

.project + .project {
  margin-top: 64px;
}

.project-head {
  display: grid;
  gap: 6px;
}

.project-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--link);
}

.project-head h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project-split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-split > div {
  padding: 24px 28px 26px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.needed {
  background: var(--client-bg);
  color: var(--client-quote);
}

.built {
  background: var(--our-bg);
  color: var(--our-text);
}

.built strong {
  color: var(--our-ink);
}

.built .text-link {
  justify-self: start;
  margin-top: 4px;
}

/* Arrow on the seam between the two halves */
.project-split::after {
  content: '→';
  content: '→' / '';
  position: absolute;
  left: calc(5 / 12 * 100%);
  top: 26px;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  box-shadow: var(--shadow);
}

.project-tech {
  font-size: 14px;
  color: var(--muted);
}

.project-tech span {
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}

/* Details: "How we solved it" */
.project-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.project-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

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

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

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

.project-details summary:hover {
  color: var(--link);
}

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

/* Smooth open/close (scripts/interactions.js toggles grid-template-rows) */
.details-body {
  display: grid;
  grid-template-rows: 0fr;
  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;
}

.project-problem,
.project-solution {
  padding: 16px 20px 0;
  font-size: 16px;
  color: var(--muted);
  max-width: 88ch;
}

.project-problem strong,
.project-solution strong {
  color: var(--ink);
}

.details-body > div > :last-child {
  margin-bottom: 20px;
}

/* Screenshot carousels (scripts/project-shot-carousel.js) */
.project-shot-carousel {
  margin: 20px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.project-shot-carousel:focus-visible {
  outline-offset: 2px;
}

.project-shot-carousel-viewport {
  position: relative;
  width: 100%;
  min-height: 120px;
  max-height: min(58vh, 520px);
  background: var(--surface);
  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(--line);
  background: var(--bg);
}

.project-shot-carousel-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.project-shot-carousel-nav:hover {
  background: var(--surface);
}

.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: 999px;
  background: var(--line);
  cursor: pointer;
  flex-shrink: 0;
}

[data-theme='dark'] .project-shot-carousel-dot {
  background: #3a4148;
}

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

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

/* ── How we work ──────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.step {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 18px;
  border-top: 3px solid var(--ink);
}

.step--you {
  border-top-color: var(--client-label);
}

.step--both {
  border-top-color: var(--line);
  border-image: linear-gradient(to right, var(--client-label) 50%, var(--ink) 50%) 1;
}

.step-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.lead-tag {
  justify-self: start;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.lead-tag--you {
  background: var(--client-bg);
  color: var(--client-label);
}

.lead-tag--us {
  background: var(--our-bg);
  color: var(--our-label);
}

.lead-tag--both {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.step h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 4px;
}

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

/* ── Let's talk ───────────────────────────────────────────────────────── */

.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  overflow: hidden;
}

.contact-side {
  padding: 48px 48px 52px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.contact-side--client {
  background: var(--client-bg);
  color: var(--client-ink);
}

.contact-side--client h2 {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.contact-side--client p {
  font-size: 20px;
  font-style: italic;
  font-weight: 500;
  color: var(--client-quote);
}

.contact-side--our {
  background: var(--our-bg);
  color: var(--our-text);
}

.contact-side--our > p {
  font-size: 18px;
  max-width: 40ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 10px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.footer-brand {
  font-size: 14px;
  color: var(--muted);
}

.footer-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--link);
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .nav {
    gap: 18px;
  }

  .nav a {
    font-size: 14px;
  }

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

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 36px;
  }
}

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

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

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

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

  .header-actions {
    margin-left: auto;
  }

  .side-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-head--side {
    position: static;
  }
}

@media (max-width: 820px) {
  :root {
    --gutter: 20px;
  }

  body {
    font-size: 16px;
  }

  .section {
    padding-block: 64px;
  }

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

  /* Hero: the halves stack, light first, then dark */
  .hero {
    background: none;
  }

  .hero-grid {
    display: block;
    padding-inline: 0;
  }

  .side {
    display: grid;
    grid-template-rows: none;
    gap: 12px;
    padding: 44px var(--gutter) 48px;
  }

  .side--client {
    background: var(--client-bg);
  }

  .side--our {
    background: var(--our-bg);
  }

  .pairs {
    grid-template-rows: none;
    gap: 10px;
  }

  .pairs li {
    font-size: 17px;
  }

  .hero-title {
    margin-bottom: 12px;
  }

  .hero-foot {
    margin-top: 20px;
  }

  .pair-table-head {
    display: none;
  }

  .pair-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pair-row + .pair-row {
    margin-top: 10px;
  }

  .pair-row .say {
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .pair-row .do {
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .team-split,
  .contact-split,
  .project-split {
    grid-template-columns: 1fr;
  }

  .person,
  .contact-side {
    padding: 32px 24px 36px;
  }

  .person-top img {
    width: 80px;
    height: 80px;
  }

  .project-split > div {
    padding: 20px 20px 22px;
  }

  .project-split::after {
    display: none;
  }

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

  .numbers > div,
  .numbers > div + div {
    padding: 18px 0;
    border-left: 0;
  }

  .numbers > div + div {
    border-top: 1px solid var(--line);
  }

  .item-grid--2,
  .item-grid--3 {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-shot-carousel {
    margin: 16px 12px;
  }

  .project-problem,
  .project-solution {
    padding-inline: 16px;
  }

  .project-details summary {
    padding-inline: 16px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    gap: 12px;
  }

  .wordmark {
    font-size: 22px;
  }

  .btn--small {
    padding: 9px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
