/* ==========================================================================
   SepehrDev — sales landing page and homepage
   ========================================================================== */

/* --- Hero ---------------------------------------------------------------- */

.sd-hero {
	padding-block-start: clamp(3.5rem, 9vw, 6.5rem);
	overflow: hidden;
}

/*
 * A faint grid behind the hero. It reads as technical without costing an
 * image request, and sits behind a radial mask so it fades out rather than
 * ending on a hard edge.
 */
.sd-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--sd-dark-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--sd-dark-line) 1px, transparent 1px);
	background-size: 56px 56px;
	opacity: .45;
	-webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
	pointer-events: none;
}

.sd-hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2.5rem, 6vw, 4rem);
	align-items: center;
}

@media (min-width: 900px) {
	.sd-hero__inner {
		grid-template-columns: 1.18fr 1fr;
	}
}

.sd-hero__title {
	font-size: clamp(2.1rem, 6vw, 3.6rem);
	font-weight: 800;
	line-height: 1.32;
	letter-spacing: -0.02em;
	margin-block-end: 1.25rem;
}

/* The Latin words in the headline carry the brand's technical register, so
   they get the mono face and the accent rather than blending in. */
.sd-hero__title .sd-tech {
	font-size: 0.86em;
	font-weight: 600;
	color: #a79dff;
	background: rgba(109, 94, 248, .12);
	border: 1px solid rgba(109, 94, 248, .25);
	border-radius: 8px;
	padding: 0.05em 0.35em;
}

.sd-hero__sub {
	font-size: clamp(1.02rem, 2vw, 1.15rem);
	color: var(--sd-dark-muted);
	max-width: 54ch;
	margin-block-end: 2rem;
}

/* --- Fact chips ----------------------------------------------------------
 * The workshop's headline numbers. Icons carry the meaning at a glance, so
 * the labels can stay short.
 */

.sd-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-block-end: 2.25rem;
	padding: 0;
	list-style: none;
}

.sd-fact {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem 0.55rem 0.8rem;
	border: 1px solid var(--sd-line);
	border-radius: 999px;
	background: var(--sd-bg-2);
	line-height: 1;
}

.sd-fact__icon {
	display: inline-flex;
	color: var(--sd-accent);
	flex: none;
}

.sd-section--dark .sd-fact__icon {
	color: #a79dff;
}

.sd-fact__value {
	font-weight: 800;
	font-size: 1.02rem;
	unicode-bidi: isolate;
}

.sd-fact__label {
	font-size: 0.9rem;
	color: var(--sd-muted);
}

/* --- Hero illustration ---------------------------------------------------
 * The artwork already carries its own dark ground and grid, matching the
 * section behind it, so it needs no frame or border — anything drawn around
 * it would only announce where the image stops.
 */

.sd-hero-art {
	margin: 0;
	width: 100%;
	max-width: 560px;
	margin-inline: auto;
	position: relative;
}

.sd-hero-art__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--sd-radius);
}

/* The portrait sits beside the headline rather than balancing it, so it is
   held to a smaller slot than the journey artwork above. */
.sd-hero-art--portrait {
	max-width: 360px;
}

/* A faint accent bloom behind the artwork, so it sits in the section rather
   than on top of it. */
.sd-hero-art::before {
	content: '';
	position: absolute;
	inset: 12% 6% 14%;
	border-radius: 50%;
	background: radial-gradient(circle at 60% 45%, rgba(109, 94, 248, .30), transparent 70%);
	filter: blur(50px);
	z-index: -1;
}

/* --- Pipeline flow -------------------------------------------------------
 * Local → Production. An ordered list, so the sequence survives without CSS
 * and for screen readers; the arrows between steps are decorative.
 */

.sd-flow {
	list-style: none;
	margin: 2.75rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: 1fr;
	counter-reset: none;
}

@media (min-width: 620px) {
	.sd-flow { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
	.sd-flow { grid-template-columns: repeat(4, 1fr); gap: 1rem 1.75rem; }
}

@media (min-width: 1180px) {
	.sd-flow { grid-template-columns: repeat(8, 1fr); gap: 0 0.5rem; }
}

.sd-flow__step {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.85rem;
	padding: 0.85rem 1rem;
	border: 1px solid var(--sd-dark-line);
	border-radius: var(--sd-radius-sm);
	background: rgba(255, 255, 255, .02);
}

@media (min-width: 1180px) {
	.sd-flow__step {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 0.6rem;
		padding: 1.15rem 0.6rem;
		background: transparent;
		border-color: transparent;
	}
}

.sd-flow__icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	flex: none;
	border-radius: 13px;
	color: #a79dff;
	background: rgba(109, 94, 248, .12);
	border: 1px solid rgba(109, 94, 248, .28);
}

