/* Section 1 — hero (Figma «Landing · Hero · Light» 1440 wide, «Mobile · Hero» 390 wide; phones below 768px).
   Positions in the café mock follow the design in physical px (left/right): it is a picture of a page, drawn RTL. */

.hero {
	--h1: clamp(56px, 7.23vw, 104px);
	position: relative;
	overflow: clip;
	padding: 120px 0 226px;
}

/* The two vertical rules at the content's edges, the full height of the section. */
.hero::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: calc(var(--container) + 1px);
	border-inline: 1px solid var(--line);
	transform: translateX(-50%);
	pointer-events: none;
}

/* Top block: the frame between the two horizontal rules (grid, crosses, mono labels) holding the copy. */
.hero__top {
	position: relative;
	width: var(--container);
	margin: 0 auto;
	padding: 70px 0 102px;
}

.hero__top::before,
.hero__top::after {
	content: "";
	position: absolute;
	left: 50%;
	width: 100vw;
	height: 1px;
	background: var(--line);
	transform: translateX(-50%);
	pointer-events: none;
}
.hero__top::before { top: 0; }
.hero__top::after { bottom: 0; }

.hero__grid {
	--cell: 60px;
	position: absolute;
	inset: 1px 0 0 1px;
	background-image:
		linear-gradient(to left, rgba(21, 19, 31, 0.05) 1px, transparent 1px),
		linear-gradient(to top, rgba(21, 19, 31, 0.05) 1px, transparent 1px);
	background-size: var(--cell) var(--cell);
	-webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
	mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
	pointer-events: none;
}

.hero__cross {
	position: absolute;
	width: 15px;
	height: 15px;
	background:
		linear-gradient(rgba(21, 19, 31, 0.5), rgba(21, 19, 31, 0.5)) center / 1px 100% no-repeat,
		linear-gradient(rgba(21, 19, 31, 0.5), rgba(21, 19, 31, 0.5)) center / 100% 1px no-repeat;
	pointer-events: none;
}
.hero__cross--ts { top: -7px; left: -7px; }
.hero__cross--te { top: -7px; right: -8px; }
.hero__cross--bs { bottom: -7px; left: -7px; }
.hero__cross--be { bottom: -7px; right: -8px; }

.hero__mono {
	position: absolute;
	top: 14px;
	color: rgba(21, 19, 31, 0.35);
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	line-height: 14px;
	direction: ltr;
	pointer-events: none;
}
.hero__mono--left { left: 16px; }
.hero__mono--right { right: 16px; }

/* Copy ----------------------------------------------------------------------------------------------------------- */

.hero__copy {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 40px;
	padding: 6px 6px 6px 16px;
	border: 1px solid rgba(21, 19, 31, 0.1);
	border-radius: 999px;
	background: rgba(21, 19, 31, 0.06);
	color: rgba(21, 19, 31, 0.82);
	font-size: 14px;
	font-weight: 500;
	line-height: 18px;
	transition: background-color 0.2s;
}
a.hero__badge:hover { background: rgba(21, 19, 31, 0.09); }
.hero__badge .icon { width: 16px; height: 16px; color: var(--ink); opacity: 0.6; transition: transform 0.2s var(--ease-out); }
a.hero__badge:hover .icon { transform: translateX(-2px); }

.hero__badge-chip {
	padding: 4px 12px 5px;
	border-radius: 999px;
	background: var(--coral);
	color: var(--white);
	font-size: 13px;
	font-weight: 600;
	line-height: 17px;
}

.hero__title {
	margin-top: 32px;
	font-size: var(--h1);
	font-weight: 900;
	line-height: 1.18;
	letter-spacing: 0;
}

.hero__line { display: block; }

.hero__orb {
	position: relative;
	display: inline-block;
	width: 0.99em;
	height: 0.99em;
	margin-inline: 0.125em;
	vertical-align: -0.3em;
	filter: drop-shadow(0 0 0.17em rgba(255, 107, 74, 0.35)); /* Follows the ring and the photo: no white behind the ring's gap. */
}
.hero__orb img,
.hero__orb svg { position: absolute; }
.hero__orb img { inset: 7.7%; width: 84.6%; height: 84.6%; border-radius: 50%; object-fit: cover; }
.hero__orb svg { inset: 0; width: 100%; height: 100%; }

/* The design sets «این بار» tighter than the font's space. */
.hero__tight { word-spacing: -0.115em; }

