/*
 * Hero — Block: ds-hero
 * Full-viewport black stage, generative Tehran map behind minimal type.
 *
 * @package Dreamy_Signal
 */

.ds-hero {
	--dsh-bg: #000;
	--dsh-fg: #fff;
	--dsh-muted: rgba(255, 255, 255, 0.58);
	--dsh-faint: rgba(255, 255, 255, 0.34);
	--dsh-line: rgba(255, 255, 255, 0.12);
	--dsh-accent: #ff4a1a;
	--dsh-pad-x: clamp(1.1rem, 3.4vw, 3.25rem);
	--dsh-pad-y: clamp(1.1rem, 2.6vw, 2.15rem);
	--dsh-dock: 6.4rem;

	background: var(--dsh-bg);
	box-sizing: border-box;
	color: var(--dsh-fg);
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
	isolation: isolate;
	overflow: hidden;
	padding:
		var(--dsh-pad-y)
		max(var(--dsh-pad-x), env(safe-area-inset-right, 0px))
		clamp(0.9rem, 2vw, 1.5rem)
		max(var(--dsh-pad-x), env(safe-area-inset-left, 0px));
	position: relative;
	width: 100%;
}

.ds-hero *,
.ds-hero *::before,
.ds-hero *::after {
	box-sizing: border-box;
}

.ds-hero[lang="en"] {
	font-family: var(--ds-font-en);
}

.ds-hero[lang="fa"],
.ds-hero[lang="ar"] {
	font-family: var(--ds-font-fa), var(--ds-font-en);
}

/* ---------- map stage ---------- */

.ds-hero__stage {
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.ds-hero__canvas {
	display: block;
	height: 100%;
	inset: 0;
	opacity: 0;
	position: absolute;
	transition: opacity 900ms ease;
	width: 100%;
}

.ds-hero.is-map .ds-hero__canvas {
	opacity: 1;
}

.ds-hero__spot {
	background: radial-gradient(circle, rgba(148, 186, 255, 0.1), rgba(255, 255, 255, 0.025) 44%, transparent 70%);
	height: 34rem;
	inset-block-start: 0;
	inset-inline-start: 0;
	mix-blend-mode: screen;
	opacity: 0;
	position: absolute;
	transform: translate(-50%, -50%);
	transition: opacity 620ms ease;
	width: 34rem;
}

.ds-hero.is-live .ds-hero__spot {
	opacity: 1;
}

.ds-hero__scrim {
	background:
		radial-gradient(ellipse at 50% 44%, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.26) 38%, transparent 64%),
		linear-gradient(180deg, rgba(0, 0, 0, 0.76) 0%, transparent 24%, transparent 62%, rgba(0, 0, 0, 0.9) 100%);
	inset: 0;
	position: absolute;
}

/* Thin instrument scanlines over the map. */
.ds-hero__scan {
	background: repeating-linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.028) 0 1px,
		transparent 1px 4px
	);
	inset: 0;
	mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 78%, transparent 98%);
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 78%, transparent 98%);
	position: absolute;
}

/* ---------- frame ---------- */

.ds-hero__frame {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: clamp(1rem, 2.4vh, 2rem);
	margin-inline: auto;
	max-width: min(96rem, 100%);
	min-height: 0;
	position: relative;
	width: 100%;
	z-index: 1;
}

.ds-hero__top,
.ds-hero__bottom {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	justify-content: space-between;
	min-width: 0;
}

.ds-hero__mark,
.ds-hero__meta,
.ds-hero__hud,
.ds-hero__scroll-label {
	direction: ltr;
	font-family: var(--ds-font-mono);
	font-size: 0.56rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	unicode-bidi: isolate;
}

.ds-hero__mark {
	color: var(--dsh-fg);
	font-weight: 500;
}

.ds-hero__meta {
	align-items: center;
	color: var(--dsh-faint);
	display: inline-flex;
	gap: 0.5rem;
}

.ds-hero__pulse {
	background: var(--dsh-accent);
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(255, 74, 26, 0.55);
	height: 5px;
	width: 5px;
}

