/**
 * Shared free-tool process steps + plan compare table.
 * Loaded by hub + tool pages (via maksut_tools_enqueue_shared_assets 'process').
 *
 * @package Maksut
 */

.aeo-process {
	margin: 24px 0 0;
	padding: 8px 0 72px;
	overflow-x: clip;
}

.aeo-process + .aeo-guide__layout {
	margin-top: 0;
}

.aeo-process__eyebrow {
	font-family: var(--mono, var(--ff-m, ui-monospace, monospace));
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fire, var(--orange, #e84e0a));
	text-align: center;
	margin: 0 0 10px;
}

.aeo-process__title {
	font-family: var(--display, var(--ff-d, sans-serif));
	font-size: clamp(36px, 5vw, 52px);
	letter-spacing: 0.04em;
	text-align: center;
	color: var(--ink, #181410);
	line-height: 1;
	margin: 0 0 36px;
}

.aeo-process__lede {
	text-align: center;
	max-width: 62ch;
	margin: -20px auto 36px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink-soft, var(--ink-muted, #625850));
}

.aeo-process__steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: aeo-process;
}

.aeo-process__step {
	position: relative;
	margin: 0;
	min-width: 0;
	padding: 0;
	display: flex;
}

.aeo-process__step:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 48px;
	left: 100%;
	width: 24px;
	height: 0;
	border-top: 2px dashed rgba(26, 23, 20, 0.16);
	pointer-events: none;
	z-index: 0;
}

.aeo-process__card {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(26, 23, 20, 0.08);
	border-radius: var(--radius-lg, 12px);
	padding: 24px 20px 26px;
	width: 100%;
	height: 100%;
	box-shadow: 0 1px 0 rgba(26, 23, 20, 0.04);
	box-sizing: border-box;
}

.aeo-process__num {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 999px;
	background: var(--ink, #181410);
	color: var(--cream, #f4efe6);
	font-family: var(--mono, var(--ff-m, ui-monospace, monospace));
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.aeo-process__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	margin: 0 0 16px;
	background: rgba(232, 78, 10, 0.12);
	color: var(--fire, var(--orange, #e84e0a));
	flex-shrink: 0;
}

.aeo-process__step-title {
	font-family: var(--sans, var(--ff-s, Georgia, serif));
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 10px;
	padding-right: 28px;
}

.aeo-process__step-link {
	color: var(--ink, #181410);
	text-decoration: none;
}

.aeo-process__step-link:hover {
	color: var(--fire, var(--orange, #e84e0a));
	text-decoration: underline;
	text-underline-offset: 3px;
}

.aeo-process__step-desc {
	font-size: 14px;
	line-height: 1.55;
	color: var(--ink-soft, var(--ink-muted, #625850));
	margin: 0;
	flex: 1;
}

.aeo-process__step-desc a {
	color: var(--fire, var(--orange, #e84e0a));
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Scroll reveal — process cards (JS: theme main.js .rv → .on) */
.aeo-process__card.rv {
	opacity: 0;
	transform: translateY(18px) scale(0.985);
	transform-origin: center top;
	transition:
		opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.aeo-process__card.rv.on {
	opacity: 1;
	transform: none;
}

.aeo-process__step:nth-child(2) .aeo-process__card.rv {
	transition-delay: 0.06s;
}

.aeo-process__step:nth-child(3) .aeo-process__card.rv {
	transition-delay: 0.12s;
}

.aeo-process__step:nth-child(4) .aeo-process__card.rv {
	transition-delay: 0.18s;
}

@media (prefers-reduced-motion: reduce) {
	.aeo-process__card.rv {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Compare table (guide + hub plans) */
.aeo-compare-table-wrap {
	overflow-x: auto;
	margin: 1.25rem 0 1.5rem;
	max-width: none;
	-webkit-overflow-scrolling: touch;
}

.aeo-compare-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.45;
}

.aeo-compare-table th,
.aeo-compare-table td {
	padding: 14px 16px;
	text-align: left;
	border: 1px solid rgba(26, 23, 20, 0.12);
	vertical-align: top;
}

.aeo-compare-table thead th {
	background: rgba(26, 23, 20, 0.04);
	font-weight: 700;
	color: var(--ink, #181410);
}

.aeo-compare-table tbody th {
	background: rgba(26, 23, 20, 0.03);
	font-weight: 600;
	color: var(--ink, #181410);
	width: 22%;
}

.aeo-compare-table td {
	color: var(--ink-mid, #3a3028);
}

.aeo-compare-table .aeo-compare-table__check {
	color: var(--orange-on-cream, #9a3808);
	font-weight: 500;
}

.aeo-compare-table .aeo-compare-table__cross {
	color: var(--ink-soft, var(--ink-muted, #625850));
}

.aeo-compare-table-note {
	color: var(--ink-soft, var(--ink-muted, #625850));
	font-size: 0.82rem;
	margin: 0.9rem 0 0;
}

.aeo-compare-table-note a {
	color: var(--fire, var(--orange, #e84e0a));
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (max-width: 1100px) {
	.aeo-process {
		padding-bottom: 56px;
	}

	.aeo-process__steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.aeo-process__step {
		padding: 0;
	}

	.aeo-process__step:not(:last-child)::after {
		display: none;
	}
}

@media (max-width: 900px) {
	.aeo-process__title {
		font-size: clamp(28px, 8vw, 40px);
		margin-bottom: 20px;
	}
}

@media (max-width: 560px) {
	.aeo-process {
		margin-top: 16px;
		padding-bottom: 48px;
	}

	.aeo-process__steps {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.aeo-process__step {
		padding: 0;
	}

	.aeo-process__card {
		padding: 20px 18px 22px;
	}

	.aeo-compare-table {
		font-size: 12px;
	}
}