.hero__line--brand {
	width: fit-content;
	margin-inline: auto;
	background: linear-gradient(90deg, var(--coral) 0%, var(--coral-mid) 55%, var(--coral-deep) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero__lead {
	max-width: 740px;
	margin-top: 24px;
	color: var(--muted);
	font-size: 20px;
	line-height: 1.8;
}

.hero__ctas {
	display: flex;
	flex-direction: row-reverse; /* «دمو را امتحان کن» at the right; the main button first in the page's order. */
	align-items: center;
	gap: 14px;
	margin-top: 40px;
}

.hero__install {
	height: 58px;
	gap: 10px;
	padding-inline: 34px 28px;
	box-shadow: 0 10px 30px rgba(21, 19, 31, 0.18);
}

.hero__try {
	height: 62px;
	gap: 12px;
	padding-inline: 14px 30px;
}

.hero__meta {
	margin-top: 24px;
	color: var(--subtle);
	font-size: 14px;
	font-weight: 500;
	line-height: 18px;
}
.hero__meta i { font-style: normal; margin-inline: 10px; }

/* «LIVE DEMO» pill, centred on the lower rule ------------------------------------------------------------------- */

.hero__live {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: center;
	margin-top: -19px;
}

.live-pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 38px;
	padding: 0 18px 0 16px;
	border: 1px solid rgba(21, 19, 31, 0.14);
	border-radius: 999px;
	background: var(--white);
	box-shadow: 0 4px 12px rgba(21, 19, 31, 0.06);
	color: rgba(21, 19, 31, 0.85);
	font-size: 14px;
	font-weight: 500;
	line-height: 18px;
}
.live-pill__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--coral);
	box-shadow: 0 0 8px 1px rgba(255, 107, 74, 0.9);
}
.live-pill__tag {
	color: var(--coral);
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 14px;
}

/* Demo: glow, ring, the stage and the shortcode row ------------------------------------------------------------ */

.hero__demo {
	position: relative;
	margin-top: 31px;
}

.hero__glow {
	position: absolute;
	top: 70px;
	left: 50%;
	width: 1560px;
	height: 700px;
	transform: translate(-50%, -50%);
	background:
		radial-gradient(ellipse 380px 110px at 50% 46%, rgba(255, 154, 127, 0.2), transparent),
		radial-gradient(closest-side, rgba(255, 107, 74, 0.14), rgba(255, 107, 74, 0.06) 50%, transparent);
	pointer-events: none;
}

