/* ====================================================
   AI Solutions v2 — cream / premium / dual-theme
   ==================================================== */

:root {
  /* DARK (default) */
  --bg:        oklch(0.14 0.006 70);
  --bg-2:      oklch(0.17 0.007 70);
  --bg-3:      oklch(0.21 0.008 70);
  --surface:   oklch(0.19 0.008 70);
  --line:      oklch(0.30 0.009 70);
  --line-dim:  oklch(0.24 0.008 70);
  --fg:        oklch(0.97 0.012 85);
  --fg-dim:    oklch(0.75 0.018 85);
  --fg-mute:   oklch(0.52 0.012 85);
  --accent:    oklch(0.89 0.045 80);
  --accent-2:  oklch(0.80 0.055 60);
  --glow-a:    oklch(0.85 0.10 70 / 0.45);
  --glow-b:    oklch(0.70 0.10 40 / 0.30);
  --glow-c:    oklch(0.78 0.09 90 / 0.30);

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

  --maxw: 1200px;
  --pad: clamp(16px, 4vw, 32px);
}

[data-theme="light"] {
  --bg:        oklch(0.975 0.012 80);
  --bg-2:      oklch(0.95  0.015 80);
  --bg-3:      oklch(0.92  0.018 80);
  --surface:   oklch(0.97  0.012 80);
  --line:      oklch(0.84  0.022 80);
  --line-dim:  oklch(0.90  0.018 80);
  --fg:        oklch(0.18  0.012 80);
  --fg-dim:    oklch(0.42  0.013 80);
  --fg-mute:   oklch(0.58  0.013 80);
  --accent:    oklch(0.45  0.045 60);
  --accent-2:  oklch(0.55  0.055 50);
  --glow-a:    oklch(0.80 0.10 70 / 0.45);
  --glow-b:    oklch(0.70 0.08 40 / 0.35);
  --glow-c:    oklch(0.85 0.06 90 / 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* iOS overscroll: the rubber-band bounce reveals whatever's behind the body,
   so pin html/body backgrounds to the theme bg and contain the bounce. */
html, body {
  background: var(--bg);
  background-color: var(--bg);
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}
html { height: 100%; scroll-behavior: smooth; }
/* Native anchor scroll lands sections below the fixed nav (~60px + air). */
section[id], main[id], div[id="top"] { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  min-height: 100%;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* ============ SCROLL INDICATOR (vertical, right edge) ============
   A subtle vertical track with ticks per major section + a moving playhead.
   Mirrors the .process-track aesthetic, but for whole-page depth. */
.scroll-indicator {
  position: fixed;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  height: min(58vh, 480px);
  width: 12px;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  animation: scroll-ind-in 0.6s ease 0.4s forwards;
}
.scroll-indicator * { pointer-events: none; }
@keyframes scroll-ind-in {
  to { opacity: 1; }
}
.scroll-indicator-track {
  position: relative;
  width: 1px;
  height: 100%;
  margin: 0 auto;
  background: color-mix(in oklch, var(--fg) 8%, transparent);
}
.scroll-indicator-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(
    180deg,
    color-mix(in oklch, var(--accent) 30%, transparent) 0%,
    var(--accent) 100%
  );
  box-shadow: 0 0 10px var(--accent);
  transition: height 0.15s linear;
}
.scroll-indicator-tick {
  position: absolute;
  left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid color-mix(in oklch, var(--fg) 18%, transparent);
  transform: translate(-50%, -50%);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.scroll-indicator-tick.lit {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.scroll-indicator-head {
  position: absolute;
  left: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent),
              0 0 16px var(--accent);
  transform: translate(-50%, -50%);
  transition: top 0.15s linear;
  top: 0%;
}
@media (max-width: 720px), (pointer: coarse) {
  .scroll-indicator { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator-fill,
  .scroll-indicator-head { transition: none; }
}

/* ============ CURSOR GLOW (odbo-style spotlight) ============ */
.cursor-glow {
  pointer-events: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 60;
  background: radial-gradient(
    520px circle at var(--mx, -200px) var(--my, -200px),
    color-mix(in oklch, var(--accent) 14%, transparent) 0%,
    color-mix(in oklch, var(--accent) 4%, transparent) 35%,
    transparent 70%
  );
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}
[data-theme="light"] .cursor-glow {
  mix-blend-mode: multiply;
  background: radial-gradient(
    480px circle at var(--mx, -200px) var(--my, -200px),
    color-mix(in oklch, var(--accent) 18%, transparent) 0%,
    color-mix(in oklch, var(--accent) 6%, transparent) 35%,
    transparent 70%
  );
}
@media (hover: none), (max-width: 640px) {
  .cursor-glow { display: none; }
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  /* On iOS/in-app browsers (Telegram, Instagram) the page extends under the
     status bar / Dynamic Island. Push the nav contents below that safe area. */
  padding-top: max(18px, env(safe-area-inset-top, 18px));
  padding-bottom: 18px;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  transition: background-color 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav, .nav * { pointer-events: auto; }
.nav.scrolled {
  background: color-mix(in oklch, var(--bg) 96%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-dim);
}
/* Page-top backdrop bar — solid theme color extending well above y=0 into the
   space behind in-app browser chrome (Telegram URL bar, Instagram header).
   Without this, hero copy scrolling under a translucent nav bleeds through. */
.nav::before {
  content: "";
  position: absolute;
  top: -120px; left: 0; right: 0;
  height: calc(120px + max(18px, env(safe-area-inset-top, 0px)));
  background: var(--bg);
  pointer-events: none;
  z-index: 1;
}
.nav-inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  letter-spacing: -0.01em;
}
.logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.nav-links {
  display: flex; gap: 4px;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--fg-dim);
  border-radius: 8px;
  transition: color 0.2s, background-color 0.15s;
}
.nav-link:hover { color: var(--fg); background: color-mix(in oklch, var(--fg) 5%, transparent); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px;
  background: var(--accent-2);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.nav-link.active { color: var(--fg); }
.nav-link.active::after { transform: scaleX(1); opacity: 0.75; }

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

.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 2px; gap: 0;
  font-family: var(--mono); font-size: 11px;
}
.lang-toggle button {
  padding: 5px 10px; border-radius: 999px;
  color: var(--fg-mute);
  transition: all 0.2s;
  letter-spacing: 0.04em;
}
.lang-toggle button.active {
  background: var(--fg);
  color: var(--bg);
}
.lang-toggle button:hover:not(.active) { color: var(--fg); }

.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--fg-dim);
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--fg-mute); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.3s ease,
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    color 0.3s ease;
  white-space: nowrap;
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.12s; }

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--fg) 90%, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -10px color-mix(in oklch, var(--fg) 60%, transparent);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--fg);
  background: color-mix(in oklch, var(--fg) 4%, transparent);
  transform: translateY(-2px);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 180px 0 100px;
  overflow: hidden;
}

