/* Deiiweb — Modern Engineering + theme system */

:root,
[data-theme='dark'] {
  color-scheme: dark;

  --tw-surface: 20 24 32;
  --tw-surface-raised: 28 33 45;
  --tw-surface-muted: 38 45 60;
  --tw-ink: 241 245 249;
  --tw-ink-muted: 156 170 188;
  --tw-ink-faint: 112 128 150;
  --tw-electric: 0 102 255;
  --tw-electric-soft: 51 133 255;
  --tw-electric-dim: 0 85 204;
  --tw-ink-heading: 226 236 255;
  --tw-line: 255 255 255;
  --tw-line-strong: 255 255 255;

  --surface: #141820;
  --surface-raised: #1c212d;
  --surface-muted: #262d3c;
  --electric: #0066ff;
  --electric-soft: #3385ff;
  --electric-dim: #0055cc;
  --ink: #f1f5f9;
  --ink-muted: #9caabc;
  --ink-heading: #e2ecff;
  --header-bg: rgba(20, 24, 32, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-ui: rgba(255, 255, 255, 0.13);
  --border-ui-hover: rgba(255, 255, 255, 0.3);
  --fill-soft: rgba(255, 255, 255, 0.03);
  --fill-hover: rgba(255, 255, 255, 0.05);
  --service-hover: #232938;
  --grid-line: rgba(255, 255, 255, 0.045);
  --quiz-option-bg: rgba(20, 24, 32, 0.5);
  --quiz-panel-bg: linear-gradient(180deg, rgba(0, 102, 255, 0.1), rgba(28, 33, 45, 0.94));
  --trust-bg: linear-gradient(180deg, rgba(0, 102, 255, 0.09), rgba(255, 255, 255, 0.03));
  --hero-atmosphere:
    radial-gradient(ellipse 80% 55% at 70% -10%, rgba(0, 102, 255, 0.24), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 80%, rgba(0, 85, 204, 0.14), transparent 50%),
    linear-gradient(180deg, #141820 0%, #171c26 45%, #1c212d 100%);
  --case-visual:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(0, 102, 255, 0.14), transparent 55%),
    linear-gradient(135deg, rgba(28, 36, 51, 0.35) 0%, rgba(28, 33, 45, 0.2) 55%, transparent 100%);
  --case-visual-overlay:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(0, 102, 255, 0.2), transparent 55%),
    linear-gradient(135deg, rgba(20, 24, 32, 0.28) 0%, rgba(28, 33, 45, 0.14) 50%, transparent 100%);
  --band-stats: linear-gradient(135deg, rgba(0, 102, 255, 0.16) 0%, rgba(28, 33, 45, 0.55) 55%, #1c212d 100%);
  --band-services: #1c212d;
  --band-value: linear-gradient(160deg, rgba(0, 102, 255, 0.14) 0%, rgba(20, 24, 32, 0.92) 60%, #141820 100%);
  --band-case: linear-gradient(180deg, #1a2233 0%, #1c212d 100%);
  --band-team: #141820;
  --band-legal: linear-gradient(160deg, rgba(0, 102, 255, 0.1) 0%, #1c212d 70%);
  --band-contact: #141820;
  --card-shadow: 0 10px 30px rgba(0, 102, 255, 0.12);
  --card-shadow-hover: 0 14px 40px rgba(0, 102, 255, 0.22);
  --theme-meta: #141820;
}

[data-theme='light'] {
  color-scheme: light;

  --tw-surface: 247 248 250;
  --tw-surface-raised: 255 255 255;
  --tw-surface-muted: 238 241 246;
  --tw-ink: 15 23 42;
  --tw-ink-muted: 71 85 105;
  --tw-ink-faint: 100 116 139;
  --tw-electric: 0 102 255;
  --tw-electric-soft: 0 102 255;
  --tw-electric-dim: 0 85 204;
  --tw-ink-heading: 10 31 68;
  --tw-line: 15 23 42;
  --tw-line-strong: 15 23 42;

  --surface: #f7f8fa;
  --surface-raised: #ffffff;
  --surface-muted: #eef1f6;
  --electric: #0066ff;
  --electric-soft: #3385ff;
  --electric-dim: #0055cc;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-heading: #0a1f44;
  --header-bg: rgba(247, 248, 250, 0.86);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-ui: rgba(15, 23, 42, 0.12);
  --border-ui-hover: rgba(15, 23, 42, 0.28);
  --fill-soft: rgba(15, 23, 42, 0.02);
  --fill-hover: rgba(15, 23, 42, 0.04);
  --service-hover: #f3f7ff;
  --grid-line: rgba(15, 23, 42, 0.06);
  --quiz-option-bg: rgba(255, 255, 255, 0.85);
  --quiz-panel-bg: linear-gradient(180deg, rgba(0, 102, 255, 0.08), rgba(255, 255, 255, 0.96));
  --trust-bg: linear-gradient(180deg, rgba(0, 102, 255, 0.07), rgba(15, 23, 42, 0.02));
  --hero-atmosphere:
    radial-gradient(ellipse 80% 55% at 70% -10%, rgba(0, 102, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 80%, rgba(0, 102, 255, 0.07), transparent 50%),
    linear-gradient(135deg, rgba(230, 240, 255, 0.55) 0%, rgba(247, 248, 250, 0.9) 42%, #ffffff 100%);
  --case-visual:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(0, 102, 255, 0.1), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.04) 50%, transparent 100%);
  --case-visual-overlay:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(0, 102, 255, 0.14), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.06) 45%, transparent 100%);
  --band-stats: linear-gradient(135deg, #e6f0ff 0%, #ffffff 100%);
  --band-services: #ffffff;
  --band-value: #f0f5ff;
  --band-case: linear-gradient(180deg, #eaf1ff 0%, #f5f7fb 100%);
  --band-team: #ffffff;
  --band-legal: #f0f5ff;
  --band-contact: linear-gradient(180deg, #eef4ff 0%, #f7f8fa 100%);
  --card-shadow: 0 10px 30px rgba(0, 102, 255, 0.08);
  --card-shadow-hover: 0 14px 40px rgba(0, 102, 255, 0.16);
  --theme-meta: #f7f8fa;
}

/* Theme-aware borders/dividers (override Tailwind utilities) */
.border-line,
.border-line-strong {
  border-color: var(--border-subtle) !important;
}

.bg-line {
  background-color: var(--border-subtle) !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--surface);
  color: var(--ink);
  transition: background-color 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-ui);
  color: var(--ink-muted);
  background: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--border-ui-hover);
  background: var(--fill-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}

[data-theme='dark'] .theme-icon-moon,
[data-theme='light'] .theme-icon-sun {
  display: none;
}

[data-theme='dark'] .theme-icon-sun,
[data-theme='light'] .theme-icon-moon {
  display: block;
}

/* Header */
.site-header {
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--electric);
  color: #fff;
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: var(--electric-dim);
  box-shadow: 0 0 0 1px rgba(0, 102, 255, 0.4), 0 10px 32px rgba(0, 102, 255, 0.32);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-lg {
  padding: 0.95rem 1.5rem;
  font-size: 0.95rem;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-ui);
  color: var(--ink-muted);
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--border-ui-hover);
  background: var(--fill-hover);
}

/* Hero */
.hero-atmosphere {
  position: absolute;
  inset: 0;
  background: var(--hero-atmosphere);
  transition: background 0.3s ease;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  animation: grid-drift 28s linear infinite;
  opacity: 0.7;
}

.hero-glow {
  position: absolute;
  width: min(520px, 80vw);
  height: min(520px, 80vw);
  right: -8%;
  top: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.18) 0%, transparent 70%);
  filter: blur(8px);
  animation: glow-pulse 7s ease-in-out infinite;
  pointer-events: none;
}

