/* Homepage «مراحل همکاری سایکو» (inc/process.php): a wheel of steps turned by the scroll, the active step's photo in
   a card beside it. process.js adds .is-wheel; without it (no JS, reduced motion, very short screens) the steps are a
   plain list with their photos. Geometry is in container units of the wheel area, so it follows the screen height. */
.scico-process {
	--process-headingSize: 32px;
	--process-titleSize: 24px;
	--process-bodySize: 16px;
	--process-headingWeight: 800;
	--process-stepWeight: 700;
	--process-bodyWeight: 400;
	--process-background: #1b1f19;
	--process-headingColor: #fff;
	--process-stepColor: #fff;
	--process-bodyColor: #bbbeb9;
	--process-accent: #b4bbb0;
	--process-cardColor: #252823;
	--process-lineColor: #3f443d;
	--process-gutter: clamp(16px, 6.667vw, 96px);
	position: relative;
	margin-block: 0;
	background: var(--process-background);
	color: var(--process-stepColor);
	padding-bottom: 120px;
	overflow-x: clip;
}
.wp-block-post-content > .scico-process { margin-block: 0; }
.scico-process *, .scico-process *::before, .scico-process *::after { box-sizing: border-box; }

/* Heading row: title on the right, text and button on the left. */
.scico-process__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
	gap: 24px 64px;
	align-items: start;
	max-width: 1248px;
	margin: 0 auto;
	padding: 120px var(--process-gutter) 24px;
	box-sizing: content-box;
}
/* -0.08em lifts the title's letters level with the first line of the text beside it (Peyda's taller line box). */
.scico-process__title { margin: -0.08em 0 0; color: var(--process-headingColor); font-size: var(--process-headingSize); font-weight: var(--process-headingWeight); line-height: 1.5; }
.scico-process__lead p { margin: 0; color: var(--process-bodyColor); font-size: var(--process-bodySize); font-weight: var(--process-bodyWeight); line-height: 1.85; }
.scico-process__button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-width: 220px;
	min-height: 48px;
	margin-top: 24px;
	padding: 10px 16px;
	border-radius: 4px;
	background: #4c504a;
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 200ms ease;
}
.scico-process__button img { display: block; flex: none; width: 24px; height: 24px; padding: 5px 8px; object-fit: contain; transition: transform 200ms ease; }
.scico-process__button:focus-visible, .scico-process__link:focus-visible { outline: 2px solid var(--process-accent); outline-offset: 3px; }

/* Plain list (no wheel). */
.scico-process__scroller { padding: 48px 0 0; }
.scico-process__steps {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 48px 32px;
	max-width: 1248px;
	margin: 0 auto;
	padding: 0 var(--process-gutter);
	box-sizing: content-box;
	list-style: none;
}
.scico-process__ring, .scico-process__visual, .scico-process__connector { display: none; }
.scico-process__spoke { display: flex; align-items: flex-start; gap: 16px; }
.scico-process__number {
	display: grid;
	place-items: center;
	flex: none;
	width: 48px;
	height: 48px;
	border: 1px solid var(--process-accent);
	border-radius: 50%;
	color: var(--process-stepColor);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	transition: border-color 300ms ease, background-color 300ms ease, box-shadow 300ms ease;
}
.scico-process__copy { min-width: 0; text-align: right; }
.scico-process__copy h3 { margin: 0 0 6px; color: var(--process-stepColor); font-size: var(--process-titleSize); font-weight: var(--process-stepWeight); line-height: 1.45; }
.scico-process__copy p { margin: 0; color: var(--process-bodyColor); font-size: var(--process-bodySize); font-weight: var(--process-bodyWeight); line-height: 1.8; }
.scico-process__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--process-accent); font-size: 15px; font-weight: 500; text-decoration: none; }
.scico-process__link svg { flex: none; transition: transform 200ms ease; }
.scico-process__thumb { margin: 20px 0 0; padding: 6px; border-radius: 16px; background: var(--process-cardColor); aspect-ratio: 4 / 3; }
.scico-process__thumb img { display: block; width: 100%; height: 100%; border-radius: 11px; object-fit: cover; }