.ds-hero.is-live .ds-hero__pulse {
	animation: ds-hero-pulse 2.6s ease-out infinite;
}

@keyframes ds-hero-pulse {
	70% {
		box-shadow: 0 0 0 9px rgba(255, 74, 26, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(255, 74, 26, 0);
	}
}

/* ---------- core copy ---------- */

.ds-hero__core {
	align-items: center;
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: clamp(0.85rem, 1.8vh, 1.35rem);
	justify-content: center;
	min-height: 0;
	min-width: 0;
	text-align: center;
	width: 100%;
}

.ds-hero__title {
	display: flex;
	flex-direction: column;
	font-family: var(--ds-font-fa);
	font-size: clamp(2.6rem, 8.4vw, 7.5rem);
	font-weight: 800;
	gap: 0.08em;
	letter-spacing: -0.03em;
	line-height: 1.08;
	margin: 0;
	max-width: 100%;
	min-width: 0;
	text-wrap: balance;
	width: 100%;
}

.ds-hero[lang="en"] .ds-hero__title {
	font-family: var(--ds-font-en);
	gap: 0.04em;
	letter-spacing: -0.055em;
	line-height: 0.96;
}

.ds-hero__line-clip {
	display: block;
	margin-inline: auto;
	max-width: 100%;
	overflow: hidden;
	overflow-clip-margin: 0.18em;
	overflow-wrap: anywhere;
	padding-block: 0.1em 0.18em;
	width: max-content;
}

.ds-hero[dir="rtl"] .ds-hero__line-clip {
	padding-block: 0.14em 0.24em;
}

.ds-hero__line {
	display: block;
	overflow-wrap: anywhere;
	padding-inline: 0.04em;
	will-change: transform;
}

.ds-hero__line--soft {
	-webkit-text-fill-color: color-mix(in srgb, var(--dsh-fg) 14%, transparent);
	-webkit-text-stroke: 1.15px color-mix(in srgb, var(--dsh-fg) 68%, transparent);
	color: color-mix(in srgb, var(--dsh-fg) 14%, transparent);
	paint-order: stroke fill;
}

.ds-hero__lead {
	color: var(--dsh-muted);
	font-family: var(--ds-font-fa);
	font-size: clamp(0.88rem, 1.1vw, 1.02rem);
	line-height: 1.9;
	margin: 0;
	max-width: min(42ch, 100%);
}

.ds-hero[lang="en"] .ds-hero__lead {
	font-family: var(--ds-font-en);
	line-height: 1.65;
	max-width: 38ch;
}

.ds-hero__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	justify-content: center;
	margin-top: 0.35rem;
	max-width: 100%;
}

.ds-hero__cta {
	align-items: center;
	border: 1px solid var(--dsh-line);
	border-radius: 999px;
	color: var(--dsh-fg);
	display: inline-flex;
	font-family: var(--ds-font-fa);
	font-size: 0.86rem;
	font-weight: 700;
	gap: 0.6rem;
	min-height: 3rem;
	overflow: visible;
	padding-inline: 1.5rem;
	position: relative;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition:
		background-color 420ms var(--ds-transition-ease, ease),
		border-color 420ms ease,
		color 420ms ease,
		transform 420ms var(--ds-transition-ease, ease);
}

.ds-hero[lang="en"] .ds-hero__cta {
	font-family: var(--ds-font-en);
	letter-spacing: -0.02em;
}

.ds-hero__cta--solid {
	background: var(--dsh-fg);
	border-color: var(--dsh-fg);
	color: #000;
}

.ds-hero__cta--ghost {
	background: rgba(255, 255, 255, 0.03);
	color: var(--dsh-muted);
}

.ds-hero__cta-arrow {
	display: block;
	flex: 0 0 auto;
	height: 10px;
	overflow: visible;
	position: relative;
	transition: width 420ms var(--ds-transition-ease, ease);
	width: 14px;
}

.ds-hero__cta-arrow::before {
	background: currentColor;
	content: "";
	height: 1.5px;
	inset-block-start: calc(50% - 0.75px);
	inset-inline: 0 1px;
	position: absolute;
}

