/* ============================================================
   Hamsafar landing — hamsafar-landing.css
   Scoped to the isolated Hamsafar landing page template only.
   Native RTL, Persian-first, Vazirmatn, WCAG-conscious.
   ============================================================ */

/* ---------- Vazirmatn (locally hosted) ---------- */
@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens (authoritative values from UI Manifest doc 08) ---------- */
:root {
	/* color */
	--hs-canvas: #fffcf8;
	--hs-surface: #ffffff;
	--hs-surface-secondary: #fffaf3;
	--hs-surface-muted: #f7f5ef;
	--hs-surface-supportive: #f1fbfb;
	--hs-surface-selected: #e5f8f9;
	--hs-mint: #cfece0;
	--hs-teal-500: #168c91;

	--hs-text-primary: #0c2d30;
	--hs-text-secondary: #566b6e;
	--hs-text-tertiary: #5e7275;
	--hs-text-inverse: #ffffff;

	--hs-action: #0b6f75;
	--hs-action-hover: #085c61;
	--hs-action-pressed: #06494d;
	--hs-focus: #168c91;

	--hs-border-subtle: #e4e6e1;
	--hs-border-default: #d2d9d2;

	/* spacing */
	--hs-space-1: 0.25rem;
	--hs-space-2: 0.5rem;
	--hs-space-3: 0.75rem;
	--hs-space-4: 1rem;
	--hs-space-5: 1.25rem;
	--hs-space-6: 1.5rem;
	--hs-space-8: 2rem;
	--hs-space-10: 2.5rem;
	--hs-space-12: 3rem;
	--hs-space-16: 4rem;
	--hs-space-20: 5rem;

	/* radius */
	--hs-radius-sm: 0.5rem;
	--hs-radius-md: 0.75rem;
	--hs-radius-lg: 1rem;
	--hs-radius-xl: 1.25rem;
	--hs-radius-pill: 9999px;

	/* elevation */
	--hs-shadow-low: 0 1px 2px rgb(12 45 48 / 0.06);
	--hs-shadow-raised: 0 4px 12px rgb(12 45 48 / 0.08);

	/* motion */
	--hs-duration-fast: 120ms;
	--hs-duration-standard: 180ms;
	--hs-duration-moderate: 240ms;
	--hs-duration-slow: 320ms;
	--hs-easing-standard: cubic-bezier(0.2, 0, 0, 1);

	/* type + layout */
	--hs-font: 'Vazirmatn', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--hs-content-width: 1120px;
	--hs-gutter: clamp(1.25rem, 4vw, 3rem);
	--hs-header-h: 72px;
	--hs-section-pad: clamp(4rem, 9vw, 7rem);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--hs-header-h) + 1rem);
}

body {
	margin: 0;
	font-family: var(--hs-font);
	background: var(--hs-canvas);
	color: var(--hs-text-primary);
	font-size: 16px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--hs-focus);
	outline-offset: 2px;
	border-radius: var(--hs-radius-sm);
}

::selection {
	background: var(--hs-surface-selected);
	color: var(--hs-text-primary);
}

/* ---------- Skip link ---------- */
.hs-skip-link {
	position: absolute;
	inset-inline-start: 1rem;
	top: -100px;
	z-index: 100;
	background: var(--hs-action);
	color: var(--hs-text-inverse);
	padding: 0.75rem 1.25rem;
	border-radius: var(--hs-radius-md);
	text-decoration: none;
	font-weight: 600;
	transition: top var(--hs-duration-fast) ease;
}
.hs-skip-link:focus {
	top: 1rem;
}

/* ---------- Buttons ---------- */
.hs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 48px;
	padding-inline: 1.5rem;
	border-radius: var(--hs-radius-md);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition:
		background-color var(--hs-duration-fast) ease,
		border-color var(--hs-duration-fast) ease,
		color var(--hs-duration-fast) ease;
}

.hs-btn--primary {
	background: var(--hs-action);
	color: var(--hs-text-inverse);
}
.hs-btn--primary:hover {
	background: var(--hs-action-hover);
}
.hs-btn--primary:active {
	background: var(--hs-action-pressed);
}

