/* ═══════════════════════════════════════════════
   DARK THEME — [data-theme="dark"] · true black
   ═══════════════════════════════════════════════ */

[data-theme="dark"] {
  --color-bg:         #18191e;
  --color-bg-soft:    #1d1e25;
  --color-ink:        #ffffff;
  --color-white:      #ffffff;
  --color-muted:      #8d9098;
  --color-muted-dark: #8d9098;
  --color-accent:     #716eff;
  --color-accent-soft:#7765ff;
  --color-line:       rgba(255, 255, 255, 0.1);
  --shadow-soft:      0 18px 55px rgba(0, 0, 0, 0.32);
}

/* surfaces used repeatedly */
[data-theme="dark"] body {
  background: #18191e;
  color: #ffffff;
}

[data-theme="dark"] a:focus,
[data-theme="dark"] a:focus-visible,
[data-theme="dark"] button:focus,
[data-theme="dark"] button:focus-visible {
  outline: 0;
  box-shadow: none;
}

/* ─── Header ────────────────────────────────────────── */
[data-theme="dark"] .site-header::before {
  background: rgba(24, 25, 30, 0.9);
}

[data-theme="dark"] .brand {
  background: #1d1e25;
  border: 0;
}

[data-theme="dark"] .main-nav {
  background: #1d1e25;
  color: #8d9098;
}

[data-theme="dark"] .main-nav__link:hover,
[data-theme="dark"] .main-nav__link.is-active {
  color: #ffffff;
}

[data-theme="dark"] .main-nav__link::after {
  background: #716eff;
}

/* "Связаться с нами" CTA — white-on-white in dark, invert it */
[data-theme="dark"] .contact-button {
  color: #000000;
  background-color: #ffffff;
  --btn-wave-rgb: 119 101 255;
}

[data-theme="dark"] .contact-button:hover {
  color: #ffffff;
  background-color: #ffffff;
}

/* ─── Monochrome SVG icons follow the theme ─────────── */
[data-theme="dark"] .brand__logo,
[data-theme="dark"] .filter-button img,
[data-theme="dark"] .filter-button__chevron,
[data-theme="dark"] .language-button__chevron,
[data-theme="dark"] .questions-toc__icon {
  filter: brightness(0) saturate(100%) invert(98%) sepia(4%) saturate(325%) hue-rotate(197deg) brightness(98%) contrast(90%);
}

[data-theme="dark"] .language-dropdown {
  background: #1d1e25;
  border-color: transparent;
}

[data-theme="dark"] .language-button {
  color: #ffffff;
}

[data-theme="dark"] .language-menu {
  background: #1d1e25;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .language-menu button {
  color: #8d9098;
}

[data-theme="dark"] .language-menu button:hover,
[data-theme="dark"] .language-menu button.is-active {
  color: #ffffff;
  background: #272933;
}

[data-theme="dark"] [data-language-option]:hover {
  background: #272933;
}

/* ─── Theme toggle: knob left = dark mode active ────── */
[data-theme="dark"] .theme-toggle {
  background: #23252f;
}

[data-theme="dark"] .theme-toggle__knob {
  background: #323446 url("../luna.svg") center / 20px 20px no-repeat;
  transform: translateX(0);
}

/* ─── Hero ──────────────────────────────────────────── */
[data-theme="dark"] .hero-copy__title-small,
[data-theme="dark"] .hero-copy__title-large {
  color: #ffffff;
}

[data-theme="dark"] .hero-copy p {
  color: var(--color-muted);
}

/* ─── Section headings ──────────────────────────────── */
[data-theme="dark"] .projects-section__top h2,
[data-theme="dark"] .reviews-section__top h2,
[data-theme="dark"] .faq-section h2,
[data-theme="dark"] .services-section h2 {
  color: #ffffff;
}

/* ─── Filter button + menu ──────────────────────────── */
[data-theme="dark"] .filter-button {
  color: #ffffff;
}

