/* =========================================================
   ARKON+ (ТОВ «Аркон Плюс») — дизайн-система
   Палітра: глибокий "кресленнєвий" синій + ціан-лінії + бурштиновий акцент
   ========================================================= */

:root {
  --bg: #0B1220;
  --bg-elevated: #101C33;
  --bg-card: #131F38;
  --line: #2A3D55;
  --line-soft: rgba(94, 212, 232, 0.14);
  --cyan: #5ED4E8;
  --cyan-soft: rgba(94, 212, 232, 0.15);
  --amber: #FF9142;
  --amber-soft: rgba(255, 145, 66, 0.15);
  --text: #EAF2F7;
  --text-muted: #8FA3B8;
  --text-dim: #5B7086;

  --font-display: "Space Grotesk", "Arial", sans-serif;
  --font-body: "Inter", "Arial", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --container: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p { margin: 0; }

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Двомовність: перемикання UA/EN ---------- */
html[data-lang="ua"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-ua { display: none !important; }

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  flex-shrink: 0;
}
.lang-switch button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.lang-switch button.active { background: var(--cyan); color: #06232A; }
.lang-switch button:not(.active):hover { color: var(--text); }

.mobile-nav .lang-switch { margin-top: 6px; }

/* ---------- noscript fallback ---------- */
noscript .reveal-note { display: block; }
.no-js .reveal, .no-js .stagger-item { opacity: 1 !important; transform: none !important; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--cyan);
  display: inline-block;
}

/* ---------- Фонова креслярська сітка ---------- */
.blueprint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  border-color: var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo img { width: 34px; height: 34px; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-desktop a {
  font-size: 14.5px;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
  position: relative;
  white-space: nowrap;
}
.nav-desktop a:hover { color: var(--text); }
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width 0.3s var(--ease);
}
.nav-desktop a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.burger span, .burger span::before, .burger span::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), top 0.3s var(--ease);
}
.burger span { top: 19px; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.burger.active span { background: transparent; }
.burger.active span::before { top: 0; transform: rotate(45deg); }
.burger.active span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  padding: 0 32px;
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease);
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a { font-family: var(--font-display); font-size: 28px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: #1A0E04;
  box-shadow: 0 8px 24px rgba(255, 145, 66, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 145, 66, 0.38); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn-small { padding: 10px 20px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 110px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -200px; right: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(94,212,232,0.16), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--cyan); }
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text);
}
.hero-stat span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Сигнатура: анімований конвеєр автоматизації ---------- */
.pipeline-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.pipeline-card .card-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.pipeline-card .card-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.pipeline-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pipeline-svg { width: 100%; height: auto; overflow: visible; }
.pipeline-path {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
}
.pipeline-node-circle { fill: var(--bg-card); stroke: var(--line); stroke-width: 2; }
.pipeline-node.is-active .pipeline-node-circle { stroke: var(--cyan); }
.pipeline-node.is-done .pipeline-node-circle { fill: var(--amber); stroke: var(--amber); }
.pipeline-node text {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--text-muted);
}
.pipeline-pulse {
  fill: var(--cyan);
  filter: drop-shadow(0 0 6px rgba(94,212,232,0.9));
}
.pipeline-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.pipeline-foot .status { color: var(--cyan); }
.pipeline-foot .status.ok { color: var(--amber); }

/* ---------- Marquee технологій ---------- */
.logo-strip {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.logo-strip-inner {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: marquee 32s linear infinite;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Секції ---------- */
.section { padding: 120px 0; position: relative; }
.section-alt { background: var(--bg-elevated); }
.section-head {
  max-width: 640px;
  margin-bottom: 60px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  margin-top: 18px;
  line-height: 1.15;
}
.section-head p {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 17px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Послуги ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--bg-elevated);
  padding: 36px 28px;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
  position: relative;
}
.service-card:hover { background: var(--bg-card); }
.service-card .icon-wrap {
  width: 56px; height: 56px;
  margin-bottom: 22px;
  transition: transform 0.4s var(--ease);
}
.service-card:hover .icon-wrap { transform: translateY(-4px); }
.service-card h3 { font-size: 18px; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.service-card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: block;
}

/* ---------- Процес ---------- */
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 30px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.process-item:last-child { border-bottom: 1px solid var(--line); }
.process-num {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--cyan);
}
.process-item h3 { font-size: 21px; margin-bottom: 10px; }
.process-item p { color: var(--text-muted); max-width: 560px; }
.process-body { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.process-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
  padding-top: 4px;
}