[data-theme='light'] .hero-glow {
  background: radial-gradient(circle, rgba(0, 102, 255, 0.14) 0%, transparent 70%);
}

@keyframes grid-drift {
  from { transform: translateY(0); }
  to { transform: translateY(64px); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.06); }
}

.hero-brand,
.hero-title,
.hero-lead,
.hero-actions {
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-brand { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.22s; }
.hero-lead { animation-delay: 0.36s; }
.hero-actions { animation-delay: 0.48s; }

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7.25rem, 38%);
  grid-template-areas:
    'brand brand'
    'title visual'
    'lead lead'
    'actions actions';
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 1rem;
}

.hero-brand { grid-area: brand; }
.hero-title { grid-area: title; margin: 0; }
.hero-visual { grid-area: visual; }
.hero-lead { grid-area: lead; margin: 0; }
.hero-actions { grid-area: actions; margin-top: 0.35rem; }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 102, 255, 0.16));
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

@media (min-width: 640px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 34%);
    column-gap: 1.25rem;
    row-gap: 1.25rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas:
      'brand visual'
      'title visual'
      'lead visual'
      'actions visual';
    column-gap: 2.5rem;
    row-gap: 0;
    align-items: center;
  }

  .hero-brand {
    margin-bottom: 1.25rem;
  }

  .hero-title {
    margin-bottom: 1.5rem;
    font-size: 4rem;
  }

  .hero-lead {
    margin-bottom: 2.5rem;
  }

  .hero-visual {
    align-self: center;
    justify-content: flex-end;
  }

  .hero-visual img {
    max-width: 34rem;
    filter: drop-shadow(0 24px 48px rgba(0, 102, 255, 0.18));
  }
}