.hero-aurora {
  position: absolute; inset: -10% -10% auto -10%;
  height: 800px;
  pointer-events: none; z-index: 0;
  filter: blur(80px);
  opacity: 1;
}
.hero-aurora::before,
.hero-aurora::after,
.hero-aurora > span {
  content: ""; position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}
[data-theme="light"] .hero-aurora::before,
[data-theme="light"] .hero-aurora::after,
[data-theme="light"] .hero-aurora > span {
  mix-blend-mode: multiply;
  opacity: 0.7;
}
.hero-aurora::before {
  width: 700px; height: 700px;
  background: radial-gradient(circle at 30% 30%, var(--glow-a) 0%, transparent 70%);
  top: 5%; left: 18%;
  animation: drift-a 18s ease-in-out infinite;
}
.hero-aurora::after {
  width: 600px; height: 600px;
  background: radial-gradient(circle at 70% 30%, var(--glow-b) 0%, transparent 70%);
  top: 10%; right: 12%;
  animation: drift-b 22s ease-in-out infinite;
}
.hero-aurora > span {
  width: 500px; height: 500px;
  background: radial-gradient(circle at 50% 50%, var(--glow-c) 0%, transparent 70%);
  top: 30%; left: 50%;
  transform: translateX(-50%);
  animation: drift-c 16s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(40px, 60px) scale(1.1); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-60px, 30px) scale(0.9); }
}
@keyframes drift-c {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50%      { transform: translate(-50%, 40px) scale(1.15); }
}

.hero-inner {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklch, var(--bg) 65%, transparent);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}
.hero-status .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(44px, 8vw, 112px);
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: var(--fg);
  text-wrap: balance;
}
.hero h1 .line-2 {
  display: block;
  color: var(--fg-mute);
  font-style: italic;
  font-weight: 400;
}

