/* ============================================
   DIAGONALIT — Design tokens
   ============================================ */
:root {
  --bg: #06090f;
  --bg-rgb: 6, 9, 15;
  --bg-elevated: #111620;
  --fg: #ffffff;
  --fg-secondary: #b9bfcb;
  --line: #252b36;
  --accent: #dfe5f0;
  --overlay-rgb: 255, 255, 255;
  --error: #e0a0a0;

  --font: "Helvetica Neue", "Inter", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Day mode — same grayscale system, inverted */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f2;
  --bg-rgb: 244, 244, 242;
  --bg-elevated: #e9e9e6;
  --fg: #1a1a1a;
  --fg-secondary: #525252;
  --line: #c9c9c9;
  --accent: #1a1a1a;
  --overlay-rgb: 0, 0, 0;
  --error: #b23b3b;
}

/* Thin (300) weight reads as frail on a light background — the same
   strokes look fine on dark because light-on-dark text optically
   thickens. Bump body copy up a step so it holds its own on white. */
[data-theme="light"] body {
  font-weight: 400;
}

[data-theme="light"] .hero__sub,
[data-theme="light"] .quote-card__text {
  font-weight: 400;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

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

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.nav__mobile-contact { display: none; }
.carousel-controls, .carousel-controls[hidden] { display: none; }

/* Decorative SVGs are hand-authored with fixed hex strokes; remap them to
   theme variables so the marks flip with the rest of the page. Presentation
   attributes sit at the bottom of the cascade, so these selectors win. */
svg [stroke="#ffffff"] { stroke: var(--fg); }
svg [stroke="#333333"] { stroke: var(--line); }
svg [stroke="#9a9a9a"] { stroke: var(--fg-secondary); }
svg [stroke="#c9c9c9"] { stroke: var(--accent); }

/* ============================================
   Typography
   ============================================ */
.kicker,
.section-kicker {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  font-weight: 400;
  margin: 0 0 24px;
}

.section-kicker--center { text-align: center; }

.hero__sub {
  font-size: 17px;
  color: var(--fg-secondary);
  max-width: 46ch;
  margin: 0 0 40px;
  font-weight: 300;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 0 0 64px;
  max-width: 20ch;
}

h1, h2, h3 { color: var(--fg); }

/* ============================================
   Reveal-on-scroll: diagonal wipe (mask)
   ============================================ */
[data-reveal] {
  opacity: 0;
  -webkit-mask-image: linear-gradient(-45deg, #000 45%, transparent 63%);
  mask-image: linear-gradient(-45deg, #000 45%, transparent 63%);
  -webkit-mask-size: 300% 300%;
  mask-size: 300% 300%;
  -webkit-mask-position: 0% 0%;
  mask-position: 0% 0%;
  transition: opacity 0.55s var(--ease),
              -webkit-mask-position 1.15s var(--ease),
              mask-position 1.15s var(--ease);
  will-change: opacity, mask-position;
}

[data-reveal].is-visible {
  opacity: 1;
  -webkit-mask-position: 100% 100%;
  mask-position: 100% 100%;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .case-card[data-reveal],
  .case-card[data-reveal]:nth-child(even) {
    opacity: 1;
    transform: none;
    transition: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

}

/* ============================================
   Buttons & links
   ============================================ */
.btn {
  display: inline-block;
  padding: 16px 34px;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  border-radius: 12px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--overlay-rgb), 0.03);
}

.btn--primary {
  background: var(--fg);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--full { width: 100%; text-align: center; }

.link-arrow {
  display: inline-block;
  margin-left: 32px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.link-arrow:hover {
  color: var(--fg);
  border-color: var(--fg-secondary);
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--bg-rgb), 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo__text {
  font-size: 14px;
  letter-spacing: 0.28em;
  font-weight: 400;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links a:not(.nav__cta) {
  color: var(--fg-secondary);
  transition: color 0.3s var(--ease);
}

.nav__links a:not(.nav__cta):hover { color: var(--fg); }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-secondary);
  cursor: pointer;
  border-radius: 12px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.nav__toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav__toggle-icon--close { display: none; }
.nav.is-open .nav__toggle-icon--burger { display: none; }
.nav.is-open .nav__toggle-icon--close { display: block; }

.nav__cta {
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 12px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.nav__cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-secondary);
  cursor: pointer;
  border-radius: 12px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle__icon { display: none; }
.theme-toggle__icon--moon { display: block; }
[data-theme="light"] .theme-toggle__icon--sun { display: block; }
[data-theme="light"] .theme-toggle__icon--moon { display: none; }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(260px, 35vh, 330px) 0 140px;
  isolation: isolate;
}

.hero__light {
  position: absolute;
  z-index: -1;
  top: 104px;
  left: 0;
  width: 100%;
  height: clamp(340px, 34vw, 570px);
  pointer-events: none;
}
.hero__light svg { width: 100%; height: 100%; overflow: visible; }
.hero__content { width: 100%; text-align: center; }
.hero__badge {
  display: inline-block;
  padding: 7px 18px;
  margin: 0 0 24px;
  border: 1px solid rgba(var(--overlay-rgb), .04);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(var(--overlay-rgb), .09), rgba(var(--overlay-rgb), .055));
  font-size: 16px;
  font-weight: 400;
}
.hero__title {
  font-size: clamp(42px, 4.65vw, 78px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.045em;
  margin: 0 auto 30px;
}
.hero__title span {
  color: var(--fg-secondary);
  background: linear-gradient(110deg, var(--fg) 5%, var(--fg-secondary) 90%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .hero__sub {
  max-width: 690px;
  margin: 0 auto 34px;
  font-size: clamp(18px, 1.45vw, 23px);
  line-height: 1.5;
}
.hero__actions { display: flex; justify-content: center; }
.hero__actions .btn { box-shadow: 0 0 24px rgba(var(--overlay-rgb), .07); }
.hero__location {
  position: absolute;
  bottom: 60px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 24px;
  font-size: 14px;
  color: var(--fg-secondary);
}
.hero__location:hover .hero__location-arrow {
  transform: translateY(4px);
  background: rgba(var(--overlay-rgb), .08);
}
.hero__location-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid var(--fg);
  border-radius: 50%;
  color: var(--fg);
  transition: transform .2s ease, background .2s ease;
}
[data-theme="light"] .hero__light { filter: invert(1); opacity: .5; }

/* ============================================
   Diagonal section divider
   ============================================ */
.diagonal-divider {
  position: relative;
  height: 90px;
  background: var(--bg);
}

.diagonal-divider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
  transform: rotate(-2.2deg);
}

.diagonal-divider--rev::after {
  transform: rotate(2.2deg);
}

/* ============================================
   Clients
   ============================================ */
.clients {
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.clients__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 56px;
  margin-top: 32px;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  opacity: 1;
}

.client-logo img {
  height: 100%;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

/* ============================================
   Services
   ============================================ */
.services { padding: 60px 0 100px; }

.section-intro {
  max-width: 65ch;
  margin: 0 0 40px;
  color: var(--fg-secondary);
  font-size: 17px;
  line-height: 1.65;
}
.services .section-title { margin-bottom: 20px; }
.services .card { display: flex; flex-direction: column; }
.services .card__link { align-self: flex-start; margin-top: auto; }
.services .card h3 { font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
.services .card p { font-size: 17px; margin-bottom: 32px; }
.services .card__link { font-size: 14px; text-transform: none; letter-spacing: 0; }
.service-label { color: var(--fg-secondary); font-size: 12px; margin-bottom: 24px; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--bg);
  padding: 44px 36px 40px;
  position: relative;
  transition: background 0.35s var(--ease);
}

.card--cut {
  border-radius: 12px;
}

.card:hover {
  background: var(--bg-elevated);
}

.card__num {
  display: block;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--fg-secondary);
  margin-bottom: 28px;
}

.card h3 {
  font-size: 21px;
  font-weight: 400;
  margin: 0 0 16px;
}

.card p {
  color: var(--fg-secondary);
  font-size: 15px;
  margin: 0 0 28px;
}

.card__link {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.card__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   Cases
   ============================================ */
.cases { padding: 60px 0 100px; }

.cases__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 40px;
}

.case-card {
  background: var(--bg);
  padding: 36px 32px 40px;
  display: flex;
  flex-direction: column;
  transition: background 0.35s var(--ease);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.case-card:nth-child(1) { margin-top: 0; }
.case-card:nth-child(2) { margin-top: 96px; }
.case-card:nth-child(3) { margin-top: 40px; }
.case-card:nth-child(4) { margin-top: 136px; }
.case-card:nth-child(5) { margin-top: 80px; }

.case-card:hover { background: var(--bg-elevated); }

/* Cinematic entrance: left-column cards slide in from the left,
   right-column cards slide in from the right. */
.case-card[data-reveal] {
  transform: translateX(-72px);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease),
              -webkit-mask-position 1.15s var(--ease), mask-position 1.15s var(--ease);
}

.case-card[data-reveal]:nth-child(even) {
  transform: translateX(72px);
}

.case-card[data-reveal].is-visible {
  transform: translateX(0);
}

@media (max-width: 960px) {
  .case-card[data-reveal],
  .case-card[data-reveal]:nth-child(even) {
    transform: translateX(0);
  }
}

.case-card__visual {
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  width: 96px;
  padding: 10px;
  margin-bottom: 28px;
}

.case-card__tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  margin-bottom: 16px;
}

.case-card h3 {
  font-size: 19px;
  font-weight: 400;
  margin: 0 0 14px;
  line-height: 1.35;
}

.case-card p {
  color: var(--fg-secondary);
  font-size: 14px;
  margin: 0 0 28px;
  flex-grow: 1;
}

.case-card__link {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  align-self: flex-start;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.case-card__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   Case detail pages
   ============================================ */
.case-detail-header {
  padding: 160px 0 60px;
  border-bottom: 1px solid var(--line);
}

.case-back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  margin-bottom: 40px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.case-back:hover {
  color: var(--fg);
  border-color: var(--fg-secondary);
}

.case-detail-header__tag {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  margin: 0 0 24px;
}

.case-detail-header h1 {
  font-size: clamp(30px, 4.5vw, 50px);
  font-weight: 300;
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 0 24px;
}

.case-detail-header__lead {
  font-size: 17px;
  color: var(--fg-secondary);
  max-width: 58ch;
  margin: 0;
}

.case-detail-header__cta {
  margin-top: 36px;
}

.case-detail-body {
  padding: 80px 0 100px;
}

.case-section {
  max-width: 780px;
  margin: 0 0 72px;
}

.case-section:last-child { margin-bottom: 0; }

.case-section h2 {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  font-weight: 400;
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.case-section > p {
  font-size: 16px;
  color: var(--fg-secondary);
  line-height: 1.8;
  margin: 0;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 20px;
  font-size: 15.5px;
  color: var(--fg-secondary);
  line-height: 1.7;
}

.feature-list li:last-child { margin-bottom: 0; }

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 14px;
  height: 2px;
  background: var(--fg-secondary);
  transform: rotate(-40deg);
}

.feature-list code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  color: var(--fg);
  background: rgba(var(--overlay-rgb), 0.06);
  border: 1px solid var(--line);
  padding: 1px 5px;
}

.feature-list strong {
  color: var(--fg);
  font-weight: 400;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  border: 1px solid var(--line);
  padding: 9px 16px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  border-radius: 12px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}

.tech-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-elevated);
}

