/* =========================================================
   Flowbase — стилі сайту
   Базові стилі = статична, повністю читабельна сторінка.
   Ефекти вмикаються класами з main.js (.motion, .flow--live,
   .process--h / .process--v), тому без JS / з reduced-motion
   сайт не ламається.
   ========================================================= */

:root {
  --bg: #07080b;
  --bg-2: #0c0d12;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3efe6;
  --muted: #a39e94;
  --dim: #6f6a62;
  --gold: #e3c27e;
  --gold-light: #f3dca4;
  --gold-deep: #b98a4b;
  --violet: #7b6cff;
  --coral: #ff8466;
  --grad-gold: linear-gradient(120deg, #f6e2b0 0%, #e3c27e 45%, #b98a4b 100%);
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --radius: 22px;
  --nav-h: 72px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* легке "плівкове" зерно для преміальної фактури */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: rgba(227, 194, 126, 0.35); color: #fff; }

svg[viewBox="0 0 24 24"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

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

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--gold); color: #14110b; font-weight: 700;
  transform: translateY(-150%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* ---------- typography ---------- */
h2 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
h2 em, .problem-outro em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.1em;
  letter-spacing: -0.01em;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.03em;
}
/* слова, розбиті для анімації, отримують градієнт кожне окремо (інакше текст зникає) */
h2 em .w {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.04em;
}
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }

.section { position: relative; padding-block: clamp(56px, 7vw, 96px); }
.section-head { max-width: 760px; }
.section-head h2 { margin-top: 18px; }
.section-sub { margin-top: 20px; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 620px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow-num {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: 1.15rem; letter-spacing: 0; color: var(--muted);
}
.eyebrow-num::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: 12px; vertical-align: middle; background: var(--gold-deep); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700; font-size: 0.98rem; letter-spacing: -0.005em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s, background-color .3s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-lg { padding: 17px 30px; font-size: 1.04rem; }
/* "магнітні" кнопки рухає GSAP — CSS-перехід transform тут заважав би */
.motion .btn[data-magnetic] { transition: box-shadow .35s var(--ease-out), border-color .3s, background-color .3s; }
.btn-small { padding: 9px 18px; font-size: 0.9rem; }

.btn-gold {
  background: var(--grad-gold);
  color: #17130b;
  box-shadow: 0 10px 40px -12px rgba(227, 194, 126, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}
.btn-gold:hover { box-shadow: 0 16px 50px -10px rgba(227, 194, 126, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-gold:hover::after { transform: translateX(120%); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: rgba(227, 194, 126, 0.6); background: rgba(227, 194, 126, 0.07); }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--grad-gold);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  box-shadow: 0 0 12px rgba(227, 194, 126, 0.8);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  transition: background-color .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 8, 11, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; letter-spacing: -0.03em; }
.logo-mark { width: 30px; height: 30px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color .3s, background-color .3s;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: rgba(227, 194, 126, 0.6); background: rgba(227, 194, 126, 0.07); }
.lang-btn svg { width: 19px; height: 19px; transition: transform .6s var(--ease-out); }
.lang-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-code { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 180px; padding: 6px;
  border-radius: 16px; border: 1px solid var(--line-strong);
  background: rgba(14, 15, 20, 0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  transform-origin: top right;
  animation: menu-in .35s var(--ease-out);
}
.lang-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
.lang-menu button {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
}
.lang-menu button:hover { background: var(--surface-2); }
.lang-menu button[aria-checked="true"] { color: var(--gold); }
.lang-menu button[aria-checked="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-block: calc(var(--nav-h) + 40px) 120px;
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero-orbs { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; will-change: transform; }
.orb-1 { width: 46vmax; height: 46vmax; top: -18vmax; right: -12vmax; background: radial-gradient(circle, rgba(227, 194, 126, 0.45), transparent 65%); }
.orb-2 { width: 40vmax; height: 40vmax; bottom: -16vmax; left: -14vmax; background: radial-gradient(circle, rgba(123, 108, 255, 0.4), transparent 65%); }
.orb-3 { width: 22vmax; height: 22vmax; top: 38%; left: 46%; background: radial-gradient(circle, rgba(185, 138, 75, 0.35), transparent 70%); }
.hero-vignette {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(7, 8, 11, 0.7) 85%),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}

.hero-content { position: relative; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 0.86rem; font-weight: 600; color: var(--muted);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(227, 194, 126, 0.6); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(227, 194, 126, 0.55); } 80%, 100% { box-shadow: 0 0 0 12px rgba(227, 194, 126, 0); } }

.hero-title {
  margin-top: 28px;
  font-size: clamp(2.7rem, 9vw, 7.2rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.045em;
  perspective: 900px;
}
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.1em;
  letter-spacing: -0.02em;
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(227, 194, 126, 0.35);
}
.hero-title .word { display: inline-block; white-space: nowrap; }
.hero-title .char { display: inline-block; transform-origin: 50% 100%; will-change: transform; }
.hero-sub { margin-top: 28px; max-width: 600px; font-size: clamp(1.06rem, 1.6vw, 1.28rem); color: #cfc9be; }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 22px; font-size: 0.92rem; color: var(--dim); }

.scroll-cue-wrap { position: absolute; left: 0; right: 0; bottom: 28px; display: flex; justify-content: center; }
.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim);
}
.scroll-cue-line { width: 1px; height: 52px; background: linear-gradient(var(--gold), transparent); transform-origin: top; animation: cue 2.2s var(--ease-out) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* стан "до анімації" — тільки коли ефекти увімкнені */
.motion [data-hero-reveal] { opacity: 0; }
.motion .hero-title:not(.is-split) { visibility: hidden; }

/* =========================================================
   2. PROBLEM
   ========================================================= */
.problem { overflow-x: clip; }
.problem-grid { display: grid; gap: 56px; }
@media (min-width: 960px) {
  .problem-grid { grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
  .problem-head { position: sticky; top: calc(var(--nav-h) + 48px); }
}
.problem-title {
  margin-top: 18px;
  font-size: clamp(3rem, 8vw, 6.4rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.problem-outro {
  position: relative;
  margin-top: 28px; max-width: 440px;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 600; line-height: 1.45; color: #d8d2c6;
  padding-left: 20px;
}
.problem-outro::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px;
  background: var(--grad-gold); border-radius: 2px;
  transform-origin: top; transform: scaleY(var(--outro, 1));
}

.pains { display: grid; gap: 14px; }
.pain {
  position: relative;
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  will-change: transform, opacity, filter;
}
.pain:nth-child(even) { margin-left: clamp(0px, 4vw, 48px); }
.pain-icon {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px;
  color: var(--coral);
  background: rgba(255, 132, 102, 0.1);
  border: 1px solid rgba(255, 132, 102, 0.22);
}
.pain-icon svg { width: 22px; height: 22px; }
.pain-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral);
}
.pain-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.pain p { margin-top: 6px; font-size: clamp(1.02rem, 1.4vw, 1.14rem); font-weight: 600; line-height: 1.45; color: #ece6da; }

/* =========================================================
   3. SOLUTION — flow
   ========================================================= */
.solution { isolation: isolate; }
.solution::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 50% 60%, rgba(123, 108, 255, 0.12), transparent 70%);
}
.flow { position: relative; margin-top: clamp(36px, 5vw, 60px); }
.flow-head { margin-inline: auto; text-align: center; }
.flow-head .section-sub { margin-inline: auto; }

.flow-track { --icon: 58px; position: relative; }
.flow-nodes { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); }
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.flow-node-icon {
  position: relative;
  display: grid; place-items: center;
  width: var(--icon); height: var(--icon); border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  transition: transform .6s var(--ease-out), background .5s, color .5s, border-color .5s, box-shadow .6s;
}
.flow-node-icon svg { width: 44%; height: 44%; }
.flow-node-label { font-size: 0.9rem; font-weight: 600; color: var(--muted); transition: color .4s; }
.flow-line {
  position: absolute; top: calc(var(--icon) / 2 - 1px);
  left: calc(100% / 14); right: calc(100% / 14);
  height: 2px; background: var(--line);
}
.flow-line-fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, var(--violet));
  transform-origin: 0 50%;
  transform: scaleX(var(--flow, 1));
  box-shadow: 0 0 18px rgba(227, 194, 126, 0.6);
}
.flow-spark {
  position: absolute; top: 50%; left: calc(var(--flow, 1) * 100%);
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(227, 194, 126, 0.35), 0 0 24px 6px rgba(227, 194, 126, 0.8);
  opacity: 0;
}
/* стан вузлів: пройдений / активний (за замовчуванням усі "пройдені") */
.flow-node.is-done .flow-node-icon,
.flow:not(.flow--live) .flow-node-icon { color: var(--gold); border-color: rgba(227, 194, 126, 0.45); }
.flow-node.is-active .flow-node-icon {
  transform: scale(1.16);
  background: var(--grad-gold);
  color: #17130b;
  border-color: transparent;
  box-shadow: 0 0 0 8px rgba(227, 194, 126, 0.1), 0 0 50px 4px rgba(227, 194, 126, 0.45);
}
.flow-node.is-active .flow-node-label { color: var(--text); }
.flow--live .flow-node.is-active .flow-node-icon::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid var(--gold);
  animation: ripple 1.8s var(--ease-out) infinite;
}
@keyframes ripple { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.9); opacity: 0; } }