.hs-btn--secondary {
	background: transparent;
	color: var(--hs-action);
	border-color: var(--hs-action);
}
.hs-btn--secondary:hover {
	background: var(--hs-surface-selected);
	border-color: var(--hs-action-hover);
	color: var(--hs-action-hover);
}
.hs-btn--secondary:active {
	background: var(--hs-surface-supportive);
}

.hs-btn--ghost {
	background: transparent;
	color: var(--hs-text-secondary);
	border-color: var(--hs-border-default);
}
.hs-btn--ghost:hover {
	color: var(--hs-text-primary);
	border-color: var(--hs-text-tertiary);
	background: var(--hs-surface);
}

.hs-btn--lg {
	min-height: 54px;
	padding-inline: 2rem;
	font-size: 1.0625rem;
	border-radius: var(--hs-radius-lg);
}

/* ---------- Header ---------- */
.hs-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 252, 248, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--hs-duration-fast) ease, box-shadow var(--hs-duration-fast) ease;
}
.hs-header.is-scrolled {
	border-bottom-color: var(--hs-border-subtle);
	box-shadow: var(--hs-shadow-low);
}

.hs-header__inner {
	max-width: var(--hs-content-width);
	margin-inline: auto;
	padding-inline: var(--hs-gutter);
	display: flex;
	align-items: center;
	gap: 1rem;
	height: var(--hs-header-h);
}

.hs-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
	flex-shrink: 0;
}
.hs-brand__mark {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #fdf1e1;
	padding: 2px;
	overflow: hidden;
	flex-shrink: 0;
}
.hs-brand__mark img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.hs-brand__word {
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.2;
}

.hs-nav {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	margin-inline-start: auto;
}
.hs-nav__list {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.hs-nav__list a {
	display: inline-block;
	padding-block: 0.375rem;
	border-radius: var(--hs-radius-sm);
	text-decoration: none;
	color: var(--hs-text-secondary);
	font-weight: 500;
	font-size: 0.9375rem;
}
.hs-nav__list a:hover {
	color: var(--hs-text-primary);
}
.hs-nav__cta {
	min-height: 44px;
	padding-inline: 1.25rem;
	font-size: 0.9375rem;
}

.hs-nav-toggle {
	display: none;
	margin-inline-start: auto;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--hs-border-subtle);
	border-radius: var(--hs-radius-md);
	cursor: pointer;
	color: var(--hs-text-primary);
}
.hs-nav-toggle__icon {
	display: grid;
	gap: 5px;
	width: 20px;
}
.hs-nav-toggle__bar {
	display: block;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform var(--hs-duration-standard) var(--hs-easing-standard);
}
body.hs-nav-open .hs-nav-toggle__bar:nth-child(1) {
	transform: translateY(3.5px) rotate(45deg);
}
body.hs-nav-open .hs-nav-toggle__bar:nth-child(2) {
	transform: translateY(-3.5px) rotate(-45deg);
}

/* ---------- Sections (shared) ---------- */
.hs-section {
	padding-block: var(--hs-section-pad);
}

.hs-container {
	max-width: var(--hs-content-width);
	margin-inline: auto;
	padding-inline: var(--hs-gutter);
}

.hs-narrow {
	max-width: 760px;
}

.hs-kicker {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hs-action);
}

.hs-section-title {
	margin: 0;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.4;
	max-width: 24em;
}

.hs-section-lead {
	margin: 1.25rem 0 0;
	font-size: 1.125rem;
	line-height: 1.9;
	color: var(--hs-text-secondary);
	max-width: 46em;
}

.hs-cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

/* ---------- Hero ---------- */
.hs-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 7vw, 4.5rem);
	text-align: center;
}
.hs-hero::before,
.hs-hero::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}
.hs-hero::before {
	width: 520px;
	height: 520px;
	inset-inline-start: -180px;
	top: -220px;
	background: radial-gradient(circle, rgb(229 248 249 / 0.9) 0%, rgb(229 248 249 / 0) 70%);
}
.hs-hero::after {
	width: 460px;
	height: 460px;
	inset-inline-end: -160px;
	bottom: -220px;
	background: radial-gradient(circle, rgb(255 250 243 / 0.9) 0%, rgb(255 250 243 / 0) 70%);
}

