/* =========================================================
   REP LABS — Global Stylesheet
   Quiet Authority: greyscale, editorial, operator-first.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color tokens ----------------------------------------- */
  --color-black:     #0A0A0A;
  --color-graphite:  #2B2B2B;
  --color-slate:     #6B6B6B;
  --color-mist:      #B5B5B5;
  --color-white:     #FFFFFF;
  --color-off-white: #F2F2F2;
  --color-grey-200:  #E2E2E2;
  --color-grey-300:  #D5D5D5;

  /* Type scale ------------------------------------------- */
  --display-xl: clamp(80px, 11vw, 168px);
  --display-l:  clamp(56px, 7.4vw, 104px);
  --display-m:  clamp(42px, 5vw, 68px);
  --display-s:  clamp(30px, 3.2vw, 42px);
  --lead:       clamp(20px, 1.6vw, 28px);
  --body:       18px;
  --caption:    14px;
  --label:      12px;

  /* Layout ----------------------------------------------- */
  --gutter: clamp(24px, 4vw, 80px);
  --section-y: clamp(96px, 12vh, 180px);

  /* Motion ----------------------------------------------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--body);
  line-height: 1.5;
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* Type ---------------------------------------------------- */
.display-xl, .display-l, .display-m, .display-s {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.display-xl { font-size: var(--display-xl); }
.display-l  { font-size: var(--display-l);  }
.display-m  { font-size: var(--display-m); letter-spacing: -0.03em; line-height: 0.98; }
.display-s  { font-size: var(--display-s); letter-spacing: -0.025em; line-height: 1.02; }

.display-light { font-weight: 300; }

.lead {
  font-family: 'Inter', sans-serif;
  font-size: var(--lead);
  line-height: 1.35;
  font-weight: 400;
  margin: 0;
  text-wrap: pretty;
  max-width: 32ch;
}
.lead-wide { max-width: 50ch; }

p { margin: 0 0 1em 0; }
.body-text {
  font-family: 'Inter', sans-serif;
  font-size: var(--body);
  line-height: 1.55;
  max-width: 56ch;
  text-wrap: pretty;
}
.caption {
  font-family: 'Inter', sans-serif;
  font-size: var(--caption);
  line-height: 1.5;
  color: var(--color-slate);
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-slate);
}
.mono-lg { font-size: 14px; }

/* Wordmark ------------------------------------------------ */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Inter Tight', sans-serif;
  letter-spacing: -0.025em;
  white-space: nowrap;
  line-height: 1;
}
.wordmark .dot {
  width: 0.36em; height: 0.36em;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
  margin-right: 0.12em;
  transform: translateY(-0.04em);
}
.wordmark .bold  { font-weight: 800; }
.wordmark .light { font-weight: 300; }

/* Brand logo images ------------------------------------- */
.logo {
  display: inline-block;
  height: 1em;
  width: auto;
  max-width: none;
  vertical-align: middle;
}
.logo-nav { height: 26px; }
.logo-hero-lockup { height: clamp(20px, 1.8vw, 26px); }
.logo-card { height: 28px; align-self: flex-start; margin-bottom: 28px; }
.logo-arch-parent { height: clamp(52px, 4.5vw, 76px); }
.logo-arch-child  { height: clamp(26px, 2.2vw, 32px); align-self: flex-start; }
.logo-footer-brand { height: clamp(56px, 5.4vw, 88px); }
.logo-footer-mark  { height: 18px; opacity: 0.75; }
.logo-hero-mono { height: 16px; vertical-align: -3px; opacity: 0.72; }

/* Invert black logo PNGs to white on dark sections */
.dark .logo,
.nav .logo,
.nav-mobile .logo,
.footer .logo,
.hero .logo,
.media-hero .logo {
  filter: invert(1);
}
/* But re-invert when inside a light element nested inside dark */
.light .logo,
.off .logo,
.nav.solid.nav-on-light .logo,
.tweaks-panel .logo {
  filter: none;
}

/* Layout primitives -------------------------------------- */
section { position: relative; }
.section {
  padding: var(--section-y) var(--gutter);
}
.section-tight { padding: clamp(64px, 8vh, 120px) var(--gutter); }

