:root {
  --bg-color: #05060a;
  --bg-alt-color: #111319;
  --card-bg: #171922;
  --text-color: #f4f5f7;
  --muted-color: #c0c4cf;
  --brand-color: #38bdf8;
  --accent-color: #0d6efd;
  --accent-soft: rgba(13, 110, 253, 0.18);
  --border-color: #2f3440;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.55);
  --transition-fast: 0.12s;
  --transition-medium: 0.25s;
  --transition-slow: 0.4s;
  --btn-shadow: 0 10px 30px rgba(13, 110, 253, 0.12);
  --scroll-padding-top: 68px;
}

body[data-theme="light"] {
  --bg-color: #f5f7fb;
  --bg-alt-color: #ffffff;
  --card-bg: #ffffff;
  --text-color: #1e2125;
  --muted-color: #374151;
  --accent-color: #0d6efd;
  --accent-soft: rgba(13, 110, 253, 0.08);
  --border-color: #dde1eb;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.15);
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-top: 68px;
}

/* Allow browser to offset anchored scrolling by navbar height */
html {
  scroll-padding-top: var(--scroll-padding-top, 68px);
  scroll-behavior: smooth;
}

.btn {
  border-radius: 50px;
}

.skip-link:focus {
  left: 10px;
  outline: 3px solid #fff;
  color: var(--bg-color);
}

/* NAVBAR */
.navbar-custom {
  background: rgba(5, 6, 10, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

body[data-theme="light"] .navbar-custom {
  background: rgba(245, 247, 251, 0.96);
  border-bottom-color: rgba(148, 163, 184, 0.45);
}

/* Ensure nav link color in light theme meets contrast requirements */
body[data-theme="light"] .navbar-custom .nav-link {
  color: #374151;
}

.navbar-custom .navbar-brand {
  letter-spacing: 0.14em;
  font-size: 1.7rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-color);
}

.navbar-custom .navbar-brand:hover {
  color: var(--accent-color);
}

.navbar-custom .nav-link {
  color: var(--muted-color);
  font-weight: 500;
  padding-left: 1rem;
  padding-right: 1rem;
  transition: color var(--transition-fast) ease, transform var(--transition-fast) ease;
}

body[data-theme="dark"] .navbar-custom .navbar-brand {
  color: var(--brand-color);
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
  color: var(--accent-color);
}

.navbar-custom .nav-link.active {
  color: var(--accent-color);
}

.navbar-toggler {
  padding: 0 4px;
  border-color: rgba(148, 163, 184, 0.6);
}

.navbar-toggler-icon {
  position: relative;
}

body[data-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28229, 231, 235, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler-icon span {
  top: 50%;
  transform: translateY(-50%);
}

/* HERO */
.hero {
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 55%),
    radial-gradient(circle at bottom right, var(--accent-soft), transparent 55%), linear-gradient(135deg, #1b1f27 0%, #05060a 100%);
  padding: 80px 0 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

body[data-theme="light"] .hero {
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 55%),
    radial-gradient(circle at bottom right, var(--accent-soft), transparent 55%), linear-gradient(135deg, #ffffff 0%, #e9edf7 100%);
}

/* Hero with video background */
.hero--with-video {
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
}

.hero--with-video .hero-inner {
  position: relative;
  z-index: 3;
  padding: 80px 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transform: translateZ(0);
}

/* overlay for readability */
.hero--with-video::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(6, 10, 18, 0.75);
  pointer-events: none;
}

/* make hero full viewport height minus navbar */
:root {
  --nav-height: 68px;
}
.hero--with-video {
  min-height: calc(100vh - var(--nav-height));
}

@media (max-width: 767.98px) {
  .hero--with-video .hero-inner {
    padding: 48px 0;
  }
  /* .hero__bg { display: none; } */
  .hero--with-video::before {
    background: rgba(6, 10, 18, 0.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg {
    display: none;
  }
}

.hero-wrapper {
  background-size: cover;
  background-position: center;
}

.hero-inner h1 {
  font-size: 2.4rem;
  font-weight: 700;
}

.hero-inner .lead {
  color: var(--text-color);
  font-size: 1.1rem;
}

body[data-theme="light"] .hero--with-video .hero-inner,
body[data-theme="light"] .hero--with-video .hero-inner .lead {
  color: #fbfcfc !important;
}

/* badge */
.badge-accent {
  background: rgba(13, 110, 253, 0.12);
  color: var(--accent-color);
  border: 1px solid rgba(13, 110, 253, 0.45);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 1.5rem;
}

/* sections */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--bg-alt-color);
}

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-color);
}