.flow-details { margin-top: 56px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.flow-detail {
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.flow-detail-num { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 1.3rem; color: var(--gold); }
.flow-detail h3 { margin-top: 4px; }
.flow-detail p { margin-top: 8px; color: var(--muted); }
.flow-hint { display: none; }

/* жива версія: схема з карткою прилипає (sticky) по центру видимої частини екрана,
   доріжка = висота схеми (--stage-h з JS) + коротка прокрутка на кожен крок.
   Без порожніх "пів екрана" над і під схемою; працює на будь-якій висоті й ширині. */
.sticky-stage {
  position: sticky;
  top: max(calc(var(--nav-h) + 12px), calc(50svh + var(--nav-h) / 2 - var(--stage-h, 0px) / 2));
}
.flow--live { height: calc(var(--stage-h, 440px) + (var(--flow-steps, 7) - 1) * 30vh); }
.flow--live .flow-stage { overflow-x: clip; overflow-y: visible; padding-block: 12px; }
.flow--live .flow-inner { width: 100%; }
.flow--live .flow-spark { opacity: 1; }
.flow--live .flow-details { display: grid; grid-template-columns: 1fr; margin-top: clamp(24px, 5vh, 52px); }
.flow--live .flow-detail {
  grid-area: 1 / 1;
  max-width: 620px; width: 100%; margin-inline: auto;
  text-align: center;
  padding: clamp(18px, 3.2vh, 28px) clamp(20px, 3vw, 30px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  opacity: 0;
  transform: translateY(26px) scale(0.97);
  filter: blur(10px);
  transition: opacity .55s var(--ease-out), transform .7s var(--ease-out), filter .55s var(--ease-out);
  pointer-events: none;
}
.flow--live .flow-detail.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.flow--live .flow-detail h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.flow--live .flow-detail p { font-size: clamp(1.02rem, 1.4vw, 1.15rem); }
.flow--live .flow-hint {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; text-align: center;
  margin-top: clamp(14px, 3vh, 26px); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
}
.flow-counter { white-space: nowrap; }
.flow-counter b { color: var(--gold); font-weight: 700; }

@media (max-height: 640px) {
  .flow-track { --icon: 48px; }
  .flow-node { gap: 8px; }
}
@media (max-width: 700px) {
  .flow-track { --icon: 40px; }
  .flow-node-label { display: none; }
  .flow-node.is-active .flow-node-icon { transform: scale(1.22); }
}

/* =========================================================
   4. SERVICES — 3D tilt cards
   ========================================================= */
.services::before {
  content: ""; position: absolute; inset: 10% 0 auto; height: 70%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 80% 50%, rgba(227, 194, 126, 0.08), transparent 70%);
}
.services-grid { margin-top: 64px; display: grid; gap: 20px; }
@media (min-width: 760px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
.service { perspective: 1200px; }
.service-inner {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; height: 100%;
  padding: clamp(26px, 3vw, 36px);
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.012) 60%);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.9);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out), border-color .4s;
  overflow: hidden;
}
.service-inner.is-tilting { transition: transform .12s linear, border-color .4s; }
.service-inner::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(243, 220, 164, 0.85), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0; transition: opacity .4s;
}
.service-glare {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(227, 194, 126, 0.13), transparent 50%);
  opacity: 0; transition: opacity .4s;
}
.service-inner:hover::before, .service-inner:hover .service-glare { opacity: 1; }
.service-top { display: flex; justify-content: space-between; align-items: flex-start; transform: translateZ(40px); }
.service-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  color: var(--gold-light);
  background: linear-gradient(145deg, rgba(227, 194, 126, 0.2), rgba(227, 194, 126, 0.04));
  border: 1px solid rgba(227, 194, 126, 0.3);
  box-shadow: 0 12px 30px -12px rgba(227, 194, 126, 0.45);
}
.service-icon svg { width: 26px; height: 26px; }
.service-num { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 2.2rem; line-height: 1; color: rgba(255, 255, 255, 0.16); }
.service h3 { margin-top: 26px; font-size: clamp(1.35rem, 2vw, 1.6rem); transform: translateZ(30px); }
.service p { margin-top: 12px; color: var(--muted); transform: translateZ(20px); }
.tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; transform: translateZ(25px); }
.tags li {
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; color: #d6cfbf;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03);
}