.hero__ring {
	position: absolute;
	top: 0;
	left: 50%;
	width: 1680px;
	height: 1680px;
	max-width: none;
	transform: translateX(-50%);
	pointer-events: none;
}
.hero__ring-line { fill: none; stroke: url(#hero-ring-fade); stroke-width: 8.2; }
.hero__ring-glow { fill: none; stroke: url(#hero-ring-fade); stroke-width: 16.4; opacity: 0.3; }
.hero__ring-dot { fill: var(--coral); }
.hero__ring-dot-glow { fill: var(--coral); opacity: 0.9; }

.stage {
	--stage: min(1040px, calc(100vw - 2 * max(var(--gutter), 96px)));
	position: relative;
	z-index: 1;
	width: var(--stage);
	margin: 0 auto;
}

.stage__frame {
	position: relative;
	z-index: 1;
	padding: 9px;
	border: 1px solid var(--line);
	border-radius: 40px;
	background: rgba(21, 19, 31, 0.03);
	box-shadow: 0 30px 70px rgba(21, 19, 31, 0.1);
}

.stage__browser {
	position: relative;
	height: 640px;
	overflow: hidden;
	border-radius: 30px;
	background: var(--white);
}
.stage__browser::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 110px;
	background: linear-gradient(rgba(255, 255, 255, 0), var(--white));
	pointer-events: none;
}

.stage__chrome {
	position: relative;
	height: 56px;
	background: var(--sand);
}
.stage__lights { position: absolute; top: 22px; left: 24px; display: flex; gap: 8px; direction: ltr; }
.stage__lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.stage__lights i:nth-child(2) { background: #febc2e; }
.stage__lights i:nth-child(3) { background: #28c840; }

.stage__url {
	position: absolute;
	top: 11px;
	left: 50%;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 35px;
	padding: 0 18px 0 16px;
	border: 1px solid var(--sand-line);
	border-radius: 999px;
	background: var(--white);
	color: var(--muted);
	font-family: var(--mono);
	font-size: 13px;
	transform: translateX(-50%);
}
.stage__url .icon { width: 14px; height: 14px; color: var(--subtle); }

.cafe {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 76px;
	padding: 0 36px;
	border-bottom: 1px solid var(--sand-line);
}
.cafe__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	font-size: 18px;
	font-weight: 900;
	line-height: 23px;
}
.cafe__logo {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #4a2e22;
	color: var(--white);
}
.cafe__links {
	position: absolute;
	left: 50%;
	display: flex;
	gap: 32px;
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
	transform: translateX(-50%);
}
.cafe__icons { display: flex; gap: 8px; }
.cafe__icons > span {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--sand);
	color: var(--ink-2);
}
.cafe__icons .icon { width: 18px; height: 18px; }

.stage__bar {
	min-height: 125px;
	margin-top: 26px;
	padding: 0 36px 0 40px;
}

.stage__products {
	position: absolute;
	top: 362px;
	right: 36px;
	left: 36px;
	display: grid;
	grid-template-columns: repeat(3, minmax(240px, 302px));
	gap: 21px;
}
.product { display: flex; flex-direction: column; gap: 12px; }
.product img { width: 100%; height: 210px; border-radius: 22px; object-fit: cover; }
.product__name { color: var(--ink); font-size: 17px; font-weight: 600; line-height: 22px; }
.product__price { color: var(--muted); font-size: 14px; font-weight: 500; line-height: 18px; }

.stage__sticker {
	position: absolute;
	z-index: 3;
	top: -35px;
	left: -57px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 41px;
	padding: 0 18px 0 14px;
	border-radius: 999px;
	background: var(--coral);
	box-shadow: 0 10px 24px rgba(255, 107, 74, 0.4);
	color: var(--white);
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	transform: rotate(-7deg);
	transform-origin: 0 0;
}
.stage__sticker .icon { width: 20px; height: 20px; }

.stage__glow {
	position: absolute;
	top: 220px;
	right: -210px;
	width: 560px;
	height: 800px;
	background: radial-gradient(closest-side, rgba(255, 107, 74, 0.22), rgba(255, 107, 74, 0.08) 55%, transparent);
	pointer-events: none;
}

.stage__phone {
	position: absolute;
	z-index: 2;
	top: 312px;
	right: -73px;
	width: 273px;
	height: 594px;
	overflow: hidden;
	border-radius: 39.44px;
	background: var(--ink-2);
	box-shadow: 0 20.4px 40.8px rgba(28, 26, 43, 0.22);
	pointer-events: none;
}
.stage__phone img { width: 100%; height: 100%; object-fit: cover; }
.stage__phone::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 6.8px var(--ink-2);
}

/* Hints and tap ripple: hero.js places them on the bar's circles (Pelk draws the pin badge itself). */
.stage__overlay {
	position: absolute;
	z-index: 4;
	inset: 0;
	pointer-events: none;
}

[data-anchor] {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0s 0.2s;
}
[data-anchor].is-placed {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s ease;
}

.tap { width: 0; height: 0; }
.tap__ring {
	position: absolute;
	top: 0;
	left: 0;
	width: 128px;
	height: 128px;
	border: 2px solid rgba(255, 107, 74, 0.55);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	animation: tap-ripple 1.6s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.tap__ring + .tap__ring {
	width: 160px;
	height: 160px;
	border-color: rgba(255, 107, 74, 0.25);
	animation-delay: 0.35s;
}
.tap__cursor {
	position: absolute;
	max-width: none;
	top: 4px;
	left: 0;
	width: 34px;
	height: 34px;
	transform-origin: 6px 4px;
	animation: tap-press 1.6s ease-in-out infinite;
}

@keyframes tap-ripple {
	0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
	20%, 70% { opacity: 1; }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}
@keyframes tap-press {
	0%, 40%, 100% { transform: translate(0, 0) scale(1); }
	10% { transform: translate(-3px, -3px) scale(0.9); }
	22% { transform: translate(0, 0) scale(1); }
}

/* Gone after the first touch of the bar (localStorage `landing_tapped`); «دمو را امتحان کن» shows them once more. */
[data-start-hint] { transition: opacity 0.2s ease, visibility 0s 0.2s; }
.landing-tapped .stage [data-start-hint]:not(.is-pulsing) { opacity: 0; visibility: hidden; }
.stage__sticker.is-pulsing,
.tap.is-pulsing { animation: start-pulse 0.8s var(--ease-out) 2; }
@keyframes start-pulse {
	50% { filter: drop-shadow(0 0 14px rgba(255, 107, 74, 0.55)); }
}

@media (prefers-reduced-motion: reduce) {
	.tap__ring,
	.tap__cursor,
	.stage__sticker.is-pulsing,
	.tap.is-pulsing { animation: none; }
	.tap__ring { opacity: 1; }
}

/* Shortcode row: centred in the stage, beside the phone. */
.shortcode {
	display: flex;
	justify-content: center;
	width: var(--stage, 1040px);
	--stage: min(1040px, calc(100vw - 2 * max(var(--gutter), 96px)));
	margin: 40px auto 0;
	padding-right: 220px;
}

.shortcode__caption { display: none; }

.shortcode__pill {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	height: 54px;
	padding: 0 22px 0 7px;
	border: 1px solid rgba(21, 19, 31, 0.1);
	border-radius: 999px;
	background: var(--white);
	box-shadow: 0 6px 18px rgba(21, 19, 31, 0.06);
}

.shortcode__note {
	padding-left: 16px;
	border-left: 1px solid rgba(21, 19, 31, 0.12);
	color: var(--muted);
	font-size: 15px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
}

.shortcode__code {
	color: var(--ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
}
.shortcode__code b { color: var(--coral-deep); font-weight: 500; }

.shortcode__copy {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 18px 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--ink);
	color: var(--white);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}
.shortcode__copy:hover { background: #2a2738; }
.shortcode__copy .icon { width: 16px; height: 16px; }
.shortcode__copy .icon--check,
.shortcode__copy.is-copied .icon--copy { display: none; }
.shortcode__copy.is-copied .icon--check { display: block; }

/* Between phone and computer: a smaller headline, a narrower stage and a smaller phone. The sticker and the café's
   links leave when there is no room for them (phones have neither). */
@media (min-width: 768px) and (max-width: 1180px) {
	.stage__phone { transform: scale(0.8); transform-origin: 100% 0; right: -40px; }
	.stage__glow { right: -180px; }
	.shortcode { padding-right: 160px; }
	.hero__ring { display: none; }
}
@media (min-width: 768px) and (max-width: 1023px) {
	.stage__sticker { display: none; }
}
@media (min-width: 768px) and (max-width: 959px) {
	.cafe__links { display: none; }
}

/* Phones ---------------------------------------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.hero { padding: 86px 0 16px; }
	.hero::before { width: calc(100vw - 39px); }

	.hero__top { padding: 38px 0 30px; }
	.hero__grid { --cell: 35px; }
	.hero__cross--te,
	.hero__cross--be { right: -8px; }
	.hero__mono { top: 10px; font-size: 10px; line-height: 13px; }
	.hero__mono--left { left: 8px; }
	.hero__mono--right { right: 8px; }

	.hero__title { --h1: 44px; margin-top: 22px; }
	.hero__orb { width: 1.045em; height: 1.045em; vertical-align: -0.32em; margin-inline: -0.05em; }

	.hero__lead { margin-top: 18px; font-size: 16px; line-height: 1.75; }

	.hero__ctas {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		width: 100%;
		margin-top: 28px;
	}
	.hero__install { height: 56px; }
	.hero__try { height: 58px; padding-inline: 14px; }

	.hero__meta { margin-top: 18px; font-size: 13px; line-height: 1.75; }
	.hero__meta > span { display: block; }
	.hero__meta i { margin-inline: 6px; }
	.hero__meta .hero__meta-join { display: none; }

	.hero__live { margin-top: 34px; }
	.hero__demo { margin-top: 34px; }

	.hero__glow {
		top: 112px;
		width: 620px;
		height: 360px;
		background: radial-gradient(closest-side, rgba(255, 107, 74, 0.22), rgba(255, 107, 74, 0.07) 55%, transparent);
	}
	.hero__ring,
	.stage__glow,
	.stage__phone,
	.stage__sticker,
	.stage__chrome,
	.cafe,
	.stage__products,
	.hint { display: none; }

	.stage { width: 100%; }
	.stage__frame {
		padding: 0;
		border: 0;
		border-block: 1px solid var(--line);
		border-radius: 0;
		background: var(--white);
		box-shadow: 0 24px 50px rgba(21, 19, 31, 0.07);
	}
	.stage__browser { height: auto; border-radius: 0; overflow: visible; }
	.stage__browser::after { display: none; }
	.stage__bar {
		margin: 0;
		padding: 42px 0 15px;
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px);
		mask-image: linear-gradient(to right, transparent 0, #000 56px);
	}
	.stage__bar.is-end { -webkit-mask-image: none; mask-image: none; }
	.stage__overlay { overflow: hidden; }

	.shortcode {
		flex-direction: column;
		align-items: center;
		gap: 10px;
		width: auto;
		margin: 26px 20px 0;
		padding: 0;
	}
	.shortcode__caption {
		display: block;
		color: var(--muted);
		font-size: 14px;
		font-weight: 500;
		line-height: 18px;
	}
	.shortcode__note { display: none; }
	.shortcode__pill { gap: 12px; padding: 0 20px 0 7px; }
	.shortcode__code { font-size: 13px; }
	.shortcode__copy { width: 38px; padding: 0; justify-content: center; }
	.shortcode__copy-label { display: none; }
}