.ds-hero__cta-arrow::after {
	border-block-start: 1.5px solid currentColor;
	border-inline-end: 1.5px solid currentColor;
	box-sizing: border-box;
	content: "";
	height: 6px;
	inset-block-start: calc(50% - 3px);
	inset-inline-end: 0;
	position: absolute;
	transform: rotate(45deg);
	width: 6px;
}

.ds-hero[dir="rtl"] .ds-hero__cta-arrow,
[dir="rtl"] .ds-hero .ds-hero__cta-arrow {
	transform: scaleX(-1);
}

@media (hover: hover) and (pointer: fine) {
	.ds-hero__cta--solid:hover {
		transform: translateY(-2px);
	}

	.ds-hero__cta--solid:hover .ds-hero__cta-arrow {
		width: 22px;
	}

	.ds-hero__cta--ghost:hover {
		background: rgba(255, 255, 255, 0.08);
		border-color: rgba(255, 255, 255, 0.34);
		color: var(--dsh-fg);
		transform: translateY(-2px);
	}
}

.ds-hero__cta:focus-visible {
	outline: 2px solid var(--dsh-accent);
	outline-offset: 3px;
}

/* ---------- bottom row ---------- */

.ds-hero__bottom {
	padding-bottom: clamp(0.2rem, 1.2vh, 0.8rem);
}

/* Live map readout: whatever the cursor (or the idle tour) is hovering. */
.ds-hero__hud {
	align-items: center;
	border: 1px solid var(--dsh-line);
	border-radius: 999px;
	color: var(--dsh-faint);
	display: inline-flex;
	flex: 0 1 auto;
	flex-wrap: nowrap;
	gap: 0.6rem;
	letter-spacing: 0.22em;
	margin: 0;
	max-width: min(100%, 28rem);
	min-width: 0;
	padding: 0.42rem 0.9rem;
}