/* Word reveal animation — words slide from random directions */
.word {
  display: inline-block;
  opacity: 0;
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--tr, 0deg)) scale(0.94);
  transform-origin: 50% 100%;
  filter: blur(6px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0ms);
}
.word.in {
  opacity: 1;
  transform: translate(0, 0) rotate(0) scale(1);
  filter: blur(0);
}
.word-space { display: inline-block; width: 0.25em; }

.hero-subtitle {
  max-width: 580px;
  margin: 0 auto 36px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
  text-wrap: pretty;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  transition-delay: 800ms;
}
.hero-subtitle.in { opacity: 1; transform: translateY(0); }

.hero-ctas {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: 1000ms;
}
.hero-ctas.in { opacity: 1; transform: translateY(0); }

/* === Hero variation B — asymmetric, single orb === */
.hero.var-b {
  text-align: left;
  padding: 200px 0 120px;
}
.hero.var-b .hero-inner {
  text-align: left;
  margin: 0;
  max-width: 1100px;
  padding-left: clamp(0px, 4vw, 40px);
}
.hero.var-b h1 {
  font-size: clamp(48px, 10vw, 140px);
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.hero.var-b .hero-ctas { justify-content: flex-start; }
.hero.var-b .hero-subtitle { margin-left: 0; }
.hero.var-b .hero-aurora::before {
  width: 900px; height: 900px;
  top: -10%; left: -15%;
  opacity: 1.1;
}
.hero.var-b .hero-aurora::after {
  width: 700px; height: 700px;
  top: 30%; right: -10%;
}
.hero.var-b .hero-aurora > span { display: none; }
.hero.var-b .hero-side {
  display: flex; align-items: center; gap: 32px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line-dim);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  transition-delay: 1200ms;
}
.hero.var-b .hero-side.in { opacity: 1; transform: translateY(0); }
.hero-side-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fg-mute);
  text-transform: uppercase;
}
.hero-side-row {
  display: flex; align-items: center; gap: 22px;
  flex-wrap: wrap;
}
.hero-client {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: -0.005em;
}

/* ============ SECTIONS ============ */
.section {
  padding: clamp(80px, 12vw, 140px) 0;
  position: relative;
}
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line-dim);
  border-bottom: 1px solid var(--line-dim);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-2);
  letter-spacing: 0.12em;
  margin-bottom: 22px;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent-2);
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 40px;
  white-space: pre-line;
  text-wrap: balance;
  color: var(--fg);
}
.section-title em {
  font-style: italic;
  color: var(--fg-mute);
  font-weight: 400;
}
.section-head-inline {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: end;
  margin-bottom: 56px;
}
.section-subtitle {
  font-size: 17px;
  color: var(--fg-dim);
  max-width: 520px;
  text-wrap: pretty;
  line-height: 1.55;
}

/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-dim);
  border: 1px solid var(--line-dim);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 90px -50px oklch(0 0 0 / 0.7);
}
[data-theme="light"] .services-grid {
  box-shadow: 0 36px 80px -52px oklch(0.45 0.04 70 / 0.28);
}
.service-card {
  --spot-a: 0;
  /* Layered surface: a tight warm cursor light over a faint top-down sheen.
     Backgrounds paint behind text, so copy stays crisp. */
  background-color: var(--bg);
  background-image:
    radial-gradient(
      300px circle at var(--spot-x, 50%) var(--spot-y, 50%),
      color-mix(in oklch, var(--accent) calc(20% * var(--spot-a)), transparent) 0%,
      transparent 46%
    ),
    linear-gradient(
      180deg,
      color-mix(in oklch, var(--fg) 3.5%, transparent) 0%,
      transparent 40%
    );
  background-repeat: no-repeat;
  padding: 40px 36px;
  position: relative;
  isolation: isolate;
  /* Hairline top highlight — lit-from-above, the hallmark of a crafted surface */
  box-shadow: inset 0 1px 0 color-mix(in oklch, var(--fg) 6%, transparent);
  transition:
    background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease;
}
.service-card:hover {
  --spot-a: 1;
  background-color: var(--bg-2);
  box-shadow:
    inset 0 1px 0 color-mix(in oklch, var(--fg) 11%, transparent),
    inset 0 0 0 1px color-mix(in oklch, var(--accent) 16%, transparent),
    inset 0 0 70px -24px color-mix(in oklch, var(--accent) 24%, transparent);
}