.case-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 48px 0 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.case-cta p {
  color: var(--fg-secondary);
  font-size: 15px;
  margin: 0;
  max-width: 40ch;
}

/* ============================================
   Compact presentation
   ============================================ */
.process { padding: 80px 0; }
.split-content { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 90px; }
.split-content .section-title { margin-bottom: 28px; }
.split-content__copy > p { font-size: clamp(21px, 2vw, 28px); line-height: 1.4; letter-spacing: -.02em; margin: 0 0 28px; }

/* ============================================
   Advantages
   ============================================ */
.advantages { padding: 80px 0; background: var(--bg-elevated); }
.benefits { margin: 0; }
.benefits > div { padding: 24px 0; border-bottom: 1px solid var(--line); }
.benefits > div:first-child { padding-top: 0; }
.benefits dt { font-size: clamp(25px, 2.6vw, 36px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; }
.benefits dd { margin: 10px 0 0; color: var(--fg-secondary); font-size: 16px; }

/* ============================================
   Testimonials
   ============================================ */
.testimonials { padding: 60px 0 100px; }

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.quote-card {
  background: var(--bg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.35s var(--ease);
}

.quote-card:hover { background: var(--bg-elevated); }

.quote-card__text {
  font-size: 15px;
  color: var(--fg);
  font-weight: 300;
  margin: 0 0 36px;
  line-height: 1.7;
}

.quote-card__person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  border-radius: 12px;
  flex-shrink: 0;
}

.person__name {
  display: block;
  font-size: 14px;
  color: var(--fg);
}

.person__role {
  display: block;
  font-size: 12px;
  color: var(--fg-secondary);
  margin-top: 2px;
}

/* ============================================
   Final CTA + form
   ============================================ */
.final-cta {
  position: relative;
  padding: 120px 0;
  border-top: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.final-cta__lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(var(--overlay-rgb), 0.03) 0px,
    rgba(var(--overlay-rgb), 0.03) 1px,
    transparent 1px,
    transparent 110px
  );
}

