/* =========================================================
   NEXORA Automation — design tokens
   ========================================================= */
:root {
  --c-graphite: #0F172A;
  --c-graphite-soft: #16213A;
  --c-blue: #00B8F5;
  --c-cyan: #00D4C7;
  --c-orange: #FF9F1C;
  --c-bg: #F3F6F8;
  --c-card: #FFFFFF;
  --c-text: #0F172A;
  --c-text-muted: #5B6B7C;
  --c-border: #E3E9EE;

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

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 12px 32px rgba(15, 23, 42, 0.14);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.15; }
p { margin: 0; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor; /* Було: var(--c-orange) */
  display: inline-block;
}

.section { padding: 96px 0; }
.section-head { max-width: 800px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--c-text-muted); margin-top: 14px; font-size: 17px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--c-orange);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 159, 28, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(255, 159, 28, 0.45); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-outline:hover { border-color: var(--c-blue); color: var(--c-blue); }

.btn-outline-dark {
  background: transparent;
  color: var(--c-graphite);
  border: 1.5px solid var(--c-border);
}
.btn-outline-dark:hover { border-color: var(--c-blue); color: var(--c-blue); }

.btn-small { padding: 9px 18px; font-size: 13.5px; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 18px 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header.scrolled {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.logo { 
  display: flex; 
  align-items: center; 
  gap: 12px; /* Трохи збільшив відступ (було 10px) */
  font-family: var(--font-display); 
  font-weight: 700; 
  font-size: 26px; /* Було 20px — це головний розмір IQ Logic */
  color: #fff; 
}
.logo .dot { 
  width: 12px;  /* Було 9px */
  height: 12px; /* Було 9px */
  border-radius: 50%; 
  background: var(--c-orange);
  box-shadow: 0 0 12px var(--c-orange);
}

.logo small { 
  display: block; 
  font-family: var(--font-mono); 
  font-size: 11px; /* Було 10px — розмір напису AUTOMATION & AI */
  letter-spacing: 0.12em; 
  color: var(--c-blue); 
  font-weight: 500; 
}

.nav-links { display: flex; gap: 34px; }
.nav-links a { color: rgba(255,255,255,0.82); font-size: 14.5px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--c-blue); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.burger { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25); background: transparent; cursor: pointer; position: relative; }
.burger span, .burger::before, .burger::after { content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: #fff; transition: 0.2s; }
.burger::before { top: 13px; }
.burger span { top: 19px; }
.burger::after { top: 25px; }

/* =========================================================
   Hero — signature element: живі трасування друкованої плати
   ========================================================= */
.hero {
  position: relative;
  background: var(--c-graphite);
  overflow: hidden;
  padding: 168px 0 120px;
  color: #fff;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.hero-bg svg { width: 100%; height: 100%; }

.trace {
  fill: none;
  stroke: var(--c-blue);
  stroke-width: 1.4;
  opacity: 0.45;
  stroke-dasharray: 6 10;
  animation: dash 22s linear infinite;
}
.trace.cyan { stroke: var(--c-cyan); animation-duration: 28s; }
.trace.slow { animation-duration: 40s; opacity: 0.28; }
@keyframes dash { to { stroke-dashoffset: -400; } }

.pad { fill: var(--c-cyan); opacity: 0.9; }
.pad.pulse { animation: pulse 3.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.35; r: 3; } 50% { opacity: 1; r: 5; } }

.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero-badge {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(0,184,245,0.35);
  color: var(--c-blue); background: rgba(0,184,245,0.08);
}
.hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 700; letter-spacing: -0.01em; }
.hero h1 span { color: var(--c-blue); }
.hero .lead { margin-top: 22px; font-size: 18px; color: rgba(255,255,255,0.72); max-width: 580px; }
.hero-actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

.hero-stats { position: relative; z-index: 2; display: flex; gap: 48px; margin-top: 84px; flex-wrap: wrap; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 30px; color: #fff; }
.hero-stat span { font-size: 13px; color: rgba(255,255,255,0.55); }

/* =========================================================
   Каталог
   ========================================================= */
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product-card {
  background: var(--c-card);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--c-border);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

.product-thumb {
  height: 210px;
  background: linear-gradient(135deg, #EAF2F6, #DCE7EE);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: contain; /* Було cover */
}
.product-thumb .no-photo { color: #A9B7C3; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-align: center; padding: 16px; }
.product-thumb .no-photo svg { margin: 0 auto 10px; opacity: 0.6; }

.product-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product-body h3 { font-size: 19px; }
.product-body p { color: var(--c-text-muted); font-size: 14.5px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-more { display: inline-flex; align-items: center; gap: 6px; color: var(--c-blue); font-weight: 600; font-size: 14px; }
.product-more svg { transition: transform 0.2s; }
.product-card:hover .product-more svg { transform: translateX(4px); }

.catalog-empty { text-align: center; padding: 60px 20px; color: var(--c-text-muted); font-family: var(--font-mono); font-size: 14px; }

/* =========================================================
   Процес
   ========================================================= */
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.process-step {
  background: var(--c-card); border-radius: var(--radius-m); padding: 28px 24px;
  border: 1px solid var(--c-border); position: relative;
}
.process-step .num { 
  font-family: var(--font-mono); 
  font-size: 13px; 
  color: var(--c-blue); /* Було: var(--c-orange) */ 
  font-weight: 700; 
  letter-spacing: 0.05em; 
}
.process-step h4 { margin-top: 14px; font-size: 17px; }
.process-step p { margin-top: 10px; color: var(--c-text-muted); font-size: 14px; }

/* =========================================================
   Про нас
   ========================================================= */
.about { background: var(--c-graphite); color: #fff; position: relative; overflow: hidden; }
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.about h2 { font-size: clamp(26px, 3.2vw, 36px); }
.about p.lead { margin-top: 18px; color: rgba(255,255,255,0.7); font-size: 16.5px; }
.about-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.about-chips span {
  font-family: var(--font-mono); font-size: 12.5px; padding: 7px 14px; border-radius: 8px;
  background: rgba(0, 184, 245, 0.1); /* Було: rgba(0, 212, 199, 0.1) */
  border: 1px solid rgba(0, 184, 245, 0.3); /* Було: rgba(0, 212, 199, 0.3) */
  color: var(--c-blue); /* Було: var(--c-cyan) */
}
.about-panel {
  background: var(--c-graphite-soft); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-l); padding: 32px;
}
.about-metric { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.about-metric:last-child { border-bottom: none; }
.about-metric b { font-family: var(--font-display); font-size: 26px; color: var(--c-blue); }
.about-metric span { color: rgba(255,255,255,0.6); font-size: 13.5px; text-align: right; max-width: 200px; }

/* =========================================================
   Переваги
   ========================================================= */
.perks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.perk-card { background: var(--c-card); border-radius: var(--radius-m); padding: 28px; border: 1px solid var(--c-border); }
.perk-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(0,184,245,0.1); display: flex; align-items: center; justify-content: center; color: var(--c-blue); margin-bottom: 18px; }
.perk-card h4 { font-size: 17px; }
.perk-card p { margin-top: 10px; color: var(--c-text-muted); font-size: 14.5px; }

/* =========================================================
   Контакти
   ========================================================= */
.contacts { background: linear-gradient(180deg, var(--c-bg), #ECF1F4); }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card {
  background: var(--c-card); border-radius: var(--radius-l); padding: 30px;
  border: 1px solid var(--c-border); display: flex; align-items: center; gap: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.contact-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-icon.phone { background: rgba(0,184,245,0.12); color: var(--c-blue); }
.contact-icon.viber { background: rgba(139,92,246,0.12); color: #7C5CFC; }
.contact-icon.telegram { background: rgba(0,212,199,0.12); color: var(--c-cyan); }
.contact-card h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text-muted); font-family: var(--font-mono); font-weight: 500; }
.contact-card strong { display: block; margin-top: 4px; font-size: 18px; font-family: var(--font-display); }

.cta-panel {
  grid-column: 1 / -1;
  background: var(--c-graphite);
  border-radius: var(--radius-l);
  padding: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-panel h3 { color: #fff; font-size: 24px; max-width: 420px; }
.cta-panel p { color: rgba(255,255,255,0.6); margin-top: 10px; max-width: 420px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--c-graphite); color: rgba(255,255,255,0.55); padding: 46px 0 28px; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 28px; padding-bottom: 32px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-links h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 14px; }
.footer-links a { display: block; font-size: 14px; margin-bottom: 10px; color: rgba(255,255,255,0.75); }
.footer-links a:hover { color: var(--c-blue); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; flex-wrap: wrap; gap: 10px; }

/* =========================================================
   Модалка товару
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius-l); max-width: 760px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 0; position: relative;
}
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(15,23,42,0.06); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5;
}
.modal-gallery { position: relative; background: #EAF2F6; }
.modal-gallery img { 
  width: 100%; 
  height: 340px; 
  object-fit: contain; /* Було cover */
}
.modal-gallery .no-photo { height: 220px; display: flex; align-items: center; justify-content: center; color: #A9B7C3; font-family: var(--font-mono); font-size: 13px; }
.modal-gallery-nav { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.modal-gallery-nav button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.5); cursor: pointer; padding: 0; }
.modal-gallery-nav button.active { background: #fff; width: 22px; border-radius: 5px; }
.modal-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,0.85); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-arrow.left { left: 14px; } .modal-arrow.right { right: 14px; }
.modal-content { padding: 32px; }
.modal-content h3 { font-size: 24px; margin-bottom: 14px; }
.modal-content p { color: var(--c-text-muted); font-size: 15px; white-space: pre-line; }
.modal-video { margin-top: 22px; aspect-ratio: 16/9; border-radius: var(--radius-m); overflow: hidden; background: #000; }
.modal-video iframe { width: 100%; height: 100%; border: none; }
.modal-cta { margin-top: 26px; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 980px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-actions .btn-outline { display: none; }
  .burger { display: block; }
  .section { padding: 64px 0; }
  .hero { padding: 128px 0 80px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .perks-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .footer-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--c-blue); outline-offset: 2px;
}

/* =========================================================
   FAQ (Liquid Glass)
   ========================================================= */
.faq-section {
  position: relative;
  overflow: hidden; /* Щоб плями не вилазили за межі екрану */
  background: var(--c-bg);
}

/* Кольорові плями під склом */
.faq-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.65;
  pointer-events: none;
}
.faq-blob-1 {
  width: 500px; height: 500px;
  background: rgba(0, 184, 245, 0.18); /* Синій відтінок */
  top: -100px; right: 5%;
}
.faq-blob-2 {
  width: 400px; height: 400px;
  background: rgba(0, 212, 199, 0.15); /* Бірюзовий відтінок */
  bottom: 0; right: 35%;
}

.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr; /* Ліворуч менше, праворуч більше */
  gap: 60px;
  position: relative;
  z-index: 1; /* Поверх плям */
}

.faq-head {
  position: sticky;
  top: 120px; /* Прилипає при скролі */
  align-self: start;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Ефект Liquid Glass */
.faq-item.liquid-glass {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-l);
  padding: 24px 30px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
  transition: all 0.3s ease;
}

.faq-item.liquid-glass:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
}

.faq-item.liquid-glass summary {
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 48px;
  outline: none;
  color: var(--c-graphite);
}

.faq-item.liquid-glass summary::-webkit-details-marker { display: none; }

/* Кастомна іконка стрілочки */
.faq-item.liquid-glass summary::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background-color: #fff;
  border: 1px solid rgba(0, 184, 245, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%2300B8F5" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6"/></svg>');
  background-position: center;
  background-size: 16px;
  background-repeat: no-repeat;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.faq-item.liquid-glass[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
  background-color: var(--c-blue);
  border-color: var(--c-blue);
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%23FFFFFF" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6"/></svg>');
}

.faq-content {
  margin-top: 16px;
  color: var(--c-text-muted);
  font-size: 15.5px;
  line-height: 1.6;
}

/* Адаптив під мобільні пристрої */
@media (max-width: 980px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .faq-head {
    position: relative;
    top: 0;
  }
}