/* =========================================================
   5. PROCESS
   ========================================================= */
.process-viewport, .flow { scroll-margin-top: var(--nav-h); }
.process-viewport { margin-top: 48px; }
.process-track {
  max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter);
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.step { position: relative; display: flex; flex-direction: column; }
.step-num {
  position: relative; z-index: 2;
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: clamp(3.6rem, 6vw, 5rem); line-height: 1;
  background: linear-gradient(180deg, var(--gold-light), rgba(185, 138, 75, 0.15));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: -12px; padding-left: 6px;
  will-change: transform;
}
.step-card {
  position: relative; flex: 1;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.step-card p { margin-top: 10px; color: var(--muted); }
.process-progress { display: none; }

/* горизонтальний режим (десктоп): висота доріжки = 100vh + ширина стрічки (--dist з JS),
   етапи прилипають (sticky) і їдуть уліво */
.process--h .process-pin { margin-top: clamp(28px, 4vw, 48px); height: calc(var(--stage-h, 480px) + var(--dist, 0px)); }
.process--h .process-stage { overflow-x: clip; overflow-y: visible; padding-block: 12px; }
.process--h .process-viewport { margin-top: 0; }
.process--h .process-track {
  display: flex; gap: 28px;
  width: max-content; max-width: none;
  padding-inline: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter)));
}
.process--h .step { width: clamp(300px, 30vw, 400px); }
.process--h .step-num { font-size: clamp(4.5rem, min(10vw, 16vh), 10rem); margin-bottom: -0.18em; }
.process--h .step-card { min-height: min(260px, 30vh); padding: clamp(22px, 3.6vh, 36px) 30px; }
.process--h .step-card h3 { font-size: 1.5rem; }
.process--h .process-progress {
  display: block; position: relative; margin-top: clamp(20px, 5vh, 52px);
  height: 2px; background: var(--line); border-radius: 2px; overflow: hidden;
}
.process--h .process-progress span {
  position: absolute; inset: 0; background: var(--grad-gold);
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}