.final-cta__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  padding-top: 40px;
}

.final-cta__title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 300;
  line-height: 1.15;
  margin: 0 0 28px;
}

.form__row {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================
   Frequently asked questions
   ============================================ */
.faq { padding: 80px 0 120px; }
.faq__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; }
.faq__intro .section-title { margin-bottom: 24px; }
.faq__items { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  color: var(--fg-secondary);
  font-size: 24px;
  font-weight: 300;
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p { margin: 0; padding: 0 40px 24px 0; color: var(--fg-secondary); font-size: 15px; }

/* ============================================
   Contact wizard
   ============================================ */
.wizard {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
}

.wizard__toggle { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard__mode {
  flex: 1; padding: 11px; font-size: 12.5px; border: 1px solid var(--line);
  background: transparent; color: var(--fg-secondary); cursor: pointer; border-radius: 8px;
  font-family: inherit; transition: border-color .2s, color .2s;
}
.wizard__mode.is-sel { border-color: var(--fg); color: var(--fg); }

.wizard__bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.wizard__seg {
  flex: 1;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.wizard__seg span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--fg);
  transition: width 0.35s var(--ease);
}

.wizard__seg.is-active span,
.wizard__seg.is-done span { width: 100%; }

.wizard__labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 36px;
}

.wizard__labels span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  transition: color 0.3s var(--ease);
}