/* Focus-on-hover: dim siblings, brighten active. Mirrors .cases-list pattern. */
.services-grid.hovering .service-card { opacity: 0.4; }
.services-grid.hovering .service-card.focus { opacity: 1; }
.services-grid.hovering .service-card.focus .service-icon { color: var(--accent-2); }

.service-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--fg-dim);
  transition: color 0.35s ease, transform 0.35s ease;
}
.service-icon svg { width: 100%; height: 100%; display: block; }
.service-card:hover .service-icon { color: var(--fg); transform: translateY(-1px); }
.service-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
}
.service-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}
.service-title {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--fg);
}
.service-lede {
  font-size: 15px;
  color: var(--fg);
  margin: 0 0 18px;
  font-weight: 400;
  font-style: italic;
}
.service-body {
  font-size: 14.5px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin: 0 0 28px;
}
.service-bullets {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none;
}
.service-bullets li {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ============ PROCESS ============
   4 cards horizontal + interactive progress line.
   The track has a playhead dot that moves to the active step,
   activated either by scroll position or hover.            */
.process-wrap {
  position: relative;
  padding: 0;
}
.process-track {
  position: relative;
  height: 1px;
  background: var(--line-dim);
  margin: 0 0 0;
  overflow: visible;
}
.process-track-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in oklch, var(--accent) 30%, transparent) 0%,
    var(--accent) 100%
  );
  width: 0%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px var(--accent);
}
.process-track-head {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent) 18%, transparent),
              0 0 28px var(--accent);
  transform: translate(-50%, -50%);
  left: 0%;
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
}

/* Static ticks per step on the track */
.process-tick {
  position: absolute;
  top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  transform: translate(-50%, -50%);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  z-index: 2;
}
.process-tick.lit {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-top: 36px;
}
.process-step {
  position: relative;
  padding: 0 28px 32px 0;
  cursor: default;
  transition: opacity 0.35s ease;
}
.process-step:not(:first-child) {
  border-left: 1px solid var(--line-dim);
  padding-left: 28px;
}

/* Dim non-active steps when hovering over the section */
.process-wrap.hovering .process-step { opacity: 0.35; }
.process-wrap.hovering .process-step.active { opacity: 1; }

.process-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase;
  transition: color 0.35s ease;
  flex-wrap: wrap;
}
.process-num > span { white-space: nowrap; }
.process-step.active .process-num { color: var(--accent-2); }
.process-num .dot-sep { opacity: 0.4; }

.process-step h3 {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--fg);
  line-height: 1.1;
}
.process-step p {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin: 0;
}

/* ============ CASES ============ */
.cases-list { display: flex; flex-direction: column; gap: 0; }
.case-row {
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: 0;
  padding: 56px 0;
  border-top: 1px solid var(--line-dim);
  align-items: start;
  transition: opacity 0.35s ease;
  cursor: default;
}
.case-row:last-child { border-bottom: 1px solid var(--line-dim); }

/* Focus-on-hover: dim others, lift the one being read */
.cases-list.hovering .case-row { opacity: 0.32; }
.cases-list.hovering .case-row.focus { opacity: 1; }
.cases-list.hovering .case-row.focus .case-client { color: var(--accent-2); }

.case-head {
  display: flex; flex-direction: column; gap: 12px;
  padding-right: 32px;
}
.case-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.case-industry {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-2);
  letter-spacing: 0.05em;
}
.case-client {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--fg);
  transition: color 0.3s;
  margin-top: 4px;
}

.case-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 18px;
}
.case-body h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--fg-mute);
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}
.case-body p {
  font-size: 14.5px;
  color: var(--fg-dim);
  line-height: 1.6;
}

.case-stack {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px dashed var(--line-dim);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
  line-height: 1.65;
}
.case-stack-label {
  color: var(--fg);
  margin-right: 8px;
}

/* ============ FAQ ============ */
.faq-list {
  border-top: 1px solid var(--line-dim);
}
.faq-item {
  border-bottom: 1px solid var(--line-dim);
}
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 4px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-align: left;
  color: var(--fg);
  transition: color 0.2s;
}
.faq-q:hover { color: var(--accent-2); }
.faq-toggle {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--fg-mute);
  transition: transform 0.3s ease, color 0.2s;
  flex-shrink: 0;
  margin-left: 24px;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); color: var(--accent-2); }