/* вертикальна таймлайн-версія (мобільні) */
.process--v .process-track { position: relative; grid-template-columns: 1fr; gap: 26px; padding-left: calc(var(--gutter) + 34px); }
.process--v .process-track::before,
.process--v .process-track::after {
  content: ""; position: absolute; left: calc(var(--gutter) + 9px); top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
}
.process--v .process-track::before { background: var(--line); }
.process--v .process-track::after { background: var(--grad-gold); transform-origin: top; transform: scaleY(var(--fill, 0)); box-shadow: 0 0 12px rgba(227, 194, 126, 0.6); }
.process--v .step::before {
  content: ""; position: absolute; left: -31px; top: 22px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold); box-shadow: 0 0 14px rgba(227, 194, 126, 0.6);
}
.process--v .step-num { font-size: 3.2rem; margin-bottom: -10px; }

/* =========================================================
   6. CONTACT / FINAL CTA
   ========================================================= */
.contact { overflow: hidden; isolation: isolate; }
.contact-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(227, 194, 126, 0.2), transparent 70%),
    radial-gradient(ellipse 60% 50% at 10% 45%, rgba(123, 108, 255, 0.16), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, #0d0b12 40%, #120f0b 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%);
}
.contact-aurora {
  position: absolute; left: 50%; top: 50%; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax;
  background: conic-gradient(from 0deg, transparent, rgba(227, 194, 126, 0.12), transparent 30%, rgba(123, 108, 255, 0.12), transparent 60%);
  filter: blur(60px);
  animation: spin 28s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.contact-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 980px) { .contact-grid { grid-template-columns: 1fr 0.95fr; gap: 72px; } }
