/* ============================================================
   AUTOGRAPH AGENCY - business development agency
   Palette: off-black #0B0C0B / #121312 · neon #18FC9B · mint #B9FEDF
   Type: Unbounded (display) + Manrope (body), обидва з кирилицею
   Motion: GSAP + Lenis, кастомні cubic-bezier, y/scale reveals
   ============================================================ */

:root {
  --bg: #0b0c0b;
  --bg-2: #101110;
  --bg-3: #151615;
  --shell: rgba(255, 255, 255, 0.04);
  --neon: #18fc9b;
  --neon-lift: #4dfdb1;        /* світліший неон = вища поверхня на hover */
  --neon-soft: rgba(24, 252, 155, 0.14);
  --mint: #b9fedf;
  --ink: #0f1210;
  --text: rgba(255, 255, 255, 0.84);
  --text-strong: #f6f8f7;
  --muted: #9aa39e;
  --line: rgba(255, 255, 255, 0.08);
  --r-card: 24px;
  --r-inner: 17px;
  --r-input: 12px;
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 32px);
  --section: clamp(88px, 11vw, 150px);
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Manrope", "Segoe UI", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* clip, а не hidden: hidden на корені ламає position:sticky всередині */
html { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--neon); color: #0a0a0a; }

/* Плівка-зерно поверх усього: fixed + pointer-events-none, не на скрол-контейнері */
.noise {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- Utilities ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
/* Ритм секцій нерівний навмисне - однаковий паддінг на всіх секціях читається як шаблон */
.section--tight { padding-block: calc(var(--section) * 0.62); }
.section--airy { padding-block: calc(var(--section) * 1.28); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--neon); color: #0a0a0a; padding: 10px 18px; font-weight: 700;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); color: var(--text-strong); }
h1 {
  font-size: clamp(29px, 5.9vw, 84px); line-height: 1.02; font-weight: 800;
  letter-spacing: -0.03em; text-transform: uppercase; min-width: 0;
}
/* anywhere тільки на вузьких екранах: воно змінює min-content
   і на десктопі стискає колонку, розриваючи слово посеред */
@media (max-width: 379px) { h1 { overflow-wrap: anywhere; } }
@media (min-width: 380px) { h1 { font-size: clamp(36px, 5.9vw, 84px); } }
h2 { font-size: clamp(28px, 4.4vw, 56px); line-height: 1.08; font-weight: 700; letter-spacing: -0.015em; text-transform: uppercase; }
h3 { font-size: clamp(18px, 2vw, 23px); line-height: 1.25; font-weight: 600; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(24, 252, 155, 0.35); border-radius: 999px;
  padding: 7px 16px;
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--neon); font-weight: 500;
  background: rgba(24, 252, 155, 0.05);
}

.accent { color: var(--neon); }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(44px, 6vw, 76px); }
.section-head p { max-width: 540px; color: var(--muted); }

/* ---------- Buttons (pill + вкладена стрілка-острівець) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 13.5px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 10px 10px 10px 28px; border-radius: 999px;
  min-height: 56px; white-space: nowrap;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out),
              background-color 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--neon); outline-offset: 3px;
}
.btn .ico {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  transition: transform 0.45s var(--ease-out);
}
.btn:hover .ico { transform: translate(2px, -2px) scale(1.06); }

.btn-primary { background: var(--neon); color: #0a0a0a; }
.btn-primary .ico { background: rgba(10, 10, 10, 0.14); color: #0a0a0a; }
/* Підняття на темному - через світлість поверхні, не через кольоровий ореол */
.btn-primary:hover { transform: translateY(-2px); background: var(--neon-lift); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7); }

.btn-ghost { border: 1px solid var(--line); color: var(--text-strong); background: rgba(255, 255, 255, 0.02); }
.btn-ghost .ico { background: rgba(255, 255, 255, 0.07); color: var(--text-strong); }
.btn-ghost:hover { border-color: rgba(24, 252, 155, 0.6); color: var(--neon); transform: translateY(-2px); }
.btn-ghost:hover .ico { color: var(--neon); }

.btn-dark { background: #101210; color: #fff; }
.btn-dark .ico { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-strong);
  transition: color 0.3s var(--ease-out);
}
.link-arrow svg { transition: transform 0.35s var(--ease-out); }
.link-arrow:hover { color: var(--neon); }
.link-arrow:hover svg { transform: translate(4px, -4px); }

