/* =========================================================
   About page — illustrated travel map
   Layout: three columns on desktop (text | path | art, alternating),
   path column on the start edge on phones so no line crosses text.
   ========================================================= */
.st {
	--st-ink: #2B2522;
	--st-ink-soft: #4A403A;
	--st-red: #A10E10;
	--st-green: #3E5641;
	--st-green-soft: #C9D3C2;
	--st-earth: #B5895A;
	--st-brick: #C46A4E;
	--st-paper: #FBF7EF;
	--st-cream: #EFE6D6;
	--st-line: #CDBEA8;
	--st-track: #CDBEA8;
	--st-muted: #75685B;
	--st-gutter: 220px;
	position: relative;
	color: var(--st-ink);
	overflow-x: clip;
}
.st-defs { position: absolute; width: 0; height: 0; }

/* ---------- Hero ---------- */
.st-hero { padding: 72px 0 24px; text-align: center; }
.st-hero__inner { display: flex; flex-direction: column; align-items: center; }
.st-hero__title { font-size: clamp(38px, 6.4vw, 84px); font-weight: 900; line-height: 1.2; margin: 6px 0 18px; text-wrap: balance; }
.st-hero__title span { color: var(--st-red); }
.st-hero__lead { max-width: 560px; color: var(--st-muted); font-size: 18px; line-height: 2.1; margin: 0; }
.st-hero__hint { margin-top: 28px; color: var(--st-earth); animation: st-bob 2.6s ease-in-out infinite; }
@keyframes st-bob { 50% { transform: translateY(6px); } }

/* ---------- Map & path ---------- */
.st-map { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px 40px; }
.st-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; display: none; z-index: 0; }
.js-story .st-path { display: block; }
.st-path__track, .st-path__trail { stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.1 11; }
.st-path__track { stroke: var(--st-track); }
.st-path__trail { stroke: var(--st-ink); stroke-width: 3.6; }
.st-walker__halo { fill: var(--st-red); opacity: .14; }
.st-walker__dot { fill: var(--st-red); stroke: var(--st-paper); stroke-width: 3; }

/* ---------- Stops ---------- */
.st-stop {
	position: relative; z-index: 1;
	display: grid; grid-template-columns: minmax(0, 1fr) var(--st-gutter) minmax(0, 1fr);
	grid-template-areas: "text pin art";
	align-items: center; gap: 0;
	min-height: 88vh; padding: 40px 0;
}
.st-stop--flip { grid-template-areas: "art pin text"; }
.st-stop__text { grid-area: text; max-width: 470px; justify-self: center; }
.st-stop__pin { grid-area: pin; justify-self: center; position: relative; }
.st-stop__art { grid-area: art; margin: 0; position: relative; width: 100%; max-width: 440px; justify-self: center; }
.st-stop__art svg { display: block; width: 100%; height: auto; overflow: visible; }

.st-stop__pin span {
	display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
	background: var(--st-paper); border: 1.5px solid var(--st-line); color: var(--st-muted);
	transition: background .5s, color .5s, border-color .5s, transform .5s cubic-bezier(.2,.7,.2,1);
}
.st-stop.is-active .st-stop__pin span { background: var(--st-ink); border-color: var(--st-ink); color: var(--st-paper); transform: scale(1.12); }
.st-stop.is-passed .st-stop__pin span { border-color: var(--st-ink); color: var(--st-ink); }