.sd-flow__step--final .sd-flow__icon {
	color: var(--sd-signal);
	background: rgba(18, 183, 106, .12);
	border-color: rgba(18, 183, 106, .32);
}

.sd-flow__name {
	font-family: var(--sd-mono);
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--sd-dark-ink);
	unicode-bidi: isolate;
	line-height: 1.4;
}

.sd-flow__desc {
	font-size: 0.82rem;
	line-height: 1.75;
	color: var(--sd-dark-muted);
}

/* The connector. Hidden until the row is a single line, where it actually
   reads as a flow rather than as a stray glyph between stacked cards. */
.sd-flow__link {
	display: none;
	color: #3b4152;
}

@media (min-width: 1180px) {
	.sd-flow__link {
		display: grid;
		place-items: center;
		position: absolute;
		inset-block-start: 2.05rem;
		/* Sits in the gap on the forward (inline-end) side of each step. */
		inset-inline-end: -0.6rem;
		width: 1.2rem;
	}
}

/* --- Trailer ------------------------------------------------------------- */

.sd-trailer {
	padding-block-start: 0;
}

.sd-trailer__title {
	font-size: clamp(1.5rem, 3.4vw, 2.2rem);
	margin-block-end: 0.5rem;
}

.sd-trailer__note {
	color: var(--sd-dark-muted);
	margin-block-end: 2rem;
	font-size: 0.98rem;
}

/* --- Problem ------------------------------------------------------------- */

.sd-problem__punch {
	font-size: clamp(1.1rem, 2.2vw, 1.3rem);
	font-weight: 700;
	color: var(--sd-ink);
	border-inline-start: 3px solid var(--sd-accent);
	padding-inline-start: 1.25rem;
	margin-block-start: 2rem;
}

/* --- Project stage cards -------------------------------------------------
 * Three illustrated cards: Local, VPS, Production.
 */

.sd-project__grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
	margin-block-start: 2.5rem;
}

@media (min-width: 760px) {
	.sd-project__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.sd-shot {
	margin: 0;
	display: flex;
	flex-direction: column;
}

/* The illustrations carry their own pale ground, so the card is just a thin
   edge and a soft shadow — a heavier frame would fight the artwork. */
.sd-shot__media {
	border-radius: var(--sd-radius);
	overflow: hidden;
	border: 1px solid var(--sd-line);
	background: var(--sd-bg);
	box-shadow: var(--sd-shadow);
	margin-block-end: 1.1rem;
	transition: transform .18s ease, border-color .18s ease;
}

.sd-shot:hover .sd-shot__media {
	transform: translateY(-3px);
	border-color: rgba(109, 94, 248, .35);
}

.sd-shot__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.sd-shot figcaption {
	font-size: 0.9rem;
	color: var(--sd-muted);
	line-height: 1.85;
}

.sd-shot__title {
	display: block;
	font-size: 0.97rem;
	font-weight: 700;
	color: var(--sd-ink);
	margin-block-end: 0.3rem;
	unicode-bidi: isolate;
}

/* Fallback frame, shown only when an illustration has not been imported. */
.sd-shot__frame {
	aspect-ratio: 16 / 10;
	border-radius: var(--sd-radius);
	border: 1px dashed var(--sd-line);
	background: var(--sd-bg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.9rem;
	margin-block-end: 1.1rem;
}

.sd-shot__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 15px;
	color: var(--sd-accent);
	background: var(--sd-accent-soft);
	border: 1px solid rgba(109, 94, 248, .22);
}

.sd-shot__label {
	font-family: var(--sd-font);
	font-size: 0.8rem;
	color: var(--sd-muted-2);
	background: var(--sd-bg);
	border: 1px solid var(--sd-line);
	border-radius: 999px;
	padding: 0.35rem 0.85rem;
	unicode-bidi: isolate;
}

/* --- Curriculum ---------------------------------------------------------- */

.sd-curriculum {
	border: 1px solid var(--sd-line);
	border-radius: var(--sd-radius);
	overflow: hidden;
	background: var(--sd-bg);
	margin-block-end: 2.5rem;
}

.sd-chapter + .sd-chapter {
	border-block-start: 1px solid var(--sd-line);
}

.sd-chapter__head {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem clamp(1rem, 3vw, 1.75rem);
	cursor: pointer;
	list-style: none;
	transition: background-color .15s ease;
}

/* Remove the native disclosure triangle in both engines. */
.sd-chapter__head::-webkit-details-marker { display: none; }
.sd-chapter__head::marker { content: ''; }

.sd-chapter__head:hover {
	background: var(--sd-bg-2);
}

.sd-chapter__head:focus-visible {
	outline: 2px solid var(--sd-accent);
	outline-offset: -2px;
}

.sd-chapter__index {
	font-family: var(--sd-mono);
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--sd-accent);
	background: var(--sd-accent-soft);
	border-radius: 7px;
	padding: 0.4rem 0.6rem;
	flex: none;
	unicode-bidi: isolate;
}