/* cards */
.feature-card,
.trust-card,
.review-card {
  background: var(--card-bg);
  border-radius: 18px;
  border: 1px solid var(--border-color);
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.feature-card:hover,
.trust-card:hover,
.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  border-color: var(--accent-color);
}

.feature-card,
.trust-card {
  text-align: center;
}

body[data-theme="light"] .feature-card:hover,
body[data-theme="light"] .trust-card:hover,
body[data-theme="light"] .review-card:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

/* icons */
.feature-icon {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(56, 189, 248, 0.06));
  transition: transform var(--transition-medium) ease, box-shadow var(--transition-medium) ease, background-color var(--transition-medium) ease;
}
.feature-icon i {
  font-size: 42px;
  color: var(--accent-color);
}
.feature-card:hover .feature-icon {
  transform: scale(1.08);
  box-shadow: 0 14px 30px rgba(13, 110, 253, 0.08);
}

.trust-icon {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(56, 189, 248, 0.04));
  transition: transform var(--transition-medium) ease, box-shadow var(--transition-medium) ease, background-color var(--transition-medium) ease;
}
.trust-icon i {
  font-size: 36px;
  color: var(--accent-color);
}
.trust-card:hover .trust-icon {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.08);
}

/* numeric/stat figure used in trust cards */
.trust-figure {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}

@media (max-width: 575.98px) {
  .badge-accent {
    font-size: 1rem;
  }
  .trust-figure {
    font-size: 1.05rem;
  }
}

/* client connection debug/info block (temporary) */
.client-conn {
  background: var(--card-bg);
  color: var(--muted-color);
  border-top: 1px solid var(--border-color);
  padding: 10px 14px;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 575.98px) {
  .client-conn {
    font-size: 0.85rem;
    padding: 8px 10px;
  }
}

/* contact */
.contact-list i {
  width: 25px;
  color: var(--accent-color);
}

.highlight {
  color: var(--accent-color);
  font-weight: 600;
}

/* footer */
.footer {
  padding: 18px 0 22px;
  text-align: center;
  color: var(--text-color);
  font-size: 0.9rem;
}

/* Theme toggle button */
.theme-toggle-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 6px 10px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

body[data-theme="light"] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.7);
}

.theme-toggle-btn i {
  font-size: 0.95rem;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* reviews */
.review-name {
  font-weight: 600;
}

.review-meta {
  font-size: 0.85rem;
  color: var(--muted-color);
}

.review-stars {
  color: #facc15;
  font-size: 0.9rem;
}

/* Buttons: subtle lift and shadow on hover, tactile press */
.btn {
  transition: transform var(--transition-medium) ease, box-shadow var(--transition-medium) ease, background-color var(--transition-fast) ease;
}
.btn:active {
  transform: translateY(1px) scale(0.995);
}
.btn:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}
.btn-primary {
  box-shadow: var(--btn-shadow);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 40px rgba(13, 110, 253, 0.16);
}
.btn-outline-contrast:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-outline-contrast {
  border-width: 1px;
  border-style: solid;
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: transparent;
}

.btn-outline-contrast:hover {
  background: var(--accent-color);
  color: #ffffff;
}

body[data-theme="dark"] .btn-outline-contrast {
  border-color: #e5e7eb;
  color: #e5e7eb;
}

body[data-theme="dark"] .btn-outline-contrast:hover {
  background: #e5e7eb;
  color: #111827;
}

/* responsive */
@media (max-width: 991.98px) {
  .hero {
    padding: 60px 0 50px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .theme-toggle-btn span {
    display: none;
  }
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;

  border: 1px solid var(--border);
  background: var(--accent-color);
  color: #fff;

  display: grid;
  place-items: center;

  box-shadow: var(--shadow-sm);
  cursor: pointer;

  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
  z-index: 1050;
}

.to-top:hover {
  filter: brightness(1.05);
  transform: translateY(0) scale(1.02);
}

.to-top:active {
  transform: translateY(0) scale(0.98);
}

.to-top:focus-visible {
  outline: none;
  box-shadow: var(--shadow-sm), var(--ring);
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.to-top__icon {
  width: 20px;
  height: 20px;
  transition: transform 0.18s ease;
}

.to-top:hover .to-top__icon {
  transform: translateY(-2px);
}

.to-top:active .to-top__icon {
  transform: translateY(0);
}

/* чуть ниже на совсем маленьких экранах, чтобы не мешать */
@media (max-width: 420px) {
  .to-top {
    right: 14px;
    bottom: 14px;
  }
}