.wizard__labels span.is-active { color: var(--fg); }

.wizard__step { display: none; }
.wizard__step.is-active { display: block; }

.wizard__count { text-align: right; font-size: 11px; color: var(--fg-secondary); margin-top: 6px; }

.wizard__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wizard__pills--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.wizard__pill {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-secondary);
  padding: 9px 16px;
  font-size: 12.5px;
  font-family: var(--font);
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 8px;
  text-align: center;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}

.wizard__pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wizard__pill.is-sel {
  border-color: var(--fg);
  color: var(--fg);
  background: rgba(var(--overlay-rgb), 0.06);
}

.wizard label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-secondary);
}

.wizard input,
.wizard select,
.wizard textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 300;
  padding: 10px 2px;
  resize: vertical;
  transition: border-color 0.3s var(--ease);
}

.wizard select { background: var(--bg); }

.wizard input:focus,
.wizard select:focus,
.wizard textarea:focus {
  outline: none;
  border-color: var(--fg);
}

.wizard input::placeholder,
.wizard textarea::placeholder {
  color: var(--fg-secondary);
}

.wizard__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.wizard__back {
  background: transparent;
  border: none;
  padding: 12px 4px;
  font-size: 13px;
  font-family: inherit;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.wizard__back:hover:not(:disabled) { color: var(--fg); }

.wizard__back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.wizard__result {
  margin-top: 20px;
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.6;
}
.wizard__result.is-error { color: var(--error); }

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  padding: 70px 0 40px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer__mark {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 220px;
  opacity: 0.5;
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer__tag {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--fg-secondary);
  margin: 10px 0 0;
}

.footer__links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--fg-secondary);
}

.footer__links a { transition: color 0.3s var(--ease); }
.footer__links a:hover { color: var(--fg); }

.footer__meta {
  font-size: 12px;
  color: var(--fg-secondary);
  text-align: right;
}

.footer__meta p { margin: 0 0 6px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 960px) {
  .services__grid,
  .testimonials__grid { grid-template-columns: 1fr; }

  .faq__grid { grid-template-columns: 1fr; gap: 40px; }

  .cases__grid { grid-template-columns: 1fr; }
  .case-card { margin-top: 0 !important; }

  .split-content { grid-template-columns: 1fr; gap: 32px; }

  .final-cta__grid { grid-template-columns: 1fr; gap: 56px; }


}