.contact-title { margin-top: 18px; font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
.contact-title .w, h2 .w { display: inline-block; }
.messengers { margin-top: 40px; }
.messengers-label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.messengers-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-messenger svg { width: 19px; height: 19px; }
.btn-messenger:hover svg { transform: none; }
.btn-messenger.is-missing { opacity: 0.55; cursor: not-allowed; }

@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.form-shell {
  position: relative;
  padding: 1px; border-radius: 30px;
  background: conic-gradient(from var(--angle), rgba(255, 255, 255, 0.08), var(--gold) 12%, rgba(255, 255, 255, 0.08) 28%, rgba(255, 255, 255, 0.08) 55%, var(--violet) 66%, rgba(255, 255, 255, 0.08) 80%);
  animation: border-spin 7s linear infinite;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 80px -30px rgba(227, 194, 126, 0.35);
}
@keyframes border-spin { to { --angle: 360deg; } }
.form {
  display: grid; gap: 18px;
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: 29px;
  background: linear-gradient(170deg, #12131a, #0b0c10);
}
.field label { display: block; margin-bottom: 8px; font-size: 0.88rem; font-weight: 700; color: #d8d2c6; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: 1rem;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(227, 194, 126, 0.7);
  background: rgba(227, 194, 126, 0.04);
  box-shadow: 0 0 0 4px rgba(227, 194, 126, 0.12);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: rgba(255, 132, 102, 0.7); }
.btn-submit { width: 100%; margin-top: 4px; }
.btn-submit[disabled] { opacity: 0.7; cursor: progress; }
.form-status { min-height: 1.5em; font-size: 0.95rem; font-weight: 600; }
.form-status.is-success { color: var(--gold-light); }
.form-status.is-error { color: var(--coral); }
.form-note { font-size: 0.85rem; color: var(--dim); text-align: center; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 36px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.logo-small { font-size: 1.05rem; }
.logo-small .logo-mark { width: 24px; height: 24px; }
.footer-tag, .footer-copy { font-size: 0.88rem; color: var(--dim); }

/* ---------- mobile tweaks ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav .btn-small { padding: 8px 14px; font-size: 0.85rem; }
  .logo-word { font-size: 1.1rem; }
  .hero-actions .btn { width: 100%; }
  .pain { padding: 18px; gap: 14px; }
  .pain-icon { width: 40px; height: 40px; border-radius: 12px; }
}
@media (max-width: 380px) {
  .nav .btn-small { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