.faq-a {
  font-size: 15.5px;
  color: var(--fg-dim);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  padding: 0 4px;
  transition: max-height 0.4s ease, padding 0.4s ease;
  max-width: 720px;
}
.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 4px 26px;
}

/* ============ TEAM ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.team-card {
  padding: 28px 24px 26px;
  border: 1px solid var(--line-dim);
  border-radius: 14px;
  background: var(--bg);
  transition: all 0.25s;
  display: flex; flex-direction: column;
}
.team-card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}
.team-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    color-mix(in oklch, var(--accent) 50%, var(--bg-2)),
    color-mix(in oklch, var(--accent-2) 50%, var(--bg-3))
  );
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans);
  font-size: 19px;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.team-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, color-mix(in oklch, var(--fg) 12%, transparent), transparent 60%);
}
.team-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--fg);
}
.team-role {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.team-note {
  font-size: 13.5px;
  color: var(--fg-dim);
  line-height: 1.5;
}

/* ============ CONTACTS ============ */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-channels {
  margin-top: 36px;
  display: flex; flex-direction: column; gap: 12px;
}
.contact-direct {
  margin-top: 28px;
  padding: 24px 22px;
  border: 1px solid var(--line-dim);
  border-radius: 14px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 14px;
}
.contact-direct-row {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg);
}
.contact-direct-row .label {
  color: var(--fg-mute);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 0 0 86px;
}
.contact-direct-row a { color: var(--fg); }
.contact-direct-row a:hover { color: var(--accent-2); }
.contact-channel {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg);
  transition: all 0.2s;
  background: var(--bg);
}
.contact-channel:hover {
  border-color: var(--fg-mute);
  background: var(--bg-2);
}
.contact-channel .chan-arrow { color: var(--fg-mute); transition: transform 0.2s; }
.contact-channel:hover .chan-arrow { transform: translateX(3px); color: var(--fg); }

.form {
  display: flex; flex-direction: column; gap: 16px;
  padding: 32px;
  border: 1px solid var(--line-dim);
  border-radius: 16px;
  background: var(--bg);
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.form-field input,
.form-field textarea {
  background: var(--bg-2);
  border: 1px solid var(--line-dim);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--fg-mute); background: var(--bg-3); }
