/* «تماس با من» — postcards that travel from left to right. */
.cx {
	--cx-ink: #1E1A18;
	--cx-red: #A10E10;
	--cx-rose: #F3E5E1;
	--cx-paper: #FBF8F1;
	--cx-cream: #EFE4D2;
	--cx-line: #D7CAB8;
	--cx-soft: #BFAF99;
	--cx-earth: #B5895A;
	--cx-green: #5B6B3A;
	--cx-muted: #75685B;
	color: var(--cx-ink);
}
.cx svg .f-paper { fill: var(--cx-paper); }
.cx svg .f-cream { fill: var(--cx-cream); }
.cx svg .f-red { fill: var(--cx-red); }
.cx svg .f-ink { fill: var(--cx-ink); }
.cx svg .f-earth { fill: var(--cx-earth); }
.cx svg .f-green { fill: var(--cx-green); }
.cx svg .s-ink, .cx svg .s-red, .cx svg .s-soft, .cx svg .cx-draw { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cx svg .s-ink { stroke: var(--cx-ink); stroke-width: 2.4; }
.cx svg .s-red { stroke: var(--cx-red); stroke-width: 2.4; }
.cx svg .s-soft { stroke: var(--cx-soft); stroke-width: 2.4; }
.cx svg .cx-draw { stroke: var(--cx-ink); stroke-width: 4; }
.cx svg .f-paper.s-ink, .cx svg .f-cream.s-ink, .cx svg .f-earth.s-ink, .cx svg .f-cream.s-red { stroke-width: 2.4; }
.cx svg .f-paper.s-ink, .cx svg .f-cream.s-ink, .cx svg .f-earth.s-ink { stroke: var(--cx-ink); }
.cx svg .f-cream.s-red { stroke: var(--cx-red); }
.cx-t { font: 800 16px var(--az-font); fill: var(--cx-ink); text-anchor: middle; }

/* Hero */
.cx-hero { padding:56px 0 24px; overflow: hidden; }
.cx-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.cx-hero__title { font-size: clamp(32px, 4.6vw, 58px); font-weight: 900; line-height: 1.45; margin:6px 0 16px; }
.cx-hero__title span { color: var(--cx-red); }
.cx-hero__lead { color: var(--cx-muted); font-size: 17px; line-height: 2.1; max-width: 560px; margin:0; }
.cx-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cx-quick .az-btn { font-size: 14px; padding:.78em 1.25em; gap: 8px; }
.cx-hero__art { margin:0; }
.cx-hero__art svg { width: 100%; height: auto; display: block; overflow: visible; }
.cx-hero__route { fill: none; stroke: var(--cx-soft); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.cx-hero__hi { font: 900 30px var(--az-font); fill: var(--cx-red); text-anchor: middle; }
.cx-hero__plane { offset-path: path("M6 268C90 250 120 170 210 160s140 30 204-40"); offset-rotate: auto; offset-distance: 100%; }

/* Ride: rail + postcards */
.cx-ride { position: relative; overflow-x: clip; }
.cx-ride__head { display: flex; align-items: center; gap: 22px; width: 100%; max-width: 1000px; margin:0 auto 26px; padding:0 24px; box-sizing: border-box; }
.cx-ride__label { margin:0; font-weight: 800; font-size: 14px; color: var(--cx-red); white-space: nowrap; }
.cx-rail { position: relative; flex: 1; height: 34px; direction: rtl; }
.cx-rail__line { position: absolute; right: 0; left: 0; top: 50%; height: 2px; background: repeating-linear-gradient(-90deg, var(--cx-line) 0 6px, transparent 6px 12px); }
.cx-rail__line i { position: absolute; inset:0 0 0 auto; width: calc(var(--p, 0) * 100%); background: var(--cx-ink); }
.cx-rail__dot { position: absolute; top: 50%; right: calc(var(--i) / (var(--n) - 1) * 100%); width: 12px; height: 12px; margin:-6px -6px 0 0; border-radius:50%; background: var(--cx-paper); border: 2px solid var(--cx-line); transition: background .3s, border-color .3s, transform .3s; }
.cx-rail__dot.is-on { background: var(--cx-red); border-color:var(--cx-red); transform: scale(1.15); }
.cx-rail__plane { position: absolute; top: 50%; right: calc(var(--p, 0) * 100%); transform: translate(80%, -58%); line-height: 0; }
.cx-rail__plane svg { overflow: visible; }

.cx-track { display: grid; gap: 28px; padding:0 24px; }
.cx-panel { display: flex; justify-content: center; }
.cx-card { position: relative; width: min(1000px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; background: var(--cx-paper); border: 1px solid var(--cx-line); border-radius:26px; padding:48px 48px 40px; box-shadow: 0 30px 60px -44px rgba(30, -26, -24, -.5); overflow: hidden; }
.cx-card::before { content: ""; position: absolute; inset:10px; border: 1.5px dashed var(--cx-line); border-radius:18px; pointer-events: none; }
.cx-card__num { position: absolute; top: 4px; right: 24px; font-size: 120px; font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--cx-line); pointer-events: none; }
.cx-card__stamp { position: absolute; top: 24px; left: 24px; width: 46px; height: 52px; border: 2px dashed var(--cx-red); border-radius:4px; background: var(--cx-rose); opacity: .9; }
.cx-card__stamp::after { content: ""; position: absolute; inset:12px 10px; border-radius:50% 50% 4px 4px; border: 2px solid var(--cx-red); border-bottom: 0; }
.cx-card__text { position: relative; z-index: 1; padding-top: 30px; }
.cx-card__kicker { margin:0 0 6px; color: var(--cx-red); font-weight: 800; font-size: 14px; }
.cx-card h2 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 900; margin:0 0 12px; line-height: 1.5; }
.cx-card p { color: #4A403A; line-height: 2.1; margin:0 0 10px; }
.cx-card__links a { color: var(--cx-red); font-weight: 800; }
.cx-card__hours { display: inline-flex; gap: 6px; align-items: center; color: var(--cx-green) !important; font-size: 14px; }
.cx-card__art { margin:0; position: relative; z-index: 1; }
.cx-card__art svg { width: 100%; height: auto; display: block; overflow: visible; }

/* Final */
.cx-final { padding:72px 0 90px; scroll-margin-top: 90px; }
.cx-final__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 28px; align-items: start; }
.cx-final__form { background: var(--cx-paper); border: 1px solid var(--cx-line); border-radius:26px; padding:40px; position: relative; }
.cx-final__form::before { content: ""; position: absolute; inset:10px; border: 1.5px dashed var(--cx-line); border-radius:18px; pointer-events: none; }
.cx-final__form > * { position: relative; }
.cx-final__form h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 900; margin:0 0 18px; }
.cx-final__form .azc-contact { max-width: none; }
.cx-final__info { background: var(--cx-ink); color: var(--cx-paper); border-radius:26px; padding:28px 22px; display: flex; flex-direction: column; gap: 16px; }
.cx-final__info h3 { margin:0; color: var(--cx-paper); font-size: 18px; }
.cx-ways { list-style: none; margin:0; padding:0; display: grid; gap: 10px; }
.cx-ways a, .cx-ways__plain { display: flex; align-items: center; gap: 12px; padding:12px 14px; border-radius:14px; border: 1px solid rgba(229, 216, 198, .18); color: var(--cx-paper); text-decoration: none; transition: background .2s, border-color .2s, transform .2s; }
.cx-ways a:hover, .cx-ways a:focus-visible { background: rgba(255, 255, 255, .06); border-color:rgba(229, .5) 198, 216,; transform: translateX(-4px); }
.cx-ways .az-ic, .cx-ways .azc-ic { color: #EBA9A5; flex: none; }
.cx-ways small { display: block; color: #BFB2A2; font-size: 12px; line-height: 1.6; }
.cx-ways b { font-weight: 700; font-size: 15px; }
.cx-final__info .az-btn--light { background: var(--cx-paper); color: var(--cx-ink); border-color:var(--cx-paper); }

/* ---------- Motion (only with JS and without reduced motion) ---------- */
.cx-anim .cx-hero__plane { animation: cx-fly 2.6s cubic-bezier(.45, .05, .3, 1) .3s both; }
.cx-anim .cx-postcard { animation: cx-slide-in 1s cubic-bezier(.2, .8, .2, 1) both; }
.cx-anim .cx-stamp { animation: cx-stamp .5s cubic-bezier(.3, 1.5, .5, 1) 1.2s both; transform-box: fill-box; transform-origin: center; }
.cx-anim .cx-postmark { animation: cx-fade .6s ease 1.6s both; }
@keyframes cx-fly { from { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } to { offset-distance: 100%; } }
@keyframes cx-slide-in { from { transform: translateX(60px) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cx-stamp { from { transform: scale(1.8) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cx-fade { from { opacity: 0; } to { opacity: 1; } }

/* Illustration states: .is-on is set when a postcard reaches the centre. */
.cx-anim .cx-draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s ease .2s; }
.cx-anim .cx-draw--late { transition-delay: .9s; }
.cx-anim .is-on .cx-draw { stroke-dashoffset: 0; }
.cx-anim .cx-pop { opacity: 0; transform: scale(.4); transform-box: fill-box; transform-origin: center; transition: opacity .4s ease 1.6s, transform .6s cubic-bezier(.3, 1.6, .5, 1) 1.6s; }
.cx-anim .is-on .cx-pop { opacity: 1; transform: none; }
.cx-anim .cx-float { transform: translateX(40px); opacity: 0; transition: transform 1s ease .4s, opacity .6s ease .4s; }
.cx-anim .is-on .cx-float { transform: none; opacity: 1; }
.cx-anim .cx-bit { transition: transform 1.1s cubic-bezier(.3, 1.2, .5, 1) .3s; transform-box: fill-box; }
.cx-anim .cx-bit--1 { transform: translate(70px, -10px) rotate(-10deg); }
.cx-anim .cx-bit--2 { transform: translate(40px, -30px) rotate(8deg); }
.cx-anim .cx-bit--3 { transform: translate(80px, 20px); }
.cx-anim .cx-bit--4 { transform: translate(50px, 26px) rotate(-6deg); }
.cx-anim .is-on .cx-bit { transform: none; }
.cx-anim .cx-pencil { transform: translateX(90px); transition: transform 2.4s ease .4s; }
.cx-anim .is-on .cx-pencil { transform: none; }
.cx-plane { offset-path: path("M20 210C90 200 110 110 190 104s110 40 150-30"); offset-rotate: auto; offset-distance: 100%; }
.cx-anim .cx-plane { offset-distance: 0%; opacity: 0; transition: offset-distance 2.4s cubic-bezier(.4, .1, .3, 1) .7s, opacity .3s ease .7s; }
.cx-anim .is-on .cx-plane { offset-distance: 100%; opacity: 1; }
.cx-anim .cx-sheet { transition: opacity .4s ease .5s, transform .5s ease .4s; transform-box: fill-box; transform-origin: center; }
.cx-anim .is-on .cx-sheet { opacity: 0; transform: scale(.5) rotate(-12deg); }
.cx-sheet { opacity: 0; }
.cx-anim .cx-sheet { opacity: 1; }
.cx-anim .cx-env { transform: translate(90px, -30px) rotate(-14deg); opacity: 0; transition: transform 1.2s cubic-bezier(.3, 1.2, .5, 1) .3s, opacity .4s ease .3s; transform-box: fill-box; }
.cx-anim .is-on .cx-env { transform: none; opacity: 1; }
.cx-anim .cx-note { opacity: 0; transform: translateY(40px); transition: opacity .6s ease 1.5s, transform .8s ease 1.5s; }
.cx-anim .is-on .cx-note { opacity: 1; transform: none; }

/* Stacked mode: postcards slide in from the left as they enter. */
.cx-anim .cx-ride:not(.is-pinned) .cx-card { opacity: 0; transform: translateX(70px) rotate(-2deg); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.cx-anim .cx-ride:not(.is-pinned) .cx-panel.is-seen .cx-card { opacity: 1; transform: none; }
.cx-ride:not(.is-pinned) .cx-ride__head { display: none; }

/* Pinned mode (wide screens): the row of postcards moves left → right. */
.cx-ride.is-pinned { height: var(--ride-h, 400vh); }
.cx-ride.is-pinned .cx-ride__stick { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: 72px; box-sizing: border-box; }
.cx-ride.is-pinned .cx-track { display: flex; flex-direction: row; direction: ltr; gap: 0; padding:0; position: relative; width: calc(var(--n) * var(--w, 100vw)); align-self: flex-start; flex: none; transform: translate3d(var(--x, 0px), 0, 0); will-change: transform; }
.cx-ride.is-pinned .cx-panel { flex: 0 0 var(--w, 100vw); padding:0 6vw; box-sizing: border-box; }
.cx-ride.is-pinned .cx-card { max-height: calc(100vh - 190px); transform: rotate(calc(var(--lp, 0) * 4deg)) scale(calc(1 - var(--lpa, 0) * .08)); opacity: calc(1 - var(--lpa, 0) * .5); }
.cx-ride.is-pinned .cx-card__art { transform: translateX(-calc(var(--lp, 0) * 60px)); }
.cx-ride.is-pinned .cx-card__num { transform: translateX(-calc(var(--lp, 0) * 120px)); }

@media (max-width: 900px) {
	.cx-hero__grid { grid-template-columns: 1fr; gap: 10px; }
	.cx-hero__art { max-width: 420px; justify-self: center; width: 100%; order: -1; }
	.cx-card { grid-template-columns: 1fr; padding:40px 22px 26px; gap: 8px; }
	.cx-card__num { font-size: 84px; right: 16px; }
	.cx-card__text { padding-top: 50px; }
	.cx-card__art { max-width: 360px; justify-self: center; width: 100%; }
	.cx-final__grid { grid-template-columns: 1fr; }
	.cx-final__form { padding:30px 20px; }
}
@media (max-width: 600px) {
	.cx-hero { padding-top: 28px; }
	.cx-track { padding:0 16px; }
	.cx-quick .az-btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.cx *, .cx *::before, .cx *::after { animation: none !important; transition: none !important; }
}
