/*
Theme Name: Chidemoon
Theme URI: https://kalahamoon.com/chidemoon
Author: Kalahamoon
Author URI: https://kalahamoon.com
Description: A Persian-first living-editorial theme for verified home product discovery.
Version: 1.5.1
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chidemoon-theme
Tags: block-theme, one-column, custom-colors, editor-style, full-site-editing, translation-ready
*/

:root {
	--ch-color-forest: #12382e;
	--ch-color-forest-strong: #0b2b23;
	--ch-color-mineral: #f7f3ea;
	--ch-color-paper: #fffdf8;
	--ch-color-clay: #c9683f;
	--ch-color-clay-dark: #aa5030;
	--ch-color-sage: #879784;
	--ch-color-ink: #17221e;
	--ch-color-muted: #62706a;
	--ch-color-line: rgba(18, 56, 46, 0.14);
	--ch-color-line-strong: rgba(18, 56, 46, 0.28);
	--ch-color-focus: #c9683f;
	--ch-font-sans: 'YekanBakh', Tahoma, Arial, sans-serif;
	--ch-font-display: 'YekanBakh', Tahoma, Arial, sans-serif;
	--ch-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--ch-container: 1440px;
	--ch-gutter: clamp(16px, 3vw, 40px);
	--ch-section-space: clamp(64px, 8vw, 112px);
	--ch-radius-xs: 6px;
	--ch-radius-sm: 10px;
	--ch-radius-md: 18px;
	--ch-shadow-drawer: 0 24px 70px rgba(11, 43, 35, 0.18);
	--ch-motion-fast: 140ms;
	--ch-motion-medium: 220ms;

	/* Backward-compatible aliases used by the helper and Kalahamoon blocks. */
	--font-serif: var(--ch-font-display);
	--font-sans: var(--ch-font-sans);
	--font-mono: var(--ch-font-mono);
	--chidemoon-font-sans: var(--ch-font-sans);
	--chidemoon-font-display: var(--ch-font-display);
	--kalahamoon-font-family: var(--ch-font-sans);
	--chidemoon-forest: var(--ch-color-forest);
	--chidemoon-sage: var(--ch-color-sage);
	--chidemoon-orange: var(--ch-color-clay);
	--chidemoon-cream: #e8ddcd;
	--chidemoon-sand: var(--ch-color-mineral);
	--chidemoon-surface: var(--ch-color-paper);
	--chidemoon-ink: var(--ch-color-ink);
	--chidemoon-muted: var(--ch-color-muted);
	--chidemoon-border: var(--ch-color-line);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	background: var(--ch-color-mineral);
}

body {
	min-width: 320px;
	margin: 0;
	overflow-x: clip;
	background: var(--ch-color-mineral);
	color: var(--ch-color-ink);
	direction: rtl;
	font-family: var(--ch-font-sans);
	font-size: 16px;
	line-height: 1.8;
	text-align: start;
	text-rendering: optimizeLegibility;
}

body :where(h1, h2, h3, h4, h5, h6, p, a, button, input, select, textarea, label, li, th, td) {
	font-family: var(--ch-font-sans);
	font-kerning: normal;
}

h1,
h2,
h3,
h4,
.h-serif {
	font-family: var(--ch-font-display);
	font-weight: 800;
	letter-spacing: -0.025em;
}

body :where(code, pre, .tag-mono, .price-mono, .code-mono, .chidemoon-tag-mono) {
	font-family: var(--ch-font-mono);
	font-variant-numeric: tabular-nums;
}

img,
svg {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-underline-offset: 0.24em;
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
[role='button'],
.button,
.wp-block-button__link,
.chidemoon-btn,
.kalahamoon-cta-button {
	min-height: 44px;
}

button,
.button,
.wp-block-button__link,
.chidemoon-btn,
.kalahamoon-cta-button {
	white-space: nowrap;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ch-color-focus) 72%, transparent);
	outline-offset: 3px;
}

::selection {
	background: var(--ch-color-clay);
	color: #fff;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.chidemoon-skip-link {
	position: fixed;
	inset-block-start: 12px;
	inset-inline-start: 12px;
	z-index: 100000;
	padding: 10px 16px;
	border: 1px solid var(--ch-color-forest);
	background: var(--ch-color-paper);
	color: var(--ch-color-forest);
	font-weight: 700;
	text-decoration: none;
	transform: translateY(calc(-100% - 24px));
	transition: transform var(--ch-motion-fast) ease;
}

.chidemoon-skip-link:focus-visible {
	transform: translateY(0);
}

@media (max-width: 767px) {
	body {
		padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
	}
}

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

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