.form-field textarea { min-height: 100px; resize: vertical; }
.form-submit {
  margin-top: 8px;
  padding: 14px 22px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
  font-size: 14px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.2s;
}
.form-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -8px color-mix(in oklch, var(--fg) 60%, transparent);
}
.form-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.form-error {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: color-mix(in oklch, var(--accent-2) 70%, #b34b4b);
  letter-spacing: 0.01em;
}
.form-sent {
  padding: 48px 32px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--fg-dim);
  background: var(--bg);
}
.form-sent-ok {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 30%, var(--bg-2));
  color: var(--fg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

/* ============ FOOTER ============ */
.footer {
  padding: 36px 0 max(36px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-dim);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  flex-wrap: wrap; gap: 16px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { pointer-events: auto; cursor: pointer; }
.footer-links a:hover { color: var(--fg); }

/* ============ REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  filter: blur(7px);
  transition:
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.reveal-delay-1 { transition-delay: 90ms; }
.reveal-delay-2 { transition-delay: 190ms; }
.reveal-delay-3 { transition-delay: 310ms; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .case-row { grid-template-columns: 1fr; gap: 28px; }
  .case-body { grid-template-columns: 1fr; gap: 20px; }
  .section-head-inline { grid-template-columns: 1fr; gap: 20px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .pc-head, .pc-row { grid-template-columns: 1fr; }
  .pc-cell, .pc-head-cell { border-left: none; border-top: 1px solid var(--line-dim); }
  .pc-head-cell:first-child, .pc-row .pc-cell:first-child { border-top: none; }
}
@media (max-width: 720px) {
  /* Hero h1 is way too aggressive at narrow widths (esp. in in-app browsers
     that may use a wider rendering viewport). Anchor it to a sensible mobile
     size so long words like "процессы" don't overflow. */
  .hero h1 { font-size: clamp(34px, 9vw, 56px); letter-spacing: -0.028em; }
  .hero.var-b h1 { font-size: clamp(36px, 10vw, 64px); letter-spacing: -0.03em; }
  .hero h1 .word { display: inline-block; }
  .hero { padding: calc(env(safe-area-inset-top, 0px) + 120px) 0 70px; }
  .hero.var-b { padding: calc(env(safe-area-inset-top, 0px) + 140px) 0 80px; }
  .hero-subtitle { font-size: 15.5px; }
  /* Compact CTA in the nav so logo + theme + CTA fit on a single row. */
  .nav .btn-primary { padding: 9px 14px; font-size: 13px; gap: 4px; }
  /* In-app browsers (Telegram/Instagram) float a URL bar over the webview and
     can displace position:fixed during scroll, letting hero copy bleed into the
     top band. Keep the nav a fully opaque bar at ALL times (not just when
     scrolled) and back the whole top strip — above AND behind the nav — with a
     solid fill. nav-inner sits on z-index 2 so it stays above the backdrop. */
  .nav {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav.scrolled {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav::before { top: -160px; bottom: 0; height: auto; z-index: 1; }
  /* Calmer aurora on phones — the large blob reads muddy/brown otherwise. */
  .hero-aurora { opacity: 0.5; }
  .hero.var-b .hero-aurora::before { width: 560px; height: 560px; }
  /* iOS auto-zooms when focusing an input with font-size < 16px — that zoom
     jolts the layout inside in-app browsers. Pin to 16px on phones. */
  .form-field input, .form-field textarea { font-size: 16px; }
}
@media (max-width: 540px) {
  .team-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  /* Keep the RU/EN switch on small phones — compact it (and the row) to fit. */
  .nav-right { gap: 8px; }
  .nav-right .lang-toggle { display: inline-flex; }
  .lang-toggle button { padding: 4px 7px; font-size: 10px; }
  .theme-toggle { width: 32px; height: 32px; }
  /* Sharper cuts on the smallest phones */
  .hero h1 { font-size: clamp(30px, 11vw, 44px); }
  .hero.var-b h1 { font-size: clamp(32px, 12vw, 48px); }
  .hero { padding: calc(env(safe-area-inset-top, 0px) + 100px) 0 60px; }
  .hero.var-b { padding: calc(env(safe-area-inset-top, 0px) + 120px) 0 70px; }
  .hero-subtitle { font-size: 15px; max-width: 100%; }
  .hero-aurora { filter: blur(60px); }
  /* CTA: keep arrow only on the tiniest screens if text wraps. */
  .nav .btn-primary { padding: 8px 12px; font-size: 12.5px; }
  .nav .btn-primary .arrow { display: none; }
}
@media (max-width: 400px) {
  /* Very narrow phones (≤iPhone mini/SE): tighten the nav row further so the
     logo + RU/EN + theme + CTA all stay on one line without overflowing. */
  .nav-inner { padding-left: 14px; padding-right: 14px; }
  .nav-right { gap: 6px; }
  .logo { font-size: 13px; }
  .lang-toggle button { padding: 4px 6px; font-size: 9.5px; }
  .theme-toggle { width: 30px; height: 30px; }
  .nav .btn-primary { padding: 7px 10px; font-size: 11.5px; }
}

/* ====================================================
   v2.1 motion polish — additive, on-brand micro-motion
   ==================================================== */

/* --- Hero aurora parallax: container drifts with cursor + scroll.
   Children keep their own drift keyframes; this transform layers on top. --- */
.hero-aurora {
  transform: translate3d(var(--par-x, 0px), var(--par-y, 0px), 0);
  will-change: transform;
}

/* --- Hero headline sheen: a single soft light pass once the words land.
   Light-only highlight of the existing --fg — no new colors introduced. --- */
.hero h1 { position: relative; }
.hero h1 .hero-sheen {
  position: absolute;
  inset: -4% -6%;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 38%,
    color-mix(in oklch, var(--fg) 26%, transparent) 50%,
    transparent 62%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-120%);
  animation: hero-sheen 1.15s cubic-bezier(0.16, 1, 0.3, 1) 1.15s 1 forwards;
}
[data-theme="light"] .hero h1 .hero-sheen { mix-blend-mode: multiply; }
@keyframes hero-sheen {
  0%   { opacity: 0; transform: translateX(-120%); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(120%); }
}

/* --- Case rows: an arrow that slides in on focus --- */
.case-head { position: relative; }
.case-arrow {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--accent-2);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 2px;
}
.case-row.focus .case-arrow { opacity: 1; transform: translateX(0); }

/* --- Theme switch: circular View-Transition reveal from the toggle button.
   Falls back to the existing 0.4s color cross-fade when unsupported. --- */
.theme-switching, .theme-switching body { transition: none !important; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) {
  animation: theme-wipe 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes theme-wipe {
  from { clip-path: circle(0% at var(--vt-x, 50%) var(--vt-y, 0%)); }
  to   { clip-path: circle(155% at var(--vt-x, 50%) var(--vt-y, 0%)); }
}

/* --- Respect reduced-motion: strip the new flourishes to instant/none --- */
@media (prefers-reduced-motion: reduce) {
  .reveal { filter: none; transform: none; transition: opacity 0.4s ease; }
  .hero h1 .hero-sheen { display: none; }
  .hero-aurora { transform: none; }
  .case-arrow { transition: none; }
  ::view-transition-new(root) { animation: none; }
}

/* --- Touch / no-hover: spotlight + sheen overlays add nothing, hide them --- */
@media (hover: none) {
  .hero h1 .hero-sheen { display: none; }
}

/* --- Service icon picks up a warm glow on hover (layers onto existing rule) --- */
.service-card:hover .service-icon {
  filter: drop-shadow(0 0 12px color-mix(in oklch, var(--accent) 45%, transparent));
}

/* --- Premium hairlines: divider lines fade out toward their ends instead of
   running edge-to-edge at full strength. Reads far more crafted/expensive. --- */
.section-alt,
.case-row,
.case-row:last-child,
.faq-list,
.faq-item,
.footer,
.hero.var-b .hero-side {
  border-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--line-dim) 14%,
    var(--line-dim) 86%,
    transparent 100%
  ) 1;
}

