/* Fox Changer — статическая тема (замена собранного Next CSS). */
:root {
  --cc-bg: #050608;
  --cc-secondary: #16181d;
  --cc-gray: #9aa0a8;
  --cc-on-gradient: #0a0a0a;
  --cc-orange: #fb8c39;
  --cc-coral: #fe5340;
}

html {
  scroll-behavior: smooth;
}

body.cc-site {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  position: relative;
  isolation: isolate;
  color: #fff;
  min-height: 100vh;
  /* Базовый тёмный пласт + несколько radial «светящихся» пятен (как на citychange.digital) */
  background-color: #030406;
  background-image:
    radial-gradient(ellipse 120% 90% at 50% -30%, rgba(254, 83, 64, 0.34), transparent 58%),
    radial-gradient(ellipse 70% 55% at 102% 78%, rgba(250, 143, 56, 0.16), transparent 52%),
    radial-gradient(ellipse 55% 45% at -8% 92%, rgba(251, 140, 57, 0.1), transparent 48%),
    radial-gradient(ellipse 42% 35% at 78% 12%, rgba(254, 83, 64, 0.07), transparent 55%),
    linear-gradient(180deg, #0c0f14 0%, var(--cc-bg) 38%, #040508 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

@media (min-width: 1024px) {
  body.cc-site {
    background-attachment: fixed;
  }
}

/* SVG-линии: cover + простая маска (проценты с auto часто дают «пустой» фон в браузерах) */
body.cc-site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.98;
  background-image: url("../assets/bg-ribbon-waves.svg");
  background-repeat: no-repeat;
  background-position: center 28%;
  background-size: cover;
  mask-image: radial-gradient(
    ellipse 110% 85% at 50% 28%,
    rgb(0, 0, 0) 0%,
    rgb(0, 0, 0) 45%,
    transparent 82%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 110% 85% at 50% 28%,
    rgb(0, 0, 0) 0%,
    rgb(0, 0, 0) 45%,
    transparent 82%
  );
}

@media (prefers-reduced-motion: no-preference) {
  body.cc-site::before {
    animation: cc-bg-ribbons-breathe 14s ease-in-out infinite alternate;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.cc-site::before {
    animation: none;
  }
}

@keyframes cc-bg-ribbons-breathe {
  from {
    opacity: 0.86;
  }
  to {
    opacity: 0.98;
  }
}

/* Лёгкая виньетка по краям — объём без «грязи» посередине */
body.cc-site::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 82% 72% at 50% 42%,
    transparent 32%,
    rgba(3, 4, 6, 0.42) 100%
  );
}

body.cc-site > header,
body.cc-site > main,
body.cc-site > footer {
  position: relative;
  z-index: 1;
}

body.cc-site.bg-bg {
  background-color: transparent;
}

.bg-bg {
  background-color: var(--cc-bg);
}
.bg-secondary {
  background-color: var(--cc-secondary);
}
.text-gray-cc {
  color: var(--cc-gray);
}
/* Конфликт с Tailwind gray: в разметке используется класс text-gray как «приглушённый текст» */
.text-gray {
  color: var(--cc-gray) !important;
}
.text-bg {
  color: var(--cc-on-gradient);
}
.bg-gradient-button {
  background-image: linear-gradient(90deg, var(--cc-orange) 0%, #fe5940 100%);
}
.gradient-text {
  background: linear-gradient(90deg, var(--cc-coral), #fa8f38);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-lg-border-hover {
  transition: box-shadow 0.2s ease;
}
.gradient-lg-border-hover:hover {
  box-shadow: 0 0 0 1px rgba(254, 83, 64, 0.45), 0 0 40px rgba(250, 143, 56, 0.08);
}

.gradient-border {
  box-shadow: inset 0 0 0 1px rgba(250, 143, 56, 0.45);
}

.mobile-nav-overlay {
  transition: opacity 0.32s ease;
}

.mobile-nav-panel {
  transition: transform 0.42s cubic-bezier(0.33, 1, 0.68, 1);
}

#mobile-nav-overlay {
  position: fixed !important;
  inset: 0;
}

/* Мобильное меню: открытие классами (Tailwind CDN может не увидеть классы из JS) */
.mobile-nav-overlay.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}
.mobile-nav-panel.is-open {
  transform: translateX(0) !important;
}

.main-bg {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(254, 83, 64, 0.4), transparent 58%),
    radial-gradient(ellipse 55% 45% at 92% 75%, rgba(250, 143, 56, 0.22), transparent 48%),
    radial-gradient(ellipse 45% 40% at 8% 88%, rgba(254, 83, 64, 0.1), transparent 45%);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.cc-input,
.cc-select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1014;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  outline: none;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    transform 0.18s ease;
}
.cc-select {
  cursor: pointer;
}
.cc-select:hover {
  border-color: rgba(255, 255, 255, 0.13);
}
.cc-select:active {
  transform: translateY(0.5px);
}
.cc-input:focus,
.cc-select:focus {
  border-color: rgba(254, 83, 64, 0.5);
  box-shadow: 0 0 0 1px rgba(250, 143, 56, 0.15);
}

.cc-input.cc-input--invalid {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.22);
}

/*
 * FAQ: высота задаётся JS (preventDefault на summary): нативный <details> после
 * первого закрытия ломает чистые CSS-переходы на содержимом слота.
 * Без JS — запасной max-height по [open] ниже.
 */
.cc-faq-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.42s cubic-bezier(0.33, 1, 0.68, 1);
}
#faq-accordion:not(.cc-faq-js) .cc-faq-item[open] .cc-faq-panel {
  max-height: 1200px;
}
.cc-faq-panel-inner {
  overflow: visible;
}
.cc-faq-content {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.32s ease,
    transform 0.38s cubic-bezier(0.33, 1, 0.68, 1);
}
.cc-faq-item[open] .cc-faq-content {
  opacity: 1;
  transform: translateY(0);
}

.cc-faq-item > summary {
  transition: background-color 0.28s ease;
}
.cc-faq-item[open] > summary {
  background-color: rgba(255, 255, 255, 0.035);
}

.cc-faq-item > summary > span.pointer-events-none {
  transition: transform 0.36s cubic-bezier(0.33, 1, 0.68, 1);
}
.cc-faq-item[open] > summary > span.pointer-events-none {
  transform: scale(1.06);
}

.cc-faq-item summary {
  list-style: none;
}
.cc-faq-item summary::-webkit-details-marker {
  display: none;
}
.cc-faq-item .cc-faq-chevron {
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}
.cc-faq-item[open] .cc-faq-chevron {
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  /* JS не вешает обработчики — остаётся нативный details + запасной max-height */
  .cc-faq-panel,
  .cc-faq-content,
  .cc-faq-item > summary,
  .cc-faq-item > summary > span.pointer-events-none,
  .cc-faq-item .cc-faq-chevron,
  .cc-input,
  .cc-select {
    transition: none !important;
  }
  .cc-faq-panel {
    max-height: none;
  }
  #faq-accordion:not(.cc-faq-js) .cc-faq-item[open] .cc-faq-panel {
    max-height: none;
  }
  .cc-faq-content {
    opacity: 1;
    transform: none;
  }
  .cc-select:active {
    transform: none;
  }
  .mobile-nav-overlay,
  .mobile-nav-panel {
    transition: none !important;
  }
}
