/* ============================================================================
   assets/css/global/theme.css — GLOBAL LAYER (loaded on every page)
   Merged equivalents of: variables.css / reset.css / typography.css /
   utilities.css + header & footer (they appear on all pages).

   Rule of the theme: nothing page-specific ever lands here. Homepage
   sections live in assets/css/pages/home.css (scoped under .page-home);
   future pages get their own scoped page CSS.
   ============================================================================ */

:root {
	--ink-950: #04060c;
	--ink-900: #070a13;
	--ink-850: #0a0f1c;
	--ink-800: #0e1424;
	--ink-700: #16203a;

	--brand-300: #a89cff;
	--brand-400: #8b7cff;
	--brand-500: #6e5bff;
	--brand-600: #5a48f2;

	--neon-300: #7cedff;
	--neon-400: #43e8ff;
	--neon-500: #22d3ee;

	--mist-200: #dbe2f4;
	--mist-400: #aab6d6;
	--mist-500: #8490b3;

	--card-bg: color-mix(in srgb, var(--ink-800) 72%, transparent);
	--line: color-mix(in srgb, var(--mist-200) 9%, transparent);
	--ease: cubic-bezier(0.16, 1, 0.3, 1);

	--font-main: "Vazirmatn", "Segoe UI", system-ui, -apple-system, Tahoma, sans-serif;
}

/* ----------------------------------------------------------------- reset */
html {
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	background-color: var(--ink-900);
	color: var(--mist-200);
	font-family: var(--font-main);
	font-size: 16px;
	line-height: 1.9;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; background: none; border: 0; color: inherit; }
input, textarea, select { font-family: inherit; }

::selection {
	background: color-mix(in srgb, var(--brand-500) 55%, transparent);
	color: #fff;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink-950); }
::-webkit-scrollbar-thumb {
	background: linear-gradient(var(--brand-600), var(--neon-500));
	border-radius: 8px;
	border: 2px solid var(--ink-950);
}

:focus-visible {
	outline: 2px solid var(--neon-400);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text,
.skip-link {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed;
	top: 14px; right: 14px;
	z-index: 999;
	width: auto; height: auto;
	margin: 0; padding: 12px 22px;
	clip: auto;
	border-radius: 12px;
	background: var(--brand-500);
	color: #fff;
	font-weight: 700;
}

/* ------------------------------------------------------------- utilities */
.cx {
	width: min(1180px, 92vw);
	margin-inline: auto;
}
.section {
	position: relative;
	padding-block: clamp(84px, 11vw, 90px);
}

/* --------------------------------------------------- shared primitives */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 16px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--brand-400) 34%, transparent);
	background: color-mix(in srgb, var(--brand-500) 10%, transparent);
	color: var(--brand-300);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
}
.eyebrow::before {
	content: "";
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--neon-400);
	box-shadow: 0 0 12px var(--neon-400);
	animation: cb-pulse 2.6s ease-in-out infinite;
}
@keyframes cb-pulse {
	50% { opacity: 0.35; transform: scale(0.72); }
}

