/* ========== Токени ========== */
:root {
  --black: #070707;
  --ink: #0e0e0f;
  --card: #141415;
  --card-2: #1b1b1d;
  --line: rgba(255, 255, 255, 0.1);
  --white: #fbfbfb;
  --grey: #dedede;
  --muted: #8b8b90;
  --muted-2: #5f5f64;
  --orange: #ff4000;
  --orange-soft: #ff7a3d;

  --font-head: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 28px;
  --radius-sm: 18px;
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ========== База ========== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }

::selection { background: var(--orange); color: var(--white); }

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

/* ========== Типографіка ========== */
.label {
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--orange);
}

.section__title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.section__title--xl { font-size: clamp(44px, 7.5vw, 110px); }

.section__lead {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 520px;
}

/* ========== Кнопки ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 6px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:has(.btn__icon) { padding-right: 6px; }
.btn--sm { min-height: 44px; padding-left: 20px; font-size: 14px; }
.btn--full { width: 100%; justify-content: space-between; padding-left: 26px; }

.btn:active { transform: scale(0.98); }

.btn--light { background: var(--white); color: var(--black); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.22); color: var(--white); background: rgba(255, 255, 255, 0.06); }
.btn--accent { background: var(--orange); color: var(--white); border: 0; }

/* Стрілка: при наведенні одна виїжджає вправо, на її місце заїжджає друга */
.btn__icon {
  position: relative;
  display: block;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--orange);
  color: var(--white);
  transition: background 0.3s var(--ease);
}
.btn--sm .btn__icon { width: 34px; height: 34px; }
.btn__icon svg {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  margin: auto;
  transition: transform 0.55s var(--ease);
}
.btn__icon svg:last-child { transform: translateX(-180%); }
.btn__icon--dark { background: var(--black); }

@media (hover: hover) {
  .btn--light:hover { background: var(--grey); }
  .btn--ghost:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.1); }
  .btn--accent:hover { background: var(--orange-soft); }

  .btn:hover .btn__icon svg:first-child,
  .channel:hover .btn__icon svg:first-child { transform: translateX(180%); }
  .btn:hover .btn__icon svg:last-child,
  .channel:hover .btn__icon svg:last-child { transform: none; }
}

/* Видимий фокус для клавіатури */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ========== Шапка ========== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 16px var(--gutter);
  transition: padding 0.3s var(--ease);
}
.header.is-scrolled { padding-top: 10px; padding-bottom: 10px; }

.header__inner {
  max-width: calc(var(--container) - 2 * var(--gutter));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-radius: 999px;
  background: rgba(20, 20, 21, 0.6);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s var(--ease);
}
/* Над анімованим першим екраном розмиття фону дороге — замінюємо щільнішою заливкою */
.header.is-over-hero .pill {
  background: rgba(20, 20, 21, 0.82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.logo {
  gap: 10px;
  padding: 0 20px 0 14px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.logo__mark { width: 23px; height: 26px; color: var(--white); flex-shrink: 0; overflow: visible; }
.logo__v { stroke: var(--orange); transition: transform 0.5s var(--ease); }
.logo:hover .logo__v { transform: translateY(-2px); }
.logo__word { width: 88px; height: 13px; color: var(--white); }

.nav { padding: 0 8px; gap: 2px; }
.nav a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  color: rgba(251, 251, 251, 0.75);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.07); }

.header__actions { display: flex; align-items: center; gap: 10px; }

.lang { position: relative; padding: 4px; gap: 2px; }
/* Білий повзунок під активною мовою; без JS підсвічується сама кнопка */
.lang__thumb {
  position: absolute;
  top: 4px;
  left: 0;
  height: 38px;
  border-radius: 999px;
  background: var(--white);
  opacity: 0;
  transition: transform 0.5s var(--ease), width 0.5s var(--ease);
}
.lang.has-thumb .lang__thumb { opacity: 1; }
.lang.has-thumb button.is-active { background: transparent; }
.lang button { position: relative; }
.lang button {
  min-width: 40px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.35s var(--ease), background 0.2s;
}
.lang button:hover { color: var(--white); }
.lang button.is-active { background: var(--white); color: var(--black); }

.burger {
  display: none;
  width: 48px;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}
.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--white);
  transition: transform 0.3s var(--ease);
}
.header.is-open .burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.header.is-open .burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ========== Перший екран ========== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 48px;
  overflow: hidden;
  isolation: isolate;
}