@media (max-width: 760px) {
  .container { padding: 0 20px; }

  .nav__inner { padding: 16px 20px; }
  .nav__links { gap: 10px; }
  .nav__toggle { display: inline-flex; }
  .nav__cta { padding: 9px 14px; }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(var(--bg-rgb), 0.98);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease);
  }

  .nav.is-open .nav__menu {
    max-height: 320px;
    opacity: 1;
  }

  .nav__menu a {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
  }

  .hero { padding: 260px 0 140px; min-height: 100svh; }
  .hero__light { top: 80px; width: 180%; left: -40%; height: 310px; }
  .hero__title { font-size: clamp(36px, 8.5vw, 52px); }
  .hero__badge { font-size: 14px; }
  .hero__location { bottom: 35px; font-size: 12px; max-width: 330px; }
  .hero .hero__sub { max-width: 440px; }


  .footer__inner { flex-direction: column; }
  .footer__meta { text-align: left; }

  .clients__row { gap: 32px; }

  .wizard { padding: 28px 20px; }
  .wizard__pills--grid { grid-template-columns: 1fr; }

  .final-cta { padding: 90px 0; }
  .case-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .logo__text { display: none; }
}

/* Silver identity shared by the landing and project pages. */
.nav {
  position: fixed;
  inset: 0 0 auto;
  height: 104px;
  padding: 0 20px;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}