[data-theme="dark"] .filter-menu {
  color: #ffffff;
  background: #1d1e25;
  border-color: transparent;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .filter-menu button {
  color: #ffffff;
}

[data-theme="dark"] .filter-menu button:hover {
  color: #9b98ff;
  background: rgba(113, 110, 255, 0.16);
}

[data-theme="dark"] .filter-menu__label {
  color: var(--color-muted);
}

/* ─── Project cards ─────────────────────────────────── */
[data-theme="dark"] .project-card {
  color: #ffffff;
  background: #1d1e25;
  border: 0;
}

[data-theme="dark"] .project-card h3 {
  color: #ffffff;
}

[data-theme="dark"] .project-card__category {
  color: var(--color-muted);
}

[data-theme="dark"] .project-card__tags span {
  color: #ffffff;
  background: #272933;
}

/* ─── Show-all / load-more buttons ──────────────────── */
[data-theme="dark"] .show-all-button {
  color: #000000;
  background: #ffffff;
}

[data-theme="dark"] .load-more-projects,
[data-theme="dark"] .consult-submit {
  color: #000000;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2)), #716eff;
}

[data-theme="dark"] .projects-empty {
  color: #8d9098;
  background: #1d1e25;
  border: 0;
}

[data-theme="dark"] .reviews-show-all {
  color: #ffffff;
  background: #1d1e25;
  border: 0;
}

[data-theme="dark"] .reviews-show-all:hover {
  background: #272933;
}

/* ─── Consult form ──────────────────────────────────── */
[data-theme="dark"] .consult-form,
[data-theme="dark"] .consult-form h2,
[data-theme="dark"] .consult-field-group h3,
[data-theme="dark"] .consult-field-group--project h3,
[data-theme="dark"] .consult-budget h3 {
  color: #ffffff;
}

[data-theme="dark"] .consult-field-group p,
[data-theme="dark"] .consult-budget p,
[data-theme="dark"] .consult-field-group--project p {
  color: var(--color-muted);
}

[data-theme="dark"] .interest-tag {
  color: #ffffff;
  background: #272933;
}

[data-theme="dark"] .interest-tag.is-active {
  color: #18191e;
  background: #ffffff;
}

[data-theme="dark"] .consult-inputs input,
[data-theme="dark"] .consult-message textarea {
  color: #ffffff;
  background: transparent;
  border-color: #272933;
}

[data-theme="dark"] .consult-inputs input:first-child,
[data-theme="dark"] .consult-inputs input:hover,
[data-theme="dark"] .consult-inputs input:focus,
[data-theme="dark"] .consult-message textarea:hover,
[data-theme="dark"] .consult-message textarea:focus {
  border-color: #3A3D4B;
  box-shadow: none;
}

[data-theme="dark"] .consult-inputs input::placeholder,
[data-theme="dark"] .consult-message textarea::placeholder {
  color: var(--color-muted);
}

[data-theme="dark"] .consult-message button {
  color: var(--color-muted);
  background: #272933;
}

[data-theme="dark"] .consult-form__separator {
  background: #24252E;
}

[data-theme="dark"] .consult-form__note {
  color: #8d9098;
}

/* ─── Budget slider ─────────────────────────────────── */
[data-theme="dark"] .budget-slider__top,
[data-theme="dark"] .budget-slider__value {
  color: #ffffff;
}

[data-theme="dark"] .budget-slider__track,
[data-theme="dark"] .budget-slider::-moz-range-track {
  background: #272933;
}

[data-theme="dark"] .budget-slider::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #716eff 0 var(--budget-progress), #272933 var(--budget-progress) 100%);
}

[data-theme="dark"] .budget-slider::-moz-range-progress {
  background: #716eff;
}

[data-theme="dark"] .budget-slider::-webkit-slider-thumb {
  background: #ffffff;
  background-color: #ffffff;
  border-color: #E9E9ED;
}

[data-theme="dark"] .budget-slider:is(:active,:focus-visible)::-webkit-slider-thumb {
  box-shadow: none;
}

[data-theme="dark"] .budget-slider::-moz-range-thumb {
  background: #ffffff;
  background-color: #ffffff;
  border-color: #E9E9ED;
}

[data-theme="dark"] .budget-slider__labels { color: var(--color-muted); }

/* ─── Review cards ──────────────────────────────────── */
[data-theme="dark"] .review-card {
  color: #ffffff;
  background: #1d1e25;
  border: 0;
  box-shadow: none;
}

[data-theme="dark"] .review-card:hover,
[data-theme="dark"] .review-card.reveal-item.is-visible:hover {
  box-shadow: none;
}

[data-theme="dark"] .review-card h3,
[data-theme="dark"] .review-card__text,
[data-theme="dark"] .review-card__date {
  color: #ffffff;
}