/* ---- Wheel ---- */
.scico-process.is-wheel {
	--process-dim: 0.28;
	--process-stageTop: var(--wp-admin--admin-bar--height, 0px);
	--process-stageHeight: calc(100vh - var(--process-stageTop));
	--process-turn: 1;
}
@supports (height: 100svh) {
	.scico-process.is-wheel { --process-stageHeight: calc(100svh - var(--process-stageTop)); }
}
.scico-process.is-wheel .scico-process__scroller {
	height: calc(var(--process-stageHeight) + (var(--process-count) - 1) * var(--process-perStep) * var(--process-stageHeight) / 100);
	padding: 0;
}
.scico-process.is-wheel .scico-process__stage {
	position: sticky;
	top: var(--process-stageTop);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, min(32vw, 470px));
	align-items: center;
	height: var(--process-stageHeight);
	padding-inline-end: var(--process-gutter);
	overflow: hidden;
}
.scico-process.is-wheel .scico-process__wheel {
	--u: min(1cqh, 1.1cqw);
	--offset: calc(10 * var(--u));
	--ring: calc(44 * var(--u));
	--core: calc(10.5 * var(--u));
	--coreR: calc(var(--ring) - var(--core));
	--line: calc(5.5 * var(--u));
	--num: clamp(40px, calc(6.6 * var(--u)), 64px);
	--gap: clamp(14px, calc(2.6 * var(--u)), 28px);
	--text: clamp(200px, calc(100cqw + var(--offset) - var(--ring) - var(--line) - var(--num) - var(--gap) - 40px), 400px);
	position: relative;
	align-self: stretch;
	container-type: size;
}