.head-title {
	margin-top: 22px;
	font-size: clamp(1.9rem, 4.4vw, 3.15rem);
	font-weight: 850;
	line-height: 1.35;
	color: #fff;
	text-wrap: balance;
}
.head-title .grad,
.plain-title .grad {
	background: linear-gradient(100deg, var(--brand-300), var(--neon-400));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.head-lead {
	margin-top: 16px;
	max-width: 620px;
	font-size: clamp(0.95rem, 1.6vw, 1.08rem);
	line-height: 2;
	color: var(--mist-400);
}
.head--center { text-align: center; }
.head--center .head-lead { margin-inline: auto; }

/* buttons */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 30px;
	border-radius: 16px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
		background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.3s;
	will-change: transform;
}
.btn .icon { transition: transform 0.35s var(--ease); flex-shrink: 0; }
.btn:hover .icon-arrow-left { transform: translateX(-4px); }
.btn:hover .icon-arrow-right { transform: translateX(-4px); }
.btn-primary {
	color: #fff;
	background: linear-gradient(120deg, var(--brand-500) 10%, var(--brand-600) 55%, #4f8dff 130%);
	box-shadow: 0 10px 34px -10px color-mix(in srgb, var(--brand-500) 65%, transparent),
		inset 0 1px 0 rgb(255 255 255 / 0.22);
}
.btn-primary:hover {
	box-shadow: 0 18px 46px -12px color-mix(in srgb, var(--neon-500) 55%, transparent),
		inset 0 1px 0 rgb(255 255 255 / 0.28);
}
.btn-ghost {
	color: var(--mist-200);
	border: 1px solid var(--line);
	background: rgb(255 255 255 / 0.03);
	backdrop-filter: blur(8px);
}
.btn-ghost:hover {
	border-color: color-mix(in srgb, var(--neon-400) 45%, transparent);
	background: rgb(255 255 255 / 0.06);
}
.btn-small { padding: 12px 22px; font-size: 13.5px; border-radius: 13px; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo .mark {
	position: relative;
	width: 38px; height: 38px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--brand-500), var(--neon-500));
	box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--brand-500) 80%, transparent),
		inset 0 1px 0 rgb(255 255 255 / 0.35);
	overflow: hidden;
	flex-shrink: 0;
}
.logo .mark::before {
	content: "";
	position: absolute;
	width: 16px; height: 16px;
	border-radius: 50%;
	top: 7px; right: 7px;
	border: 3px solid #fff;
}
.logo .mark::after {
	content: "";
	position: absolute;
	width: 7px; height: 7px;
	border-radius: 50%;
	bottom: 8px; left: 8px;
	background: #fff;
}
.logo-text b { font-size: 17px; font-weight: 900; color: #fff; display: block; line-height: 1.3; }
.logo-text small { font-size: 9px; letter-spacing: 0.28em; color: var(--mist-500); font-weight: 600; }
.logo-custom img { max-height: 42px; width: auto; }

/* ================================================================== HEADER */
.site-header {
	position: fixed;
	inset-inline: 0; top: 0;
	z-index: 60;
	transition: background 0.4s, box-shadow 0.4s, border-color 0.4s, backdrop-filter 0.4s;
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
	background: color-mix(in srgb, var(--ink-950) 78%, transparent);
	backdrop-filter: blur(14px);
	border-bottom-color: var(--line);
}
.header-progress {
	position: absolute;
	top: 0; right: 0;
	height: 2px; width: 100%;
	transform: scaleX(0);
	transform-origin: right;
	background: linear-gradient(90deg, var(--neon-400), var(--brand-500));
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 14px;
}
.primary-nav { display: none; }
.nav-menu, .mobile-menu { list-style: none; }
.primary-nav .nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-link, .primary-nav .nav-menu a {
	position: relative;
	display: inline-block;
	padding: 8px 2px;
	font-size: 14px;
	font-weight: 500;
	color: var(--mist-400);
	transition: color 0.3s;
}
.nav-link::after, .primary-nav .nav-menu a::after {
	content: "";
	position: absolute;
	right: 0; bottom: 2px;
	height: 2px; width: 100%;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--brand-400), var(--neon-400));
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s var(--ease);
}
.nav-link:hover, .primary-nav .nav-menu a:hover,
.nav-link.is-active, .primary-nav .nav-menu a.is-active { color: #fff; }
.nav-link:hover::after, .primary-nav .nav-menu a:hover::after,
.nav-link.is-active::after, .primary-nav .nav-menu a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-cta { display: none; }

.burger {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px; height: 42px;
	padding: 10px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: rgb(255 255 255 / 0.04);
	cursor: pointer;
}
.burger span {
	height: 2px; border-radius: 2px;
	background: #fff;
	transition: transform 0.35s var(--ease), opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 55;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 96px 8vw 48px;
	background: color-mix(in srgb, var(--ink-950) 93%, transparent);
	backdrop-filter: blur(20px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-menu { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu a {
	display: block;
	font-size: clamp(1.6rem, 6vw, 2.4rem);
	font-weight: 800;
	color: var(--mist-200);
	padding-block: 10px;
	transform: translateY(26px);
	opacity: 0;
	transition: transform 0.6s var(--ease), opacity 0.6s, color 0.3s;
}
.mobile-nav.is-open .mobile-menu a { transform: none; opacity: 1; }
.mobile-menu a:hover { color: var(--neon-400); }

@media (min-width: 1024px) {
	.primary-nav { display: block; }
	.header-cta { display: inline-flex; }
	.burger, .mobile-nav { display: none; }
}

/* ================================================================== FOOTER */
.site-footer {
	position: relative;
	border-top: 1px solid var(--line);
	background: linear-gradient(to bottom, transparent, var(--ink-950));
}
.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(28px, 4vw, 56px);
	padding-block: clamp(60px, 8vw, 88px);
}
.footer-about p {
	margin-top: 18px;
	font-size: 13px;
	line-height: 2.05;
	color: var(--mist-500);
	max-width: 300px;
}
.footer-social { margin-top: 22px; display: flex; gap: 10px; }
.footer-social a {
	width: 40px; height: 40px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	border: 1px solid var(--line);
	color: var(--mist-400);
	background: rgb(255 255 255 / 0.02);
	transition: all 0.3s var(--ease);
}
.footer-social a:hover {
	color: #fff;
	border-color: transparent;
	background: linear-gradient(135deg, var(--brand-500), var(--neon-500));
	transform: translateY(-3px);
}
.footer-col h2 {
	font-size: 13.5px;
	font-weight: 850;
	color: #fff;
}
.footer-col ul { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
	font-size: 13px;
	color: var(--mist-400);
	transition: color 0.3s, padding 0.3s var(--ease);
}
.footer-col a:hover { color: var(--neon-300); padding-right: 5px; }
.footer-contact li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.95;
	color: var(--mist-400);
}
.footer-contact .icon { margin-top: 5px; flex-shrink: 0; color: var(--brand-300); }
.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-block: 22px;
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--mist-500);
}

