/* ============================================================
   Auralis — Neural Audio Engine
   Tokens sourced from DESIGN.md
   ============================================================ */

/* Geist — self-hosted (variable font, веса 300–700). Раньше грузился с
   Google Fonts; вынесен локально ради доступа из РФ (см. DEPLOY.md §0). */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/geist-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colors */
  --primary: #c7d2fe;
  --secondary: #4b5563;
  --tertiary: #111827;
  --neutral: #ffffff;
  --background: #eef2ff;
  --surface: #1c1c1e;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --border: rgba(255, 255, 255, 0.6);

  /* Gradient (from DESIGN.md) */
  --grad-from: #4f46e5;
  --grad-to: #06b6d4;

  /* Spacing rhythm (6px base) */
  --sp-sm: 2px;
  --sp-md: 6px;
  --sp-lg: 14px;
  --sp-xl: 26.5px;
  --section-padding: 32px;

  /* Radii */
  --r-full: 9999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 300ms;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ----------------------------------------------------------
   Background layers
   ---------------------------------------------------------- */
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* Vertical glass slices overlay */
.glass-slices {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.glass-slices span {
  width: 7vw;
  height: 100%;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.06)
  );
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* Light wash so the left-side text stays readable over the gradient */
.left-wash {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to right,
    #ffffff 0%,
    var(--background) 34%,
    rgba(238, 242, 255, 0.55) 46%,
    rgba(238, 242, 255, 0) 62%
  );
}

/* ----------------------------------------------------------
   Page shell
   ---------------------------------------------------------- */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 48px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  text-decoration: none;
}

.brand img {
  height: 34px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 40px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.main-nav a:hover {
  color: var(--tertiary);
}

.link-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.link-signin:hover {
  color: var(--tertiary);
}

/* ----------------------------------------------------------
   Hero
   ---------------------------------------------------------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 40px;
}

.hero-copy {
  max-width: 680px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(199, 210, 254, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.badge-icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
  color: var(--grad-from);
}

.hero-title {
  margin-top: 28px;
  /* fluid: scales with viewport so the Russian line breaks hold without
     wrapping each word; caps at the 80px design value on wide screens */
  font-size: clamp(40px, 5.6vw, 80px);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.05em;
  color: var(--tertiary);
}

.gradient-text {
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  margin-top: 32px;
  max-width: 440px;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: var(--text-secondary);
}

/* Buttons */
.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  border-radius: var(--r-full);
  padding: 14px 28px;
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn svg,
.btn .ic {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* Primary — #1C1C1E surface (DESIGN.md › Buttons › Primary) */
.btn-primary {
  background: var(--surface);
  color: var(--neutral);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
    rgba(0, 0, 0, 0.1) 0px 4px 6px -4px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 14px 22px -6px,
    rgba(0, 0, 0, 0.12) 0px 6px 10px -6px;
}

/* Secondary "Talk to Sales" — white surface, indigo ink + border */
.btn-ghost {
  background: var(--neutral);
  color: #6366f1;
  border: 1px solid rgba(199, 210, 254, 0.8);
}

.btn-ghost:hover {
  background: var(--background);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   Feature row
   ---------------------------------------------------------- */
.features {
  list-style: none;
  display: flex;
  gap: 56px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--tertiary);
  flex-shrink: 0;
}

.feature-icon svg,
.feature-icon .ic {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.feature-text h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--tertiary);
}

.feature-text p {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .page {
    padding: 0 24px;
  }
  .main-nav {
    display: none;
  }
  .hero-sub {
    font-size: 16px;
  }
  .features {
    gap: 28px;
    margin-top: 40px;
  }
  .left-wash {
    background: linear-gradient(
      to right,
      var(--background) 0%,
      rgba(238, 242, 255, 0.85) 55%,
      rgba(238, 242, 255, 0.4) 100%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   CTA — "Расскажите про вашу идею"
   Final accent block before the footer. Dark with a soft brand
   glow; links only (no form). Mobile-first.
   ============================================================ */
.cta {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  overflow: hidden;
  color: #f9fafb;
  background: #0b0e16; /* dark accent block before the footer */
}
/* soft brand glow */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(79, 70, 229, 0.32), transparent 70%),
    radial-gradient(55% 75% at 85% 110%, rgba(6, 182, 212, 0.2), transparent 70%);
}

.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.cta__title {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  color: #ffffff;
}

.cta__subtitle {
  margin: 18px auto 0;
  max-width: 52ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.55;
  color: #9ca3af;
}

/* ---- Actions ------------------------------------------------ */
.cta__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* primary — brand gradient pill */
.cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--r-full);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease,
    filter 0.3s ease;
}
.cta__btn .ic {
  width: 16px;
  height: 16px;
  font-size: 16px;
}
.cta__btn:focus {
  outline: none;
}
.cta__btn:focus-visible {
  outline: none;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35),
    0 0 0 3px rgba(99, 102, 241, 0.5);
}

