/**
 * Dark mode — token overrides and component fixes.
 *
 * @package Psychologies
 */

[data-theme="dark"] {
	color-scheme: dark;

	/* Core palette */
	--psy-background: #121010;
	--psy-background-blush: #1E1816;
	--psy-background-dark: #0A0808;
	--psy-text: #F5F0EB;
	--psy-text-muted: #A89890;
	--psy-text-secondary: #C4B8B0;
	--psy-text-tertiary: #A89890;
	--psy-text-quaternary: #8A7E76;
	--psy-text-faint: #756A62;
	--psy-primary: #D4566A;
	--psy-primary-light: #E8788A;
	--psy-cta: #E04548;
	--psy-cta-hover: #C93A3D;
	--psy-accent-gold: #D4B87A;
	--psy-border: #2E2624;
	--psy-white: #F5F0EB;

	/* Surfaces */
	--psy-surface: #1A1614;
	--psy-surface-muted: #211C19;
	--psy-surface-accent: #2A201C;
	--psy-surface-accent-soft: #261E1A;
	--psy-surface-neutral: #1E1816;
	--psy-surface-elevated: #231E1B;

	/* Borders & inputs */
	--psy-divider: #3A322E;
	--psy-divider-light: #332B27;
	--psy-card-border: #332B27;
	--psy-card-border-hover: #3D3430;
	--psy-input-border: #3A322E;
	--psy-input-border-alt: #3A322E;
	--psy-input-bg: #1A1614;

	/* Interactive */
	--psy-focus-ring: rgba(224, 69, 72, 0.2);
	--psy-accent-tint: rgba(224, 69, 72, 0.12);
	--psy-accent-tint-strong: rgba(224, 69, 72, 0.08);
	--psy-accent-border: rgba(224, 69, 72, 0.35);
	--psy-accent-index: rgba(224, 69, 72, 0.4);
	--psy-error-tint: rgba(212, 86, 106, 0.12);
	--psy-placeholder: rgba(245, 240, 235, 0.35);

	/* Header & search */
	--psy-header-bg: rgba(18, 16, 16, 0.95);
	--psy-search-panel-bg: #1A1614;
	--psy-search-panel-border: #2E2624;
	--psy-search-bar-bg: #211C19;
	--psy-search-bar-border: #3A322E;
	--psy-search-input-placeholder: #756A62;
	--psy-search-btn-bg: #E04548;
	--psy-search-btn-hover: #C93A3D;
	--psy-overlay: rgba(0, 0, 0, 0.65);

	/* Gradients & neutrals */
	--psy-gradient-hero: linear-gradient(180deg, #2A201C 0%, #121010 100%);
	--psy-neutral-line: #3A322E;
	--psy-neutral-bg: #332B27;
	--psy-neutral-bg-warm: #2E2624;

	/* Shadows */
	--psy-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
	--psy-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Header / search / mobile */
[data-theme="dark"] .psy-site-header {
	background: var(--psy-header-bg);
	border-bottom-color: var(--psy-border);
}

[data-theme="dark"] .psy-search-panel {
	background: var(--psy-search-panel-bg);
	border-top-color: var(--psy-search-panel-border);
}

[data-theme="dark"] .psy-search-bar {
	background: var(--psy-search-bar-bg);
	border-color: var(--psy-search-bar-border);
}

[data-theme="dark"] .psy-search-bar__input::placeholder {
	color: var(--psy-search-input-placeholder);
}

[data-theme="dark"] .psy-header-utility.psy-search-toggle {
	background: var(--psy-search-btn-bg);
}

[data-theme="dark"] .psy-header-utility.psy-search-toggle:hover,
[data-theme="dark"] .psy-header-utility.psy-search-toggle:focus-visible,
[data-theme="dark"] .psy-header-utility.psy-search-toggle[aria-expanded="true"] {
	background: var(--psy-search-btn-hover);
}

[data-theme="dark"] .psy-header-quick-nav__link.is-current {
	background: rgba(224, 69, 72, 0.16);
}

[data-theme="dark"] .psy-mobile-nav__overlay {
	background: var(--psy-overlay);
}

[data-theme="dark"] .psy-mobile-nav__panel {
	background: var(--psy-background);
}

/* Footer */
[data-theme="dark"] .psy-site-footer {
	background-color: #8B0B0D;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Images */
[data-theme="dark"] .psy-img-adaptive {
	filter: brightness(0.92);
}

[data-theme="dark"] .psy-animate-lighten:hover,
[data-theme="dark"] .psy-animate-lighten:focus-within,
[data-theme="dark"] .psy-home-hero__image-wrap.psy-animate-lighten:hover > .psy-img-adaptive,
[data-theme="dark"] .psy-home-about__image-wrap.psy-animate-lighten:hover > .psy-img-adaptive,
[data-theme="dark"] .psy-home-why__image-wrap.psy-animate-lighten:hover > .psy-img-adaptive,
[data-theme="dark"] .psy-about-hero__image-wrap.psy-animate-lighten:hover > .psy-img-adaptive,
[data-theme="dark"] .psy-about-team__image-wrap.psy-animate-lighten:hover > .psy-img-adaptive {
	filter: brightness(1.05);
}

[data-theme="dark"] .psy-article-card:hover .psy-article-card__image img,
[data-theme="dark"] .psy-home-blog-card:hover .psy-home-blog-card__image img {
	filter: brightness(1.05);
}

/* Shared cards */
[data-theme="dark"] .psy-card,
[data-theme="dark"] .psy-article-card,
[data-theme="dark"] .psy-home-blog-card {
	background: var(--psy-surface);
	border-color: var(--psy-card-border);
}

[data-theme="dark"] .psy-home-blog-card:hover {
	border-color: var(--psy-card-border-hover);
}

[data-theme="dark"] .psy-article-card__image .psy-favorite-btn {
	background: var(--psy-surface-elevated);
}

/* ========== Home page ========== */
[data-theme="dark"] .psy-home {
	background: var(--psy-background);
}

[data-theme="dark"] .psy-home-hero,
[data-theme="dark"] .psy-home-services,
[data-theme="dark"] .psy-home-why,
[data-theme="dark"] .psy-home-faq,
[data-theme="dark"] .psy-home-newsletter {
	background: var(--psy-background);
}

[data-theme="dark"] .psy-home-hero__content {
	background: var(--psy-surface-accent-soft);
}

[data-theme="dark"] .psy-home-stat:not(:last-child)::after {
	background: var(--psy-neutral-bg-warm);
}

[data-theme="dark"] .psy-home-about__card,
[data-theme="dark"] .psy-home-testimonials__card {
	background: var(--psy-surface-muted);
}

[data-theme="dark"] .psy-home-service-card:not(:first-child)::before {
	background: var(--psy-neutral-bg);
}

[data-theme="dark"] .psy-home-journey__card {
	background: var(--psy-surface-accent);
}

[data-theme="dark"] .psy-home-journey__form-box,
[data-theme="dark"] .psy-home-newsletter__form {
	background: var(--psy-surface);
	border-color: var(--psy-card-border);
}

[data-theme="dark"] .psy-home-process__block {
	background: var(--psy-surface);
}

[data-theme="dark"] .psy-home-process-step:nth-child(-n + 2),
[data-theme="dark"] .psy-home-process-step:nth-child(odd) {
	border-color: var(--psy-neutral-line);
}

[data-theme="dark"] .psy-home-faq-item__trigger {
	background: var(--psy-surface);
	color: var(--psy-text);
}

[data-theme="dark"] .psy-home-faq-item:not(.is-open) .psy-home-faq-item__trigger:hover {
	background: var(--psy-surface-elevated);
}

[data-theme="dark"] .psy-home-faq-item.is-open .psy-home-faq-item__trigger {
	background: var(--psy-cta);
	color: #ffffff;
}

[data-theme="dark"] .psy-home-faq-item__panel-inner p {
	color: var(--psy-text-secondary);
}

[data-theme="dark"] .psy-home-newsletter__card {
	background: var(--psy-gradient-hero);
	border-color: var(--psy-card-border);
}

[data-theme="dark"] .psy-home-newsletter__benefits li::before {
	box-shadow: 0 0 0 3px rgba(224, 69, 72, 0.18);
}

[data-theme="dark"] .psy-home-newsletter__form .psy-form-message {
	background: var(--psy-accent-tint);
}

[data-theme="dark"] .psy-home-newsletter__form .psy-form-message.is-error {
	background: var(--psy-error-tint);
}

[data-theme="dark"] .psy-home-mission-item,
[data-theme="dark"] .psy-home-why-item__content h3,
[data-theme="dark"] .psy-home-why-item__content p,
[data-theme="dark"] .psy-home-service-card h3,
[data-theme="dark"] .psy-home-service-card p,
[data-theme="dark"] .psy-home-process-step h3,
[data-theme="dark"] .psy-home-process-step p,
[data-theme="dark"] .psy-home-testimonial-card__quote,
[data-theme="dark"] .psy-home-testimonial-card__meta strong {
	color: var(--psy-text);
}

[data-theme="dark"] .psy-home-service-card p,
[data-theme="dark"] .psy-home-why-item__content p,
[data-theme="dark"] .psy-home-process-step p,
[data-theme="dark"] .psy-home-testimonial-card__meta span,
[data-theme="dark"] .psy-home-testimonials__intro {
	color: var(--psy-text-secondary);
}

[data-theme="dark"] .psy-home-testimonials__divider {
	background: var(--psy-neutral-line);
}

/* Search results */
[data-theme="dark"] .psy-search-page,
[data-theme="dark"] .psy-search-results__card {
	background: var(--psy-surface);
}

[data-theme="dark"] .psy-search-results__title {
	color: var(--psy-text);
}

[data-theme="dark"] .psy-search-results__excerpt {
	color: var(--psy-text-secondary);
}

[data-theme="dark"] .psy-search-bar--page {
	background: var(--psy-search-bar-bg);
	border-color: var(--psy-search-bar-border);
}

[data-theme="dark"] ::selection {
	background: rgba(224, 69, 72, 0.35);
	color: var(--psy-text);
}