.nav__inner {
  position: relative;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  min-height: 104px;
  border-radius: 10px;
  pointer-events: auto;
  transition: background .25s ease, box-shadow .25s ease, min-height .25s ease, transform .25s ease, padding .25s ease;
}
.nav.is-scrolled .nav__inner {
  min-height: 76px;
  padding-block: 14px;
  transform: translateY(16px);
  background: rgba(25, 27, 36, .9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
}
[data-theme="light"] .nav.is-scrolled .nav__inner {
  background: rgba(244, 244, 242, .9);
}
.logo { gap: 13px; }
.logo__mark { color: var(--fg); flex-shrink: 0; }
.logo__text { font-size: 25px; font-weight: 650; letter-spacing: .035em; }
.nav__links { font-size: 15px; text-transform: none; letter-spacing: -.025em; gap: 24px; }
.nav__menu { gap: 30px; }
.nav__links a:not(.nav__cta) { color: var(--fg); }
.nav__cta { border-color: var(--fg-secondary); padding: 8px 16px; border-radius: 8px; }
.theme-toggle { border: 0; color: var(--fg-secondary); }
.section-title { max-width: 27ch; line-height: 1.15; letter-spacing: -.035em; }
.section-kicker { letter-spacing: .16em; }
.diagonal-divider { height: 40px; }
.diagonal-divider::after { transform: none; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.services__grid { gap: 20px; background: transparent; border: 0; }
.card, .case-card, .quote-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(var(--overlay-rgb), .045), rgba(var(--overlay-rgb), .01));
}
.cases__grid { gap: 24px; }
.case-card:nth-child(n) { margin-top: 0; }
.case-card__visual { border-radius: 16px; background: rgba(var(--overlay-rgb), .025); }
.clients { border-top: 0; }
.client-logo img { border-radius: 6px; }
.final-cta { border-radius: 0; background: var(--bg-elevated); }
.final-cta__lines { background: radial-gradient(ellipse at 20% 0%, rgba(var(--overlay-rgb), .07), transparent 60%); }
.wizard { border-radius: 20px; }
.wizard input, .wizard select, .wizard textarea, .wizard__mode, .wizard__pill { border-radius: 8px; }
.footer__mark { display: none; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 5px; }
@media (min-width: 761px) and (max-width: 960px) {
  .nav__inner { padding-inline: 24px; }
  .nav__links, .nav__menu { gap: 16px; }
  .logo__text { font-size: 20px; }
  .logo__mark svg { width: 44px; }
}
@media (max-width: 760px) {
  .nav { height: 80px; padding-inline: 10px; }
  .nav__inner { min-height: 80px; }
  .nav.is-scrolled .nav__inner { min-height: 64px; padding-block: 12px; transform: translateY(8px); }
  .nav__inner { padding-inline: 10px; }
  .nav__menu { border-radius: 0 0 10px 10px; }
  .logo { gap: 8px; }
  .logo__mark svg { width: 36px; height: 32px; }
  .logo__text { display: block; font-size: 18px; }
  .nav__links { gap: 6px; }
  .nav__cta { font-size: 13px; padding: 7px 10px; }
  .theme-toggle { width: 28px; }
  .nav__menu { visibility: hidden; }
  .nav.is-open .nav__menu { visibility: visible; }
  .card, .case-card { padding: 30px 24px; }
  .section-title { margin-bottom: 36px; }
}
@media (max-width: 360px) {
  .nav__inner { padding-inline: 12px; }
  .logo__text { font-size: 16px; }
}
/* Touch layouts use native horizontal scrolling without blocking page gestures. */
@media (max-width: 960px) {
  .container { --gutter: 32px; }
  .container > *, .split-content > *, .final-cta__grid > * { min-width: 0; }
  [data-carousel] {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(82%, 340px);
    align-items: stretch;
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    background: transparent;
    border: 0;
  }
  [data-carousel] > * { min-width: 0; scroll-snap-align: start; }
  [data-carousel] > [data-reveal] {
    opacity: 1;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
    will-change: auto;
  }
  [data-carousel] .case-card[data-reveal]:nth-child(n) { transform: none; }
  [data-carousel] .card, [data-carousel] .case-card, [data-carousel] .quote-card { padding: 26px 24px; }
  [data-carousel] .card__link, [data-carousel] .case-card__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
  }
  [data-carousel].clients__row {
    grid-auto-columns: max-content;
    justify-content: start;
    gap: 24px;
    width: max-content;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: 4px;
    scroll-padding-inline: 4px;
  }
  .client-logo { height: 64px; }
  .client-logo img { max-width: 140px; }
  .carousel-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
  }
  .carousel-controls__hint { margin-right: auto; color: var(--fg-secondary); font-size: 12px; }
  .carousel-controls button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--fg);
    cursor: pointer;
  }
  .carousel-controls button:disabled { opacity: .3; cursor: default; }
  .carousel-controls button:focus-visible { outline-offset: 2px; }
  .split-content { grid-template-columns: 1fr 1fr; gap: 32px; }
  .case-card__visual { width: 64px; margin-bottom: 20px; }
  .case-card__tag { letter-spacing: .08em; font-size: 10px; }
  .case-card h3 { font-size: 23px; }
  .case-card p { font-size: 15px; margin-bottom: 16px; }
  .services .card h3 { font-size: 25px; }
  .services .card p { font-size: 16px; margin-bottom: 20px; }
  .service-label { margin-bottom: 18px; }
  .quote-card__text { font-size: 17px; line-height: 1.5; margin-bottom: 28px; }
  .person__name { font-size: 13px; }
  .person__role { font-size: 11px; }
  .tech-tags { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; }
  .tech-tag { flex-shrink: 0; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 96px; }
  .container { --gutter: 20px; }
  .nav { padding-inline: max(10px, env(safe-area-inset-left)); }
  .nav__inner { gap: 8px; }
  .nav__links { gap: 4px; }
  .nav__toggle, .theme-toggle { width: 44px; height: 44px; }
  .nav__cta { display: flex; align-items: center; min-height: 44px; }
  .logo { flex-shrink: 0; gap: 6px; }
  .logo__mark svg { width: 32px; }
  .logo__text { font-size: 17px; }
  .nav__menu { max-height: 0; gap: 0; }
  .nav.is-open .nav__menu { max-height: min(380px, calc(100dvh - 96px)); overflow-y: auto; }
  .nav__menu a { min-height: 48px; padding: 14px 20px; }
  .hero { padding: clamp(180px, 29svh, 240px) 0 28px; }
  .hero__light { width: 160%; left: -30%; height: 280px; }
  .hero__badge { margin-bottom: 20px; font-size: 13px; padding: 6px 14px; }
  .hero__title { font-size: clamp(32px, 8.4vw, 52px); margin-bottom: 24px; }
  .hero .hero__sub { font-size: clamp(16px, 4.2vw, 18px); margin-bottom: 26px; max-width: 38ch; }
  .btn { min-height: 48px; padding: 12px 22px; text-align: center; font-size: 15px; }
  .hero__location { position: static; margin: 42px 20px 0; max-width: 350px; min-height: 44px; gap: 12px; font-size: 12px; }
  .hero__location-arrow { width: 36px; height: 36px; }
  .clients { padding: 36px 0; }
  .clients .section-kicker { max-width: 30ch; margin: 0 auto 20px; }
  .clients__row { margin-top: 0; }
  [data-carousel].clients__row { gap: 20px; }
  .services, .cases, .testimonials { padding: 44px 0; }
  .process, .advantages, .faq, .final-cta { padding: 52px 0; }
  .diagonal-divider { height: 16px; }
  .section-kicker { font-size: 11px; letter-spacing: .12em; margin-bottom: 16px; }
  .section-title { font-size: clamp(28px, 7.2vw, 36px); margin-bottom: 28px; max-width: 24ch; }
  .section-intro { font-size: 16px; line-height: 1.5; margin-bottom: 28px; }
  .split-content { grid-template-columns: 1fr; gap: 24px; }
  .split-content .section-title { margin-bottom: 20px; }
  .split-content__copy > p { font-size: 20px; line-height: 1.45; }
  .benefits > div { display: grid; grid-template-columns: 100px 1fr; gap: 16px; align-items: baseline; padding: 20px 0; }
  .benefits dt { font-size: 20px; }
  .benefits dd { margin: 0; font-size: 14px; line-height: 1.5; }
  .faq__grid { gap: 28px; }
  .faq__item summary { font-size: 16px; padding: 18px 0; gap: 16px; }
  .faq__item p { padding: 0 24px 20px 0; }
  .final-cta__grid { padding-top: 0; gap: 24px; }
  .final-cta__copy .hero__sub { margin-bottom: 0; font-size: 16px; }
  .final-cta__title { font-size: 32px; margin-bottom: 18px; }
  .wizard { padding: 24px 20px; }
  .wizard__mode { min-height: 44px; font-size: 14px; }
  .wizard__labels { margin-bottom: 24px; }
  .wizard__labels span { letter-spacing: .04em; font-size: 11px; }
  .wizard label { font-size: 13px; letter-spacing: 0; text-transform: none; }
  .wizard input, .wizard select, .wizard textarea { min-width: 0; width: 100%; min-height: 48px; padding: 10px 8px; font-size: 16px; }
  .wizard textarea { min-height: 120px; }
  .wizard__pills--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard__pill { min-height: 48px; padding: 10px 8px; font-size: 12px; }
  .wizard__actions { gap: 8px; }
  .wizard__actions .btn { padding-inline: 14px; }
  .wizard__back { min-height: 44px; }
  .wizard__result { overflow-wrap: anywhere; }
  .form__row { gap: 6px; margin-bottom: 16px; }
  .case-detail-header { padding: 120px 0 36px; }
  .case-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 20px; font-size: 11px; }
  .case-detail-header__tag { font-size: 11px; letter-spacing: .1em; margin-bottom: 16px; }
  .case-detail-header h1 { font-size: clamp(28px, 7.2vw, 38px); }
  .case-detail-header__lead { font-size: 16px; }
  .case-detail-body { padding: 40px 0 52px; }
  .case-section { margin-bottom: 36px; }
  .case-section h2 { margin-bottom: 20px; padding-bottom: 14px; letter-spacing: .12em; }
  .case-section > p, .feature-list li { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
  .feature-list li { padding-left: 22px; margin-bottom: 16px; }
  .case-cta { padding-top: 28px; gap: 16px; }
  .footer { padding: 36px 0 max(24px, env(safe-area-inset-bottom)); }
  .footer__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; font-size: 12px; }
  .footer__links a { display: flex; align-items: center; min-height: 44px; }
  .footer__brand .logo__text { font-size: 18px; }
  .footer__tag { font-size: 9px; letter-spacing: .08em; }
  .footer__meta { grid-column: 1 / -1; overflow-wrap: anywhere; font-size: 11px; }
}

@media (max-width: 380px) {
  .nav__cta { display: none; }
  .nav__mobile-contact { display: block; }
  .footer__inner { grid-template-columns: 1fr; gap: 16px; }
  .footer__links { grid-template-columns: repeat(4, 1fr); }
  .benefits > div { grid-template-columns: 88px 1fr; gap: 12px; }
  .benefits dt { font-size: 18px; }
}

@media (max-width: 960px) and (max-height: 500px) {
  .hero { min-height: 100svh; padding: 150px 0 24px; }
  .hero__location { position: static; margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .case-card[data-reveal]:nth-child(n) { transform: none; }
}