/* ---------- Переваги ---------- */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.advantage-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.advantage-card:hover { border-color: var(--cyan); transform: translateY(-4px); }
.advantage-num { font-family: var(--font-mono); color: var(--amber); font-size: 13px; margin-bottom: 16px; display: block;}
.advantage-card h3 { font-size: 18px; margin-bottom: 10px; }
.advantage-card p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- Кейси ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.case-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.case-card:hover { transform: translateY(-6px); border-color: var(--cyan); }
.case-media { overflow: hidden; }
.case-media img { transition: transform 0.6s var(--ease); }
.case-card:hover .case-media img { transform: scale(1.05); }
.case-body { padding: 24px; }
.case-tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.06em; }
.case-body h3 { font-size: 19px; margin: 10px 0 8px; }
.case-body p { color: var(--text-muted); font-size: 14px; }
.case-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
}
.case-result b { font-family: var(--font-display); font-size: 20px; color: var(--amber); display: block; }
.case-result span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

/* ---------- Відгуки ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.testimonial-card p { color: var(--text); font-size: 15px; line-height: 1.65; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testimonial-author img { width: 42px; height: 42px; border-radius: 50%; }
.testimonial-author b { display: block; font-size: 14px; }
.testimonial-author span { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }

/* ---------- CTA ---------- */
.cta-section {
  position: relative;
  border-radius: 24px;
  margin: 0 24px;
  overflow: hidden;
  padding: 80px 60px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--line);
}
.cta-inner { position: relative; max-width: 640px; }
.cta-section h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 18px; }
.cta-section p { color: var(--text-muted); font-size: 17px; margin-bottom: 32px; max-width: 520px; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Контакти / форма ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.contact-info-item:last-child { border-bottom: 1px solid var(--line); }
.contact-info-item b { display: block; font-size: 15px; margin-bottom: 4px; }
.contact-info-item span { color: var(--text-muted); font-size: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-field input, .form-field textarea, .form-field select {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--cyan);
  background: var(--bg-card);
  outline: none;
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12.5px; color: var(--text-dim); margin-top: 14px; }
.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--amber);
  background: var(--amber-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
}
.form-success.show { display: flex; }

/* ---------- Footer ---------- */
.site-footer { padding: 70px 0 30px; border-top: 1px solid var(--line); }
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col a, .footer-col p {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
  transition: color 0.25s var(--ease);
}
.footer-col a:hover { color: var(--cyan); }
.footer-legal {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.7;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}
.socials { display: flex; gap: 14px; }
.socials a {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.socials a:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view .stagger-item {
  opacity: 1;
  transform: translateY(0);
}
.stagger-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

/* Захист від "порожньої" сторінки: якщо анімація з якоїсь причини не спрацює,
   через 2.5s елементи все одно стають видимими (керується класом force-visible через JS-таймер) */
.force-visible.reveal:not(.in-view),
.force-visible .stagger-item {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  color: var(--text);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Cookie-повідомлення ---------- */
.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  max-width: 520px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  transform: translateY(140%);
  transition: transform 0.5s var(--ease);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { font-size: 13.5px; color: var(--text-muted); flex: 1; min-width: 200px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid, .testimonials-grid, .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1.3fr 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .burger { display: block; }
  .header-actions .lang-switch { display: none; }
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding-top: 130px; }
  .pipeline-card { max-width: 480px; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .cases-grid, .testimonials-grid, .advantages-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .process-item { grid-template-columns: 1fr; gap: 10px; }
  .process-body { flex-direction: column; gap: 6px; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-section { padding: 50px 26px; margin: 0 12px; }
  .section { padding: 80px 0; }
  .hero-stats { gap: 24px; }
  .header-actions { gap: 10px; }
}