.st-kicker { font-size: 13px; font-weight: 700; color: var(--st-earth); margin: 0 0 6px; letter-spacing: .02em; }
.st-stop h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 900; line-height: 1.5; margin: 0 0 14px; text-wrap: balance; }
.st-stop__text p { font-size: 17px; line-height: 2.15; color: #3F3631; margin: 0 0 12px; }
.st-quote { margin: 14px 0 16px; padding: 0; border: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 900; color: var(--st-green); line-height: 1.5; }
.st-stop--key h2 { color: var(--st-green); }
.st-stop--key .st-stop__pin span { border-color: var(--st-green); }
.st-stop--key.is-active .st-stop__pin span { background: var(--st-green); border-color: var(--st-green); }

.st-tags { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-tags li { padding: 4px 14px; border-radius: 999px; border: 1px dashed var(--st-line); font-size: 14px; color: var(--st-ink-soft); }

.st-dialog { margin-top: 18px; display: grid; gap: 10px; }
.st-dialog p { margin: 0; padding: 10px 16px; border-radius: 16px; font-size: 16px; line-height: 1.8; width: fit-content; max-width: 100%; }
.st-dialog__a { background: var(--st-cream); border-bottom-right-radius: 4px; }
.st-dialog__b { background: var(--st-ink); color: var(--st-paper) !important; justify-self: end; border-bottom-left-radius: 4px; }

/* speech bubbles over art */
.st-bubble { position: absolute; margin: 0; padding: 8px 14px; background: var(--st-paper); border: 1.5px solid var(--st-ink); border-radius: 16px; font-size: 14px; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.st-bubble::after { content: ""; position: absolute; bottom: -8px; width: 12px; height: 12px; background: var(--st-paper); border-right: 1.5px solid var(--st-ink); border-bottom: 1.5px solid var(--st-ink); transform: rotate(45deg); }
.st-bubble--b { top: 18%; left: 52%; }
.st-bubble--b::after { left: 70%; }
.st-bubble--a { top: 22%; right: 0; color: var(--st-green); border-color: var(--st-green); }
.st-bubble--a::after { right: 22%; border-color: var(--st-green); }

/* ---------- Illustration palette ---------- */
.st-stop__art svg [class*="s-"] { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.s-ink { stroke: var(--st-ink); }
.s-red { stroke: var(--st-red); }
.s-green { stroke: var(--st-green); }
.s-earth { stroke: var(--st-earth); }
.s-line { stroke: var(--st-line); }
.st-stop__art .f-paper { fill: var(--st-paper); }
.st-stop__art .f-cream { fill: var(--st-cream); }
.st-stop__art .f-earth { fill: var(--st-earth); }
.st-stop__art .f-brick { fill: var(--st-brick); }
.st-stop__art .f-red { fill: var(--st-red); }
.st-stop__art .f-green { fill: var(--st-green); }
.st-stop__art .f-green-soft { fill: var(--st-green-soft); }
.st-stop__art .f-ink { fill: var(--st-ink); }
.st-stop__art .f-ink-soft { fill: var(--st-ink-soft); }
.st-stop__art text { font-family: var(--az-font, "Vazirmatn", Tahoma, sans-serif); text-anchor: middle; fill: var(--st-ink); }
.t-cal-head { font-size: 15px; font-weight: 800; fill: var(--st-paper) !important; }
.t-cal-day { font-size: 54px; font-weight: 900; }
.t-cal-year { font-size: 16px; font-weight: 700; fill: var(--st-muted) !important; }
.t-screen { font-size: 26px; font-weight: 900; transition: fill 1.2s ease .9s; }
.t-calc { font-size: 12px; font-weight: 700; text-anchor: end !important; }
.t-title { font-size: 13px; font-weight: 800; fill: var(--st-paper) !important; }
.t-num { font-size: 12px; fill: var(--st-muted) !important; }
.t-export { font-size: 13px; font-weight: 700; }
.st-draw, .st-bond, .st-ahead { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.st-draw { stroke: var(--st-ink); }
.st-art--2 .st-draw.s-red { stroke: var(--st-red); }
.st-bond { stroke: var(--st-red); }
.st-ahead { stroke: var(--st-line); transition: stroke 1s ease .6s; }
.st-heart { fill: var(--st-red); }
.st-layer { fill: var(--st-cream); }
.st-screen { fill: var(--st-ink-soft); transition: fill .8s ease .2s; }
.st-bar { transform-box: fill-box; transform-origin: right center; }

/* ---------- Animation (only when JS is on and motion is OK) ---------- */
.st-anim .st-stop__text, .st-anim .st-stop__art { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.st-anim .st-stop__art { transition-delay: .12s; }
.st-anim .st-stop.is-seen .st-stop__text, .st-anim .st-stop.is-seen .st-stop__art { opacity: 1; transform: none; }

/* 1: clock settles on seven, sun rises */
.st-anim .st-hand--min { transform: rotate(-300deg); }
.st-anim .st-hand--hour { transform: rotate(60deg); }
.st-anim .st-hand { transition: transform 2.2s cubic-bezier(.3,.8,.2,1) .4s; }
.st-hand--min { transform: rotate(0deg); }
.st-hand--hour { transform: rotate(210deg); }
.st-anim .is-seen .st-hand--min { transform: rotate(0deg); }
.st-anim .is-seen .st-hand--hour { transform: rotate(210deg); }
.st-anim .st-sun { opacity: 0; transform: translateY(34px); transition: opacity 1s ease 1.6s, transform 1.4s cubic-bezier(.2,.7,.2,1) 1.6s; }
.st-anim .is-seen .st-sun { opacity: 1; transform: none; }

/* strokes that draw themselves */
.st-anim .st-draw, .st-anim .st-bond { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 2.4s ease .5s; }
.st-anim .st-bond { stroke-dasharray: 2 6; stroke-dashoffset: 0; opacity: 0; transition: opacity 1s ease 1.6s; }
.st-anim .is-seen .st-draw { stroke-dashoffset: 0; }
.st-anim .is-seen .st-bond { opacity: 1; }
.st-anim .st-draw--2 { transition-delay: 1.6s; }

/* bubbles pop */
.st-anim .st-bubble { opacity: 0; transform: translateY(8px) scale(.92); transition: opacity .5s ease 1.9s, transform .5s cubic-bezier(.3,1.4,.5,1) 1.9s; }
.st-anim .is-seen .st-bubble { opacity: 1; transform: none; }

/* 3: monitor switches on, layers stack, text turns red */
.st-anim .st-screen { fill: var(--st-ink-soft); }
.st-anim .is-seen .st-screen, .st-screen { fill: var(--st-paper); }
.st-anim .st-ui { opacity: 0; transition: opacity .8s ease .7s; }
.st-anim .is-seen .st-ui { opacity: 1; }
.st-anim .st-layer { opacity: 0; transform: translateX(-10px); transition: opacity .4s, transform .4s; }
.st-anim .is-seen .st-layer { opacity: 1; transform: none; }
.st-anim .is-seen .st-layer:nth-of-type(2) { transition-delay: 1s; }
.st-anim .is-seen .st-layer:nth-of-type(3) { transition-delay: 1.2s; }
.st-anim .is-seen .st-layer:nth-of-type(4) { transition-delay: 1.4s; }
.t-screen { fill: var(--st-red) !important; }
.st-anim .t-screen { fill: var(--st-ink) !important; }
.st-anim .is-seen .t-screen { fill: var(--st-red) !important; transition-delay: 2s; }

/* 4: heart */
.st-anim .st-heart { opacity: 0; transform: scale(.4); transform-box: fill-box; transform-origin: center; transition: opacity .6s ease 2.4s, transform .6s cubic-bezier(.3,1.5,.5,1) 2.4s; }
.st-anim .is-seen .st-heart { opacity: 1; transform: none; }

/* 5: the title slides to the centre */
.st-anim .st-title { transform: translateX(-22px) rotate(-2deg); transition: transform 1.2s cubic-bezier(.3,1.3,.5,1) 1s; transform-box: fill-box; }
.st-anim .is-seen .st-title { transform: none; }
.st-anim .st-guide-line { opacity: 0; transition: opacity .4s ease 2.1s; }
.st-anim .is-seen .st-guide-line { opacity: 1; }

/* 6: anchors and handles appear, pen arrives */
.st-anim .st-anchors { opacity: 0; transition: opacity .8s ease 2.2s; }
.st-anim .is-seen .st-anchors { opacity: 1; }
.st-anim .st-pen { opacity: 0; transform: translate(18px, 18px); transition: opacity .6s ease 2.6s, transform .8s ease 2.6s; }
.st-anim .is-seen .st-pen { opacity: 1; transform: none; }

/* 7: path ahead lights up, tools appear in order */
.st-anim .is-seen .st-ahead, .st-ahead { stroke: var(--st-green); }
.st-anim .st-ahead { stroke: var(--st-line); }
.st-anim .is-seen .st-ahead { stroke: var(--st-green); transition-delay: 2.2s; }
.st-anim .st-tool { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s cubic-bezier(.3,1.4,.5,1); }
.st-anim .is-seen .st-tool { opacity: 1; transform: none; }
.st-anim .is-seen .st-tool--1 { transition-delay: 2.6s; }
.st-anim .is-seen .st-tool--2 { transition-delay: 3s; }
.st-anim .is-seen .st-tool--3 { transition-delay: 3.4s; }

/* 8: each piece of work lands in place; small loops */
.st-anim .st-item { opacity: 0; transform: translateY(-26px); transition: opacity .5s, transform .7s cubic-bezier(.3,1.4,.5,1); }
.st-anim .is-seen .st-item { opacity: 1; transform: none; }
.st-anim .is-seen .st-item--2 { transition-delay: .35s; }
.st-anim .is-seen .st-item--3 { transition-delay: .7s; }
.st-anim .is-seen .st-item--4 { transition-delay: 1.05s; }
.st-anim .is-seen .st-item--5 { transition-delay: 1.4s; }
.st-anim .is-seen .st-bounce { animation: st-arc 2.4s cubic-bezier(.45,0,.55,1) 2s infinite alternate; }
@keyframes st-arc { 0% { transform: translate(0, 0); } 50% { transform: translate(34px, -30px); } 100% { transform: translate(68px, 0); } }
.st-anim .is-seen .st-playhead { animation: st-play 4s linear 2s infinite; }
@keyframes st-play { from { transform: translateX(-76px); } to { transform: translateX(28px); } }

/* 9: export bar runs, hesitates near the end, then completes */
.st-bar { transform: scaleX(1); }
.st-anim .st-bar { transform: scaleX(0); }
.st-anim .is-seen .st-bar { animation: st-export 4.2s ease .6s forwards; }
@keyframes st-export { 0% { transform: scaleX(0); } 55% { transform: scaleX(.93); } 85% { transform: scaleX(.95); } 100% { transform: scaleX(1); } }
.st-anim .st-dialog p { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.st-anim .is-seen .st-dialog__a { opacity: 1; transform: none; transition-delay: 1.2s; }
.st-anim .is-seen .st-dialog__b { opacity: 1; transform: none; transition-delay: 2.4s; }

/* ---------- End ---------- */
.st-end { position: relative; z-index: 1; text-align: center; padding: 120px 0 80px; }
.st-end__line { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; color: var(--st-muted); margin: 0 0 28px; }
.st-end__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Progress guide ---------- */
.st-guide {
	position: fixed; z-index: 40; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	display: flex; align-items: center; gap: 12px; padding: 8px 14px;
	background: rgba(251, 247, 239, .92); border: 1px solid var(--st-line); border-radius: 999px; font-size: 13px; color: var(--st-muted);
	backdrop-filter: blur(6px); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.st-guide.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.st-guide b { color: var(--st-ink); }
.st-guide__dots { display: flex; gap: 5px; }
.st-guide__dots a { width: 8px; height: 8px; border-radius: 50%; background: var(--st-line); transition: background .3s, transform .3s; }
.st-guide__dots a.is-on { background: var(--st-ink); }
.st-guide__dots a.is-current { background: var(--st-red); transform: scale(1.35); }
.st-guide__dots a:focus-visible { outline: 2px solid var(--st-red); outline-offset: 2px; }

/* ---------- Phones / small tablets ---------- */
@media (max-width: 900px) {
	.st { --st-gutter: 56px; }
	.st-map { padding: 0 16px 24px; }
	.st-stop, .st-stop--flip {
		grid-template-columns: var(--st-gutter) minmax(0, 1fr);
		grid-template-areas: "pin text" "pin art";
		align-items: start; gap: 18px 0; min-height: 0; padding: 48px 0;
	}
	.st-stop__pin { justify-self: start; padding-top: 4px; }
	.st-stop__pin span { width: 42px; height: 42px; }
	.st-stop__text, .st-stop__art { justify-self: stretch; max-width: none; }
	.st-stop__art { max-width: 420px; }
	.st-stop__text p { font-size: 16px; }
	.st-bubble { font-size: 13px; padding: 6px 12px; }
	.st-end { padding: 64px 0 96px; }
	/* On phones the lit pins show progress; a floating pill would cover text. */
	.st-guide { display: none; }
	/* lighter motion on phones */
	.st-anim .st-stop__text, .st-anim .st-stop__art { transform: none; }
}
@media (max-width: 420px) {
	.st-bubble { white-space: normal; max-width: 60%; }
}

@media (prefers-reduced-motion: reduce) {
	.st-hero__hint, .st-bounce, .st-playhead { animation: none !important; }
	.st *, .st *::before, .st *::after { transition: none !important; }
}

