/* =====================================================
   Zayeat — سیستم طراحی «فلز مذاب»
   توکن‌های رنگ به‌صورت پیش‌فرض؛ در ران‌تایم توسط Customizer
   در <style id="zayeat-customizer-vars"> بازنویسی می‌شوند.
   ===================================================== */

:root {
	--z-bg: #15110D;
	--z-bg-elevated: #1E1815;
	--z-bg-card: #211A16;
	--z-copper: #C8622D;
	--z-ember: #FF7A3D;
	--z-teal: #2E5F5A;
	--z-brass: #B8935A;
	--z-ash: #A39D95;
	--z-ash-dim: #6E6660;
	--z-white: #F5F1EC;
	--z-line: rgba(245, 241, 236, 0.08);

	--z-font-body: 'Vazirmatn', sans-serif;
	--z-font-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;

	--z-radius: 14px;
	--z-radius-lg: 22px;
	--z-shadow-ember: 0 0 40px rgba(255, 122, 61, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background: var(--z-bg);
	color: var(--z-white);
	font-family: var(--z-font-body);
	direction: rtl;
	line-height: 1.75;
	overflow-x: hidden;
}

/* کاهش حرکت برای کاربران حساس */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
body.zayeat-anim-off .zayeat-ember-particles,
body.zayeat-anim-off [data-reveal] { animation: none !important; opacity: 1 !important; transform: none !important; }

a { color: var(--z-ember); text-decoration: none; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; margin: 0 0 .5em; }

.zayeat-container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

/* =====================================================
   هدر شیشه‌ای (Glass Header)
   نکته فنی مهم: backdrop-filter روی خودِ .site-header
   یک containing block برای فرزندهای position:fixed می‌سازد
   و منوی موبایل را می‌شکند. راه‌حل: بلور روی ::before.
   ===================================================== */
.zayeat-header {
	position: sticky;
	top: 0;
	z-index: 100;
	transition: padding .3s ease;
}
.zayeat-header::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(21, 17, 13, 0.72);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--z-line);
	z-index: -1;
}
.zayeat-header .zayeat-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
}
.zayeat-header.is-shrunk .zayeat-container { padding-block: 10px; }
.zayeat-logo { font-weight: 900; font-size: 1.25rem; color: var(--z-white); }
.zayeat-logo span { color: var(--z-ember); }

.zayeat-nav { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.zayeat-nav a { color: var(--z-ash); font-weight: 600; }
.zayeat-nav a:hover { color: var(--z-ember); }

.zayeat-nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--z-line);
	border-radius: 10px;
	color: var(--z-white);
	padding: 8px 12px;
	cursor: pointer;
}

@media (max-width: 860px) {
	.zayeat-nav {
		position: fixed;
		inset-inline: 0;
		top: 64px;
		flex-direction: column;
		background: var(--z-bg-elevated);
		border-bottom: 1px solid var(--z-line);
		padding: 20px 24px;
		transform: translateY(-8px);
		opacity: 0;
		pointer-events: none;
		transition: all .25s ease;
	}
	.zayeat-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
	.zayeat-nav-toggle { display: block; }
}

/* =====================================================
   هیرو + عنصر امضادار: نوار ذوب (Melt Bar)
   ===================================================== */
.zayeat-hero {
	position: relative;
	padding: 96px 0 72px;
	overflow: hidden;
}
.zayeat-hero-grid {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 48px;
	align-items: center;
}
@media (max-width: 900px) { .zayeat-hero-grid { grid-template-columns: 1fr; } }

.zayeat-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--z-font-mono);
	font-size: .78rem;
	letter-spacing: .12em;
	color: var(--z-brass);
	border: 1px solid var(--z-line);
	border-radius: 999px;
	padding: 6px 14px;
	margin-bottom: 20px;
}
.zayeat-eyebrow::before { content: '●'; color: var(--z-ember); animation: zayeat-pulse 2s infinite; }

