/* Section 6 — how it works (Figma «Landing · How it works» 1440 wide, «Mobile · How it works» 390 wide).
   Three cards in a row under a timeline; below 1024px one under the other with the timeline as a rail at their right.
   Each picture is drawn at 338×320 on .step__canvas and scaled by --k (steps.js fits it on narrower computers). */

.steps { padding: 80px 0 140px; } /* .sec: the frame (base.css). */

.steps__inner {
	width: var(--container);
	margin: 0 auto;
	padding: 70px 40px 0;
}

.steps__title {
	max-width: 1000px;
	font-size: clamp(26px, 3.61vw, 52px);
	font-weight: 900;
	line-height: 1.35;
}
.steps__title span { color: var(--subtle); }

.steps__list {
	display: flex;
	gap: 20px;
	margin: 70px 0 0;
	padding: 0;
	list-style: none;
}

.step {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 0;
}

/* The timeline: a node above each card, a line from each node to the next one's (right to left). */
.step__rail {
	position: relative;
	display: flex;
	justify-content: center;
	height: 52px;
	margin-bottom: 46px;
}

.step__node {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: 1.5px solid var(--coral);
	border-radius: 50%;
	background: var(--white);
	box-shadow: 0 6px 16px rgba(21, 19, 31, 0.06);
	font-size: 20px;
	font-weight: 900;
	line-height: 26px;
}

.step__line {
	position: absolute;
	top: 25px;
	right: 50%;
	width: calc(100% + 20px);
	height: 2px;
	border-radius: 1px;
	background: var(--coral);
	transform-origin: right;
}
.step:last-child .step__line { display: none; }

/* In view, once: the line draws from the right and the nodes light up in turn (steps.js arms it). */
.steps__list.is-armed .step__node,
.steps__list.is-armed .step__line {
	transition: opacity 0.35s, transform 0.4s var(--ease-out);
	transition-delay: calc(var(--n) * 0.4s);
}
.steps__list.is-armed .step__line { transition-delay: calc(var(--n) * 0.4s + 0.1s); transition-timing-function: linear; }
.steps__list.is-armed .step__node { opacity: 0.3; transform: scale(0.85); }
.steps__list.is-armed .step__line { transform: scaleX(0); }
.steps__list.is-playing .step__node { opacity: 1; transform: none; }
.steps__list.is-playing .step__line { transform: none; }
.step:nth-child(1) { --n: 0; }
.step:nth-child(2) { --n: 1; }
.step:nth-child(3) { --n: 2; }

/* The card ---------------------------------------------------------------------------------------------------------- */

.step__card {
	--k: var(--fit, 1);
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 10px 10px 0;
	border: 1px solid rgba(21, 19, 31, 0.08);
	border-radius: 36px;
	background: var(--white);
}

.step__visual {
	position: relative;
	height: calc(320px * var(--k));
	overflow: hidden;
	border-radius: 28px;
	background: var(--sand);
}

.step__canvas {
	position: absolute;
	top: 0;
	left: 50%;
	width: 338px;
	height: 320px;
	margin-left: -169px;
	transform: scale(var(--k));
	transform-origin: 50% 0;
}
.step__canvas > * { position: absolute; }
.step__canvas .icon { flex: none; }

/* 1 · install: the plugin's card, the cursor on «فعال‌سازی», and «پلک» new in the admin menu. */
.plugin {
	left: 20px;
	top: 26px;
	display: flex;
	flex-direction: column;
	align-items: flex-start; /* RTL: the right edge. */
	gap: 14px;
	width: 300px;
	height: 139px;
	padding: 16px;
	border-radius: 22px;
	background: var(--white);
	box-shadow: 0 10px 26px rgba(21, 19, 31, 0.1);
}
.plugin__info { display: flex; align-items: center; gap: 12px; }
.plugin__icon {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	background: var(--coral);
	color: var(--ink-2);
}
.plugin__icon .icon { width: 33.5px; height: 33.5px; }
.plugin__names { display: flex; flex-direction: column; gap: 2px; }
.plugin__names b { font-size: 18px; font-weight: 900; line-height: 23px; }
.plugin__names span { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 16px; }
.plugin__names code { color: var(--subtle); font-size: 11px; line-height: 14px; direction: ltr; text-align: right; }
.plugin__buttons { display: flex; align-items: center; gap: 8px; }
.plugin__activate,
.plugin__details { border-radius: 999px; font-size: 13px; line-height: 17px; white-space: nowrap; }
.plugin__activate {
	padding: 8px 18px 9px;
	background: var(--coral);
	box-shadow: 0 6px 14px rgba(255, 107, 74, 0.35);
	color: var(--white);
	font-weight: 700;
}
.plugin__details { padding: 9px 16px 10px; box-shadow: inset 0 0 0 1px rgba(21, 19, 31, 0.12); font-weight: 600; }
.plugin__cursor { left: 262px; top: 129px; width: 26px; height: 26px; overflow: visible; }