[data-theme="dark"] .review-card__stars {
  color: #ffe76e;
}

[data-theme="dark"] .review-card__avatar {
  background: #ffffff;
}

[data-theme="dark"] .review-card__avatar img {
  filter: invert(1);
}

[data-theme="dark"] .review-card__tag {
  color: #ffffff;
  background: #7765FF;
}

/* ─── FAQ ───────────────────────────────────────────── */
[data-theme="dark"] .faq-item {
  background: #1d1e25;
  border: 0;
  box-shadow: none;
}

[data-theme="dark"] .faq-item:hover {
  box-shadow: none;
}

[data-theme="dark"] .faq-item summary {
  color: #ffffff;
}

[data-theme="dark"] .faq-item p {
  color: var(--color-muted);
}

[data-theme="dark"] .faq-item__plus {
  background-color: #23252F;
}

[data-theme="dark"] .faq-item__plus::before,
[data-theme="dark"] .faq-item__plus::after {
  display: none;
}

/* ─── Projects / Questions sub-pages ────────────────── */
[data-theme="dark"] .projects-page__grid::before {
  background: #24252E;
}

[data-theme="dark"] .policy-card {
  background: #1d1e25;
  border: 0;
}

[data-theme="dark"] .policy-card h2,
[data-theme="dark"] .policy-card p,
[data-theme="dark"] .policy-card li {
  color: #ffffff;
}

[data-theme="dark"] .questions-toc {
  background: #1d1e25;
  border: 0;
}

[data-theme="dark"] .questions-toc h2 {
  color: #ffffff;
  border-bottom-color: #24252E;
}

[data-theme="dark"] .questions-toc a {
  color: var(--color-muted);
}

[data-theme="dark"] .questions-toc a .questions-toc__icon {
  filter: brightness(0) saturate(100%) invert(66%) sepia(8%) saturate(217%) hue-rotate(194deg) brightness(94%) contrast(86%);
}

[data-theme="dark"] .questions-toc a.is-active,
[data-theme="dark"] .questions-toc a:hover {
  color: #ffffff;
}

[data-theme="dark"] .questions-toc a.is-active::before,
[data-theme="dark"] .questions-toc a:hover::before {
  background: #272933;
}

[data-theme="dark"] .questions-toc a.is-active .questions-toc__icon,
[data-theme="dark"] .questions-toc a:hover .questions-toc__icon {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .projects-page__back,
[data-theme="dark"] .questions-page__back {
  color: #ffffff;
}

[data-theme="dark"] .projects-page__back:hover span,
[data-theme="dark"] .questions-page__back:hover span {
  color: var(--color-muted);
}

/* ─── Footer ────────────────────────────────────────── */
[data-theme="dark"] .site-footer {
  border-top-color: #24252E;
}

[data-theme="dark"] .projects-separator,
[data-theme="dark"] .section-separator {
  background: #24252E;
  opacity: 1;
}

[data-theme="dark"] .footer-socials__line {
  display: none;
}

[data-theme="dark"] .footer-brand__name,
[data-theme="dark"] .footer-brand__text p,
[data-theme="dark"] .footer-nav h3 {
  color: #ffffff;
}

[data-theme="dark"] .footer-nav,
[data-theme="dark"] .footer-nav a,
[data-theme="dark"] .footer-legal,
[data-theme="dark"] .footer-legal a {
  color: var(--color-muted);
}

[data-theme="dark"] .footer-nav a:hover,
[data-theme="dark"] .footer-legal a:hover {
  color: #ffffff;
}

[data-theme="dark"] .footer-socials img,
[data-theme="dark"] .footer-brand__logo {
  filter: brightness(0) saturate(100%) invert(98%) sepia(4%) saturate(325%) hue-rotate(197deg) brightness(98%) contrast(90%);
}

[data-theme="dark"] .footer-legal__dot {
  background: #3a3a3a;
}

/* ─── Smooth theme transition ───────────────────────── */
body,
.brand,
.main-nav,
.language-dropdown,
.filter-button,
.filter-menu,
.project-card,
.review-card,
.policy-card,
.questions-toc,
.interest-tag,
.faq-item,
.consult-inputs input,
.consult-message textarea,
.site-footer {
  transition:
    background-color 300ms ease,
    border-color 300ms ease,
    color 300ms ease;
}