.zayeat-hero h1 {
	font-size: clamp(2.1rem, 4vw, 3.4rem);
	line-height: 1.25;
}
.zayeat-hero p.zayeat-subtitle {
	color: var(--z-ash);
	font-size: 1.05rem;
	max-width: 46ch;
	margin-bottom: 32px;
}

.zayeat-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, var(--z-copper), var(--z-ember));
	color: #1A0E08;
	font-weight: 800;
	padding: 14px 28px;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	box-shadow: var(--z-shadow-ember);
	transition: transform .2s ease, box-shadow .2s ease;
}
.zayeat-btn:hover { transform: translateY(-2px); box-shadow: 0 0 55px rgba(255,122,61,.4); color: #1A0E08; }
.zayeat-btn-ghost {
	background: transparent;
	color: var(--z-white);
	border: 1px solid var(--z-line);
	box-shadow: none;
}

/* نوار ذوب: گیج افقی که با قیمت امروز پر می‌شود و می‌درخشد */
.zayeat-meltbar {
	position: relative;
	background: var(--z-bg-elevated);
	border: 1px solid var(--z-line);
	border-radius: var(--z-radius-lg);
	padding: 28px;
}
.zayeat-meltbar-label {
	display: flex;
	justify-content: space-between;
	font-family: var(--z-font-mono);
	font-size: .8rem;
	color: var(--z-ash);
	margin-bottom: 10px;
}
.zayeat-meltbar-track {
	position: relative;
	height: 14px;
	border-radius: 999px;
	background: rgba(255,255,255,.05);
	overflow: hidden;
}
.zayeat-meltbar-fill {
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	bottom: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--z-teal), var(--z-copper), var(--z-ember));
	background-size: 200% 100%;
	animation: zayeat-melt-flow 4s linear infinite;
	transition: width 1s ease;
}
.zayeat-meltbar-price {
	font-family: var(--z-font-mono);
	font-size: 2.2rem;
	font-weight: 700;
	margin-top: 18px;
}
.zayeat-meltbar-price small { font-size: 1rem; color: var(--z-ash); font-weight: 400; margin-right: 8px; }

@keyframes zayeat-melt-flow { 0% { background-position: 0 0; } 100% { background-position: -200% 0; } }
@keyframes zayeat-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ذرات اِمبر شناور (اتمسفر پس‌زمینه هیرو) */
.zayeat-ember-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.zayeat-ember-particle {
	position: absolute;
	bottom: -20px;
	width: 4px; height: 4px;
	border-radius: 50%;
	background: var(--z-ember);
	box-shadow: 0 0 8px 2px rgba(255,122,61,.6);
	animation: zayeat-float 8s linear infinite;
	opacity: 0;
}
@keyframes zayeat-float {
	0% { transform: translateY(0) translateX(0); opacity: 0; }
	10% { opacity: .8; }
	90% { opacity: .4; }
	100% { transform: translateY(-70vh) translateX(20px); opacity: 0; }
}

/* =====================================================
   کارت‌های قیمت زنده
   ===================================================== */
.zayeat-section { padding: 72px 0; }
.zayeat-section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.zayeat-section-head .zayeat-eyebrow { margin-inline: auto; }
.zayeat-section-head p { color: var(--z-ash); }

.zayeat-price-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
}
.zayeat-price-card {
	background: var(--z-bg-card);
	border: 1px solid var(--z-line);
	border-radius: var(--z-radius);
	padding: 22px;
	position: relative;
	overflow: hidden;
	transition: transform .25s ease, border-color .25s ease;
}
.zayeat-price-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 0%), rgba(255,122,61,.14), transparent 70%);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}
.zayeat-price-card:hover { transform: translateY(-4px); border-color: rgba(255,122,61,.35); }
.zayeat-price-card:hover::after { opacity: 1; }