.dark {
  background: var(--color-black);
  color: var(--color-white);
}
.dark .mono { color: var(--color-mist); }
.dark .caption { color: var(--color-mist); }

.light  { background: var(--color-white); color: var(--color-black); }
.off    { background: var(--color-off-white); color: var(--color-black); }

.container {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}
.container-wide {
  max-width: 1640px;
  margin: 0 auto;
  width: 100%;
}

/* Grain ----------------------------------------------- */
.grain {
  position: relative;
  isolation: isolate;
}
.grain::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.025), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.02), transparent 65%);
  z-index: 0;
}
.grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.6) 0, rgba(255,255,255,0) 1px, transparent 1.5px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}
.grain > * { position: relative; z-index: 1; }

/* Nav --------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.3s var(--ease);
  border-bottom: 1px solid transparent;
  color: var(--color-white);
}
.nav.solid {
  background: rgba(10,10,10,0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(255,255,255,0.06);
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav-on-light {
  color: var(--color-black);
}
.nav-on-light.solid {
  background: rgba(255,255,255,0.85);
  border-bottom-color: rgba(0,0,0,0.06);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: 20px;
  letter-spacing: -0.025em;
}
.nav-logo .dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: currentColor;
  margin-right: 8px;
  display: inline-block;
}
.nav-logo .bold  { font-weight: 800; }
.nav-logo .light { font-weight: 300; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  opacity: 0.75;
  transition: opacity 0.2s var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active {
  opacity: 1;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
}

.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0; padding: 6px 0;
  color: inherit;
  opacity: 0.75;
  font-weight: 500;
  font-size: 14px;
  transition: opacity 0.2s var(--ease);
}
.nav-dropdown-trigger:hover { opacity: 1; }
.nav-dropdown-trigger svg { transition: transform 0.25s var(--ease); }
.nav-dropdown.open .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: -16px;
  min-width: 280px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  color: var(--color-white);
}
.nav-on-light .nav-dropdown-menu {
  background: rgba(255,255,255,0.97);
  border-color: rgba(0,0,0,0.08);
  color: var(--color-black);
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 15px;
  opacity: 0.85;
  border-radius: 2px;
  transition: background 0.15s var(--ease), opacity 0.15s var(--ease);
}
.nav-dropdown-menu a:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.nav-on-light .nav-dropdown-menu a:hover { background: rgba(0,0,0,0.04); }
.nav-dropdown-menu .mono {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--color-mist);
}
.nav-on-light .nav-dropdown-menu .mono { color: var(--color-slate); }

.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 8px;
}
.nav-mobile-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-mobile-open .nav-mobile-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-mobile-open .nav-mobile-toggle span:nth-child(2) { opacity: 0; }
.nav-mobile-open .nav-mobile-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  inset: 0;
  background: var(--color-black);
  color: var(--color-white);
  z-index: 49;
  padding: 100px var(--gutter) 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
  overflow-y: auto;
}
.nav-mobile-open .nav-mobile {
  opacity: 1;
  visibility: visible;
}
.nav-mobile a {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 16px;
}
.nav-mobile a.mono-sub {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  font-size: clamp(26px, 4.4vw, 38px);
  border-bottom: none;
  padding-left: 24px;
  padding-bottom: 4px;
  margin-top: -10px;
  opacity: 0.78;
}
.nav-mobile .mono-section {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-mist);
  margin-top: 20px;
  margin-bottom: -10px;
}

@media (max-width: 880px) {
  .nav-links, .nav-dropdown-menu { display: none; }
  .nav-mobile-toggle { display: inline-flex; flex-direction: column; }
}

/* Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: 0;
  transition: transform 0.2s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-white);
  color: var(--color-black);
}
.btn-primary:hover {
  background: var(--color-off-white);
}
.light .btn-primary, .off .btn-primary {
  background: var(--color-black);
  color: var(--color-white);
}
.light .btn-primary:hover, .off .btn-primary:hover {
  background: var(--color-graphite);
}

.btn-ghost {
  background: transparent;
  color: currentColor;
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover {
  border-color: currentColor;
  background: rgba(255,255,255,0.04);
}
.light .btn-ghost, .off .btn-ghost {
  border-color: rgba(0,0,0,0.18);
}
.light .btn-ghost:hover, .off .btn-ghost:hover {
  border-color: var(--color-black);
  background: rgba(0,0,0,0.02);
}

.btn-arrow::after {
  content: "→";
  font-family: 'Inter', sans-serif;
  display: inline-block;
  transition: transform 0.25s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: gap 0.2s var(--ease);
}
.link-arrow::after { content: "→"; transition: transform 0.25s var(--ease); }
.link-arrow:hover { gap: 12px; }
.link-arrow:hover::after { transform: translateX(2px); }

/* Hero ---------------------------------------------------- */
.hero {
  min-height: 100vh;
  padding: 140px var(--gutter) 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.hero-mono {
  margin-bottom: 28px;
}
.hero-headline {
  margin-bottom: 32px;
  max-width: 16ch;
}
.hero-sub {
  color: var(--color-mist);
  max-width: 60ch;
  margin-bottom: 44px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: clamp(60px, 10vh, 120px);
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  gap: 32px;
  flex-wrap: wrap;
}

/* Service cards (homepage) ------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-grey-300);
  margin-top: clamp(60px, 8vh, 100px);
  border-top: 1px solid var(--color-grey-300);
  border-bottom: 1px solid var(--color-grey-300);
}
.service-grid.acq-stripe {
  grid-template-columns: 1fr;
  margin-top: 1px;
  border-top: 0;
}
.service-card {
  background: var(--color-off-white);
  padding: 56px 44px 48px;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  transition: background 0.3s var(--ease);
}
.service-card:hover { background: var(--color-white); }
.service-card .mono { margin-bottom: 32px; }
.service-card .wordmark { font-size: 28px; margin-bottom: 28px; }
.service-card h3 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px 0;
  text-wrap: balance;
}
.service-card p {
  color: var(--color-slate);
  font-size: 16px;
  line-height: 1.55;
  flex: 1;
  max-width: 38ch;
}
.service-card .link-arrow { margin-top: 28px; align-self: flex-start; }

.service-card-wide {
  grid-column: 1 / -1;
  background: var(--color-white);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 40px;
  align-items: center;
}
.service-card-wide .mono { margin: 0; }
.service-card-wide h3 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 1.8vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.service-card-wide p {
  color: var(--color-slate);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 880px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-card-wide { grid-template-columns: 1fr; gap: 16px; }
}

/* Section headers ---------------------------------------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 6vw, 100px);
  margin-bottom: clamp(60px, 8vh, 100px);
  align-items: end;
}
.section-head .mono { margin-bottom: 32px; }
.section-head h2 {
  margin-top: 8px;
}
.section-head-sub {
  color: var(--color-slate);
}
.dark .section-head-sub { color: var(--color-mist); }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; }
}

/* Stat / proof pillars ----------------------------------- */
.proof-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  margin-top: clamp(60px, 8vh, 100px);
}
.light .proof-row, .off .proof-row {
  background: var(--color-grey-300);
}
.proof-cell {
  background: var(--color-black);
  padding: 40px 36px 44px;
}
.light .proof-cell, .off .proof-cell {
  background: var(--color-off-white);
}
.proof-cell .mono { margin-bottom: 32px; }
.proof-cell .stat {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  font-size: clamp(48px, 5.6vw, 84px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 20px;
}
.proof-cell .stat .em { font-weight: 800; }
.proof-cell .stat-caption {
  font-size: 15px;
  color: var(--color-mist);
  max-width: 30ch;
  line-height: 1.45;
}
.light .proof-cell .stat-caption, .off .proof-cell .stat-caption {
  color: var(--color-slate);
}
@media (max-width: 720px) {
  .proof-row { grid-template-columns: 1fr; }
}

/* Pull-quote --------------------------------------------- */
.pullquote {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  font-size: var(--display-m);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
  max-width: 22ch;
}
.pullquote::before { content: "\201C"; }
.pullquote::after  { content: "\201D"; }

/* Two-column body ---------------------------------------- */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
}
@media (max-width: 720px) {
  .cols-2 { grid-template-columns: 1fr; gap: 40px; }
}
.cols-2 .col p { color: var(--color-mist); max-width: 38ch; }
.light .cols-2 .col p, .off .cols-2 .col p { color: var(--color-slate); }

