/* BlackBox site. Dark, editorial, restrained. */

:root {
  --bg: #0a0a0b;
  --bg-2: #0e0f11;
  --bg-3: #131417;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f1eee8;
  --text-2: #c9c6c0;
  --muted: #8b9098;
  --muted-2: #5f646c;
  --accent: #20abcd;
  --accent-soft: rgba(32, 171, 205, 0.14);
  --accent-line: rgba(32, 171, 205, 0.45);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1360px;
  --section: clamp(96px, 13vw, 184px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #041015; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex: none; }
.eyebrow--center { justify-content: center; }

.display {
  font-size: clamp(44px, 8.4vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
  max-width: 14ch;
}
.display--md { font-size: clamp(40px, 6.4vw, 96px); max-width: 16ch; }
.h2 {
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 54px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: var(--h);
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn--primary { background: var(--text); color: #0a0a0b; }
.btn--primary:hover { background: var(--accent); color: #041015; }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { --h: 42px; padding: 0 18px; font-size: 14px; }
.btn--lg { --h: 64px; padding: 0 34px; font-size: 17px; }
.btn__arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: 80px; display: flex; align-items: center; gap: 40px;
  transition: height .35s var(--ease);
}
.nav.is-scrolled .nav__inner { height: 68px; }
.nav__logo img { width: 164px; height: auto; }
.nav__links { display: flex; gap: 32px; margin-left: auto; }
.nav__links a {
  font-size: 14px; color: var(--muted); text-decoration: none; position: relative; padding: 6px 0;
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:hover, .nav__links a.is-current { color: var(--text); }
.nav__links a.is-current::after { transform: scaleX(1); }
.nav__cta { opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), background-color .25s, color .25s; }
.nav.show-cta .nav__cta { opacity: 1; transform: none; pointer-events: auto; }
.nav__toggle { display: none; }

.mnav {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  padding: 112px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.mnav[hidden] { display: none; }
.mnav nav { display: flex; flex-direction: column; }
.mnav nav a {
  font-size: 34px; letter-spacing: -0.03em; font-weight: 500; text-decoration: none;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.mnav .btn { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 150px 0 clamp(72px, 9vw, 120px);
  display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 78% 40%, rgba(32, 171, 205, 0.10), transparent 60%),
    radial-gradient(900px 600px at 10% 100%, rgba(255, 255, 255, 0.035), transparent 60%),
    linear-gradient(180deg, #0b0c0e 0%, #0a0a0b 100%);
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
}
.hero__art {
  position: absolute;
  width: min(62vw, 880px);
  right: max(-6vw, -80px);
  top: 50%;
  transform: translateY(-46%);
  opacity: 0.95;
}
.art-lines path { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.art-lines .art-lines--faint { stroke: rgba(255, 255, 255, 0.07); }
.art-lines .art-lines--ghost { stroke: rgba(255, 255, 255, 0.04); stroke-dasharray: 3 6; }
.art-floor { fill: rgba(32, 171, 205, 0.10); stroke: rgba(32, 171, 205, 0.35); stroke-width: 1; vector-effect: non-scaling-stroke; }
.art-box__top { fill: #1c1d21; }
.art-box__left { fill: #0f1012; }
.art-box__right { fill: #08090a; }
.art-box path { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.art-trace {
  stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-dasharray: 0.12 0.88; stroke-dashoffset: 1;
  animation: trace 9s linear infinite;
  filter: drop-shadow(0 0 6px rgba(32, 171, 205, 0.6));
}
@keyframes trace { to { stroke-dashoffset: 0; } }
.art-labels text { font-family: var(--mono); font-size: 13px; fill: rgba(255, 255, 255, 0.28); letter-spacing: 0.08em; }

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  column-gap: clamp(40px, 6vw, 112px);
  align-items: start;
}
.hero__head { grid-column: 1 / -1; }
.hero__title {
  font-size: clamp(46px, 7.4vw, 120px);
  line-height: 0.93;
  letter-spacing: -0.048em;
  font-weight: 600;
  margin-bottom: clamp(36px, 4.4vw, 64px);
  max-width: 16ch;
}
.hero__title .accent { display: inline; }
.hero__title, .display, .h2, .ai__head { text-wrap: balance; }
.hero__offer {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.28;
  letter-spacing: -0.022em;
  color: var(--text);
  max-width: 26ch;
  margin-bottom: 44px;
}
.hero__story {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: 44px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Code block */
.code {
  margin: 0;
  background: rgba(14, 15, 17, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  align-self: start;
  margin-top: 4px;
}
.code__bar {
  display: flex; align-items: center; gap: 14px;
  height: 40px; padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted-2);
}
.code__dots { display: flex; gap: 6px; }
.code__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.code__body {
  margin: 0; padding: 22px 22px 26px 0;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.85;
  color: var(--text-2);
  overflow-x: auto;
}
.code__body .ln { display: inline-block; width: 44px; padding-right: 18px; text-align: right; color: var(--muted-2); user-select: none; }
.code .k { color: #9aa0a8; }
.code .v { color: var(--text); }
.code .p { color: var(--muted); }
.code .pr { color: #c9c6c0; }
.code .s { color: var(--accent); }
.code .f { color: var(--text); }
.caret {
  display: inline-block; width: 8px; height: 1.1em; vertical-align: -0.2em; margin-left: 3px;
  background: var(--accent); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Display quote ---------- */
.dquote { padding: clamp(88px, 11vw, 160px) 0 clamp(72px, 8vw, 120px); border-top: 1px solid var(--line); position: relative; }
.dquote__fig { margin: 0; position: relative; max-width: 1180px; }
.dquote__mark {
  position: absolute; top: -0.32em; left: -0.06em;
  font-size: clamp(120px, 14vw, 210px); line-height: 1; font-weight: 300;
  color: var(--accent); opacity: 0.85; letter-spacing: -0.05em; pointer-events: none;
}
.dquote blockquote { margin: 0; padding-top: clamp(48px, 5.5vw, 76px); }
.dquote blockquote p {
  font-size: clamp(27px, 3.5vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--text);
  text-wrap: pretty;
}
.dquote figcaption {
  margin-top: clamp(32px, 4vw, 52px);
  display: flex; align-items: center; gap: 16px;
  font-size: 15px; color: var(--muted);
}
.dquote figcaption strong { color: var(--text); font-weight: 500; }
.dquote__rule { width: 48px; height: 1px; background: var(--accent); }

/* ---------- Who we are ---------- */
.who .display { margin-bottom: clamp(48px, 6vw, 88px); }
.who__body {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
  margin-bottom: clamp(80px, 10vw, 140px);
}
.who__lead {
  grid-column: 1 / span 6;
  font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--text-2); letter-spacing: -0.01em;
}
.who__claim {
  grid-column: 8 / span 5;
  font-size: clamp(22px, 2.1vw, 31px); line-height: 1.3; letter-spacing: -0.025em; color: var(--text);
  padding-left: 28px; border-left: 1px solid var(--accent);
}
.who__claim em { font-style: normal; color: var(--accent); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 0; border-top: 1px solid var(--line-2);
}
.stat { padding: 32px 28px 8px 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 28px; }
.stat:last-child { border-right: 0; }
.stat__num {
  font-size: clamp(64px, 7.6vw, 120px); line-height: 0.9; letter-spacing: -0.06em; font-weight: 500;
  margin-bottom: 22px; font-variant-numeric: tabular-nums;
}
.stat__num small {
  font-size: 0.24em; letter-spacing: 0; font-weight: 400; color: var(--muted);
  margin: 0 0.35em; vertical-align: 0.9em; font-family: var(--mono);
}
.stat__txt { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 24ch; }
.stat:first-child .stat__num { color: var(--accent); }

/* ---------- Who this is for ---------- */
.forwho__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 120px); }
.forwho__head { position: sticky; top: 120px; align-self: start; }
.forwho__list li {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px;
  padding: 36px 0 40px; border-top: 1px solid var(--line);
}
.forwho__list li:last-child { border-bottom: 1px solid var(--line); }
.forwho__list .idx { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 8px; }
.forwho__list p { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--muted); }
.forwho__list strong {
  display: block; color: var(--text); font-weight: 500;
  font-size: clamp(24px, 2.3vw, 34px); line-height: 1.18; letter-spacing: -0.028em; margin-bottom: 12px;
}

/* ---------- Services ---------- */
.services .display { margin-bottom: clamp(56px, 7vw, 96px); }
.services__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.svc {
  position: relative;
  padding: clamp(32px, 4vw, 56px);
  display: flex; flex-direction: column; min-height: 460px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  transition: background-color .4s var(--ease);
}
.svc + .svc { border-left: 1px solid var(--line-2); }
.svc::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.svc:hover { background-color: rgba(255,255,255,0.015); }
.svc:hover::before { transform: scaleX(1); }
.svc__idx { font-family: var(--mono); font-size: 13px; color: var(--muted-2); margin-bottom: clamp(48px, 7vw, 96px); }
.svc__title { font-size: clamp(34px, 3.6vw, 54px); line-height: 1; letter-spacing: -0.04em; margin-bottom: 24px; }
.svc__body { font-size: clamp(18px, 1.45vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 40ch; }
.svc__proof {
  margin-top: auto; padding-top: 28px;
  font-size: 15px; line-height: 1.6; color: var(--muted);
  border-top: 1px solid var(--line);
}
.svc__body { margin-bottom: 40px; }

.ai {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(72px, 9vw, 128px); align-items: start;
}
.ai__head { font-size: clamp(32px, 3.9vw, 58px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 500; }
.ai__body { display: grid; gap: 18px; font-size: 18px; line-height: 1.6; color: var(--text-2); padding-top: 8px; }
.ai__body .muted { font-size: 16px; }

/* ---------- How it works ---------- */
.how .display { margin-bottom: clamp(56px, 7vw, 96px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-2); counter-reset: s; }
.step { padding: 0 28px 0 0; position: relative; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step__num {
  display: block;
  font-size: clamp(64px, 7vw, 112px); line-height: 1; letter-spacing: -0.06em; font-weight: 500;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.28);
  padding: 28px 0 32px;
  transition: color .5s var(--ease), -webkit-text-stroke-color .5s;
}
.step.is-in .step__num { color: var(--text); -webkit-text-stroke-color: transparent; }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--accent);
  transition: width 1s var(--ease);
}
.step.is-in::before { width: 100%; }
.step__txt h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px; font-weight: 600; }
.step__txt p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.terms { color: var(--text); display: block; margin-bottom: 18px; }
.own {
  display: block; color: var(--text); font-weight: 500;
  font-size: 19px; line-height: 1.35; letter-spacing: -0.015em;
  padding: 16px 0 0; border-top: 1px solid var(--accent-line);
}

/* ---------- How the day works ---------- */
.day { background: var(--bg-2); }
.day__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.day__intro { font-size: clamp(21px, 2vw, 28px); line-height: 1.35; letter-spacing: -0.02em; color: var(--text-2); }

.tz { border: 1px solid var(--line-2); border-radius: 14px; padding: clamp(20px, 3vw, 36px); background: var(--bg); }
.tz__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.tz__toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; }
.tz__toggle button {
  border: 0; background: transparent; cursor: pointer; padding: 8px 18px; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  transition: background-color .25s, color .25s;
}
.tz__toggle button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.tz__legend { display: flex; gap: 22px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.tz__legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 8px; border-radius: 2px; display: inline-block; }
.sw--team { background: var(--accent); }
.sw--day { border: 1px dashed rgba(255,255,255,0.45); }

.tz__rows { display: grid; gap: 0; }
.tz__row { display: grid; grid-template-columns: 190px 1fr 92px; align-items: center; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.tz__row:first-child { border-top: 0; }
.tz__label strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.tz__label span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tz__track { position: relative; height: 54px; }
.tz__ticks { position: absolute; inset: auto 0 0 0; height: 16px; }
.tz__tick { position: absolute; bottom: 0; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.tz__tick::before { content: ""; position: absolute; left: 50%; bottom: 16px; width: 1px; height: 5px; background: rgba(255,255,255,0.18); }
.tz__lane { position: absolute; left: 0; right: 0; top: 6px; height: 22px; border-radius: 4px; background: rgba(255,255,255,0.025); }
.tz__bar, .tz__work {
  position: absolute; top: 0; height: 100%; border-radius: 4px;
  transition: left .7s var(--ease), width .7s var(--ease);
}
.tz__work { border: 1px dashed rgba(255,255,255,0.4); background: transparent; z-index: 0; top: -5px; height: calc(100% + 10px); border-radius: 6px; }
.tz__bar { background: var(--accent); z-index: 1; }
.tz__bar--early { background: rgba(32, 171, 205, 0.32); }
.tz__bar span {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10.5px; color: #041015; white-space: nowrap; letter-spacing: 0.02em;
}
.tz__bar--early span { color: var(--text); }
.tz__bar--r span { left: auto; right: 10px; }
.tz__out { text-align: right; }
.tz__out b { display: block; font-size: 26px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tz__out small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.tz__now { position: absolute; top: -6px; bottom: 14px; width: 1px; background: rgba(255,255,255,0.7); z-index: 3; }
.tz__row:not(:first-child) .tz__now::after { content: none; }
.tz__now::after {
  content: "now"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 9.5px; color: var(--text); letter-spacing: 0.1em; text-transform: uppercase;
}

.day__cities { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: clamp(56px, 7vw, 96px); }
.city__name { font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.04em; line-height: 1; margin-bottom: 22px; }
.city p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.city strong { color: var(--text); font-weight: 500; }

/* ---------- Case studies ---------- */
.cases__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.cases__sub { color: var(--muted); font-size: 17px; }
.cases__ui { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); border-top: 1px solid var(--line-2); }
.cases__tabs { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.cases__tabs button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 28px 28px 28px 0; cursor: pointer; position: relative;
}
.cases__tabs button::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--accent); transition: width .5s var(--ease);
}
.tab__name { font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -0.035em; font-weight: 500; color: var(--muted-2); transition: color .3s; }
.tab__meta { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.cases__tabs button:hover .tab__name { color: var(--text-2); }
.cases__tabs button[aria-selected="true"] .tab__name { color: var(--text); }
.cases__tabs button[aria-selected="true"] .tab__meta { color: var(--accent); }
.cases__tabs button[aria-selected="true"]::before { width: 100%; }

.cases__panels { padding: 28px 0 0 clamp(28px, 4vw, 64px); }
.case { animation: fadeIn .5s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.case__client { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 32px; }
.case__client h3 { font-size: clamp(40px, 4.4vw, 68px); letter-spacing: -0.045em; line-height: 1; }
.case__client span { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.case__meta { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case__meta div { padding: 18px 20px 18px 0; }
.case__meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.case__meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.case__meta dd { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.case__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.case h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); font-weight: 400; margin-bottom: 14px; }
.case p { color: var(--text-2); font-size: 16px; line-height: 1.7; }
.case ul { display: grid; gap: 14px; }
.case li { color: var(--muted); font-size: 15.5px; line-height: 1.55; padding-left: 22px; position: relative; }
.case li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1px; background: var(--accent); }
.case li strong { color: var(--text); font-weight: 500; }
.cases__cta { margin-top: clamp(56px, 7vw, 96px); display: flex; justify-content: center; }

/* ---------- Testimonials ---------- */
.tst__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(32px, 4vw, 56px); }
.tst__head .eyebrow { margin-bottom: 0; }
.tst__ctrl { display: flex; align-items: center; gap: 10px; }
.tst__count { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 12px; letter-spacing: 0.08em; }
.tst__btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent;
  cursor: pointer; font-size: 17px; transition: border-color .25s, background-color .25s, color .25s;
}
.tst__btn:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
.tst__stage { display: grid; min-height: 0; }
.tst__item { grid-area: 1 / 1; margin: 0; max-width: 1100px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s .6s; }
.tst__item.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .6s var(--ease) .1s, transform .6s var(--ease) .1s, visibility 0s; }
.tst__item blockquote { margin: 0; }
.tst__item blockquote p { font-size: clamp(22px, 2.5vw, 36px); line-height: 1.3; letter-spacing: -0.025em; font-weight: 400; color: var(--text); text-wrap: pretty; }
.tst__item figcaption { margin-top: 36px; display: flex; flex-direction: column; gap: 4px; padding-left: 20px; border-left: 1px solid var(--accent); }
.tst__item figcaption strong { font-weight: 500; font-size: 16px; }
.tst__item figcaption span { color: var(--muted); font-size: 14.5px; }
.tst__dots { display: flex; gap: 8px; margin-top: 48px; }
.tst__dots button { width: 28px; height: 2px; border: 0; padding: 0; background: var(--line-2); cursor: pointer; transition: background-color .3s, width .3s var(--ease); }
.tst__dots button[aria-current="true"] { background: var(--accent); width: 56px; }

/* ---------- Logos ---------- */
.logos { padding: clamp(72px, 8vw, 112px) 0; border-top: 1px solid var(--line); overflow: hidden; }
.logos .eyebrow { margin-bottom: 48px; }
.logos__track {
  display: flex; width: max-content;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  animation: marquee 48s linear infinite;
}
.logos:hover .logos__track { animation-play-state: paused; }
.logos__row { display: flex; align-items: center; gap: clamp(56px, 7vw, 112px); padding-right: clamp(56px, 7vw, 112px); }
.logos__row img {
  height: 40px; width: auto;
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.42; transition: opacity .3s, filter .3s;
}
.logos__row img.logo--wide { height: 18px; }
.logos__row img:hover { opacity: 1; filter: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Founder ---------- */
.founder { border-top: 1px solid var(--line); }
.founder__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 120px); align-items: start; }
.founder__media { margin: 0; max-width: 440px; }
.founder__media img { width: 100%; height: auto; border-radius: 12px; filter: grayscale(1) contrast(1.05) brightness(0.92); }
.founder__id { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 0 18px; border-bottom: 1px solid var(--line); }
.founder__id strong { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.founder__id span { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.founder__stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.founder__stats div { padding: 20px 20px 0 0; }
.founder__stats div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.founder__stats dt { font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; margin-bottom: 8px; }
.founder__stats div:first-child dt { color: var(--accent); }
.founder__stats dd { margin: 0; font-size: 14px; color: var(--muted); }
.founder__story { padding-top: clamp(0px, 4vw, 56px); }
.founder__story .h2 { max-width: 20ch; margin-bottom: clamp(28px, 3vw, 40px); }
.founder__body { display: grid; gap: 20px; max-width: 58ch; }
.founder__body p { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.65; color: var(--muted); }
.founder__body strong { color: var(--text); font-weight: 500; }
.founder__body .founder__lead { font-size: clamp(21px, 1.9vw, 27px); line-height: 1.3; letter-spacing: -0.02em; color: var(--text); }

/* ---------- Contact ---------- */
.contact { background: var(--bg-2); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(48px, 7vw, 120px); align-items: start; }
.contact .display { margin-bottom: 36px; }
.contact__lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--text-2); max-width: 46ch; margin-bottom: 28px; }
.contact__hire { font-size: 16px; color: var(--muted); max-width: 48ch; padding-top: 24px; border-top: 1px solid var(--line); margin-bottom: 40px; }
.contact__hire strong { color: var(--text); font-weight: 500; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.contact__mail a { font-family: var(--mono); font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.contact__mail a:hover { color: var(--accent); border-color: var(--accent); }

.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px;
  padding: clamp(24px, 3.4vw, 44px); border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg);
  scroll-margin-top: 110px;
}
.form .field { grid-column: 1 / -1; margin-bottom: 22px; }
.form .field--half { grid-column: auto; }
.form label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.req { color: var(--accent); }
.form input, .form textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-2);
  color: var(--text); font: inherit; font-size: 17px; padding: 8px 0 12px; border-radius: 0;
  transition: border-color .25s;
}
.form textarea { resize: vertical; min-height: 96px; }
.form input::placeholder, .form textarea::placeholder { color: var(--muted-2); }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--accent); }
.form .is-invalid { border-bottom-color: #e5735f; }
.hp { position: absolute; left: -9999px; }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.form__note { font-size: 14px; color: var(--muted); }
.form__msg { grid-column: 1 / -1; margin-top: 18px; font-size: 14.5px; color: var(--text-2); }
.form__msg.is-error { color: #e5735f; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 56px 0 48px; }
.foot__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px 48px; align-items: center; }
.foot__inner > img { width: 118px; height: auto; }
.foot__links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.foot__links a, .foot__meta a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; }
.foot__links a:hover, .foot__meta a:hover { color: var(--text); }
.foot__meta { display: flex; gap: 24px; }
.foot__copy { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; color: var(--muted-2); padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav__links { gap: 22px; }
  .hero__inner { grid-template-columns: 1fr; align-items: start; }
  .hero__art { width: 90vw; right: -28vw; top: 30%; opacity: 0.55; }
  .code { max-width: 560px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(n+3) { margin-top: 48px; border-top: 1px solid var(--line-2); }
  .step:nth-child(n+3)::before { top: -1px; }
  .cases__ui { grid-template-columns: 1fr; }
  .cases__tabs { flex-direction: row; border-right: 0; overflow-x: auto; scrollbar-width: none; }
  .cases__tabs::-webkit-scrollbar { display: none; }
  .cases__tabs button { flex: 1 0 auto; padding: 22px 28px 22px 0; flex-direction: column; gap: 4px; }
  .cases__panels { padding: 40px 0 0; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 7px;
    margin-left: auto; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; z-index: 60;
  }
  .nav__toggle span { display: block; height: 1.5px; background: var(--text); transition: transform .3s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav__inner { height: 68px; }

  .hero { padding-top: 120px; min-height: auto; }
  .hero__art { width: 120vw; right: -50vw; top: 18%; opacity: 0.4; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }

  .who__body { grid-template-columns: 1fr; gap: 36px; }
  .who__lead, .who__claim { grid-column: 1 / -1; }
  .forwho__grid { grid-template-columns: 1fr; }
  .forwho__head { position: static; }
  .forwho__list li { grid-template-columns: 44px 1fr; }

  .services__cards { grid-template-columns: 1fr; }
  .svc + .svc { border-left: 0; border-top: 1px solid var(--line-2); }
  .svc { min-height: 0; }
  .ai { grid-template-columns: 1fr; }

  .day__head, .cases__head { grid-template-columns: 1fr; }
  .day__cities { grid-template-columns: 1fr; }

  .case__cols { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .founder__grid { grid-template-columns: 1fr; }
  .founder__media { max-width: 420px; }
  .founder__story { padding-top: 0; }
  .foot__inner { grid-template-columns: 1fr; }
  .foot__links { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 28px 0 28px; border-right: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .stat__num { margin-bottom: 14px; }
  .stat__txt { max-width: 32ch; }

  .steps { grid-template-columns: 1fr; border-top: 0; }
  .step, .step + .step { padding: 0 0 40px 0; border-left: 0; border-top: 1px solid var(--line-2); margin-top: 0; }
  .step:nth-child(n+3) { margin-top: 0; }
  .step__num { padding: 22px 0 18px; }

  .tz__row { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .tz__label { grid-column: 1; }
  .tz__out { grid-column: 2; grid-row: 1; }
  .tz__track { grid-column: 1 / -1; }
  .tz__bar span { display: none; }
  .tz__tick:nth-child(even) { display: none; }
  .code { margin-top: 40px; }
  .code__body { font-size: 12px; padding-right: 16px; }
  .code__body .ln { width: 34px; padding-right: 12px; }
  .cases__tabs button { padding-right: 18px; }
  .tab__name { font-size: 21px; }
  .contact__actions .btn { flex: 1 1 100%; justify-content: center; }
  .tz__legend { gap: 14px; }

  .case__meta { grid-template-columns: 1fr; }
  .case__meta div, .case__meta div + div { padding: 14px 0; border-left: 0; }
  .case__meta div + div { border-top: 1px solid var(--line); }

  .form { grid-template-columns: 1fr; }
  .form .field--half { grid-column: 1 / -1; }
  .form__foot .btn { width: 100%; justify-content: center; }
  .cases__cta .btn { width: 100%; justify-content: center; white-space: normal; }
  .tst__btn { width: 42px; height: 42px; }
  .tst__item blockquote p { font-size: 20px; line-height: 1.38; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