.sd-chapter__titles {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	flex: 1 1 auto;
	min-width: 0;
}

.sd-chapter__title {
	font-weight: 700;
	font-size: clamp(1rem, 2vw, 1.1rem);
	line-height: 1.6;
}

.sd-chapter__meta {
	font-size: 0.82rem;
	color: var(--sd-muted-2);
}

/*
 * Chevron points down when closed and up when open. Deliberately vertical
 * rather than horizontal: a sideways chevron means opposite things in LTR and
 * RTL, while up/down reads the same either way. Physical borders are correct
 * here — the arrow is a shape, not a direction-dependent edge.
 */
.sd-chapter__chevron {
	flex: none;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--sd-muted-2);
	border-bottom: 2px solid var(--sd-muted-2);
	transform: rotate(45deg);
	transition: transform .2s ease;
	margin-inline-start: auto;
	margin-block-end: 4px;
}

.sd-chapter[open] .sd-chapter__chevron {
	transform: rotate(-135deg);
	margin-block: 4px 0;
	border-color: var(--sd-accent);
}

.sd-chapter__body {
	padding: 0 clamp(1rem, 3vw, 1.75rem) 1.5rem;
}

.sd-chapter__summary {
	font-size: 0.93rem;
	line-height: 1.95;
	color: var(--sd-muted);
	margin-block: 0 1.25rem;
	max-width: 70ch;
}

.sd-lessons {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.15rem;
}

.sd-lesson {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.7rem 0.9rem;
	border-radius: var(--sd-radius-sm);
	background: var(--sd-bg-2);
}

.sd-lesson__num {
	font-family: var(--sd-mono);
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--sd-muted-2);
	min-width: 1.6rem;
	text-align: center;
	flex: none;
	unicode-bidi: isolate;
}

.sd-lesson__title {
	font-size: 0.97rem;
	line-height: 1.7;
}

/* --- Audience lists ------------------------------------------------------ */

.sd-audience__intro {
	font-size: clamp(1.05rem, 2.1vw, 1.2rem);
	color: var(--sd-ink);
	font-weight: 600;
	margin-block-end: 2rem;
}

.sd-check-list,
.sd-cross-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.85rem;
}

.sd-check-list li,
.sd-cross-list li {
	position: relative;
	padding-inline-start: 2.25rem;
	font-size: 1rem;
	line-height: 1.85;
	color: var(--sd-ink-2);
}

.sd-check-list li::before,
.sd-cross-list li::before {
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0.15em;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
}

.sd-check-list li::before {
	content: '✓';
	background: rgba(18, 183, 106, .12);
	color: var(--sd-signal);
}

.sd-cross-list li::before {
	content: '×';
	background: var(--sd-line-2);
	color: var(--sd-muted-2);
	font-size: 1rem;
}

.sd-cross-list li {
	color: var(--sd-muted);
}

.sd-not-for__note {
	margin-block-start: 1.75rem;
	font-weight: 600;
	color: var(--sd-ink-2);
}

/* --- Instructor ---------------------------------------------------------- */

.sd-instructor__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2rem, 5vw, 3.5rem);
	align-items: center;
}

@media (min-width: 820px) {
	.sd-instructor__inner {
		grid-template-columns: minmax(0, 300px) 1fr;
	}
}

.sd-portrait {
	margin: 0;
	position: relative;
	max-width: 300px;
}

/*
 * The source portrait is 1856x2304 (4:5). object-fit crops responsively
 * without touching the original file, and object-position keeps the face in
 * frame as the box changes shape.
 */
.sd-portrait__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 22%;
	border-radius: var(--sd-radius);
	border: 1px solid var(--sd-line);
}

/*
 * Body font, not mono.
 *
 * This heading is "SepehrDev" on the sales page but "سلام، من سپهرم" on the
 * homepage. A monospace face cannot join Arabic-script letters, so the mono
 * treatment that flattered the Latin brand name shattered the Persian
 * greeting into disconnected glyphs. Wrap Latin in .sd-tech where a technical
 * look is wanted instead.
 */
.sd-instructor__copy h2 {
	font-family: var(--sd-font);
	margin-block-end: 1rem;
}

.sd-instructor__placeholder {
	font-size: 0.88rem;
	color: var(--sd-muted-2);
	border: 1px dashed var(--sd-line);
	border-radius: var(--sd-radius-sm);
	padding: 0.85rem 1rem;
}