/* Brand wall ---------------------------------------------- */
.brand-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-grey-300);
  border-top: 1px solid var(--color-grey-300);
  border-bottom: 1px solid var(--color-grey-300);
  margin-top: clamp(40px, 6vh, 80px);
}
.dark .brand-wall { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.08); }

.brand-cell {
  background: var(--color-off-white);
  padding: 56px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 200px;
  transition: background 0.3s var(--ease);
}
.dark .brand-cell { background: var(--color-black); }
.brand-cell:hover { background: var(--color-white); }
.dark .brand-cell:hover { background: var(--color-graphite); }

.brand-cell .brand-name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.brand-cell .brand-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-slate);
  margin-top: 12px;
}
.dark .brand-cell .brand-cat { color: var(--color-mist); }
.brand-cell .brand-result {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--color-graphite);
  margin-top: 16px;
  line-height: 1.3;
}
.dark .brand-cell .brand-result { color: var(--color-mist); }

@media (max-width: 880px) { .brand-wall { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .brand-wall { grid-template-columns: 1fr; } }

/* Mono stat strip ---------------------------------------- */
.stat-strip {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  flex-wrap: wrap;
  padding-top: 32px;
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-mist);
}
.stat-strip .dot {
  display: inline-block; width: 4px; height: 4px;
  border-radius: 999px; background: currentColor;
  margin-right: 12px; vertical-align: 2px; opacity: 0.4;
}