.ds-hero__hud-place {
	color: var(--dsh-fg);
	max-width: 12rem;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ds-hero__hud-dot {
	background: var(--dsh-accent);
	border-radius: 50%;
	flex: 0 0 auto;
	height: 4px;
	opacity: 0.9;
	width: 4px;
}

.ds-hero__hud-coord {
	flex: 0 1 auto;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.14em;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ds-hero__scroll {
	align-items: center;
	background: none;
	border: 0;
	color: var(--dsh-faint);
	cursor: pointer;
	display: inline-flex;
	gap: 0.6rem;
	padding: 0.35rem 0;
	transition: color 420ms ease;
	-webkit-tap-highlight-color: transparent;
}

.ds-hero__scroll:hover {
	color: var(--dsh-fg);
}

.ds-hero__scroll:focus-visible {
	outline: 2px solid var(--dsh-accent);
	outline-offset: 4px;
}

.ds-hero__scroll-rail {
	background: var(--dsh-line);
	display: block;
	height: 2.6rem;
	overflow: hidden;
	position: relative;
	width: 1px;
}

.ds-hero__scroll-dot {
	background: var(--dsh-fg);
	display: block;
	height: 0.85rem;
	inset-inline: 0;
	position: absolute;
	width: 1px;
}

.ds-hero.is-live .ds-hero__scroll-dot {
	animation: ds-hero-drop 2.1s cubic-bezier(0.66, 0, 0.34, 1) infinite;
}

@keyframes ds-hero-drop {
	0% {
		opacity: 0;
		transform: translateY(-100%);
	}

	28% {
		opacity: 1;
	}

	72% {
		opacity: 1;
	}

	100% {
		opacity: 0;
		transform: translateY(260%);
	}
}

@media (max-width: 1280px) {
	.ds-hero__title {
		font-size: clamp(2.35rem, 6.4vw, 5.4rem);
	}
}

@media (max-width: 1100px) {
	.ds-hero {
		--dsh-pad-x: clamp(1rem, 3vw, 2.2rem);
	}

	.ds-hero__title {
		font-size: clamp(2.15rem, 5.6vw, 4.4rem);
	}

	.ds-hero__lead {
		max-width: min(44ch, 100%);
	}
}

@media (max-width: 980px) {
	.ds-hero {
		--dsh-pad-x: clamp(0.9rem, 3.4vw, 1.6rem);
		height: auto;
		min-height: 100svh;
		overflow: visible;
		padding-bottom: calc(var(--dsh-dock) + env(safe-area-inset-bottom, 0px));
	}

	.ds-hero__frame {
		flex: 1 0 auto;
		gap: 1rem;
		min-height: calc(100svh - var(--dsh-pad-y) - var(--dsh-dock) - env(safe-area-inset-bottom, 0px) - 1.2rem);
	}

	.ds-hero__core {
		gap: 0.75rem;
	}

	.ds-hero__title {
		font-size: clamp(2.05rem, 6.8vw, 3.4rem);
	}

	.ds-hero[dir="rtl"] .ds-hero__title {
		line-height: 1.2;
	}

	.ds-hero[lang="en"] .ds-hero__title {
		font-size: clamp(2.2rem, 7.2vw, 3.65rem);
	}

	.ds-hero__lead {
		max-width: min(46ch, 100%);
	}

	.ds-hero__cta {
		min-height: 2.9rem;
	}

	.ds-hero__spot {
		height: 22rem;
		width: 22rem;
	}
}

@media (max-width: 720px) {
	.ds-hero {
		--dsh-pad-x: clamp(0.8rem, 4vw, 1.15rem);
		padding-inline:
			max(var(--dsh-pad-x), env(safe-area-inset-left, 0px))
			max(var(--dsh-pad-x), env(safe-area-inset-right, 0px));
	}

	.ds-hero__mark,
	.ds-hero__meta,
	.ds-hero__hud,
	.ds-hero__scroll-label {
		letter-spacing: 0.16em;
	}

	.ds-hero__title {
		font-size: clamp(1.9rem, 9vw, 2.7rem);
		line-height: 1.1;
	}

	.ds-hero[dir="rtl"] .ds-hero__title {
		letter-spacing: -0.02em;
		line-height: 1.26;
	}

	.ds-hero[lang="en"] .ds-hero__title {
		font-size: clamp(2rem, 9.6vw, 2.9rem);
		line-height: 0.98;
	}

	.ds-hero__line-clip {
		padding-block: 0.08em 0.16em;
	}

	.ds-hero[dir="rtl"] .ds-hero__line-clip {
		padding-block: 0.12em 0.22em;
	}

	.ds-hero__lead {
		font-size: 0.9rem;
		line-height: 1.75;
		max-width: min(34ch, 100%);
	}

	.ds-hero[lang="en"] .ds-hero__lead {
		line-height: 1.55;
	}

	.ds-hero__actions {
		gap: 0.5rem;
		width: auto;
		max-width: 100%;
	}

	.ds-hero__cta {
		flex: 0 1 auto;
		justify-content: center;
		min-height: 2.85rem;
		padding-inline: 1.2rem;
	}

	.ds-hero__bottom {
		align-items: center;
		flex-direction: column;
		gap: 0.75rem;
	}

	.ds-hero__hud {
		justify-content: center;
		letter-spacing: 0.14em;
		max-width: 100%;
		padding: 0.38rem 0.8rem;
	}

	.ds-hero__hud-dot,
	.ds-hero__hud-coord {
		display: none;
	}

	.ds-hero__hud-place {
		max-width: 16rem;
	}

	.ds-hero__scroll {
		align-self: center;
	}

	.ds-hero__scan {
		opacity: 0.45;
	}
}

@media (max-width: 480px) {
	.ds-hero {
		--dsh-pad-x: 0.78rem;
		padding-inline:
			max(0.78rem, env(safe-area-inset-left, 0px))
			max(0.78rem, env(safe-area-inset-right, 0px));
	}

	.ds-hero__top {
		gap: 0.4rem;
	}

	.ds-hero__mark,
	.ds-hero__meta {
		letter-spacing: 0.12em;
	}

	.ds-hero__title {
		font-size: clamp(1.7rem, 10.2vw, 2.35rem);
	}

	.ds-hero[lang="en"] .ds-hero__title {
		font-size: clamp(1.8rem, 10.8vw, 2.5rem);
	}

	.ds-hero__lead {
		font-size: 0.86rem;
	}

	.ds-hero__cta {
		min-height: 2.8rem;
		padding-inline: 1.05rem;
	}

	.ds-hero__hud {
		font-size: 0.52rem;
		letter-spacing: 0.12em;
		padding: 0.34rem 0.7rem;
	}

	.ds-hero__scroll-rail {
		height: 2rem;
	}

	.ds-hero__spot {
		display: none;
	}
}

@media (max-width: 360px) {
	.ds-hero__mark {
		max-width: 9rem;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.ds-hero__title {
		font-size: clamp(1.5rem, 11vw, 2rem);
	}

	.ds-hero[lang="en"] .ds-hero__title {
		font-size: clamp(1.6rem, 11.6vw, 2.1rem);
	}

	.ds-hero__actions {
		flex-direction: column;
		width: 100%;
	}

	.ds-hero__cta {
		width: 100%;
	}

	.ds-hero__hud-place {
		max-width: 12rem;
	}
}

@media (max-height: 760px) and (min-width: 981px) {
	.ds-hero {
		height: auto;
		min-height: 100dvh;
		overflow: visible;
		padding-bottom: calc(var(--dsh-dock) + env(safe-area-inset-bottom, 0px));
	}

	.ds-hero__title {
		font-size: clamp(2rem, 4.2vw, 3.4rem);
	}

	.ds-hero__core {
		gap: 0.7rem;
	}

	.ds-hero__lead {
		max-width: min(42ch, 100%);
	}
}

@media (orientation: landscape) and (max-height: 540px) {
	.ds-hero {
		height: auto;
		min-height: 0;
		overflow: visible;
		padding:
			0.55rem
			clamp(0.75rem, 3vw, 1.4rem)
			calc(5.6rem + env(safe-area-inset-bottom, 0px));
	}

	.ds-hero__frame {
		flex: none;
		gap: 0.45rem;
		min-height: 0;
	}

	.ds-hero__core {
		flex: none;
		gap: 0.4rem;
		padding-block: 0.1rem;
	}

	.ds-hero__title {
		font-size: clamp(1.3rem, 4.4vw, 2.05rem);
	}

	.ds-hero[dir="rtl"] .ds-hero__title {
		line-height: 1.18;
	}

	.ds-hero[lang="en"] .ds-hero__title {
		font-size: clamp(1.4rem, 4.8vw, 2.2rem);
		line-height: 0.98;
	}

	.ds-hero__lead {
		display: none;
	}

	.ds-hero__cta {
		min-height: 2.4rem;
		padding-inline: 1rem;
	}

	.ds-hero__bottom {
		align-items: center;
		flex-direction: row;
		gap: 0.7rem;
		justify-content: space-between;
	}

	.ds-hero__hud {
		max-width: 14rem;
		padding: 0.3rem 0.7rem;
	}

	.ds-hero__hud-dot,
	.ds-hero__hud-coord {
		display: none;
	}

	.ds-hero__scroll-rail {
		height: 1.5rem;
	}

	.ds-hero__spot,
	.ds-hero__scan {
		display: none;
	}
}

@media (pointer: coarse) {
	.ds-hero__cta {
		min-height: 2.9rem;
	}

	.ds-hero__scroll {
		min-height: 2.4rem;
	}

	.ds-hero__spot {
		display: none;
	}
}

@media (prefers-reduced-transparency: reduce) {
	.ds-hero__scrim {
		background:
			linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.88) 100%);
	}

	.ds-hero__line--soft {
		-webkit-text-fill-color: color-mix(in srgb, var(--dsh-fg) 62%, transparent);
		-webkit-text-stroke: 0;
		color: color-mix(in srgb, var(--dsh-fg) 62%, transparent);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ds-hero__spot {
		display: none;
	}

	.ds-hero__line {
		will-change: auto;
	}

	.ds-hero.is-live .ds-hero__pulse,
	.ds-hero.is-live .ds-hero__scroll-dot {
		animation: none;
	}
}