.cta__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 14px 36px rgba(79, 70, 229, 0.45);
}

/* messenger icon links */
.cta__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  color: #6366f1;
  background: #ffffff;
  border: 1px solid rgba(199, 210, 254, 0.8);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease),
    border-color 0.3s ease;
}

.cta__icon:hover {
  transform: translateY(-2px);
  color: #4f46e5;
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.5);
}

.cta__icon svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 769px) {
  .cta__inner {
    padding: 120px 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta__btn,
  .cta__icon {
    transition: none;
  }
  .cta__btn:hover,
  .cta__icon:hover {
    transform: none;
  }
}

/* ============================================================
   Footer — compact site footer (final element)
   Dark, in key with the site. Mobile-first: columns stack.
   ============================================================ */
.footer {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  overflow: hidden; /* contain the glow / ghost layers */
  background: #0b0e16;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  position: relative;
  z-index: 1; /* content above the spotlight layers */
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ---- cursor spotlight (glow follows pointer, reveals LUMIO) ---- */
.footer__glow {
  position: absolute;
  z-index: 0;
  left: var(--spot-x, 50%);
  top: var(--spot-y, 50%);
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(79, 70, 229, 0.32),
    rgba(6, 182, 212, 0.15),
    transparent 72%
  );
  filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.footer.spot-on .footer__glow {
  opacity: 1;
}

.footer__ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  /* only the area under the cursor light stays visible */
  -webkit-mask-image: radial-gradient(
    circle 220px at var(--spot-x, 50%) var(--spot-y, 50%),
    #000 0%,
    rgba(0, 0, 0, 0.5) 45%,
    transparent 72%
  );
  mask-image: radial-gradient(
    circle 220px at var(--spot-x, 50%) var(--spot-y, 50%),
    #000 0%,
    rgba(0, 0, 0, 0.5) 45%,
    transparent 72%
  );
}
.footer.spot-on .footer__ghost {
  opacity: 0.5;
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer__logo {
  display: inline-flex;
  text-decoration: none;
}

.footer__logo img {
  height: 30px;
  width: auto;
  display: block;
}

.footer__tagline {
  margin: 10px 0 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.5;
  color: #9ca3af;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__nav a {
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__nav a:hover {
  color: #ffffff;
}

.footer__contacts {
  display: flex;
  gap: 12px;
}

.footer__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  color: #c7d2fe;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(199, 210, 254, 0.25);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease,
    transform 0.3s var(--ease);
}

.footer__icon:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(99, 102, 241, 0.5);
}

.footer__icon svg {
  width: 20px;
  height: 20px;
}

.footer__bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.footer__bottom p {
  margin: 0;
}

@media (min-width: 769px) {
  .footer__inner {
    padding: 64px 48px;
  }
  .footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
  }
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer__icon {
    transition: none;
  }
  .footer__icon:hover {
    transform: none;
  }
  .footer__glow,
  .footer__ghost {
    display: none;
  }
}

/* ============================================================
   Showcase — interactive image accordion (alt "Кейсы" block)
   Ported from a React/Tailwind component to vanilla CSS:
   hover expands a project (CSS-only flex grow). Dark section,
   sharp corners + brand gradient accent per DESIGN.md.
   ============================================================ */
.showcase {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  background: #0b0e16;
  color: #f9fafb;
  overflow: hidden;
}

.showcase__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.showcase__intro {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.showcase__title {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  color: #ffffff;
}

.showcase__sub {
  margin: 16px 0 0;
  max-width: 46ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.5;
  color: #9ca3af;
}
/* centered sub on top layout */
.showcase__intro .showcase__sub {
  margin-left: auto;
  margin-right: auto;
}

.showcase__btn {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, filter 0.3s ease;
}

.showcase__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 14px 36px rgba(79, 70, 229, 0.45);
}

.showcase__btn .ic {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* ---- accordion row ---- */
.iacc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  height: 440px;
}

.iacc__item {
  position: relative;
  flex: 1;
  min-width: 0; /* let flex shrink the strips */
  overflow: hidden;
  transition: flex 0.6s var(--ease);
}