/* Architecture diagram ----------------------------------- */
.arch {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(60px, 8vh, 120px);
  padding: 40px 0;
}
.arch-parent {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(38px, 4vw, 62px);
  letter-spacing: -0.03em;
  font-weight: 800;
  position: relative;
}
.arch-parent .dot {
  width: 0.32em; height: 0.32em;
  border-radius: 999px;
  background: currentColor;
  margin-right: 0.18em;
}
.arch-spine {
  width: 1px;
  height: 100px;
  background: rgba(255,255,255,0.2);
  margin: 32px 0;
}
.arch-children {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.15);
  width: 100%;
  max-width: 1200px;
}
.arch-children::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 16.66%; right: 16.66%;
  height: 1px;
  background: rgba(255,255,255,0.2);
}
.arch-child {
  background: var(--color-black);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.arch-child::before {
  content: "";
  position: absolute;
  top: -32px; left: 50%;
  width: 1px; height: 32px;
  background: rgba(255,255,255,0.2);
}
.arch-child .wordmark {
  font-size: clamp(20px, 1.8vw, 26px);
}
.arch-child .arch-desc {
  font-size: 14px;
  color: var(--color-mist);
  line-height: 1.45;
}
@media (max-width: 720px) {
  .arch-children { grid-template-columns: 1fr; }
  .arch-children::before { display: none; }
}

/* Forms --------------------------------------------------- */
.form-block {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
@media (max-width: 720px) { .form-block { grid-template-columns: 1fr; } }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form .full { grid-column: 1 / -1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-slate);
}
.dark .field label { color: var(--color-mist); }

.field input, .field select, .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  padding: 12px 0;
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s var(--ease);
  border-radius: 0;
  color: inherit;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%236B6B6B' fill='none' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 24px;
}
.dark .field input, .dark .field select, .dark .field textarea {
  border-bottom-color: rgba(255,255,255,0.2);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-bottom-color: var(--color-black);
}
.dark .field input:focus, .dark .field select:focus, .dark .field textarea:focus {
  border-bottom-color: var(--color-white);
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--color-mist);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.form-note {
  font-size: 13px;
  color: var(--color-slate);
  max-width: 40ch;
}
.dark .form-note { color: var(--color-mist); }

.form-success {
  padding: 32px;
  border: 1px solid currentColor;
  display: none;
}
.form-success.show { display: block; }
.form-success .mono { margin-bottom: 16px; }
.form-success h4 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px 0;
}

/* Footer -------------------------------------------------- */
.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: clamp(80px, 10vh, 140px) var(--gutter) 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding-bottom: clamp(60px, 8vh, 100px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 48px; }
}
.footer-brand .wordmark {
  font-size: clamp(48px, 5vw, 72px);
  margin-bottom: 24px;
}
.footer-brand .lead { color: var(--color-mist); }
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-mist);
  margin: 0 0 24px 0;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.footer-col a { font-size: 15px; opacity: 0.85; }
