/* ═══ Перемикач теми та темна тема (нейтральні темно-сірі тони) ═══ */

/* ── Перемикач теми в шапці ── */
.theme-switch {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 34px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-switch:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.ts-track {
  position: relative;
  display: block;
  width: 62px;
  height: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ffe9a8, #faab01);
  box-shadow: inset 0 0 0 1px rgb(32 37 28 / 12%), inset 0 2px 5px rgb(180 110 0 / 28%);
  overflow: hidden;
  transition: background 0.5s ease, box-shadow 0.5s ease, transform 0.25s ease;
}
.theme-switch:hover .ts-track {
  transform: scale(1.05);
}
.theme-switch:active .ts-track {
  transform: scale(0.97);
}
.ts-icon {
  position: absolute;
  top: 9px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.33, 0.1, 0.2, 1);
}
.ts-sun {
  right: 9px;
  color: #6a4300;
  opacity: 1;
}
.ts-moon {
  left: 9px;
  color: #e9e9e9;
  opacity: 0;
  transform: rotate(-60deg) scale(0.5);
}
.ts-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fffdf5;
  box-shadow: 0 2px 6px rgb(0 0 0 / 28%);
  transition: transform 0.6s cubic-bezier(0.5, 0, 0.2, 1), background 0.5s ease;
}
html[data-theme="dark"] .ts-track {
  background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%), inset 0 2px 6px rgb(0 0 0 / 55%);
}
html[data-theme="dark"] .ts-thumb {
  transform: translateX(28px);
  background: #e9e9e9;
}
html[data-theme="dark"] .ts-sun {
  opacity: 0;
  transform: rotate(60deg) scale(0.5);
}
html[data-theme="dark"] .ts-moon {
  opacity: 1;
  transform: none;
}
/* Плавна зміна кольорів у момент перемикання */
html.theme-anim,
html.theme-anim *:not(.ts-thumb):not(.ts-icon),
html.theme-anim *:not(.ts-thumb):not(.ts-icon)::before,
html.theme-anim *:not(.ts-thumb):not(.ts-icon)::after {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, fill 0.4s ease, stroke 0.4s ease, box-shadow 0.4s ease !important;
}