/* the featured item stays open until the row is hovered */
.iacc:not(:hover) .iacc__item--open {
  flex: 7;
}
.iacc__item:hover {
  flex: 7;
}

.iacc__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* readability shade (stronger at the bottom) */
.iacc__item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(11, 14, 22, 0) 38%,
    rgba(11, 14, 22, 0.78) 100%
  );
  pointer-events: none;
}

/* brand accent line on the open item */
.iacc__item::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 3px;
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.iacc:not(:hover) .iacc__item--open::before,
.iacc__item:hover::before {
  transform: scaleX(1);
}

/* vertical caption (collapsed state) */
.iacc__vlabel {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) rotate(-90deg);
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  transition: opacity 0.35s var(--ease);
}

/* horizontal panel (open state) */
.iacc__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.iacc__type {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.iacc__name {
  margin: 6px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
}

/* mini-story — readable only when the case is open (wide) */
.iacc__story {
  margin: 10px 0 0;
  max-width: 48ch;
  font-size: 14px;
  line-height: 1.55;
  color: #cbd5e1;
}

/* state swap: hide vertical label, reveal panel */
.iacc:not(:hover) .iacc__item--open .iacc__vlabel,
.iacc__item:hover .iacc__vlabel {
  opacity: 0;
}
.iacc:not(:hover) .iacc__item--open .iacc__panel,
.iacc__item:hover .iacc__panel {
  opacity: 1;
  transform: translateY(0);
}

/* ---- desktop: intro on top, accordion full width below ---- */
@media (min-width: 880px) {
  .showcase__inner {
    padding: 96px 48px;
  }
  .iacc {
    height: 480px;
  }
}

/* ---- mobile: stack into a simple preview list (no hover) ---- */
@media (max-width: 879px) {
  .iacc {
    flex-direction: column;
    height: auto;
  }
  /* override the open/hover flex grow so every strip keeps its height */
  .iacc__item,
  .iacc:not(:hover) .iacc__item--open,
  .iacc__item:hover {
    flex: none;
    height: 200px;
  }
  .iacc__vlabel {
    display: none;
  }
  .iacc__panel {
    opacity: 1;
    transform: none;
  }
  .iacc__item::before {
    transform: scaleX(1);
  }
  /* keep the compact list clean — story is a desktop-hover detail */
  .iacc__story {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iacc__item,
  .iacc__vlabel,
  .iacc__panel,
  .iacc__item::before,
  .showcase__btn {
    transition: none;
  }
}

/* ============================================================
   Услуги — три карточки направлений (light section)
   ============================================================ */
.tools {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  background: #ffffff;
  color: var(--tertiary);
  overflow: hidden;
}

/* soft brand glow behind the heading */
.tools::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    46% 46% at 50% 26%,
    rgba(99, 102, 241, 0.08),
    transparent 70%
  );
}

.tools__inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px 24px;
}

.tools__center {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.tools__title {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  color: var(--tertiary);
}

.tools__sub {
  margin: 16px auto 0;
  max-width: 46ch;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ---- service cards ---- */
.svc {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.svc__card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s ease;
}

.svc__card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}

.svc__name {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--tertiary);
}

.svc__desc {
  margin: 12px 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.svc__price {
  margin-top: auto; /* pin to the bottom so cards align */
  padding-top: 16px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 16px;
  font-weight: 600;
  color: var(--tertiary);
}
.svc__price-num {
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@media (min-width: 768px) {
  .tools__inner {
    padding: 112px 48px;
  }
  .svc {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 64px;
  }
  .svc__card {
    padding: 36px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svc__card {
    transition: none;
  }
  .svc__card:hover {
    transform: none;
  }
}

/* ============================================================
   CTA lead form — expandable (UI only)
   «Начать проект» expands an inline form inside the CTA block
   (grid-rows 0fr→1fr). Dark glass fields, brand-gradient submit,
   faked submit -> success. Backend wiring is a TODO (see app.js).
   ============================================================ */
/* ---- modal shell: expands from the CTA button (FLIP morph in app.js) ---- */
.lead {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lead[hidden] {
  display: none;
}

.lead__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.lead.is-open .lead__backdrop {
  opacity: 1;
}

.lead__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 940px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  background: #0b0e16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  will-change: transform, border-radius;
}
.lead__card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      60% 80% at 12% 0%,
      rgba(79, 70, 229, 0.35),
      transparent 70%
    ),
    radial-gradient(55% 75% at 100% 100%, rgba(6, 182, 212, 0.22), transparent 70%);
}

.lead__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease 0.22s;
}
.lead.is-open .lead__content {
  opacity: 1;
}