/* ====================================================
   Easter eggs — both speak the same warm-light language
   1) Konami code  ↑↑↓↓←→←→ B A → full-page light sweep
   2) Logo dot ×5  → a light bloom ripples out from the mark
   ==================================================== */
.egg-fx {
  position: fixed; inset: 0;
  z-index: 90;
  pointer-events: none;
}
.egg-fx * { pointer-events: none; }

/* A slow warm glow blooms from the trigger point and fades over ~3.6s */
.egg-glow {
  position: absolute;
  left: var(--ex, 50%); top: var(--ey, 50%);
  width: 78vmax; height: 78vmax;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.35);
  background: radial-gradient(
    circle,
    color-mix(in oklch, var(--accent) 20%, transparent) 0%,
    color-mix(in oklch, var(--accent) 7%, transparent) 32%,
    transparent 62%
  );
  mix-blend-mode: screen;
  opacity: 0;
  animation: egg-glow 3.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
[data-theme="light"] .egg-glow { mix-blend-mode: multiply; }
@keyframes egg-glow {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
  22%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

/* ✦ sparks drift up the viewport, swaying and rotating, then fade */
.egg-spark {
  position: absolute;
  bottom: -48px;
  left: 50%;
  font-size: var(--sz, 12px);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 14px color-mix(in oklch, var(--accent) 70%, transparent);
  opacity: 0;
  transform: translate(0, 0) scale(0.5);
  animation: egg-rise var(--dur, 3200ms) cubic-bezier(0.22, 0.65, 0.3, 1) var(--dl, 0ms) forwards;
  will-change: transform, opacity;
}
@keyframes egg-rise {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(0deg); }
  12%  { opacity: 1; }
  72%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -86vh) scale(1.1) rotate(var(--rot, 0deg)); }
}

.egg-toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(12px);
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg);
  background: color-mix(in oklch, var(--bg) 68%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: 0 16px 44px -18px oklch(0 0 0 / 0.55);
  opacity: 0;
  animation: egg-toast 4.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.egg-toast .egg-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
@keyframes egg-toast {
  0%   { opacity: 0; transform: translateX(-50%) translateY(12px); }
  9%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  86%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .egg-glow, .egg-spark { display: none; }
  .egg-toast { animation: egg-toast-fade 4.6s ease forwards; }
  @keyframes egg-toast-fade { 0%,100% { opacity: 0; } 10%,88% { opacity: 1; } }
}