@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; } }

/* ===================================================== PLAIN TEMPLATES */
/* page.php / index.php / 404.php — intentionally simple and readable. */
.plain-main {
	padding-top: clamp(150px, 18vh, 200px);
	padding-bottom: clamp(84px, 10vw, 140px);
	min-height: 70vh;
}
.plain-head { margin-bottom: clamp(36px, 5vw, 56px); }
.plain-title {
	font-size: clamp(1.9rem, 4.4vw, 3rem);
	font-weight: 850;
	line-height: 1.4;
	color: #fff;
}
.plain-lead { margin-top: 14px; max-width: 640px; color: var(--mist-400); font-size: 15px; line-height: 2; }

.plain-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}
.plain-card {
	border-radius: 22px;
	border: 1px solid var(--line);
	background: var(--card-bg);
	overflow: hidden;
	transition: border-color 0.4s, transform 0.5s var(--ease);
}
.plain-card:hover { border-color: color-mix(in srgb, var(--neon-400) 34%, transparent); transform: translateY(-4px); }
.plain-thumb { display: block; aspect-ratio: 4/3; overflow: hidden; }
.plain-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plain-card-body { padding: 22px; }
.plain-card-title { font-size: 1.05rem; font-weight: 800; line-height: 1.8; }
.plain-card-title a { color: #fff; transition: color 0.3s; }
.plain-card-title a:hover { color: var(--neon-300); }
.plain-card-meta { margin-top: 8px; font-size: 11.5px; color: var(--mist-500); }
.plain-card-excerpt { margin-top: 10px; font-size: 13px; line-height: 1.95; color: var(--mist-400); }

.page-content { max-width: 780px; color: var(--mist-200); font-size: 15.5px; line-height: 2.1; }
.page-content h2, .page-content h3, .page-content h4 { color: #fff; margin-block: 1.6em 0.6em; line-height: 1.6; }
.page-content p { margin-block: 1em; }
.page-content a { color: var(--neon-300); }
.page-content ul, .page-content ol { padding-right: 1.4em; margin-block: 1em; list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content img { border-radius: 16px; margin-block: 1.4em; }
.page-content blockquote {
	border-right: 3px solid var(--brand-500);
	padding: 6px 18px;
	margin-block: 1.4em;
	color: var(--mist-400);
}

.notfound { text-align: center; padding-block: clamp(50px, 8vw, 90px); }
.notfound-code {
	font-size: clamp(5rem, 18vw, 9rem);
	font-weight: 900;
	line-height: 1;
	background: linear-gradient(120deg, var(--brand-300), var(--neon-400));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound .plain-lead { margin-inline: auto; }
.notfound-search { max-width: 460px; margin: 26px auto 34px; }
.notfound-search .search-form { display: flex; gap: 10px; }
.notfound-search input[type="search"] {
	flex: 1;
	padding: 13px 18px;
	border-radius: 13px;
	border: 1.5px solid var(--line);
	background: rgb(255 255 255 / 0.03);
	color: #fff;
}
.notfound-search .search-submit {
	padding: 13px 22px; border-radius: 13px; cursor: pointer;
	background: linear-gradient(120deg, var(--brand-500), var(--brand-600));
	color: #fff; font-weight: 700;
}

.pagination { margin-top: 40px; display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers {
	padding: 9px 16px; border-radius: 11px;
	border: 1px solid var(--line);
	color: var(--mist-400); font-size: 13px; font-weight: 700;
	transition: all 0.3s;
}
.pagination .page-numbers.current { background: linear-gradient(120deg, var(--brand-500), var(--brand-600)); color: #fff; border-color: transparent; }
.pagination .page-numbers:hover:not(.current) { color: #fff; border-color: var(--mist-500); }

.wp-block-image figcaption { font-size: 12px; color: var(--mist-500); margin-top: 8px; }

/* ----------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.eyebrow::before { animation: none !important; }
}