/* ---------- Header: плаваюча скляна пігулка ---------- */
.header {
  position: fixed; inset-inline: 0; top: 14px; z-index: 100;
  display: flex; justify-content: center; padding-inline: var(--gutter);
  pointer-events: none;
}
.header-inner {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; max-width: var(--container);
  padding: 10px 12px 10px 20px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}
.header.is-scrolled .header-inner {
  background: rgba(14, 15, 14, 0.72);
  border-color: var(--line);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px -22px rgba(0, 0, 0, 0.8);
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand img { width: 40px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.06em; color: #fff; font-weight: 700; }
.brand-text span { font-size: 9px; letter-spacing: 0.22em; color: var(--neon); text-transform: uppercase; }

.nav > ul { display: flex; align-items: center; gap: 2px; }
.nav a, .nav-toggle-sub {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 15px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--text);
  transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.nav a:hover, .nav-toggle-sub:hover { color: var(--neon); background: rgba(255, 255, 255, 0.05); }

.has-sub { position: relative; }
.has-sub .chevron { transition: transform 0.3s var(--ease-out); }
.has-sub.open .chevron, .has-sub:hover .chevron { transform: rotate(180deg); }
.subnav {
  position: absolute; top: calc(100% + 12px); left: 0; min-width: 350px;
  background: rgba(18, 19, 18, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 10px; display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out), visibility 0.28s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 28px 70px -24px rgba(0, 0, 0, 0.85);
}
.has-sub:hover .subnav, .has-sub.open .subnav, .has-sub:focus-within .subnav {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.subnav a { display: flex; padding: 11px 14px; border-radius: 11px; font-size: 14.5px; width: 100%; }
.subnav a:hover { background: rgba(24, 252, 155, 0.08); }
.subnav a span { color: var(--neon); font-family: var(--font-display); font-size: 10.5px; margin-right: 12px; padding-top: 3px; }

.header-cta { flex: none; }
.header-cta .btn { min-height: 46px; padding: 6px 6px 6px 20px; font-size: 12px; }
.header-cta .btn .ico { width: 32px; height: 32px; }

/* Burger */
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; position: relative; z-index: 130; background: rgba(255, 255, 255, 0.05); }
.burger span {
  position: absolute; left: 13px; right: 13px; height: 2px; background: #fff;
  transition: transform 0.35s var(--ease-io), opacity 0.25s var(--ease-out), top 0.35s var(--ease-io);
  border-radius: 2px;
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 27px; }
.burger.active span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 110px; padding-bottom: 40px;
  position: relative; overflow: hidden;
  background: var(--bg);
}
/* промінь світла з правого верхнього кута, як у преміум-референсі */
.hero-beam {
  position: absolute; top: -30%; right: -12%; width: 68%; height: 130%;
  background:
    conic-gradient(from 215deg at 78% 22%,
      transparent 0deg,
      rgba(24, 252, 155, 0.16) 12deg,
      rgba(24, 252, 155, 0.05) 32deg,
      transparent 60deg);
  filter: blur(30px);
  pointer-events: none;
}
.hero-glow {
  position: absolute; left: -10%; bottom: -25%; width: 55%; height: 70%;
  background: radial-gradient(closest-side, rgba(24, 252, 155, 0.07), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 85% 65% at 55% 40%, black 15%, transparent 72%);
  opacity: 0.4;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(24px, 5vw, 60px); align-items: center; position: relative;
}
.hero-copy .eyebrow { margin-bottom: 26px; }
.hero-sub {
  font-family: var(--font-display); color: var(--neon);
  font-size: clamp(14px, 1.8vw, 22px); font-weight: 600; letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 14px; margin-bottom: 8px;
  text-transform: uppercase;
}
.hero-sub .arrow { display: inline-flex; }
.hero h1 { margin-bottom: 26px; }
.hero-desc { max-width: 500px; color: var(--muted); margin-bottom: 42px; font-size: clamp(16px, 1.6vw, 18px); }
.hero-desc strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* 3D-сцена: реальна перспектива, шари на різній глибині (translateZ),
   камера рухається від скролу + нахил за курсором. */
.hero-visual {
  position: relative; display: flex; justify-content: center; align-items: center;
  perspective: 1100px; perspective-origin: 50% 45%;
}
.hero-stage {
  position: relative; transform-style: preserve-3d;
  will-change: transform;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
}
/* ноут можна крутити рукою */
.hero-visual { cursor: grab; touch-action: pan-y; }
.hero-visual.is-dragging { cursor: grabbing; }
/* ---------- 3D-ноутбук (справжня геометрія, не картинка) ----------
   .lap  - корпус сцени, крутиться цілком
   .lap-lid  - кришка на завісі (rotateX: -90 закрито, +12 відкрито)
   .lap-base - клавіатурна панель, лежить горизонтально
   Керується змінними --lid, які пише JS. */
.lap {
  --lap-w: min(470px, 100%);
  --lap-h: 296px;
  --lap-d: 244px;
  --lid: 12deg;
  position: relative;
  width: var(--lap-w); height: var(--lap-h);
  transform-style: preserve-3d;
  transform: translateZ(60px);
  will-change: transform;
}

/* --- кришка --- */
.lap-lid {
  position: absolute; inset: 0;
  transform-origin: 50% 100%;
  transform: rotateX(var(--lid));
  transform-style: preserve-3d;
}
.lap-screen, .lap-lid-back {
  position: absolute; inset: 0;
  border-radius: 14px 14px 4px 4px;
  backface-visibility: hidden;
}
/* лицьова сторона: рамка + матриця */
.lap-screen {
  background: linear-gradient(160deg, #26282a, #131516 40%, #1b1e20);
  padding: 12px 12px 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.lap-screen::after {            /* підборіддя з іменем бренду */
  content: "AUTOGRAPH";
  position: absolute; left: 0; right: 0; bottom: 4px;
  text-align: center;
  font-family: var(--font-display); font-size: 8px; font-weight: 700;
  letter-spacing: 0.32em; color: rgba(255, 255, 255, 0.34);
}
.lap-waves, .lap-logo, .lap-glass { position: absolute; }
.lap-waves {
  inset: 12px 12px 20px; width: auto; height: auto;
  background:
    radial-gradient(100% 80% at 50% 45%, rgba(24, 252, 155, 0.10), transparent 70%),
    #030504;
  border-radius: 5px;
}
.lap-waves path {
  fill: none; stroke: var(--neon); stroke-width: 1.4;
  opacity: 0.55; filter: drop-shadow(0 0 5px rgba(24, 252, 155, 0.85));
}
.lap-waves path:nth-child(2) { opacity: 0.36; }
.lap-waves path:nth-child(3) { opacity: 0.24; }
.lap-waves path:nth-child(4) { opacity: 0.15; }
.lap-logo {
  left: 50%; top: 50%; width: 33%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.6));
}
/* відблиск на склі */
.lap-glass {
  inset: 12px 12px 20px; border-radius: 5px; pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.12) 0%, transparent 34%, transparent 66%, rgba(255, 255, 255, 0.05) 100%);
}
/* задня кришка з логотипом-гравіюванням */
.lap-lid-back {
  transform: rotateY(180deg) translateZ(6px);
  background: linear-gradient(200deg, #303336, #191c1e 55%, #232628);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

/* --- нижня частина: панель з клавіатурою --- */
.lap-base {
  position: absolute; left: 0; top: 100%;
  width: var(--lap-w); height: var(--lap-d);
  transform-origin: 50% 0;
  /* +90, а не -90: у CSS вісь Y дивиться вниз, тож саме rotateX(90deg)
     кладе панель горизонтально лицем догори (інакше видно її споду) */
  transform: rotateX(90deg);
  transform-style: preserve-3d;
  border-radius: 4px 4px 16px 16px;
  background: linear-gradient(180deg, #303437 0%, #43484c 34%, #2b2f32 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
/* клавіші: сітка світлих кнопок на темній вставці */
.lap-keys {
  position: absolute; left: 7%; right: 7%; top: 8%; height: 46%;
  border-radius: 7px; padding: 3px;
  background: #101214;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
  background-image:
    repeating-linear-gradient(90deg, #34383c 0 5.4%, #101214 5.4% 6.6%),
    repeating-linear-gradient(0deg, #34383c 0 14%, #101214 14% 17%);
  background-size: 100% 100%;
}
.lap-pad {
  position: absolute; left: 31%; right: 31%; top: 61%; height: 30%;
  border-radius: 6px;
  background: linear-gradient(180deg, #43484d, #363b3f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 2px 4px rgba(0,0,0,0.35);
}
/* торець корпусу — дає товщину */
.lap-body {
  position: absolute; left: 0; top: 100%;
  width: var(--lap-w); height: 13px;
  transform-origin: 50% 0;
  transform: translateZ(0);
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #40454a, #202426);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}
/* контактна тінь на «підлозі» - лежить нижче й глибше за ноутбук */
.hero-shadow {
  position: absolute; left: 50%; bottom: 2%;
  width: 66%; height: 70px;
  transform: translateX(-50%) translateZ(-70px) rotateX(76deg);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8), transparent 72%);
  filter: blur(20px); pointer-events: none;
}
/* світло від екрана, що б'є назад у сцену */
.hero-halo {
  position: absolute; left: 50%; top: 44%;
  width: 92%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) translateZ(-60px);
  background: radial-gradient(circle, rgba(24, 252, 155, 0.28), rgba(24, 252, 155, 0.06) 45%, transparent 66%);
  filter: blur(30px); pointer-events: none;
}
/* мережа вузлів — окремий шар глибини, тому паралаксить сама по собі */
.hero-net {
  position: absolute; inset: -8% -14%; pointer-events: none;
  transform: translateZ(-40px);
}
.hero-net line { stroke: rgba(24, 252, 155, 0.28); stroke-width: 1; }
.hero-net circle.node {
  fill: #141514; stroke: rgba(24, 252, 155, 0.5); stroke-width: 1;
}
.hero-net circle.pulse { fill: var(--neon); }
.hero-net .pulse { animation: nodePulse 2.6s var(--ease-io) infinite; transform-origin: center; transform-box: fill-box; }
.hero-net .pulse:nth-of-type(2n) { animation-delay: 0.9s; }
.hero-net .pulse:nth-of-type(3n) { animation-delay: 1.6s; }
@keyframes nodePulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ---------- Marquee: дві перехресні стрічки (одна маркі-сцена на сторінку) ---------- */
.tapes { position: relative; padding-block: clamp(48px, 7vw, 90px); overflow: hidden; }
.tape {
  background: var(--mint); color: var(--ink);
  padding-block: 13px; overflow: hidden; white-space: nowrap;
  border-block: 2px solid #0a0a0a;
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.85);
}
.tape-inner { display: inline-flex; will-change: transform; animation: tapeMove 30s linear infinite; }
.tape-chunk {
  display: inline-flex; align-items: center; gap: 26px; padding-inline: 13px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(14px, 1.7vw, 20px);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.tape-chunk img { width: 22px; height: 22px; }
.tape--a { transform: rotate(-2.6deg) scale(1.04); }
.tape--b { transform: rotate(2.1deg) scale(1.04); margin-top: -6px; position: relative; }
.tape--b .tape-inner { animation-direction: reverse; animation-duration: 36s; }
@keyframes tapeMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 6vw, 76px); align-items: start; }
.why-copy h2 { margin-bottom: 26px; }
.why-copy .lead { font-size: clamp(18px, 2vw, 21px); color: var(--text-strong); margin-bottom: 18px; line-height: 1.5; font-weight: 600; }
.why-copy .lead .accent { font-family: var(--font-display); font-size: 0.82em; }
.why-copy p:not(.lead) { color: var(--muted); }
.why-copy .mark { color: var(--neon); font-weight: 700; }

.why-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* double-bezel: зовнішній корпус + внутрішнє ядро */
.why-card {
  background: var(--shell); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 7px;
  transition: transform 0.5s var(--ease-out), border-color 0.4s var(--ease-out);
}
.why-card:hover { transform: translateY(-6px); border-color: rgba(24, 252, 155, 0.4); }
.why-card-core {
  background: var(--mint); color: var(--ink);
  border-radius: var(--r-inner); padding: 24px 22px; height: 100%;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
}
.why-card .num {
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  background: #0f1210; color: var(--neon);
  display: grid; place-items: center; flex: none;
}
.why-card p { font-weight: 600; line-height: 1.5; font-size: 15px; color: var(--ink); }
.why-card--wide { grid-column: 1 / -1; }
.why-card--wide .why-card-core { flex-direction: row; align-items: center; }

/* ---------- Services ---------- */
.services { background: var(--bg-2); border-block: 1px solid var(--line); }
/* Асиметричний ритм 2 / 3 / 1 замість 3×2 рівних карток
   (рівна 3-колонкова сітка фіч - найвпізнаваніший AI-шаблон) */
.services-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.services-grid > :nth-child(1) { grid-column: span 4; }
.services-grid > :nth-child(2) { grid-column: span 2; }
.services-grid > :nth-child(3),
.services-grid > :nth-child(4),
.services-grid > :nth-child(5) { grid-column: span 2; }
.services-grid > :nth-child(6) { grid-column: span 6; }
.service-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 30px 28px 26px; overflow: hidden;
  transition: transform 0.5s var(--ease-out), border-color 0.4s var(--ease-out);
}
.service-card::after {
  content: ""; position: absolute; right: -28%; bottom: -50%; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(24, 252, 155, 0.15), transparent 65%);
  opacity: 0; transition: opacity 0.45s var(--ease-out); pointer-events: none;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(24, 252, 155, 0.45); }
.service-card:hover::after { opacity: 1; }
.service-card .num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 3.8vw, 48px); line-height: 1; color: var(--neon);
}
/* Перша картка дихає ширше, шоста лягає горизонтально і закриває ритм */
.services-grid > :nth-child(1) { padding: 38px 36px 32px; }
.services-grid > :nth-child(1) .num { font-size: clamp(48px, 5.4vw, 72px); }
.services-grid > :nth-child(1) h3 { font-size: 19px; min-height: 0; }
.services-grid > :nth-child(6) {
  display: grid; grid-template-columns: auto minmax(0, 21ch) minmax(0, 1fr) auto;
  align-items: center; gap: 30px; padding: 30px 34px;
}
.services-grid > :nth-child(6) h3 {
  display: block; min-height: 0; min-width: 0;
  overflow-wrap: anywhere; font-size: 15.5px;
}
.services-grid > :nth-child(6) p { flex: none; min-width: 0; }
.services-grid > :nth-child(6) .link-arrow { margin-top: 0; white-space: nowrap; }
.service-card h3 { text-transform: uppercase; letter-spacing: 0.02em; font-size: 16px; min-height: 2.5em; display: flex; align-items: flex-end; }
.service-card p { color: var(--muted); font-size: 15px; flex: 1; }
.service-card .link-arrow::before { content: ""; position: absolute; inset: 0; }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process-step {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 28px 24px; background: rgba(255, 255, 255, 0.015);
  position: relative; overflow: hidden;
  transition: border-color 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}