.wpmenu {
	left: 150px;
	top: 196px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 170px;
	height: 182px;
	padding: 10px 8px 30px;
	border-radius: 18px;
	background: #1d2327;
}
.wpmenu__item {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 34px;
	padding: 8px 12px 9px;
	border-radius: 10px;
	color: #c3c4c7;
	font-size: 13px;
	font-weight: 500;
	line-height: 17px;
}
.wpmenu__item .icon { width: 16px; height: 16px; color: #a7aaad; }
.wpmenu__item--pelk { background: var(--coral); color: var(--white); font-weight: 700; }
.wpmenu__item--pelk .icon { color: var(--white); }
.wpmenu__item em {
	padding: 1px 7px 2px;
	border-radius: 999px;
	background: var(--white);
	color: var(--coral-deep);
	font-size: 10px;
	font-style: normal;
	font-weight: 700;
	line-height: 13px;
}

/* 2 · create: the live preview and the story's form. */
.preview {
	left: 18px;
	top: 40px;
	width: 116px;
	height: 240px;
	padding: 4px;
	border-radius: 22px;
	background: #0b0a12;
	box-shadow: 0 12px 26px rgba(21, 19, 31, 0.2);
}
.preview__screen {
	position: relative;
	display: block;
	height: 100%;
	overflow: hidden;
	border-radius: 18px;
	background: center / cover no-repeat;
	color: var(--white);
}
.preview__screen::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 120px;
	background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
}
.preview__screen > * { position: absolute; z-index: 1; }
.preview__bars { top: 10px; right: 6px; left: 6px; display: flex; gap: 3px; }
.preview__bars i { flex: 1; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.4); }
.preview__bars i:first-child { background: var(--white); }
.preview__screen b { top: 176px; right: 8px; font-size: 11px; font-weight: 900; line-height: 14px; white-space: nowrap; }
.preview__cta {
	top: 202px;
	right: 8px;
	padding: 3px 10px 4px;
	border-radius: 999px;
	background: var(--white);
	color: var(--ink);
	font-size: 9px;
	font-weight: 700;
	line-height: 12px;
}

.form {
	left: 142px;
	top: 26px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 180px;
}
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__label { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 14px; }
.form__input {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 9px 12px 10px;
	border-radius: 12px;
	background: var(--white);
	box-shadow: inset 0 0 0 1px rgba(21, 19, 31, 0.08);
	font-size: 13px;
	font-weight: 500;
	line-height: 17px;
}
.form__input--date { height: 37px; font-size: 12px; line-height: 16px; }
.form__input--date .icon { width: 15px; height: 15px; color: var(--coral); }
.form__slides { display: flex; gap: 8px; width: 184px; }
.form__slide {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: center / cover no-repeat;
	color: var(--white);
}
.form__slide.is-on { box-shadow: inset 0 0 0 2px var(--coral); }
.form__slide .icon { width: 14px; height: 14px; }
.form__slide--text { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); font-size: 13px; font-weight: 900; line-height: 17px; }
.form__slide--add { background: var(--white); box-shadow: inset 0 0 0 1px rgba(21, 19, 31, 0.1); color: var(--subtle); }
.form__slide--add .icon { width: 16px; height: 16px; }

/* 3 · place: «محل نمایش» open, the home page picked. */
.place__label { top: 22px; right: 18px; font-size: 12px; font-weight: 600; line-height: 16px; }
.place__select {
	left: 20px;
	top: 46px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 300px;
	height: 43px;
	padding: 11px 14px 12px 12px;
	border: 1.5px solid var(--coral);
	border-radius: 14px;
	background: var(--white);
	box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.18);
	font-size: 13px;
	font-weight: 500;
	line-height: 17px;
}
.place__select .icon { width: 16px; height: 16px; color: var(--muted); }
.place__value { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.place__options {
	left: 20px;
	top: 104px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 300px;
	padding: 6px;
	border-radius: 16px;
	background: var(--white);
	box-shadow: 0 12px 30px rgba(21, 19, 31, 0.14);
}
.place__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 33px;
	padding: 8px 10px 9px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
}
.place__option .icon { width: 15px; height: 15px; color: var(--subtle); }
.place__option.is-on { background: #fff1ec; color: var(--coral-deep); font-weight: 600; }
.place__option.is-on .icon { color: var(--coral-deep); }
.place__option.is-on .icon--tick { width: 14px; height: 14px; color: var(--coral); }

@media (max-width: 1180px) {
	.steps__inner { padding-inline: 0; }
}

/* Tablets and phones: one under the other, the rail at their right. ------------------------------------------------- */

@media (max-width: 1023px) {
	.steps__list { flex-direction: column; gap: 0; margin-top: 30px; }

	.step { flex-direction: row; gap: 12px; padding-bottom: 16px; }
	.step:last-child { padding-bottom: 0; }

	.step__rail {
		flex: none;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		width: 44px;
		height: auto;
		margin: 0;
	}
	.step__node { width: 44px; height: 44px; font-size: 18px; line-height: 23px; }
	.step__line {
		top: 44px;
		right: 21px;
		bottom: -16px; /* Down to the next node. */
		width: 2px;
		height: auto;
		transform-origin: top;
	}
	.steps__list.is-armed .step__line { transform: scaleY(0); }
	.steps__list.is-playing .step__line { transform: none; }

	.step__card { flex: 1; min-width: 0; }
	.step__card { --k: 1; }
}

@media (max-width: 767px) {
	.steps { padding: 36px 0 44px; }
	.steps__inner { padding-top: 48px; }
	.steps__title { font-size: 26px; line-height: 1.4; }

	.step__card { --k: 0.8225; padding: 8px 8px 0; border-radius: 28px; } /* 263px high, as in the design. */
	.step__visual { border-radius: 22px; }
	.step__card .ftext { padding: 18px 16px 22px; }
	.step__card .ftext__title { font-size: 22px; }
	.step__card .ftext__body { font-size: 15px; }
}