/* Intro media: desktop — справа от текста; mobile — под текстом */
.section-intro-row {
  position: relative;
}

.section-intro-row .section-intro {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  width: 100%;
}

.intro-media.is-ready {
  display: block;
  position: relative;
  z-index: 0;
  width: min(100%, 16rem);
  max-height: 14rem;
  margin: 1.5rem auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}

.intro-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 14rem;
  object-fit: contain;
  object-position: center;
  background: transparent;
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.14));
}

@media (min-width: 1024px) {
  .intro-media.is-ready {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(42rem + 1.25rem);
    right: 0;
    width: auto;
    max-height: none;
    margin: 0;
  }

  .intro-media img {
    max-height: none;
    object-position: right center;
    filter: drop-shadow(0 16px 36px rgba(15, 23, 42, 0.16));
  }
}

[data-theme='dark'] .intro-media img {
  /* Чисто чёрный фон «растворяется»; свечение и объект остаются */
  mix-blend-mode: screen;
  filter: drop-shadow(0 14px 32px rgba(0, 102, 255, 0.24));
}

@media (min-width: 1024px) {
  [data-theme='dark'] .intro-media img {
    filter: drop-shadow(0 18px 42px rgba(0, 102, 255, 0.28));
  }
}

/* Пустой слот не занимает место и не ломает загрузку соседних */
.drop-slot:not(.is-ready) {
  display: none;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stats */
.stat-item {
  padding-block: 0.25rem;
  border-left: 3px solid rgba(0, 102, 255, 0.55);
  padding-left: 1rem;
}

.stat-item .font-display {
  color: var(--ink-heading);
}

/* Services */
.services-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .services-toolbar {
    flex-direction: row;
    align-items: center;
  }
}

.services-toolbar .services-tablist {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.services-view-toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border-ui);
  border-radius: 0.6rem;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

@media (min-width: 768px) {
  .services-view-toggle {
    align-self: center;
  }
}

.services-view-toggle:hover {
  color: var(--ink);
  border-color: var(--border-ui-hover);
  background: var(--fill-hover);
}

.services-view-toggle:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}

[data-services-view='grid'] .view-icon-grid,
[data-services-view='list'] .view-icon-list {
  display: none;
}

.services-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  background: transparent;
  border: 0;
}

@media (min-width: 640px) {
  [data-services-view='grid'] .services-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  [data-services-view='grid'] .services-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

[data-services-view='list'] .services-list {
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.service-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(0, 102, 255, 0.12);
  border-radius: 1rem;
  background: var(--surface-raised);
  box-shadow: var(--card-shadow);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.service-item:hover {
  background: var(--service-hover);
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: var(--card-shadow-hover);
  transform: scale(1.01);
}

.service-pages {
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
}

.service-page {
  display: none;
}

.service-page.is-active {
  display: block;
  animation: service-page-in 0.28s ease;
}

@keyframes service-page-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.service-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.service-pager {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.service-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border-ui);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.service-pager-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--border-ui-hover);
  background: var(--fill-hover);
}