/* Photo ring: centred just past the right edge, its photo turning with the steps. */
.scico-process.is-wheel .scico-process__ring {
	display: block;
	position: absolute;
	top: 50%;
	right: calc(-1 * var(--offset) - var(--ring));
	width: calc(2 * var(--ring));
	height: calc(2 * var(--ring));
	margin-top: calc(-1 * var(--ring));
	padding: calc(1.4 * var(--u));
	border: 1px solid var(--process-lineColor);
	border-radius: 50%;
	-webkit-mask-image: linear-gradient(to bottom, transparent 2%, #000 26%, #000 74%, transparent 98%);
	mask-image: linear-gradient(to bottom, transparent 2%, #000 26%, #000 74%, transparent 98%);
}
.scico-process__photo {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--process-cardColor) center / cover no-repeat;
	transform: rotate(calc(var(--d, 0) * var(--process-angle) * var(--process-turn) * 1deg));
	will-change: transform;
}
.scico-process__core {
	position: absolute;
	inset: var(--core);
	border: 1px solid var(--process-lineColor);
	border-radius: 50%;
	background: var(--process-background);
}
.scico-process__core::before {
	content: "";
	position: absolute;
	inset: 24%;
	border: 1px solid var(--process-lineColor);
	border-radius: 50%;
	opacity: 0.6;
}
.scico-process__core-number { display: none; }
.scico-process.has-core-number .scico-process__core-number {
	display: block;
	position: absolute;
	top: 50%;
	/* Centred in the band between the disc's edge and its inner circle (::before, radius 0.52 of the disc). */
	left: calc(0.24 * var(--coreR));
	transform: translate(-50%, -50%);
	color: var(--process-accent);
	font-size: calc(0.3 * var(--coreR));
	font-weight: 900;
	line-height: 1;
	opacity: 0.12;
}

/* Steps: each one is a spoke from the wheel's centre, turned by its distance from the active step. */
.scico-process.is-wheel .scico-process__steps { display: block; position: absolute; inset: 0; max-width: none; margin: 0; padding: 0; }
.scico-process.is-wheel .scico-process__step {
	position: absolute;
	top: 50%;
	right: calc(-1 * var(--offset));
	width: 0;
	height: 0;
	opacity: var(--o, 1);
	transform: rotate(calc(var(--off, var(--i)) * var(--process-angle) * var(--process-turn) * -1deg));
	transform-origin: 0 0;
}
.scico-process.is-wheel .scico-process__spoke {
	position: absolute;
	top: 0;
	right: 0;
	align-items: center;
	gap: 0;
	padding-right: var(--ring);
	transform: translateY(-50%);
	pointer-events: none;
}
.scico-process.is-wheel .scico-process__connector {
	display: block;
	flex: none;
	width: var(--line);
	height: 1px;
	background: linear-gradient(to left, transparent, var(--process-accent) 40%);
	opacity: 0;
	transition: opacity 300ms ease;
}
.scico-process.is-wheel .scico-process__number {
	width: var(--num);
	height: var(--num);
	border-color: transparent;
	font-size: clamp(14px, calc(1.8 * var(--u)), 17px);
	pointer-events: auto;
}
.scico-process.is-wheel .scico-process__copy { flex: none; width: var(--text); margin-right: var(--gap); pointer-events: auto; }
.scico-process.is-wheel .scico-process__thumb { display: none; }
.scico-process.is-wheel .scico-process__step:not(.is-active) { cursor: pointer; }
.scico-process.is-wheel .scico-process__step.is-active .scico-process__connector { opacity: 1; }
.scico-process.is-wheel .scico-process__step.is-active .scico-process__number { border-color: var(--process-accent); box-shadow: 0 0 0 6px rgb(180 187 176 / 8%); }

/* Photo card. */
.scico-process.is-wheel .scico-process__visual { display: block; position: relative; z-index: 1; }
.scico-process__card {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	max-height: 70vh;
	margin-inline-start: auto;
	border: 1px solid var(--process-lineColor);
	border-radius: 16px;
	background: var(--process-cardColor);
	box-shadow: 0 24px 64px rgb(0 0 0 / 22%);
}
.scico-process__card img {
	position: absolute;
	inset: 6px;
	width: calc(100% - 12px);
	height: calc(100% - 12px);
	border-radius: 11px;
	object-fit: cover;
	opacity: 0;
	transform: scale(1.06);
	transition: opacity 600ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.scico-process__card img.is-active { opacity: 1; transform: none; }

@media (hover: hover) {
	.scico-process__button:hover { background: #5e635c; }
	.scico-process__button:hover img { transform: translateX(-4px); }
	.scico-process__link:hover svg { transform: translate(-2px, -2px); }
	.scico-process.is-wheel .scico-process__step:not(.is-active):hover { opacity: min(1, calc(var(--o, 0.3) * 2 + 0.1)); }
	.scico-process.is-wheel .scico-process__step:not(.is-active):hover .scico-process__number { border-color: var(--process-lineColor); }
	.scico-process__card:hover img.is-active { transform: scale(1.04); }
}

@media (max-width: 1100px) {
	.scico-process { padding-bottom: 96px; }
	.scico-process__head { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 20px 40px; padding-top: 96px; }
	.scico-process__title { font-size: min(var(--process-headingSize), 28px); }
	.scico-process.is-wheel .scico-process__stage { grid-template-columns: minmax(0, 1fr) minmax(0, min(32vw, 400px)); }
	.scico-process__copy h3 { font-size: min(var(--process-titleSize), 20px); }
	.scico-process__copy p { font-size: min(var(--process-bodySize), 15px); line-height: 1.75; }
}

/* Phones and portrait tablets: the wheel on top, the card below it. */
@media (max-width: 781px) {
	.scico-process__head { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 64px; }
	.scico-process__title { margin-top: 0; font-size: min(var(--process-headingSize), 24px); }
	.scico-process__lead p { font-size: min(var(--process-bodySize), 15px); line-height: 1.8; }
	.scico-process__button { margin-top: 20px; }
	.scico-process { padding-bottom: 64px; }
	.scico-process__scroller { padding: 32px 0 0; }
	.scico-process.is-wheel { --process-turn: 1.5; --process-dim: 0.2; }
	.scico-process.is-wheel .scico-process__stage {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr) auto;
		padding: 0 0 24px;
	}
	.scico-process.is-wheel .scico-process__wheel {
		--u: min(1cqh, 0.95cqw);
		--offset: calc(16 * var(--u));
		--ring: calc(40 * var(--u));
		--core: calc(9.5 * var(--u));
		--line: calc(4 * var(--u));
		--num: 36px;
		--gap: 12px;
		--text: clamp(150px, calc(100cqw + var(--offset) - var(--ring) - var(--line) - var(--num) - var(--gap) - 16px), 400px);
	}
	.scico-process.is-wheel .scico-process__number { font-size: 13px; }
	.scico-process__copy h3 { font-size: min(var(--process-titleSize), 18px); margin-bottom: 4px; }
	.scico-process__copy p { font-size: min(var(--process-bodySize), 14px); line-height: 1.7; }
	.scico-process__link { font-size: 14px; margin-top: 6px; }
	.scico-process.is-wheel .scico-process__visual { padding: 0 16px; }
	.scico-process__card { aspect-ratio: 16 / 10; width: 100%; max-width: 560px; max-height: 34vh; margin-inline: auto; border-radius: 14px; }
	.scico-process__card img { inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 10px; }
}

/* Phones: «درخواست مشاوره» spans the column (mobile pass, 2026-11-05). */
@media (max-width: 600px) {
	.scico-process { --process-gutter: 16px; }
	.scico-process__button { display: flex; width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.scico-process__card img, .scico-process__number, .scico-process__connector, .scico-process__button, .scico-process__button img, .scico-process__link svg { transition: none; }
}

/* Editor: the wheel without the scroll; a step is chosen by clicking it. */
.scico-process--editor.is-wheel .scico-process__scroller { height: auto; }
.scico-process--editor.is-wheel .scico-process__stage { position: relative; top: 0; height: 760px; }
.scico-process--editor .scico-process__card-tools { position: absolute; bottom: 24px; left: 24px; z-index: 2; display: flex; gap: 8px; }