/* --- FAQ ----------------------------------------------------------------- */

.sd-faq__item {
	border-block-end: 1px solid var(--sd-line);
	padding-block: 0.35rem;
}

.sd-faq__item > summary {
	cursor: pointer;
	list-style: none;
	font-weight: 700;
	font-size: clamp(1rem, 2vw, 1.08rem);
	line-height: 1.7;
	padding-block: 1.15rem;
	padding-inline-end: 2rem;
	position: relative;
	transition: color .15s ease;
}

.sd-faq__item > summary::-webkit-details-marker { display: none; }
.sd-faq__item > summary::marker { content: ''; }

.sd-faq__item > summary:hover {
	color: var(--sd-accent);
}

.sd-faq__item > summary:focus-visible {
	outline: 2px solid var(--sd-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* A plus that becomes a minus, positioned on the inline-end edge so it sits
   on the left in this RTL layout. */
.sd-faq__item > summary::after {
	content: '+';
	position: absolute;
	inset-inline-end: 0;
	inset-block-start: 50%;
	transform: translateY(-50%);
	font-size: 1.4rem;
	font-weight: 400;
	color: var(--sd-muted-2);
	line-height: 1;
}

.sd-faq__item[open] > summary::after {
	content: '−';
	color: var(--sd-accent);
}

.sd-faq__item > p {
	padding-block-end: 1.25rem;
	max-width: 68ch;
	margin-block: 0;
}

/* --- Final CTA ----------------------------------------------------------- */

.sd-final__inner {
	text-align: center;
}

.sd-final__title {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	margin-block-end: 0.6rem;
}

.sd-final__sub {
	color: var(--sd-dark-muted);
	font-size: clamp(1rem, 2vw, 1.12rem);
	margin-block-end: 2rem;
}

/* The fact chips and the call to action both centre under the heading.
   `.sd-facts` is a flex row, so without this it aligns to the inline start —
   the right-hand edge in RTL — and sits visibly off-centre. */
.sd-final__inner .sd-facts,
.sd-final__inner .sd-cta-group {
	justify-content: center;
}

/* --- Homepage ------------------------------------------------------------ */

/* Copy first in the source, so in RTL it takes the right-hand column and the
   portrait falls to the left. On a phone the columns collapse and the
   headline still leads. */
.sd-home-hero__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2rem, 5vw, 3.5rem);
	align-items: center;
}

.sd-home-hero__title {
	font-size: clamp(1.9rem, 5vw, 3.1rem);
	font-weight: 800;
	line-height: 1.38;
	letter-spacing: -0.02em;
	margin-block-end: 1.25rem;
	max-width: 22ch;
}

.sd-home-hero__sub {
	font-size: clamp(1rem, 2vw, 1.15rem);
	color: var(--sd-dark-muted);
	max-width: 56ch;
	margin-block-end: 0;
}

.sd-workshop-card {
	border: 1px solid var(--sd-line);
	border-radius: var(--sd-radius);
	padding: clamp(1.75rem, 4vw, 2.75rem);
	background: var(--sd-bg);
	box-shadow: var(--sd-shadow);
	max-width: 760px;
}

.sd-workshop-card__title {
	font-size: clamp(1.6rem, 3.5vw, 2.1rem);
	margin-block-end: 0.4rem;
}

.sd-workshop-card__sub {
	color: var(--sd-muted);
	font-weight: 600;
	margin-block-end: 1.25rem;
}

/* --- Price --------------------------------------------------------------- */

.sd-price__was {
	text-decoration: line-through;
	color: var(--sd-muted-2);
	font-size: 1rem;
	margin-inline-end: 0.5rem;
	unicode-bidi: isolate;
}

.sd-section--dark .sd-price__amount {
	color: var(--sd-dark-ink);
}

/* --- Mobile -------------------------------------------------------------- */

@media (max-width: 599px) {
	.sd-cta-group {
		align-items: stretch;
		flex-direction: column;
	}

	.sd-cta-group .sd-btn {
		width: 100%;
	}

	.sd-stats {
		gap: 0.5rem;
	}

	.sd-stat {
		padding: 0.45rem 0.8rem;
	}

	/* The terminal is decorative; at phone width the hero copy and CTA
	   matter far more than a code illustration. */
	.sd-hero__aside {
		display: none;
	}

	/* On a phone the portrait sits below the headline, so keeping it well
	   under the column width stops it from swallowing the first screen. */
	.sd-hero-art--portrait {
		max-width: 300px;
	}
}



@media (min-width: 900px) {
	.sd-home-hero__inner {
		grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.8fr);
	}
}