.footer-col a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom .mono { font-size: 11px; }
.footer-marks {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-marks .wordmark {
  font-size: 16px;
  color: var(--color-mist);
}

/* Scroll fade-up animation ------------------------------- */
.fade-up {
  animation: fadeUp 0.9s var(--ease) both;
  animation-delay: var(--stagger, 0ms);
  will-change: opacity, transform;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; }
  html { scroll-behavior: auto; }
}

/* Image placeholders ------------------------------------- */
.ph {
  position: relative;
  background: var(--color-graphite);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  color: var(--color-mist);
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.025) 0 1px, transparent 1px 14px),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.04), transparent 60%);
}
.ph .ph-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}
.light .ph, .off .ph {
  background: var(--color-grey-200);
  color: var(--color-slate);
}
.light .ph::before, .off .ph::before {
  background:
    repeating-linear-gradient(135deg,
      rgba(0,0,0,0.04) 0 1px, transparent 1px 14px);
}

.ph-square { aspect-ratio: 1 / 1; }
.ph-wide   { aspect-ratio: 16 / 9; }
.ph-tall   { aspect-ratio: 3 / 4; }
.ph-banner { aspect-ratio: 21 / 9; }

/* CTA banner ---------------------------------------------- */
.cta-banner {
  text-align: center;
  padding: clamp(96px, 14vh, 180px) var(--gutter);
}
.cta-banner .mono { margin-bottom: 40px; }
.cta-banner h2 { margin: 0 auto 36px; max-width: 20ch; }
.cta-banner p { margin: 0 auto 48px; max-width: 56ch; color: var(--color-mist); }

/* Service list (Advertising/Fulfillment/Media) ----------- */
.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--color-grey-300);
  border-top: 1px solid var(--color-grey-300);
  border-bottom: 1px solid var(--color-grey-300);
  margin-top: clamp(60px, 8vh, 100px);
}
.dark .service-list { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.08); }

.service-item {
  background: var(--color-white);
  padding: 44px 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: start;
}
.off .service-item { background: var(--color-off-white); }
.dark .service-item { background: var(--color-black); }
.service-item .mono { padding-top: 6px; }
.service-item h4 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
  line-height: 1.15;
}
.service-item p {
  color: var(--color-slate);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 50ch;
}
.dark .service-item p { color: var(--color-mist); }

@media (max-width: 720px) {
  .service-list { grid-template-columns: 1fr; }
  .service-item { grid-template-columns: 1fr; gap: 16px; }
}

/* Three column callouts (dark cards) --------------------- */
.tri-callout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(48px, 6vh, 80px);
}
.tri-callout .item {
  background: var(--color-black);
  color: var(--color-white);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
}
.off .tri-callout .item, .light .tri-callout .item {
  border: 1px solid var(--color-grey-300);
  background: var(--color-white);
  color: var(--color-black);
}
.tri-callout .item .mono { color: var(--color-mist); }
.off .tri-callout .item .mono, .light .tri-callout .item .mono { color: var(--color-slate); }
.tri-callout .item-headline {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.18;
}
.tri-callout .item p {
  font-size: 15px;
  color: var(--color-mist);
  margin: 0;
  line-height: 1.5;
}
.off .tri-callout .item p, .light .tri-callout .item p { color: var(--color-slate); }
@media (max-width: 720px) { .tri-callout { grid-template-columns: 1fr; } }

/* Case study cards (Advertising) ------------------------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(60px, 8vh, 100px);
  background: rgba(255,255,255,0.1);
}
.case-card {
  background: var(--color-black);
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 460px;
}
.case-card .case-brand {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.025em;
  line-height: 1;
}
.case-card .case-result {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  font-size: clamp(40px, 4vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: auto;
}
.case-card .case-result .em { font-weight: 800; }
.case-card p {
  font-size: 15px;
  color: var(--color-mist);
  margin: 0;
  line-height: 1.55;
  max-width: 36ch;
}
@media (max-width: 880px) { .case-grid { grid-template-columns: 1fr; } }

/* SLA table ---------------------------------------------- */
.sla-table {
  margin-top: clamp(48px, 6vh, 80px);
  width: 100%;
}
.sla-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  align-items: baseline;
}
.sla-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.15); }
.sla-row .sla-svc {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.02em;
}
.sla-row .sla-val {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.02em;
  color: var(--color-mist);
}
@media (max-width: 720px) {
  .sla-row { grid-template-columns: 1fr; gap: 8px; }
}

