/*
 * Mniamio app section — mobile first. Same layout and behaviour as the Sprouzy "App Section".
 *
 * On a phone the screens are a swipeable rail with scroll-snap: one screen
 * fills about three quarters of the width so the next one peeks in and says
 * "there is more here". From 860px up the rail becomes a plain grid, because
 * a mouse has no swipe and hiding four fifths of the content behind a drag is
 * how desktop visitors miss it.
 *
 * Everything colourful is a custom property so the Elementor Design tab can
 * repaint the section without a single !important.
 */

.mas {
	--mas-accent: #F0C75E;
	--mas-ink: #1F2A1C;
	--mas-muted: #5C6355;
	--mas-card: #FFFDF8;
	--mas-tag: #F0D48A;
	--mas-frame: #1F2A1C;
	--mas-line: #E2D9C6;
	--mas-radius: 28px;
	--mas-pad: 22px;
	--mas-slide: 74%;

	color: var(--mas-ink);
	background: var(--mas-card);
	border-radius: var(--mas-radius);
	padding: var(--mas-pad) 0;
	box-shadow: 0 10px 40px rgba(31, 42, 28, .08);
	max-width: 1180px;
	margin-inline: auto;
	box-sizing: border-box;
}

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

.mas__head {
	padding-inline: var(--mas-pad);
}

.mas__eyebrow {
	display: inline-block;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--mas-ink);
	background: var(--mas-tag);
	padding: 6px 10px;
	border-radius: 999px;
	margin-bottom: 14px;
}

.mas__heading {
	font-size: clamp(1.5rem, 6vw, 2.1rem);
	line-height: 1.14;
	font-weight: 800;
	margin: 0 0 10px;
	color: inherit;
	text-wrap: balance;
}

.mas__lead {
	font-size: 1rem;
	line-height: 1.5;
	color: var(--mas-muted);
	margin: 0 0 18px;
	max-width: 62ch;
}

/* "Draw the card behind the section" switched off: the section sits straight on the page. */
.mas--plain {
	background: transparent;
	box-shadow: none;
	border-radius: 0;
}

/* ---- the rail ---------------------------------------------------------- */

.mas__rail {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 6px var(--mas-pad) 4px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.mas__rail::-webkit-scrollbar {
	display: none;
}

.mas__slide {
	flex: 0 0 var(--mas-slide);
	scroll-snap-align: center;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
}

/* A phone is a fixed 390:844 window. The screenshot fills the width and is
   pinned to the top; a full-length one simply runs off the bottom edge until
   the page scroll pulls it up (see app-section.js). */
.mas__phone {
	position: relative;
	border-radius: 26px;
	overflow: hidden;
	border: 6px solid var(--mas-frame);
	background: var(--mas-frame);
	box-shadow: 0 14px 30px rgba(31, 42, 28, .18);
	aspect-ratio: 390 / 844;
	max-width: 100%;
}

.mas__phone img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	will-change: transform;
	/* the screens are pictures: nothing inside a phone can be pressed, dragged or selected */
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

/* Short screens are exactly one screenful: let them cover the frame so a
   rounding difference never shows a sliver of the frame colour. */
.mas__phone:not(.is-tall) img {
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

/* The step number rides in the strip where a phone keeps its status bar, so
   it never covers a screen's own first line. It follows the width of the
   frame, because a badge sized for a 300px phone swallows a 180px one. */
.mas__step {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 2;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--mas-accent);
	color: var(--mas-ink);
	font-weight: 800;
	font-size: 11px;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
}

@supports (width: 1cqw) {
	.mas__phone {
		container-type: size;
	}

	.mas__step {
		width: max(20px, 6cqw);
		height: max(20px, 6cqw);
		line-height: max(20px, 6cqw);
		font-size: max(11px, 3.2cqw);
	}
}

.mas__cap h3 {
	font-size: 1rem;
	font-weight: 800;
	margin: 0 0 4px;
	line-height: 1.25;
	color: inherit;
}

.mas__cap p {
	font-size: .875rem;
	line-height: 1.45;
	color: var(--mas-muted);
	margin: 0;
}

/* ---- dots, facts, button ----------------------------------------------- */

.mas__dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin: 14px 0 4px;
}

.mas__dots i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mas-line);
	transition: width .2s ease, background-color .2s ease;
}

.mas__dots i.on {
	width: 18px;
	border-radius: 3px;
	background: var(--mas-accent);
}

.mas__swipe {
	font-size: .72rem;
	color: var(--mas-muted);
	text-align: center;
	margin: 2px 0 0;
	letter-spacing: .04em;
}

.mas__facts {
	list-style: none;
	padding: 0 var(--mas-pad);
	margin: 18px 0 0;
	display: grid;
	gap: 10px;
}

.mas__facts li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: .9rem;
	line-height: 1.4;
}

.mas__facts b {
	flex: 0 0 26px;
	height: 26px;
	border-radius: 8px;
	background: var(--mas-tag);
	display: grid;
	place-items: center;
	font-size: .875rem;
	font-weight: 400;
}

.mas__cta {
	margin: 22px var(--mas-pad) 0;
	display: grid;
	gap: 10px;
}

.mas__btn {
	display: block;
	text-align: center;
	background: var(--mas-accent);
	color: var(--mas-ink);
	font-weight: 800;
	font-size: .95rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 16px;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(240, 199, 94, .45);
}

.mas__btn:hover,
.mas__btn:focus {
	color: var(--mas-ink);
	filter: brightness(1.03);
}

.mas__btn:focus-visible {
	outline: 3px solid var(--mas-ink);
	outline-offset: 3px;
}

.mas__cta small {
	display: block;
	text-align: center;
	color: var(--mas-muted);
	font-size: .8rem;
	line-height: 1.4;
}

/* ---- desktop ----------------------------------------------------------- */

@media (min-width: 860px) {
	.mas {
		padding: calc(var(--mas-pad) * 1.6) 0;
	}

	.mas__head {
		padding-inline: calc(var(--mas-pad) * 1.6);
		max-width: 46rem;
	}

	.mas__rail {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
		gap: 26px 20px;
		overflow: visible;
		padding-inline: calc(var(--mas-pad) * 1.6);
	}

	.mas__slide {
		flex: initial;
	}

	.mas__dots,
	.mas__swipe {
		display: none;
	}

	.mas__facts {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		padding-inline: calc(var(--mas-pad) * 1.6);
		margin-top: 26px;
	}

	.mas__cta {
		margin-inline: calc(var(--mas-pad) * 1.6);
		justify-content: center;
	}

	.mas__btn {
		padding-inline: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mas__phone img {
		transform: none !important;
	}

	.mas__rail {
		scroll-behavior: auto;
	}
}