.hs-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 860px;
	margin-inline: auto;
	padding-inline: var(--hs-gutter);
}

.hs-hero__title {
	margin: 0;
	font-size: clamp(2.1rem, 5.5vw, 3.4rem);
	font-weight: 700;
	line-height: 1.4;
}

.hs-hero__lead {
	margin: 1.25rem auto 0;
	font-size: clamp(1.0625rem, 2vw, 1.25rem);
	line-height: 1.9;
	color: var(--hs-text-secondary);
	max-width: 34em;
}

.hs-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 2rem;
}

.hs-hero__visual {
	position: relative;
	z-index: 1;
	max-width: 680px;
	margin-inline: auto;
	margin-top: 3rem;
	opacity: 0.95;
}

/* entrance (progressive, subtle) */
.hs-hero__inner > * {
	animation: hs-fade-up 0.6s var(--hs-easing-standard) both;
}
.hs-hero__inner > *:nth-child(2) {
	animation-delay: 0.08s;
}
.hs-hero__inner > *:nth-child(3) {
	animation-delay: 0.16s;
}
.hs-hero__visual {
	animation: hs-fade-up 0.6s var(--hs-easing-standard) both;
	animation-delay: 0.24s;
}
@keyframes hs-fade-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- About / not a course ---------- */
.hs-prose-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.5rem;
	margin-top: 3rem;
}

.hs-prose h3 {
	margin: 0 0 0.625rem;
	padding-top: 1.125rem;
	border-top: 2px solid var(--hs-surface-selected);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.6;
}

.hs-prose p {
	margin: 0;
	color: var(--hs-text-secondary);
	font-size: 1rem;
	line-height: 1.9;
}

/* ---------- 100-station journey ---------- */
.hs-section--journey {
	background: var(--hs-surface-supportive);
}

.hs-journey {
	max-width: 880px;
	margin-inline: auto;
	margin-top: 3rem;
}

.hs-journey svg {
	width: 100%;
	height: auto;
}

.hs-journey__path {
	stroke-dasharray: 1400;
	stroke-dashoffset: 1400;
	transition: stroke-dashoffset 1.6s ease 0.15s;
}
.hs-journey.is-visible .hs-journey__path {
	stroke-dashoffset: 0;
}

.hs-journey-stops {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 0.875rem;
	margin: 1.5rem 0 0;
	padding: 0;
}
.hs-journey-stops li {
	display: inline-flex;
	align-items: center;
	gap: 0.875rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--hs-text-secondary);
	white-space: nowrap;
}
.hs-journey-stops li + li::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--hs-mint);
	flex-shrink: 0;
}

/* ---------- Steps (how it begins) ---------- */
.hs-steps {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.75rem 2.5rem;
	margin: 3rem 0 0;
	padding: 0;
}

.hs-step {
	padding-top: 1.25rem;
	border-top: 2px solid var(--hs-surface-selected);
}
.hs-step__num {
	display: block;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--hs-action);
}
.hs-step h3 {
	margin: 0.5rem 0 0.5rem;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.6;
}
.hs-step p {
	margin: 0;
	color: var(--hs-text-secondary);
	font-size: 1rem;
	line-height: 1.9;
	max-width: 36em;
}

/* ---------- Support / not alone ---------- */
.hs-section--support {
	background: var(--hs-surface-secondary);
}

.hs-support {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: clamp(2rem, 5vw, 4rem);
	background: var(--hs-surface);
	border: 1px solid var(--hs-border-subtle);
	border-radius: 24px;
	padding: clamp(2rem, 5vw, 3.5rem);
	box-shadow: var(--hs-shadow-low);
}

.hs-support__promise {
	margin: 1.5rem 0 1rem;
	font-size: clamp(1.375rem, 3vw, 1.875rem);
	font-weight: 700;
	line-height: 1.6;
	color: var(--hs-action);
}

.hs-support__text {
	margin: 0;
	color: var(--hs-text-secondary);
	font-size: 1.0625rem;
	line-height: 1.9;
	max-width: 40em;
}

.hs-support__note {
	margin: 1rem 0 0;
	font-size: 0.9375rem;
	color: var(--hs-text-tertiary);
	line-height: 1.8;
	max-width: 40em;
}