.service-pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.service-pager-status {
  min-width: 2.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.service-link {
  margin-left: auto;
}

[data-services-view='list'] .service-item {
  display: block;
  height: auto;
  padding: 1rem 1.2rem;
  border-radius: 0.85rem;
}

[data-services-view='list'] .service-item:hover {
  transform: none;
}

[data-services-view='list'] .service-item h3 {
  display: inline;
  margin: 0;
  font-size: 1rem;
}

[data-services-view='list'] .service-label {
  display: inline;
  margin: 0 0 0 0.45rem;
}

[data-services-view='list'] .service-desc {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
}

[data-services-view='list'] .service-price {
  display: inline-block;
  margin: 0.55rem 1rem 0 0;
  font-size: 1.05rem;
}

[data-services-view='list'] .service-footer {
  margin-top: 0.55rem;
}

[data-services-view='list'] .service-link {
  margin-left: 0;
}

.services-tablist {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem;
  overflow: visible;
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  background: var(--fill-soft);
}

@media (min-width: 768px) {
  .services-tablist {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .services-tablist::-webkit-scrollbar {
    display: none;
  }
}

.services-tab {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--ink-muted);
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .services-tab {
    width: auto;
    min-width: max-content;
    text-align: center;
  }
}

.services-tab:hover {
  color: var(--ink);
}

.services-tab.is-active {
  background: var(--electric);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 102, 255, 0.3);
}

.services-tab:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}

.services-panel[hidden] {
  display: none;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.services-list .service-item.reveal:nth-child(2) { transition-delay: 0.08s; }
.services-list .service-item.reveal:nth-child(3) { transition-delay: 0.16s; }
.services-list .service-item.reveal:nth-child(4) { transition-delay: 0.24s; }

/* Trust strip */
.trust-strip {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  background: var(--trust-bg);
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .trust-strip {
    padding: 1.5rem 1.75rem;
  }
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.trust-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: rgba(0, 102, 255, 0.12);
  color: var(--electric);
}

/* Compare */
.compare-highlight {
  position: relative;
  background: rgba(0, 102, 255, 0.06) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 102, 255, 0.5);
}

.usp-item {
  border: 1px solid rgba(0, 102, 255, 0.14);
  border-radius: 0.875rem;
  padding: 1.1rem 1.2rem;
  background: rgba(0, 102, 255, 0.04);
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.05);
}

/* Case */
.case-visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--surface-muted);
}

.case-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--case-visual);
  pointer-events: none;
}

.case-visual:has(.case-visual-media.is-ready)::after {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.35) 42%, transparent 72%),
    linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.45) 100%),
    var(--case-visual-overlay);
}

.case-visual-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
}

.case-visual-media.is-ready {
  display: block;
}

.case-visual-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(2px);
  transform: scale(1.03);
  transform-origin: center;
}

.case-visual-content {
  position: relative;
  z-index: 2;
}

.case-visual:has(.case-visual-media.is-ready) .case-visual-content {
  color: #f8fafc;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.case-visual:has(.case-visual-media.is-ready) .case-visual-content .text-electric {
  color: #93c5fd;
}

.case-visual:has(.case-visual-media.is-ready) .case-visual-content .text-ink {
  color: #f8fafc;
}

