:root {
  --bg-dark: #020617;
  --bg-section: #020b17;
  --accent: #0782a1;
  --accent-soft: #0a9fc4;
  --accent-soft2: #22c1c3;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-soft: rgba(148, 163, 184, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  scroll-behavior: smooth;
}

/* Фон — лёгкая динамическая сетка */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 0 0, rgba(7, 130, 161, 0.2), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 193, 195, 0.24), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
  z-index: -3;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(15, 23, 42, 0.9) 40%,
    rgba(15, 23, 42, 0.95) 100%
  );
  z-index: -2;
}

.tech-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.65) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.65) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

/* NAVBAR */

.navbar {
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar-brand span {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.navbar-brand small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5f5 !important;
  border-radius: 999px;
  padding: 0.4rem 0.9rem !important;
}

.nav-link:hover {
  background: rgba(7, 130, 161, 0.22);
  color: #f9fafb !important;
}

/* HERO */

.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-soft);
}

.hero-title {
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: #cbd5f5;
}

.hero-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.hero-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.hero-list i {
  color: var(--accent-soft);
}

.hero-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper img {
  border-radius: 20px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.85);
}

.hero-chip {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  backdrop-filter: blur(12px);
}

.hero-chip-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #e0f2fe, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #02131a;
  font-size: 0.9rem;
}

/* Кнопки */

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft2));
  border-color: var(--accent);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-soft2), var(--accent));
  border-color: var(--accent-soft2);
}

.btn-outline-primary {
  border-color: var(--accent-soft);
  color: #e5e7eb;
}

.btn-outline-primary:hover {
  background: var(--accent-soft);
  color: #020617;
}

/* Общие секции */

section {
  padding: 72px 0;
}

.section-title {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 700;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.bg-section {
  background-color: var(--bg-section);
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.85);
}

/* Services */

.service-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-body {
  padding: 14px 16px 16px;
}

.service-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #e0f2fe, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #02131a;
  font-size: 1rem;
  margin-bottom: 6px;
}

.service-title {
  font-size: 1rem;
  font-weight: 600;
}

/* Pricing */

.pricing-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 16px 16px 18px;
  height: 100%;
}

.pricing-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.pricing-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-soft2);
}

.pricing-card ul {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Process */

.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 4px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
}

.timeline-dot {
  position: absolute;
  left: 8px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid #020617;
  box-shadow: 0 0 0 3px rgba(7, 130, 161, 0.3);
}

/* Portfolio */

.gallery-grid .gallery-item {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(37, 99, 235, 0.6);
}

.gallery-grid .gallery-item img,
.gallery-grid .gallery-item video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-grid .gallery-item:hover img,
.gallery-grid .gallery-item:hover video {
  transform: scale(1.05);
  opacity: 0.9;
}

.gallery-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Модалка галереи */

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9990;
}

.gallery-modal.open {
  display: flex;
}

.gallery-modal-inner {
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-modal-img,
.gallery-modal-video {
  max-width: 96vw;
  max-height: 75vh;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  background: #000;
}

.gallery-modal-caption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #e5e7eb;
  text-align: center;
}

.gallery-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  color: #e5e7eb;
  cursor: pointer;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  cursor: pointer;
}

.gallery-prev {
  left: 18px;
}

.gallery-next {
  right: 18px;
}

/* Contacts */

.contacts-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  padding: 16px 16px 18px;
}

/* Footer */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 16px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Cookie / consent */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 998;
  max-width: 520px;
  margin: 0 auto;
}

/* Кейсы (сайты-кейсы) */

.case-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 12px 12px 14px;
  height: 100%;
}

.case-thumb {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.6);
  margin-bottom: 8px;
}

.case-thumb img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.case-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.case-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Модалка кейсов (iframe-превью) */

.case-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.96);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9995;
}

.case-modal.open {
  display: flex;
}

.case-modal-inner {
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  padding: 40px 20px 20px;
  display: flex;
  flex-direction: column;
}

.case-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e5e7eb;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.case-modal-iframe {
  flex: 1;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  width: 100%;
  background: #000;
}

.case-close {
  font-size: 1.8rem;
  cursor: pointer;
}

/* Мобильные */

@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 96px;
  }
}

@media (max-width: 575.98px) {
  .hero-image-wrapper img {
    height: auto;
  }
  .case-thumb img {
    height: 150px;
  }
}