.process-step:hover { border-color: rgba(24, 252, 155, 0.4); transform: translateY(-4px); }
.process-step .step-ico {
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 20px;
  background: rgba(24, 252, 155, 0.1); border: 1px solid rgba(24, 252, 155, 0.35);
  color: var(--neon); display: grid; place-items: center;
}
.process-step h3 { font-size: 16.5px; text-transform: uppercase; margin-bottom: 10px; }
.process-step p { color: var(--muted); font-size: 14.5px; }
.process-step .ghost-num {
  position: absolute; right: 14px; top: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 64px;
  color: rgba(255, 255, 255, 0.045); line-height: 1;
}

/* ---------- Cases (slider) ---------- */
.cases { background: var(--bg-2); border-block: 1px solid var(--line); overflow: hidden; }
.slider { position: relative; }
/* margin/padding-inline давали стартовий scrollLeft > 0, через що
   ліва стрілка вмикалась коли ліворуч ще нічого нема. Забираємо зсув. */
.slider-track {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 8px; scroll-padding-inline: 0;
  scrollbar-width: none;
  cursor: grab;
}
.slider-track:active { cursor: grabbing; }
.slider-track::-webkit-scrollbar { display: none; }
.case-card {
  flex: 0 0 clamp(280px, 30vw, 396px); scroll-snap-align: start;
  border-radius: var(--r-card); position: relative;
  background: var(--shell); border: 1px solid var(--line);
  padding: 7px;
  transition: transform 0.5s var(--ease-out), border-color 0.4s var(--ease-out);
  display: flex; flex-direction: column;
}
.case-card:hover { transform: translateY(-6px); border-color: rgba(24, 252, 155, 0.4); }
.case-media {
  aspect-ratio: 16 / 10; overflow: hidden; position: relative;
  background: #191a19; border-radius: var(--r-inner);
}
.case-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.7s var(--ease-out); }
.case-card:hover .case-media img { transform: scale(1.05); }
.case-media--brand {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(24, 252, 155, 0.16), transparent 55%),
    #131413;
}
.case-media--brand img { width: 72px; height: auto; object-fit: contain; opacity: 0.9; }
.case-media--mint { background: radial-gradient(circle at 30% 80%, rgba(15, 18, 16, 0.2), transparent 60%), var(--mint); }
.case-media--mint img { width: 72px; filter: brightness(0); opacity: 0.85; }
.case-body { padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.case-tag { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--neon); font-weight: 700; }
.case-body h3 { font-size: 16.5px; text-transform: uppercase; }
.case-body p { color: var(--muted); font-size: 14.5px; }