/* Team */
.team-card {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.team-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.85rem;
  background: rgba(0, 102, 255, 0.14);
  color: var(--electric);
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.team-avatar::before {
  content: attr(data-initials);
}

.team-avatar.is-ready::before {
  display: none;
}

.team-avatar img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-avatar.is-ready img {
  display: block;
}

/* Legal */
.legal-card {
  border: 1px solid rgba(0, 102, 255, 0.14);
  border-radius: 1rem;
  padding: 1.5rem;
  background: rgba(0, 102, 255, 0.04);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.legal-card:hover {
  border-color: rgba(0, 102, 255, 0.28);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

/* Quiz */
.quiz-panel {
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  background: var(--quiz-panel-bg);
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .quiz-panel {
    padding: 2rem;
  }
}

.quiz-progress {
  height: 3px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-subtle);
}

.quiz-progress-bar {
  display: block;
  height: 100%;
  width: 33.333%;
  border-radius: inherit;
  background: var(--electric);
  transition: width 0.35s ease;
}

.quiz-progress-bar[data-progress='2'] { width: 66.666%; }
.quiz-progress-bar[data-progress='3'] { width: 100%; }

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-ui);
  border-radius: 0.75rem;
  background: var(--quiz-option-bg);
  color: var(--ink-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.quiz-option:hover {
  border-color: rgba(0, 102, 255, 0.45);
  color: var(--ink);
}

.quiz-option:has(input:checked) {
  border-color: var(--electric);
  background: rgba(0, 102, 255, 0.12);
  color: var(--ink);
}

.quiz-option input {
  accent-color: var(--electric);
}

.quiz-step[hidden] {
  display: none;
}

/* Mobile menu */
.mobile-menu[hidden] {
  display: none;
}

.menu-toggle[aria-expanded='true'] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded='true'] .icon-close {
  display: block;
}

/* —— Bonus page —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bonus-hero {
  min-height: auto;
}

.bonus-slots {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 36rem;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--electric);
  background: linear-gradient(90deg, rgba(0, 102, 255, 0.1), transparent 85%);
}

.bonus-slots-icon {
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--electric);
}

.bonus-steps {
  list-style: none;
  counter-reset: bonus-step;
  padding: 0;
}

.bonus-steps li {
  position: relative;
  padding-left: 2.5rem;
  counter-increment: bonus-step;
}

.bonus-steps li::before {
  content: counter(bonus-step);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  background: rgba(0, 102, 255, 0.14);
  color: var(--electric);
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
}

.bonus-list {
  list-style: none;
  padding: 0;
}

.bonus-list li {
  position: relative;
  padding-left: 1.25rem;
}

.bonus-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--electric);
}

.bonus-terms {
  list-style: none;
  counter-reset: bonus-term;
  padding: 0;
}

.bonus-terms > li {
  position: relative;
  padding-left: 3rem;
  counter-increment: bonus-term;
}

.bonus-terms > li::before {
  content: counter(bonus-term);
  position: absolute;
  left: 0;
  top: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--electric);
  line-height: 1.2;
}

.bonus-form {
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  background: var(--quiz-panel-bg);
}

@media (min-width: 768px) {
  .bonus-form {
    padding: 2rem;
  }
}

.bonus-check {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border-ui);
  border-radius: 0.85rem;
  background: var(--quiz-option-bg);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bonus-check:hover {
  border-color: rgba(0, 102, 255, 0.45);
}

.bonus-check:has(input:checked) {
  border-color: var(--electric);
  background: rgba(0, 102, 255, 0.12);
}

.bonus-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.bonus-check-box {
  position: relative;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border: 1.5px solid var(--border-ui-hover);
  border-radius: 0.3rem;
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bonus-check:has(input:checked) .bonus-check-box {
  border-color: var(--electric);
  background: var(--electric);
}

.bonus-check:has(input:checked) .bonus-check-box::after {
  content: '';
  position: absolute;
  left: 0.28rem;
  top: 0.08rem;
  width: 0.35rem;
  height: 0.65rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.bonus-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.bonus-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-ui);
  border-radius: 0.75rem;
  background: var(--quiz-option-bg);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bonus-input::placeholder {
  color: var(--ink-faint);
}

.bonus-input:focus {
  outline: none;
  border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18);
}

.bonus-textarea {
  resize: vertical;
  min-height: 7rem;
}

.bonus-file {
  position: relative;
  padding: 1.25rem 1rem;
  border: 1px dashed var(--border-ui);
  border-radius: 0.85rem;
  background: var(--fill-soft);
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bonus-file:hover {
  border-color: rgba(0, 102, 255, 0.45);
  background: rgba(0, 102, 255, 0.04);
}

.bonus-file input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.btn-primary.is-loading,
.btn-primary:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.form-status.is-success {
  color: #059669;
}

.form-status.is-error {
  color: #dc2626;
}

.form-status.is-info {
  color: var(--ink-muted);
}

[data-theme='dark'] .form-status.is-success {
  color: #34d399;
}

[data-theme='dark'] .form-status.is-error {
  color: #f87171;
}

/* —— Visual rhythm: section bands & accent polish —— */
main > section {
  position: relative;
}

.section-intro h2,
main section > .mx-auto > .reveal > h2,
main section > .mx-auto > div > h2 {
  color: var(--ink-heading) !important;
}

.team-card h3,
.legal-card h3,
.service-item h3 {
  color: var(--ink-heading);
}

section[aria-label='Показатели доверия'] {
  background: var(--band-stats) !important;
}

#services {
  background: var(--band-services) !important;
}