.lead__aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 48px;
  color: #ffffff;
}
.lead__eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.lead__title {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.02em;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
}
.lead__list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.lead__list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  line-height: 1.5;
  color: #cbd5e1;
}
.lead__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
}

.lead__formside {
  display: flex;
  align-items: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.18);
}
.lead__formside .cta__form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: none;
  border: 0;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.lead__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-full);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}
.lead__close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lead__close svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .lead {
    padding: 0;
  }
  .lead__card {
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
  }
  .lead__content {
    grid-template-columns: 1fr;
    max-height: 100dvh;
  }
  .lead__aside {
    padding: 72px 24px 4px;
    gap: 14px;
  }
  .lead__formside {
    padding: 24px;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead__backdrop,
  .lead__content {
    transition: none;
  }
}

/* the grid/display rules below override [hidden]; restore it explicitly */
.cta__form[hidden],
.cta__success[hidden] {
  display: none;
}

.cta__form {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
  padding: 28px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(199, 210, 254, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cta__form-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-full);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(199, 210, 254, 0.2);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cta__form-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.cta__form-close svg {
  width: 16px;
  height: 16px;
}

.cta__field {
  display: grid;
  gap: 6px;
}
.cta__field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}
.cta__field input,
.cta__field select,
.cta__field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: #ffffff;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(199, 210, 254, 0.22);
  border-radius: 0; /* sharp surface per DESIGN.md */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cta__field input::placeholder,
.cta__field textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}
.cta__field input:focus,
.cta__field select:focus,
.cta__field textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.cta__field textarea {
  resize: vertical;
  min-height: 76px;
}
.cta__field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.cta__field option {
  color: #111827; /* native dropdown list renders light */
}

.cta__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--r-full);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
  transition: transform 0.3s var(--ease), filter 0.3s ease;
}
.cta__submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}
.cta__submit:disabled {
  opacity: 0.75;
  cursor: default;
  transform: none;
}

.cta__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: cta-spin 0.7s linear infinite;
}
.cta__form.is-submitting .cta__spinner {
  display: inline-block;
}
@keyframes cta-spin {
  to {
    transform: rotate(360deg);
  }
}

.cta__formnote {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: #6b7280;
}

.cta__success {
  display: grid;
  place-items: center;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 28px;
  text-align: center;
}
.cta__success-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}
.cta__success-mark svg {
  width: 32px;
  height: 32px;
}
.cta__success h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
}
.cta__success p {
  margin: 0;
  max-width: 36ch;
  color: #9ca3af;
}
.cta__success-btn {
  margin-top: 6px;
  padding: 10px 22px;
  border-radius: var(--r-full);
  border: 1px solid rgba(199, 210, 254, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cta__success-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ============================================================
   Case links + meta, «Как это работает», footer email
   ============================================================ */

/* whole case card is a link (stretched transparent overlay) */
.iacc__link {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* «Сделано за N дней» */
.iacc__time {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
}

/* ---- «Как это работает» — dark steps ---- */
.steps {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  background: #ffffff;
  color: var(--tertiary);
  overflow: hidden;
}
.steps__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px 24px;
}
.steps__head {
  max-width: 640px;
}
.steps__title {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  color: var(--tertiary);
}
.steps__sub {
  margin: 16px 0 0;
  max-width: 48ch;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.5;
  color: var(--text-secondary);
}
.steps__list {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

/* connector line — vertical on mobile (circle to circle) */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px; /* circle centre */
  top: 46px;
  bottom: -28px;
  width: 2px;
  background: rgba(17, 24, 39, 0.12);
}

.step__num {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

.step__name {
  margin: 7px 0 0;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--tertiary);
}
.step__desc {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .steps__inner {
    padding: 112px 48px;
  }
  .steps__list {
    flex-direction: row;
    gap: 0;
    margin-top: 64px;
  }
  .step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    padding: 0 12px;
  }
  /* connector line — centred, circle-to-circle */
  .step:not(:last-child)::before {
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    top: 19px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .step__body {
    margin-top: 20px;
    max-width: 30ch;
  }
  .step__name {
    margin: 0;
  }
}

/* (почта появится вместе с доменом — пока в подвале только Telegram) */
.footer__contacts {
  align-items: center;
}

/* (чередующиеся ряды «картинка+текст» откатили — вернулись к аккордеону) */