.hs-support__art {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 220px;
	flex-shrink: 0;
}

/* ---------- Mirrors ---------- */
.hs-split {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: clamp(2rem, 5vw, 4rem);
}

.hs-mirror-quote {
	margin: 2rem 0 0;
	padding-inline-start: 1.25rem;
	border-inline-start: 3px solid var(--hs-mint);
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--hs-text-primary);
	line-height: 1.9;
	max-width: 30em;
}

.hs-split__art {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 240px;
	flex-shrink: 0;
	opacity: 0.95;
}

/* ---------- Change ---------- */
.hs-section--change .hs-section-lead + .hs-section-lead {
	margin-top: 0.75rem;
}

/* ---------- Intro session ---------- */
.hs-section--intro {
	background: var(--hs-surface-selected);
}
.hs-section--intro .hs-section-title,
.hs-section--intro .hs-section-lead {
	text-align: center;
	margin-inline: auto;
}
.hs-section--intro .hs-cta-row {
	justify-content: center;
}
.hs-intro-note {
	margin: 1.25rem auto 0;
	text-align: center;
	color: var(--hs-text-secondary);
	font-size: 1.0625rem;
	max-width: 34em;
}

/* ---------- Final CTA ---------- */
.hs-section--final {
	text-align: center;
}
.hs-section--final .hs-section-title {
	margin-inline: auto;
}
.hs-section--final .hs-section-lead {
	margin-inline: auto;
}
.hs-section--final .hs-cta-row {
	justify-content: center;
}

/* ---------- Footer ---------- */
.hs-footer {
	background: var(--hs-surface);
	border-top: 1px solid var(--hs-border-subtle);
	padding-block: 2.5rem;
}

.hs-footer__inner {
	max-width: var(--hs-content-width);
	margin-inline: auto;
	padding-inline: var(--hs-gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
}

.hs-footer__brand {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
}
.hs-brand__mark--sm {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	padding: 1px;
}
.hs-footer__word {
	font-weight: 700;
	font-size: 1.0625rem;
}

.hs-footer__tagline {
	margin: 0;
	color: var(--hs-text-secondary);
	font-size: 0.9375rem;
}

.hs-footer__copy {
	margin: 0;
	color: var(--hs-text-tertiary);
	font-size: 0.875rem;
}

/* ---------- Reveal (progressive enhancement) ---------- */
.hs-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition:
		opacity 0.55s var(--hs-easing-standard),
		transform 0.55s var(--hs-easing-standard);
}
.hs-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
	.hs-prose-row {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}
	.hs-support {
		grid-template-columns: 1fr;
	}
	.hs-support__art {
		width: 180px;
	}
	.hs-split {
		grid-template-columns: 1fr;
	}
	.hs-split__art {
		width: 200px;
	}
}

@media (max-width: 860px) {
	:root {
		--hs-header-h: 64px;
	}

	.hs-nav-toggle {
		display: inline-flex;
	}

	.hs-nav {
		position: absolute;
		top: var(--hs-header-h);
		inset-inline: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		background: var(--hs-canvas);
		border-bottom: 1px solid var(--hs-border-subtle);
		box-shadow: var(--hs-shadow-raised);
		padding: 1rem var(--hs-gutter) 1.25rem;
	}
	body.hs-nav-open .hs-nav {
		display: flex;
	}
	.hs-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0.25rem;
	}
	.hs-nav__list a {
		display: block;
		padding: 0.75rem 0.5rem;
		font-size: 1rem;
		border-radius: var(--hs-radius-sm);
	}
	.hs-nav__list a:hover {
		background: var(--hs-surface-secondary);
	}
	.hs-nav__cta {
		width: 100%;
		margin-top: 0.5rem;
	}
}

@media (max-width: 640px) {
	.hs-steps {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
	.hs-support {
		border-radius: 20px;
		padding: 1.75rem 1.25rem;
	}
	.hs-hero__visual {
		margin-top: 2.25rem;
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.hs-hero__inner > *,
	.hs-hero__visual {
		animation: none;
	}

	.hs-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.hs-journey__path {
		stroke-dashoffset: 0;
		transition: none;
	}

	.hs-nav-toggle__bar {
		transition: none;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}