#value {
  background: var(--band-value) !important;
}

#case {
  background: var(--band-case) !important;
}

#team {
  background: var(--band-team) !important;
}

#legal {
  background: var(--band-legal) !important;
}

#contact {
  background: var(--band-contact) !important;
}

/* Soft accent rail between bands (light theme) */
[data-theme='light'] main > section:not(.hero)::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 102, 255, 0.22) 20%,
    rgba(0, 102, 255, 0.08) 50%,
    rgba(0, 102, 255, 0.22) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.team-card {
  border-top-color: rgba(0, 102, 255, 0.2);
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: 1rem;
  background: rgba(0, 102, 255, 0.03);
  border: 1px solid rgba(0, 102, 255, 0.1);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.team-card:hover {
  border-color: rgba(0, 102, 255, 0.28);
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.case-block {
  box-shadow: var(--card-shadow);
  border-color: rgba(0, 102, 255, 0.16) !important;
}

/* Case slider */
.case-slider-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
}

.case-nav {
  display: flex;
  align-items: center;
}

.case-nav--top {
  flex-shrink: 0;
  gap: 0.5rem;
  margin-left: auto;
  padding-top: 0.15rem;
}

@media (min-width: 768px) {
  .case-nav--top {
    padding-top: 2.15rem;
  }
}

.case-slider-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}

.case-source {
  margin: 0;
  min-width: 0;
  flex: 1 1 12rem;
}

.case-source a {
  color: var(--electric);
}

.case-source a:hover {
  text-decoration: underline;
}

.case-nav--bottom {
  flex-shrink: 0;
  justify-content: center;
  gap: 0.55rem;
  margin-left: auto;
}

.case-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.case-arrow svg {
  width: 1.15rem;
  height: 1.15rem;
}

.case-arrow:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

.case-arrow:active:not(:disabled) {
  transform: translateY(1px);
}

.case-arrow:disabled {
  opacity: 0.38;
  cursor: default;
}

.case-arrow--ghost {
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--border-ui);
  border-radius: 0.7rem;
  background: transparent;
  color: var(--ink-muted);
}

.case-arrow--ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--border-ui-hover);
  background: var(--fill-hover);
}

.case-arrow--filled {
  width: 2.85rem;
  height: 2.85rem;
  border: 0;
  border-radius: 999px;
  background: var(--electric);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 102, 255, 0.28);
}

.case-arrow--filled:hover:not(:disabled) {
  background: var(--electric-dim);
  box-shadow: 0 10px 28px rgba(0, 102, 255, 0.38);
}

.case-arrow--filled:disabled {
  background: var(--surface-muted);
  color: var(--ink-faint);
  box-shadow: none;
}

.case-pager {
  display: flex;
  align-items: center;
  gap: 0.15rem 0.35rem;
  font-family: Manrope, Inter, sans-serif;
}

.case-pager-btn {
  min-width: 2rem;
  padding: 0.2rem 0.35rem;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.case-pager-btn:hover {
  color: var(--ink);
}

.case-pager-btn.is-active {
  color: var(--electric);
}

.case-pager-btn:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.case-pager-sep {
  color: var(--ink-faint);
  font-size: 0.7rem;
  opacity: 0.7;
  pointer-events: none;
}

.case-slider-viewport {
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
}

.case-slider-viewport:focus-visible {
  box-shadow: 0 0 0 2px var(--electric);
  border-radius: 1.15rem;
}

.case-slider-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.case-slide {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
}

.case-slide img {
  -webkit-user-drag: none;
  user-select: none;
}