/* Integration grid --------------------------------------- */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-grey-300);
  border: 1px solid var(--color-grey-300);
  margin-top: clamp(48px, 6vh, 80px);
}
.integration-cell {
  background: var(--color-white);
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--color-graphite);
  transition: background 0.2s var(--ease);
}
.integration-cell:hover { background: var(--color-off-white); }
@media (max-width: 720px) { .integration-grid { grid-template-columns: repeat(2, 1fr); } }

/* Team grid (about) -------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
  margin-top: clamp(48px, 6vh, 80px);
}
.team-card .ph { aspect-ratio: 4 / 5; margin-bottom: 20px; }
.team-card .name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 4px 0;
}
.team-card .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-slate);
  margin-bottom: 12px;
}
.dark .team-card .role { color: var(--color-mist); }
.team-card .bio {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-slate);
  max-width: 38ch;
}
.dark .team-card .bio { color: var(--color-mist); }
@media (max-width: 880px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

/* Values list (about) ------------------------------------ */
.values-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  margin-top: clamp(48px, 6vh, 80px);
}
.values-list .value {
  background: var(--color-black);
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.values-list .value .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-mist);
  text-transform: uppercase;
}
.values-list .value h4 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}
.values-list .value p {
  color: var(--color-mist);
  font-size: 16px;
  line-height: 1.55;
  max-width: 38ch;
  margin: 0;
}
@media (max-width: 720px) { .values-list { grid-template-columns: 1fr; } }

/* Studio equipment cards (Media) ------------------------- */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  margin-top: clamp(48px, 6vh, 80px);
}
.equipment-cell {
  background: var(--color-black);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
}
.equipment-cell .eq-name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.equipment-cell .eq-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-mist);
  margin: 0;
}
@media (max-width: 880px) { .equipment-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .equipment-grid { grid-template-columns: 1fr; } }

/* Acquisition criteria cols (light) ---------------------- */
.criteria-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.criteria-list li {
  position: relative;
  padding-left: 28px;
  font-size: 17px;
  line-height: 1.5;
  max-width: 46ch;
}
.criteria-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 14px; height: 1px;
  background: currentColor;
}

/* Tweaks panel ------------------------------------------- */
.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  background: rgba(10,10,10,0.95);
  color: var(--color-white);
  border: 1px solid rgba(255,255,255,0.12);
  width: 280px;
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 16px;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.tweaks-panel.open { display: flex; }
.tweaks-panel .tw-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.tweaks-panel .tw-head .mono { font-size: 11px; color: var(--color-mist); margin: 0; }
.tweaks-panel .tw-close {
  background: transparent; border: 0; color: var(--color-mist);
  font-size: 18px; line-height: 1; padding: 2px 6px;
}
.tweaks-panel .tw-close:hover { color: var(--color-white); }
.tweaks-panel .tw-group { display: flex; flex-direction: column; gap: 8px; }
.tweaks-panel .tw-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-mist);
}
.tweaks-panel .tw-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(255,255,255,0.08);
  padding: 2px;
}
.tweaks-panel .tw-opt {
  background: rgba(255,255,255,0.04);
  color: var(--color-mist);
  border: 0;
  padding: 8px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.tweaks-panel .tw-opt.active {
  background: var(--color-white);
  color: var(--color-black);
}
.tweaks-panel .tw-toggle {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.tweaks-panel .tw-switch {
  width: 36px; height: 20px;
  background: rgba(255,255,255,0.15);
  border: 0;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
  cursor: pointer;
}
.tweaks-panel .tw-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--color-white);
  border-radius: 999px;
  transition: transform 0.2s;
}
.tweaks-panel .tw-switch.on { background: var(--color-white); }
.tweaks-panel .tw-switch.on::after { transform: translateX(16px); background: var(--color-black); }