.zayeat-price-card h3 { font-size: 1rem; color: var(--z-ash); margin-bottom: 10px; }
.zayeat-price-value { font-family: var(--z-font-mono); font-size: 1.6rem; font-weight: 700; }
.zayeat-price-unit { font-size: .8rem; color: var(--z-ash-dim); margin-inline-start: 4px; }
.zayeat-price-change { font-family: var(--z-font-mono); font-size: .85rem; margin-top: 8px; display: inline-block; }
.zayeat-trend-up { color: #6FCF97; }
.zayeat-trend-down { color: #EB5757; }
.zayeat-trend-flat { color: var(--z-ash); }

/* =====================================================
   جدول قیمت زنده (صفحه قیمت)
   ===================================================== */
.zayeat-price-table { width: 100%; border-collapse: collapse; }
.zayeat-price-table th, .zayeat-price-table td {
	padding: 16px 14px;
	border-bottom: 1px solid var(--z-line);
	text-align: start;
}
.zayeat-price-table th { color: var(--z-ash); font-weight: 600; font-size: .85rem; }
.zayeat-price-table td { font-family: var(--z-font-mono); }
.zayeat-price-table tr:hover td { background: rgba(255,255,255,.02); }

/* =====================================================
   چرا ما / نحوه کار
   ===================================================== */
.zayeat-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.zayeat-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .zayeat-grid-4, .zayeat-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .zayeat-grid-4, .zayeat-grid-3 { grid-template-columns: 1fr; } }

.zayeat-feature-card {
	background: var(--z-bg-elevated);
	border: 1px solid var(--z-line);
	border-radius: var(--z-radius);
	padding: 26px;
}
.zayeat-feature-card .zayeat-icon-dot {
	width: 42px; height: 42px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--z-teal), var(--z-brass));
	margin-bottom: 16px;
}

.zayeat-step {
	position: relative;
	padding-inline-start: 54px;
}
.zayeat-step-index {
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--z-bg-elevated);
	border: 1px solid var(--z-copper);
	color: var(--z-copper);
	font-family: var(--z-font-mono);
	display: flex; align-items: center; justify-content: center;
	font-weight: 700;
}

/* =====================================================
   فرم لید
   ===================================================== */
.zayeat-form { background: var(--z-bg-card); border: 1px solid var(--z-line); border-radius: var(--z-radius-lg); padding: 32px; }
.zayeat-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .zayeat-form-grid { grid-template-columns: 1fr; } }
.zayeat-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.zayeat-field label { font-size: .85rem; color: var(--z-ash); }
.zayeat-field input, .zayeat-field select, .zayeat-field textarea {
	background: var(--z-bg);
	border: 1px solid var(--z-line);
	border-radius: 10px;
	padding: 12px 14px;
	color: var(--z-white);
	font-family: var(--z-font-body);
}
.zayeat-field input:focus, .zayeat-field select:focus, .zayeat-field textarea:focus {
	outline: 2px solid var(--z-ember);
	outline-offset: 1px;
}
.zayeat-form-status { margin-top: 14px; font-size: .9rem; }
.zayeat-form-status.success { color: #6FCF97; }
.zayeat-form-status.error { color: #EB5757; }

/* =====================================================
   نمودار تاریخچه قیمت
   ===================================================== */
.zayeat-chart-wrap { background: var(--z-bg-card); border: 1px solid var(--z-line); border-radius: var(--z-radius-lg); padding: 24px; }
.zayeat-chart-filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.zayeat-chart-filters select, .zayeat-chart-filters input {
	background: var(--z-bg-elevated); border: 1px solid var(--z-line); border-radius: 10px;
	padding: 8px 12px; color: var(--z-white); font-family: var(--z-font-body);
}

/* =====================================================
   اسکرول ریویل
   ===================================================== */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* =====================================================
   فوتر
   ===================================================== */
.zayeat-footer { border-top: 1px solid var(--z-line); padding: 56px 0 28px; margin-top: 40px; }
.zayeat-footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 900px) { .zayeat-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .zayeat-footer-grid { grid-template-columns: 1fr; } }
.zayeat-footer h4 { color: var(--z-ash); font-size: .85rem; }
.zayeat-footer-bottom { text-align: center; color: var(--z-ash-dim); font-size: .8rem; margin-top: 40px; }

/* فوکوس کیبورد قابل مشاهده در همه‌جا */
:focus-visible { outline: 2px solid var(--z-ember); outline-offset: 2px; }