/* Потік трафіку, що збирається у воронку (малюється в funnel.js) */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--black);
}
.hero__canvas { display: block; width: 100%; height: 100%; }

/* Затемнення під текстом, щоб потік не заважав читати */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--black) 0%, transparent 32%),
    linear-gradient(to right, rgba(7, 7, 7, 0.55) 0%, transparent 45%);
}

.hero__inner { position: relative; }

.hero__eyebrow {
  font-size: 15px;
  color: rgba(251, 251, 251, 0.7);
}

.hero__title {
  margin: 22px 0 56px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(48px, 8.6vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line--indent {
  display: flex;
  align-items: center;
  gap: 0.14em;
  padding-left: clamp(0px, 9vw, 150px);
}
.hero__star {
  width: 0.95em;
  height: 0.95em;
  flex: none;
  fill: var(--orange);
}

/* Слово, що змінюється: вертикальний reveal із маски, літери йдуть з легкою затримкою.
   Запас зверху в масці потрібен, щоб не обрізались Й та Ї. */
.rotator {
  display: inline-grid;
  justify-items: start;
  align-items: end;
  padding: 0.16em 0.06em 0.08em 0;
  margin: -0.16em -0.06em -0.08em 0;
  overflow: hidden;
  color: var(--orange);
  transition: width 0.8s var(--ease-in-out);
}
.rotator__word { grid-area: 1 / 1; white-space: nowrap; }
.rotator__char {
  display: inline-block;
  transition:
    transform 0.8s var(--ease-in-out) calc(var(--i) * 28ms),
    filter 0.8s var(--ease-in-out) calc(var(--i) * 28ms),
    opacity 0.6s var(--ease-in-out) calc(var(--i) * 28ms);
}
.rotator__word.is-enter .rotator__char {
  transform: translateY(110%);
  filter: blur(6px);
  opacity: 0;
  transition: none;
}
.rotator__word.is-leave .rotator__char {
  transform: translateY(-110%);
  filter: blur(6px);
  opacity: 0;
}

/* До старту появи елементи першого екрана приховані (поява — у script.js) */
.is-loading .header__inner > *,
.is-loading .hero__eyebrow,
.is-loading .hero__line,
.is-loading .hero__lead,
.is-loading .hero__buttons,
.is-loading .flow-card { opacity: 0; }

.hero__bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
}
.hero__lead {
  max-width: 520px;
  margin-bottom: 28px;
  font-size: clamp(17px, 1.5vw, 20px);
  color: rgba(251, 251, 251, 0.75);
}
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.flow-card {
  width: 360px;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(14, 14, 15, 0.82);
  border: 1px solid var(--line);
}
.flow-card__title {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.flow li {
  display: flex;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.flow li span:first-child { color: var(--orange); font-variant-numeric: tabular-nums; }

/* ========== Секції ========== */
.section { position: relative; padding: clamp(88px, 12vw, 160px) 0; }
.section--border { border-top: 1px solid var(--line); }

.section__head { margin-bottom: clamp(40px, 6vw, 72px); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: end;
}
.split--top { align-items: start; }

/* ---------- Про агенцію ---------- */
.about { padding-bottom: clamp(40px, 6vw, 80px); }
.about .container { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.about .label { padding-top: 14px; }

.statement {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.2vw, 60px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.04em;
}
.statement__star {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-right: 0.35em;
  vertical-align: 0.02em;
  fill: var(--orange);
}
.statement__muted { color: var(--muted-2); }

/* ---------- Послуги: екосистема ---------- */
.eco { background: #000; }

.eco__head { margin-bottom: clamp(48px, 6vw, 80px); }
.eco__label {
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}
.eco__title {
  font-family: var(--font-head);
  font-size: clamp(40px, 6.4vw, 92px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}
.eco__line { display: block; }
.eco__line--muted { color: var(--muted-2); }

.eco__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 64px;
  margin-top: clamp(28px, 3.5vw, 44px);
}
.eco__lead {
  max-width: 540px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--muted);
}

/* Смислова послідовність, не навігація: тонкі стрілки між етапами */
.eco__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
}
.eco__flow li { display: flex; align-items: center; }
.eco__flow li + li { margin-left: 28px; }
.eco__flow li + li::before {
  content: "";
  width: 22px;
  height: 1px;
  margin: 0 6px 0 -28px;
  background: linear-gradient(to right, transparent, var(--orange));
}

/* Етапи як фізичні клавіші: світла верхня грань, видимий торець знизу.
   Натиснута клавіша лишається втопленою, поки її етап вибрано */
.eco__key {
  --edge: #0d0d0e;
  --rim: rgba(255, 255, 255, 0.14);
  --ring: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #2b2b2e 0%, #1b1b1d 100%);
  box-shadow:
    inset 0 1px 0 var(--rim),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px var(--ring),
    0 4px 0 var(--edge),
    0 4px 0 1px rgba(255, 255, 255, 0.05),
    0 10px 16px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.2s,
    filter 0.2s;
}
.eco__key:active,
.eco__key[aria-pressed="true"] {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 0 1px var(--ring),
    0 1px 0 var(--edge),
    0 1px 0 1px rgba(255, 255, 255, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.6);
}
.eco__key:active {
  transition-duration: 0.07s;
  transition-timing-function: ease-out;
}
.eco__key[aria-pressed="true"] {
  --ring: rgba(255, 64, 0, 0.7);
  color: var(--orange);
}
@media (hover: hover) {
  .eco__key:hover { filter: brightness(1.12); }
}
/* Остання клавіша — мета всієї системи */
.eco__flow li:last-child .eco__key {
  --edge: #8f2400;
  --rim: rgba(255, 255, 255, 0.34);
  background: linear-gradient(180deg, #ff5a1f 0%, #f23c00 100%);
  color: var(--white);
}
.eco__flow li:last-child .eco__key[aria-pressed="true"] {
  --ring: rgba(255, 255, 255, 0.5);
  background: linear-gradient(180deg, #e63a00 0%, #f24a10 100%);
}

.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 24px;
  border-radius: var(--radius);
  background: #111112;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), opacity 0.4s var(--ease);
}
/* Ледь помітна помаранчева підсвітка знизу при наведенні */
.svc::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 90%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 64, 0, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.svc__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: auto;
  padding-bottom: 40px;
}
.svc__num {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  transition: color 0.28s var(--ease);
}
.svc__star {
  width: 16px;
  height: 16px;
  fill: var(--orange);
  transition: transform 0.4s var(--ease);
}
.svc h3 {
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-size: clamp(22px, 1.9vw, 26px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #e8e8ea;
  transition: color 0.28s var(--ease);
}
.svc p { font-size: 15px; line-height: 1.55; color: var(--muted); }

@media (hover: hover) {
  .svc:not(.svc--accent):hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
  .svc:not(.svc--accent):hover::after { opacity: 1; }
  .svc:not(.svc--accent):hover h3 { color: #fff; }
  .svc:not(.svc--accent):hover .svc__num { color: var(--orange); }
  .svc:not(.svc--accent):hover .svc__star { transform: translateY(-2px); }
}

/* Помаранчева картка — завершення композиції; вся картка веде до заявки */
/* Вибрано етап системи: його послуги в акценті */
.svc.is-related { border-color: rgba(255, 64, 0, 0.5); }
.svc.is-related::after { opacity: 1; }
.svc.is-related h3 { color: #fff; }
.svc.is-related .svc__num { color: var(--orange); }
.services.has-stage .svc:not(.is-related):not(.svc--accent) { opacity: 0.45; }
@media (hover: hover) {
  .services.has-stage .svc:not(.is-related):not(.svc--accent):hover { opacity: 0.75; }
}

.svc--accent {
  justify-content: flex-end;
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.svc--accent::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: radial-gradient(45% 45% at 80% 15%, rgba(255, 255, 255, 0.24), transparent 70%);
  opacity: 0.7;
  transition: opacity 0.3s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.svc--accent::after { display: none; }
.svc--accent h3 { color: var(--white); font-size: clamp(24px, 2.1vw, 30px); }
.svc--accent p { color: rgba(255, 255, 255, 0.86); }
.svc__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 500;
}
.svc__arrow {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}
.svc__arrow svg {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  margin: auto;
  transition: transform 0.3s var(--ease);
}
.svc__arrow svg:last-child { transform: translate(-150%, 150%); }

@media (hover: hover) {
  .svc--accent:hover::before { opacity: 1; transform: translate(-6%, 6%); }
  .svc--accent:hover .svc__arrow svg:first-child { transform: translate(150%, -150%); }
  .svc--accent:hover .svc__arrow svg:last-child { transform: none; }
}
.svc--accent:active { transform: scale(0.99); }

/* До першої появи секції її елементи приховані (поява — у script.js) */
.eco.is-pending .eco__label,
.eco.is-pending .eco__line,
.eco.is-pending .eco__lead,
.eco.is-pending .eco__flow,
.eco.is-pending .svc { opacity: 0; }

.card__star {
  width: 18px;
  height: 18px;
  margin-bottom: 18px;
  fill: var(--orange);
  transition: transform 0.7s var(--ease);
}

/* ---------- Для кого ---------- */
.section--light { background: var(--white); color: var(--black); border-radius: var(--radius) var(--radius) 0 0; }
.section--light + .section { border-radius: 0; }
.section--light .section__lead { color: #55555a; }

/* Ліворуч — розміри бізнесу, праворуч — опис і картки обраного */
.sizes {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(40px, 6vw, 96px);
  align-items: start;
}
/* Заголовок видно лише в компактному вигляді: на широкому екрані блок читається з назв розмірів */
@media (min-width: 981px) {
  .sizes__heading {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
.sizes__menu {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 52px);
}
.sizes__tab {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.sizes__name {
  font-family: var(--font-head);
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  color: #71717a;
  opacity: 0.4;
  transition: color 0.7s var(--ease), opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.sizes__tab[aria-selected="true"] .sizes__name { color: var(--black); opacity: 1; transform: translateX(16px); }
@media (hover: hover) {
  .sizes__tab:hover .sizes__name { opacity: 0.7; }
  .sizes__tab[aria-selected="true"]:hover .sizes__name { opacity: 1; }
}

.sizes__panel { position: relative; isolation: isolate; }
/* М'яке помаранчеве світіння за картками */
.sizes__panel::before {
  content: "";
  position: absolute;
  inset: 10% 0 0;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 64, 0, 0.12), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}
.sizes__lead {
  max-width: 560px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: #55555a;
}
.sizes__cta { margin-top: 72px; }

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 40px;
}
.principle {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
  padding: 26px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #e6e6e6;
}
.principle:nth-child(even) { transform: translateY(40px); }
.principle h3 {
  margin-bottom: 10px;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.principle p { font-size: 15px; color: #66666b; }

.principle--dark { background: var(--black); border-color: var(--black); color: var(--white); }
.principle--dark p { color: var(--muted); }
.principle--grey { background: var(--grey); border-color: var(--grey); }
.principle--accent { background: var(--orange); border-color: var(--orange); color: var(--white); }
.principle--accent p { color: rgba(255, 255, 255, 0.85); }
.principle--accent .card__star { fill: var(--white); }


/* ---------- Процес: таймлайн ---------- */
/* Без JS і з reduced motion таймлайн показано завершеним; .is-live вмикає прогрес за прокруткою */
.proc__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: end;
  gap: 24px 64px;
  margin-bottom: clamp(56px, 7vw, 96px);
}
.proc__title {
  max-width: 14ch;
  font-family: var(--font-head);
  font-size: clamp(38px, 5.4vw, 80px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.proc__lead {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
  color: var(--muted);
}

.proc__timeline { --dot: 13px; position: relative; }
.proc__track {
  position: absolute;
  top: calc(var(--dot) / 2);
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.proc__fill {
  position: absolute;
  inset: 0;
  background: var(--orange);
  transform-origin: left center;
}
.proc.is-live .proc__fill { transform: scaleX(0); }

.proc__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.proc__step {
  position: relative;
  display: flex;
  padding-top: calc(var(--dot) + 28px);
}
.proc__dot {
  position: absolute;
  top: 0;
  left: 28px;
  width: var(--dot);
  height: var(--dot);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: var(--black);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.proc__card {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease), transform 0.5s var(--ease);
}
.proc__num {
  margin-bottom: 48px;
  font-family: var(--font-head);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--muted-2);
  transition: color 0.5s var(--ease);
}
.proc__card h3 {
  margin-bottom: 14px;
  font-family: var(--font-head);
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.proc__card p {
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.proc__result {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.proc__result span { font-size: 13px; color: var(--muted-2); transition: color 0.5s var(--ease); }
.proc__result strong { font-size: 16px; font-weight: 500; line-height: 1.35; }

/* Пройдений етап: делікатний помаранчевий акцент */
.proc:not(.is-live) .proc__dot,
.proc__step.is-active .proc__dot {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 64, 0, 0.14);
}
.proc:not(.is-live) .proc__card,
.proc__step.is-active .proc__card { border-color: rgba(255, 64, 0, 0.28); }
.proc:not(.is-live) .proc__num,
.proc:not(.is-live) .proc__result span,
.proc__step.is-active .proc__num,
.proc__step.is-active .proc__result span { color: var(--orange); }

/* Вміст етапу проявляється, коли лінія доходить до нього вперше */
.proc.is-live .proc__card > * {
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
}
.proc.is-live .proc__card > :nth-child(2) { transition-delay: 0.06s; }
.proc.is-live .proc__card > :nth-child(3) { transition-delay: 0.12s; }
.proc.is-live .proc__card > :nth-child(4) { transition-delay: 0.18s; }
.proc.is-live .proc__step:not(.is-seen) .proc__card > * {
  opacity: 0;
  transform: translateY(14px);
}

@media (hover: hover) {
  .proc__card:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.025);
    transform: translateY(-3px);
  }
  .proc__step.is-active .proc__card:hover { border-color: rgba(255, 64, 0, 0.5); }
}

.proc__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
}
.proc__cta p {
  max-width: 24ch;
  font-family: var(--font-head);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* ---------- Кейси (заглушка) ---------- */
.cases-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
}
.cases-hint { color: var(--muted); font-size: 15px; }

/* Папки: місце над ними потрібне, бо відкриті файли піднімаються вгору віялом */
.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-items: center;
  align-items: end;
  gap: 120px 40px;
  padding-top: 40px;
}

/* ---------- Формати співпраці ---------- */
.pricing__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 24px clamp(32px, 6vw, 96px);
  margin-bottom: clamp(40px, 6vw, 72px);
}

/* Одна рамка на три колонки: пакети порівнюють поруч, а не як окремі картки */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 36px);
}
.plan + .plan { border-left: 1px solid var(--line); }
.plan--main {
  position: relative;
  isolation: isolate;
  background: #111112;
}
.plan--main::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -30% auto;
  height: 70%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 64, 0, 0.16), transparent 70%);
  pointer-events: none;
}
.plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan__name {
  font-family: var(--font-head);
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.plan__tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 64, 0, 0.14);
  color: var(--orange-soft);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.plan__for {
  min-height: 3.1em;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.plan__price {
  margin: 28px 0;
  padding: 20px 0;
  border-block: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.plan__list { display: grid; gap: 14px; margin-bottom: 36px; }
.plan__list li,
.audit__list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  font-size: 15px;
  line-height: 1.45;
  color: #d4d4d8;
}
.plan__list svg,
.audit__list svg {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  fill: var(--orange);
}
.plan__btn { margin-top: auto; width: 100%; }
.pricing__note {
  max-width: 70ch;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Часті питання ---------- */
.faq__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq__head .section__lead { margin-top: 24px; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-head);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  transition: color 0.25s var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 6px; }
/* Плюс, що повертається в мінус */
.faq__icon {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 12px;
  height: 1.5px;
  margin: auto;
  background: currentColor;
  transition: transform 0.4s var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { background: var(--orange); border-color: var(--orange); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__a {
  max-width: 62ch;
  padding: 0 60px 28px 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Безкоштовний аудит у блоці заявки ---------- */
.audit {
  max-width: 460px;
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 64, 0, 0.35);
  background: rgba(255, 64, 0, 0.06);
}
.audit__title {
  margin-bottom: 16px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.audit__list { display: grid; gap: 10px; }

@media (hover: hover) {
  .faq__item summary:hover { color: var(--orange-soft); }
  .faq__item summary:hover .faq__icon { border-color: rgba(255, 255, 255, 0.3); }
}

@media (max-width: 980px) {
  .pricing__head, .faq__inner { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
  .plan__for { min-height: 0; }
  .faq__a { padding-right: 0; }
}

/* ---------- Контакти ---------- */
.contact { overflow: hidden; isolation: isolate; }
.contact__glow {
  position: absolute;
  z-index: -1;
  width: 900px;
  height: 260px;
  left: -200px;
  bottom: 10%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 64, 0, 0.35), transparent 70%);
  filter: blur(40px);
  transform: rotate(-8deg);
}
.contact .section__lead { margin-top: 24px; }

.channels { display: grid; gap: 10px; margin-top: 40px; max-width: 460px; }
.channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 24px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color 0.3s;
}
.channel:hover { border-color: rgba(255, 255, 255, 0.3); }
.channel__label { display: block; font-size: 12px; color: var(--muted); }
.channel__value { display: block; font-weight: 500; }

.form {
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 17px;
  outline: none;
  resize: vertical;
  transition: border-color 0.25s;
}
.field input:focus,
.field textarea:focus { border-color: var(--orange); }
.form .btn { margin-top: 12px; }
.form__note { margin-top: 16px; font-size: 12px; color: var(--muted-2); }
.form__note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.form__note a:hover { color: var(--white); }
.form__status { margin-top: 10px; font-size: 14px; }
.form__status a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--orange-soft); }
.form__status.is-success { color: #7ddc9a; }

/* ---------- Підвал ---------- */
.footer { border-top: 1px solid var(--line); overflow: hidden; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 13px;
  color: var(--muted);
}
.footer__link { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 3px; }
.footer__link:hover { color: var(--white); }
.footer__word {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 22.5vw;
  line-height: 0.75;
  letter-spacing: -0.07em;
  text-align: center;
  margin-bottom: -0.04em;
  background: linear-gradient(to bottom, #1d1d1f, var(--black) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

/* ========== Адаптив ========== */
@media (max-width: 1180px) {
  .nav a { padding: 8px 11px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  /* На вужчих екранах послуги етапу підіймаються одразу під клавіші */
  .svc.is-related { order: -1; }
  .principle:nth-child(even) { transform: none; }
  .sizes__cta { margin-top: 32px; }
}

/* Меню ховається в «бургер» раніше за решту адаптиву: інакше пункти переносяться на два рядки */
@media (max-width: 1120px) {
  .burger { display: flex; }
  .nav {
    position: absolute;
    top: calc(100% + 4px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 24px;
    background: rgba(20, 20, 21, 0.92);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav a { padding: 14px 16px; font-size: 17px; }
  .header.is-open .nav { opacity: 1; visibility: visible; transform: none; }
}

@media (max-width: 980px) {
  .header__cta { display: none; }
  .hero__bottom { grid-template-columns: 1fr; }
  .flow-card { width: 100%; max-width: 460px; }
  .split, .about .container, .eco__intro { grid-template-columns: 1fr; }

  /* Процес: вертикальна лінія зліва, етапи один під одним */
  .proc__head { grid-template-columns: 1fr; }
  .proc__timeline { padding-left: 40px; }
  .proc__track { top: 34px; bottom: 0; left: calc(var(--dot) / 2); right: auto; width: 1px; height: auto; }
  .proc__fill { transform-origin: center top; }
  .proc.is-live .proc__fill { transform: scaleY(0); }
  .proc__steps { grid-template-columns: 1fr; }
  .proc__step { padding-top: 0; }
  .proc__dot { top: 28px; left: -40px; }
  .proc__card {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: 32px;
  }
  .proc__num { grid-column: 1; margin-bottom: 16px; }
  .proc__card h3 { grid-column: 1; margin-bottom: 0; }
  .proc__card p { grid-column: 2; grid-row: 1 / 3; margin-bottom: 24px; }
  .proc__result { grid-column: 2; }
}

@media (max-width: 600px) {
  .logo { padding: 0 14px 0 12px; }
  .lang button { min-width: 34px; }
  .hero { padding-top: 120px; }
  .hero__title { font-size: clamp(40px, 12.4vw, 72px); margin-bottom: 40px; }
  .hero__line { white-space: normal; }
  .hero__line--indent { padding-left: 0; }
  .hero__buttons .btn { width: 100%; justify-content: space-between; }
  .hero__buttons .btn--ghost { justify-content: center; }
  .services, .principles { grid-template-columns: 1fr; }
  .principle { min-height: 220px; }
  .svc { min-height: 0; }
  .svc__top { padding-bottom: 28px; }
  .hero__title { line-height: 0.96; }
  .footer__inner { flex-direction: column; gap: 4px; }
  .about { padding-top: 24px; padding-bottom: 16px; }
  .about .container { gap: 12px; }
  .about .label { margin-bottom: 0; padding-top: 0; }
  .proc__timeline { padding-left: 32px; }
  .proc__dot { top: 26px; left: -32px; }
  .proc__track { top: 32px; }
  .proc__card { display: flex; padding: 24px; }
  .proc__card h3 { margin-bottom: 12px; }
  .proc__cta .btn { width: 100%; justify-content: space-between; }
}

/* Для кого, вузькі екрани: компактний перемикач, що лишається під шапкою,
   поки читаєш картки, — перемкнути розмір можна з будь-якого місця блока */
@media (max-width: 980px) {
  .sizes { display: block; }
  .sizes__heading {
    margin-bottom: 24px;
    font-family: var(--font-head);
    font-size: clamp(34px, 7vw, 56px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.04em;
  }
  .sizes__menu {
    top: 76px;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 28px;
    padding: 4px;
    border-radius: 999px;
    background: #ececee;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
  .sizes__menu::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 3);
    border-radius: 999px;
    background: var(--black);
    transform: translateX(calc(var(--active, 0) * 100%));
    transition: transform 0.45s var(--ease);
  }
  .sizes__tab {
    position: relative;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }
  .sizes__name,
  .sizes__tab:hover .sizes__name {
    font-family: var(--font-body, inherit);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #55555a;
    opacity: 1;
    transition: color 0.3s var(--ease);
  }
  .sizes__tab[aria-selected="true"] .sizes__name { color: var(--white); transform: none; }
  .sizes__name br,
  .sizes__rest { display: none; }
}

/* Російський рядок заголовка довший за інші — трохи менший кегль, щоб лишитися в сітці */
@media (min-width: 601px) {
  html[lang="ru"] .hero__title { font-size: clamp(48px, 8.2vw, 134px); }
}

/* Чотири мови в шапці: на вузьких телефонах ущільнюємо, а на найвужчих лишаємо від логотипа знак */
@media (max-width: 420px) {
  .header__inner { gap: 8px; }
  .header__actions { gap: 6px; }
  .lang button { min-width: 30px; font-size: 12px; }
}
@media (max-width: 350px) {
  .logo { padding: 0 12px; }
  .logo__word { display: none; }
}

/* Послідовність етапів на вузьких екранах — сітка 2×2 з номерованим порядком, без ліній між рядками */
@media (max-width: 700px) {
  .eco__flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 10px;
    counter-reset: flow;
  }
  .eco__flow li { margin: 0 !important; counter-increment: flow; }
  .eco__flow li::before,
  .eco__flow li + li::before { content: none; }
  .eco__key { width: 100%; justify-content: flex-start; gap: 8px; min-height: 46px; }
  .eco__key::before {
    content: counter(flow);
    font-size: 12px;
    color: var(--orange);
  }
  .eco__flow li:last-child .eco__key::before { color: rgba(255, 255, 255, 0.8); }
}

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