.slider-nav { display: flex; gap: 10px; }
.slider-btn {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out),
              color 0.3s var(--ease-out), opacity 0.3s, transform 0.3s var(--ease-out);
  color: #fff;
}
.slider-btn:hover { border-color: var(--neon); color: var(--neon); background: rgba(24, 252, 155, 0.06); }
.slider-btn:active { transform: scale(0.94); }
.slider-btn[disabled] { opacity: 0.3; pointer-events: none; }

/* ---------- Big CTA ---------- */
.cta-band { text-align: center; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(640px 340px at 50% 108%, rgba(24, 252, 155, 0.14), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { max-width: 820px; margin-inline: auto; margin-bottom: 16px; position: relative; }
.cta-band p { color: var(--muted); max-width: 520px; margin: 0 auto 42px; position: relative; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; position: relative; }

/* ---------- Contacts ---------- */
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.contacts-info .eyebrow { margin-bottom: 20px; }
.contacts-info h2 { margin-bottom: 36px; }
.contact-row { display: flex; align-items: center; gap: 18px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.contact-row:first-of-type { border-top: 1px solid var(--line); }
.contact-row .ico {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  border: 1px solid rgba(24, 252, 155, 0.4); color: var(--neon);
  display: grid; place-items: center;
  background: rgba(24, 252, 155, 0.05);
}
.contact-row small { display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.contact-row a, .contact-row .val { font-size: 17px; font-weight: 600; color: var(--text-strong); transition: color 0.25s; word-break: break-word; }
.contact-row a:hover { color: var(--neon); }

/* форма: double-bezel м'ятна картка */
.form-shell {
  background: var(--shell); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 8px;
}
.form-card {
  background: var(--mint); color: var(--ink);
  border-radius: var(--r-inner); padding: clamp(26px, 4vw, 42px);
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45);
}
.form-card h2 { color: var(--ink); font-size: clamp(21px, 2.5vw, 28px); margin-bottom: 10px; }
.form-card > p { font-size: 15px; margin-bottom: 26px; color: rgba(15, 18, 16, 0.75); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 15px 18px; font: inherit; font-size: 16px;
  border: 1.5px solid rgba(15, 18, 16, 0.25); border-radius: var(--r-input);
  background: rgba(255, 255, 255, 0.65); color: var(--ink);
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.field input::placeholder { color: rgba(15, 18, 16, 0.4); }
.field input:focus, .field textarea:focus { outline: none; border-color: #0f1210; background: #fff; }
.field .error-msg { display: none; align-items: center; gap: 6px; color: #9a1f17; font-size: 13px; margin-top: 6px; font-weight: 600; }
.field.invalid input { border-color: #9a1f17; }
.field.invalid .error-msg { display: flex; }
.form-card .btn { width: 100%; justify-content: space-between; }
.form-note { font-size: 12.5px; color: rgba(15, 18, 16, 0.55); margin-top: 12px; text-align: center; }
.form-success { display: none; text-align: center; padding: 36px 10px; }
.form-success.visible { display: block; }
.form-success .check {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: #0f1210; color: var(--neon); display: grid; place-items: center;
}
.form-success h3 { color: var(--ink); margin-bottom: 8px; }
.form-success p { color: rgba(15, 18, 16, 0.75); font-size: 15px; }

/* ---------- Footer ---------- */
/* Statement-футер (Ft5): велика заява + контакти в рядок.
   4-колонковий індекс посилань - впізнаваний AI-футер, тому не використовується. */
.footer { border-top: 1px solid var(--line); padding-top: clamp(56px, 8vw, 96px); background: var(--bg); }
.footer-statement {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: end; padding-bottom: clamp(40px, 5vw, 64px);
}
.footer-statement h2 { font-size: clamp(26px, 4vw, 52px); margin-bottom: 20px; }
.footer-statement .sig { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14.5px; }
.footer-statement .sig img { width: 40px; flex: none; }
.footer-contacts { display: grid; gap: 14px; justify-items: start; }
.footer-contacts a, .footer-contacts span {
  font-size: clamp(15px, 1.5vw, 17px); font-weight: 600; color: var(--text-strong);
  transition: color 0.25s var(--ease-out);
}
.footer-contacts a:hover { color: var(--neon); }
.footer-contacts small { display: block; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.footer-nav {
  border-top: 1px solid var(--line);
  padding-block: 24px; display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center;
}
.footer-nav a { color: var(--muted); font-size: 14.5px; transition: color 0.25s var(--ease-out); white-space: nowrap; }
.footer-nav a:hover { color: var(--neon); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 20px; display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13px;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 5, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-card {
  position: relative; width: min(520px, 100%);
  transform: translateY(26px) scale(0.96);
  transition: transform 0.4s var(--ease-drawer);
  max-height: 90svh; overflow-y: auto;
}
.modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(15, 18, 16, 0.1); color: var(--ink);
  display: grid; place-items: center;
  transition: background-color 0.25s, transform 0.35s var(--ease-out);
}
.modal-close:hover { background: rgba(15, 18, 16, 0.2); transform: rotate(90deg); }

/* ---------- Service pages ---------- */
.page-hero {
  padding-top: clamp(150px, 19vw, 210px); padding-bottom: clamp(48px, 7vw, 84px);
  position: relative; overflow: hidden; background: var(--bg);
}
.page-hero .hero-beam { top: -40%; }
.page-hero .crumbs { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; margin-bottom: 28px; flex-wrap: wrap; position: relative; }
.page-hero .crumbs a { transition: color 0.25s; }
.page-hero .crumbs a:hover { color: var(--neon); }
.page-hero .crumbs .sep { opacity: 0.5; }
.page-hero .crumbs .here { color: var(--text); }
.page-hero h1 { font-size: clamp(32px, 5.2vw, 70px); max-width: 1020px; position: relative; }
.page-hero .page-lead { max-width: 640px; color: var(--muted); margin-top: 26px; font-size: clamp(16px, 1.6vw, 18px); position: relative; }

/* 2 картки в ряд, остання «непарна» лягає на всю ширину.
   Тиловий 3-колонковий ряд рівних карток - AI-шаблон, тому не використовується.
   Правило тайлиться для 3, 4 і 6 підпослуг без порожніх клітин. */
.subservices-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.subservices-grid > * { grid-column: span 3; }
.subservices-grid > :nth-child(odd):last-child { grid-column: span 6; }
.subservices-grid > :nth-child(odd):last-child .sub-card-core {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 40px; align-items: start;
}
.subservices-grid > :nth-child(odd):last-child h3 { grid-column: 1; }
.subservices-grid > :nth-child(odd):last-child p { grid-column: 1; }
.subservices-grid > :nth-child(odd):last-child ul { grid-column: 2; grid-row: 1 / span 3; }
.subservices-grid > :nth-child(odd):last-child .btn { grid-column: 1; align-self: end; }
.sub-card {
  background: var(--shell); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 7px;
  transition: transform 0.5s var(--ease-out), border-color 0.4s var(--ease-out);
  display: flex;
}
.sub-card:hover { transform: translateY(-6px); border-color: rgba(24, 252, 155, 0.4); }
.sub-card-core {
  background: var(--mint); color: var(--ink);
  border-radius: var(--r-inner); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 15px; width: 100%;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
}
.sub-card h3 { color: var(--ink); text-transform: uppercase; font-size: 16.5px; letter-spacing: 0.01em; }
.sub-card p { font-size: 15px; line-height: 1.6; color: rgba(15, 18, 16, 0.82); flex: 1; }
.sub-card ul { display: grid; gap: 8px; }
.sub-card li { font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; color: rgba(15, 18, 16, 0.85); font-weight: 500; }
.sub-card li svg { flex: none; margin-top: 4px; }
.sub-card .btn { align-self: stretch; justify-content: space-between; padding: 8px 8px 8px 22px; font-size: 12px; min-height: 48px; }
.sub-card .btn .ico { width: 34px; height: 34px; }

.help-cta {
  border: 1px solid rgba(24, 252, 155, 0.35); border-radius: var(--r-card);
  background:
    radial-gradient(440px 260px at 88% 18%, rgba(24, 252, 155, 0.12), transparent 65%),
    var(--bg-3);
  padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, auto);
  gap: 32px; align-items: center;
}
.help-cta h2 { font-size: clamp(23px, 3.2vw, 40px); margin-bottom: 12px; }
.help-cta p { color: var(--muted); max-width: 480px; }

/* ---------- Reveal helpers (JS керує transform; opacity завжди 1) ---------- */
.reveal, .reveal-item { will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid > :nth-child(1),
  .services-grid > :nth-child(2),
  .services-grid > :nth-child(3),
  .services-grid > :nth-child(4),
  .services-grid > :nth-child(5) { grid-column: span 1; }
  .services-grid > :nth-child(6) { grid-column: span 2; grid-template-columns: auto minmax(0, 1fr); }
  .services-grid > :nth-child(6) p,
  .services-grid > :nth-child(6) .link-arrow { grid-column: 2; }
  .services-grid > :nth-child(1) { padding: 30px 28px 26px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-statement { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .lap { --lap-w: min(266px, 60vw); --lap-h: min(168px, 38vw); --lap-d: min(132px, 30vw); }
  .hero-visual { perspective: 1300px; }
  .hero { padding-top: 120px; }
  .why-grid, .contacts-grid { grid-template-columns: 1fr; }
  .help-cta { grid-template-columns: 1fr; }

  .nav {
    position: fixed; inset: 0; z-index: 120;
    background: rgba(9, 10, 9, 0.9);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  }
  .nav.open { opacity: 1; visibility: visible; }
  .nav > ul { flex-direction: column; gap: 4px; width: min(440px, 88vw); }
  .nav > ul > li { width: 100%; transform: translateY(24px); transition: transform 0.5s var(--ease-out); }
  .nav.open > ul > li { transform: translateY(0); }
  .nav.open > ul > li:nth-child(1) { transition-delay: 0.05s; }
  .nav.open > ul > li:nth-child(2) { transition-delay: 0.1s; }
  .nav.open > ul > li:nth-child(3) { transition-delay: 0.15s; }
  .nav.open > ul > li:nth-child(4) { transition-delay: 0.2s; }
  .nav.open > ul > li:nth-child(5) { transition-delay: 0.25s; }
  .nav a, .nav-toggle-sub { font-size: 20px; padding: 13px 18px; width: 100%; justify-content: space-between; }
  .subnav {
    position: static; min-width: 0; width: 100%;
    background: transparent; border: none; box-shadow: none; padding: 0 0 6px 16px;
    display: none; opacity: 1; visibility: visible; transform: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .has-sub.open .subnav { display: grid; }
  .subnav a { font-size: 16px; justify-content: flex-start; }
  .burger { display: block; }
  .header-cta { display: none; }
}

@media (max-width: 640px) {
  /* декоративні шари не мають розсувати layout на вузьких екранах */
  .hero-net { inset: -4% 0; }
  .hero-beam { right: -4%; width: 78%; }
  .services-grid { grid-template-columns: 1fr; }
  .services-grid > * { grid-column: span 1 !important; }
  .services-grid > :nth-child(6) { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 30px 28px 26px; }
  .subservices-grid { grid-template-columns: 1fr; }
  .subservices-grid > *, .subservices-grid > :nth-child(odd):last-child { grid-column: span 1; }
  .subservices-grid > :nth-child(odd):last-child .sub-card-core { grid-template-columns: 1fr; }
  .subservices-grid > :nth-child(odd):last-child ul { grid-column: 1; grid-row: auto; }
  .process-grid, .why-cards { grid-template-columns: 1fr; }
  .why-card--wide .why-card-core { flex-direction: column; align-items: flex-start; }
  .case-card { flex-basis: min(320px, 84vw); }
  .hero-actions .btn, .cta-actions .btn { width: 100%; justify-content: space-between; }
  .slider-nav { width: 100%; justify-content: flex-end; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tape-inner { animation: none; }
  .hero-net .pulse { animation: none; opacity: 0.6; }
}

/* ---------- Hover тільки для точних курсорів ---------- */
@media (hover: none), (pointer: coarse) {
  .why-card:hover, .service-card:hover, .case-card:hover,
  .sub-card:hover, .process-step:hover { transform: none; }
}