/* ── Темна тема ── */
html[data-theme="dark"] {
  color-scheme: dark;
  --color-background: #141414;
  --ink: #ededed;
  --muted: #9c9c9c;
  --line: #2f2f2f;
  --green-text: #58ad2a;
}
/* ── з styles.css ── */
html[data-theme="dark"] .green {
  color: var(--green-text);
}
html[data-theme="dark"] .header-inner nav a:hover {
  color: var(--green-text);
}
html[data-theme="dark"] .text-link:hover {
  color: var(--green-text);
}
html[data-theme="dark"] .image-placeholder {
  background: #191b18;
  color: #a4a99d;
}
html[data-theme="dark"] .hero-art {
  background: #282c26;
}
html[data-theme="dark"] .placeholder-cross {
  color: #a4aa9d;
}
html[data-theme="dark"] .placeholder-caption {
  color: #a4a99e;
}
html[data-theme="dark"] h2 .handwritten {
  color: var(--green-text);
}
html[data-theme="dark"] .service-card {
  background: #1c1f1b;
}
html[data-theme="dark"] .service-name > span {
  color: var(--green-text);
}
html[data-theme="dark"] .stickers-art {
  background: #282c26;
}
html[data-theme="dark"] .flyers-art {
  background: #282c26;
}
html[data-theme="dark"] .banners-art {
  background: #282c26;
}
html[data-theme="dark"] .work-card figcaption > span {
  color: var(--green-text);
}
html[data-theme="dark"] .artwork-card {
  background: #191b18;
}
html[data-theme="dark"] .artwork-card > p {
  color: #acb1a7;
}
html[data-theme="dark"] .process-grid::before {
  border-top: 2px dashed #41463e;
}
html[data-theme="dark"] .process-card {
  background: #1d1f1b;
  border: 1px solid #343832;
  outline: 8px solid #282b26;
}
html[data-theme="dark"] .pin {
  border: 4px solid #282b26;
}
html[data-theme="dark"] .step-number {
  color: var(--green-text);
}
html[data-theme="dark"] .process-note {
  color: var(--green-text);
}
html[data-theme="dark"] .button-yellow:hover {
  background: #282c26;
}
html[data-theme="dark"] .contact-details {
  border-top: 1px solid rgb(255 255 255 / 10%);
}
html[data-theme="dark"] .location-art {
  background: rgb(255 255 255 / 1%);
  border: 1px solid rgb(255 255 255 / 10%);
}
@media (max-width: 480px) {
html[data-theme="dark"] .process-grid::before {
  border-left: 2px dashed #41463e;
}
}
html[data-theme="dark"] .word-cloud {
  color: var(--green-text);
}
html[data-theme="dark"] .hero-actions .sketch-contact {
  color: var(--green-text);
}
html[data-theme="dark"] .location-map {
  background: #1e211c;
}
html[data-theme="dark"] .scroll-top {
  border: 1px solid rgb(255 255 255 / 18%);
}
html[data-theme="dark"] .social-button {
  background: #1e211c;
  color: #f1f1f1;
}
html[data-theme="dark"] .social-button:hover,
html[data-theme="dark"] .social-button:focus-visible {
  background: #191c18;
  color: var(--green-text);
}
html[data-theme="dark"] #account-orders li {
  background: #191b18;
}
html[data-theme="dark"] #order-success-number {
  color: var(--green-text);
}
html[data-theme="dark"] #account-logout {
  color: #ffffff;
}
html[data-theme="dark"] .footer-links a:hover,
html[data-theme="dark"] .footer-links a:focus-visible {
  color: var(--green-text);
}
html[data-theme="dark"] .cm-close:hover {
  color: var(--green-text);
}
html[data-theme="dark"] .cm-map {
  color: var(--green-text);
}
html[data-theme="dark"] .wk-open {
  background: #282c26;
}
html[data-theme="dark"] .wk-arrow {
  background: #1e211c;
}
html[data-theme="dark"] .wk-lightbox .cm-close {
  background: rgb(255 255 255 / 13%);
}
html[data-theme="dark"] .more-toggle {
  color: var(--green-text);
}
html[data-theme="dark"] .br-faq details {
  background: #1c1f1b;
}
html[data-theme="dark"] .br-faq summary::after {
  color: var(--green-text);
}
html[data-theme="dark"] .fact {
  background: #1c1f1b;
}
html[data-theme="dark"] .fact-num {
  color: var(--green-text);
}
html[data-theme="dark"] .fact-ico {
  color: var(--green-text);
}
/* ── з service.css ── */
html[data-theme="dark"] .sv-group {
  background: #1c1f1b;
}
html[data-theme="dark"] .sv-list li {
  border-top: 1px solid rgb(255 255 255 / 8%);
}
html[data-theme="dark"] .sv-list i {
  border-bottom: 1.5px dotted #41463e;
}
html[data-theme="dark"] .sv-list b {
  color: var(--green-text);
}
html[data-theme="dark"] .sv-note {
  background: #1a1c19;
  color: #d2e1c8;
}
html[data-theme="dark"] .sv-all a {
  color: var(--green-text);
}
html[data-theme="dark"] .sv-step {
  background: #1d1f1b;
}
html[data-theme="dark"] .sv-swatch {
  background: #1c1f1b;
}
html[data-theme="dark"] .sv-badge {
  background: #1a1c18;
  border: 2px solid #41463e;
  color: #e3e6e1;
}
html[data-theme="dark"] .sv-badge span {
  color: #dee8e4;
}
html[data-theme="dark"] .sv-lux .lux-frame {
  border: 1.5px solid #41463e;
  background: linear-gradient(135deg, #1d1f1b 0%, #282c26 100%);
}
html[data-theme="dark"] .sv-lux .lux-badge {
  background: linear-gradient(135deg, #282c26, #c99a2e);
  color: #f2e9d6;
}
html[data-theme="dark"] .sv-lux .sv-note {
  background: rgb(255 255 255 / 8%);
  border: 1px solid #41463e;
  color: #ddd4bd;
}
/* ── з branding.css ── */
html[data-theme="dark"] .branding-art {
  background: #191b18;
}
html[data-theme="dark"] .br-section.alt {
  background: #191c18;
  border-block: 1px solid #2e312b;
}
html[data-theme="dark"] .br-box {
  background: #1c1f1b;
}
html[data-theme="dark"] .br-plan {
  background: #1c1f1b;
}
html[data-theme="dark"] .br-plan.featured {
  background: #1e211c;
}
html[data-theme="dark"] .br-plan .price {
  color: var(--green-text);
}
html[data-theme="dark"] .br-plan li::before {
  color: var(--green-text);
}
html[data-theme="dark"] .br-steps li {
  background: #1c1f1b;
}
html[data-theme="dark"] .br-steps li::before {
  color: var(--green-text);
}
html[data-theme="dark"] .pf-card {
  background: #1c1f1b;
}
html[data-theme="dark"] .pf-card .pf-cover {
  background: #191b18;
}
html[data-theme="dark"] .pf-tags li {
  background: #1a1c18;
}
html[data-theme="dark"] .pj-gallery figure {
  background: #191b18;
}
html[data-theme="dark"] .pj-gallery figcaption {
  background: #1c1f1b;
}
html[data-theme="dark"] .pj-note {
  background: #1c1f1b;
}
html[data-theme="dark"] .pj-nav a:hover strong {
  color: var(--green-text);
}
html[data-theme="dark"] .br-faq details {
  background: #1c1f1b;
}
html[data-theme="dark"] .br-faq summary::after {
  color: var(--green-text);
}
html[data-theme="dark"] .br-plan li {
  border-top: 1px solid rgb(255 255 255 / 8%);
}
html[data-theme="dark"] .br-plan li.no {
  color: #a6a79f;
}
html[data-theme="dark"] .br-custom {
  background: #1e211c;
}
html[data-theme="dark"] .br-plan.luxe {
  border: 1.5px solid #41463e;
  background: linear-gradient(135deg, #1d1f1b 0%, #282c26 100%);
}
html[data-theme="dark"] .br-plan.luxe li {
  border-top-color: rgb(255 255 255 / 9%);
}
html[data-theme="dark"] .br-plan.luxe .badge {
  background: linear-gradient(135deg, #282c26, #c99a2e);
  color: #f2e9d6;
}
html[data-theme="dark"] .br-plan.starter .badge {
  color: var(--green-text);
  background: #1e211c;
}
/* ── з legal.css ── */
html[data-theme="dark"] .legal-body a {
  color: var(--green-text);
}

/* ── Логотип та інші вставки ── */
html[data-theme="dark"] .header-wordmark {
  fill: #f1f1f1;
}
html[data-theme="dark"] .footer-logo {
  content: url("../assets/images/Logo_header_dark.svg");
}

/* ── Перемикач теми: на телефоні — всередині меню з трьома смужками ── */
.nav-theme {
  display: none;
}
@media (max-width: 800px) {
  .site-header .header-inner > .theme-switch {
    display: none;
  }
  .site-header .header-inner nav .nav-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 2px 4px;
    font-size: 14px;
    font-weight: 600;
  }
}

/* ── Підказка про темну тему ── */
.theme-hint {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 40px 16px 16px;
  border-radius: 18px;
  background: #1f1f1f;
  color: #f1f1f1;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 18px 44px rgb(0 0 0 / 35%), inset 0 0 0 1px rgb(255 255 255 / 10%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.33, 0.1, 0.2, 1);
}
.theme-hint.is-in {
  opacity: 1;
  transform: none;
}
.th-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #333;
  font-size: 18px;
}
.th-text {
  flex: 1;
  min-width: 0;
  color: #bdbdbd;
}
.th-text b {
  display: block;
  color: #fff;
  font-size: 14px;
}
.th-on {
  flex: none;
  padding: 9px 14px;
  border: 0;
  border-radius: 40px;
  background: #338309;
  color: #fff;
  font: 600 12px Montserrat, Arial, sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.th-on:hover {
  background: #3f9a10;
}
.th-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9a9a9a;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.th-close:hover {
  color: #fff;
}
.th-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: #58ad2a;
  transform-origin: left;
  transform: scaleX(1);
}
.theme-hint.is-in .th-bar {
  transform: scaleX(0);
  transition: transform 5s linear;
}
@media (max-width: 800px) {
  .theme-hint {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme-hint,
  .theme-hint.is-in .th-bar {
    transition: opacity 0.2s;
  }
}

/* ── Темна тема: блок контактів — темно-сірий замість великої зеленої заливки ── */
html[data-theme="dark"] .contact-section {
  background: #1a1c19;
  border-block: 1px solid #2a2d29;
}
html[data-theme="dark"] .contact-section .section-label,
html[data-theme="dark"] .contact-copy > p,
html[data-theme="dark"] .contact-details span {
  color: #a9ada6;
}
html[data-theme="dark"] .contact-details {
  border-top-color: #2f322e;
}
html[data-theme="dark"] .contact-section .social-button,
html[data-theme="dark"] .contact-section .contact-email {
  background: #262926;
  box-shadow: inset 0 0 0 1px #333632;
}
html[data-theme="dark"] .contact-section .social-button:hover,
html[data-theme="dark"] .contact-section .social-button:focus-visible,
html[data-theme="dark"] .contact-section .contact-email:hover {
  background: #2f332e;
  color: #fff;
}
html[data-theme="dark"] .location-map img {
  filter: brightness(0.85);
}

/* ── Темна тема: рамка пакета «Преміум» — тонка, без білого кільця ── */
html[data-theme="dark"] .br-plan.luxe {
  border: 1px solid #3a3d37;
  box-shadow: 0 10px 30px rgb(0 0 0 / 35%), inset 0 0 0 5px #1d1f1b, inset 0 0 0 6px rgb(212 175 90 / 22%);
}

/* ── Темна тема: блок «Брендинг» на головній — темно-сірий замість зеленої заливки ── */
html[data-theme="dark"] .branding-inner {
  background: #1a1c19;
  box-shadow: inset 0 0 0 1px #2a2d29;
}
html[data-theme="dark"] .branding-copy > p {
  color: #b4b8b1;
}
html[data-theme="dark"] .branding-points li {
  color: #ededed;
}

/* ── Темна тема: люксова рамка на сторінці візиток ── */
html[data-theme="dark"] .sv-lux .lux-frame {
  border: 1px solid #3a3d37;
  box-shadow: 0 10px 30px rgb(0 0 0 / 35%), inset 0 0 0 5px #1d1f1b, inset 0 0 0 6px rgb(212 175 90 / 22%);
}
html[data-theme="dark"] .sv-lux .sv-group {
  background: none;
  border: 0;
  box-shadow: none;
}
