:root {
	--brand: #1867c0;
	--brand-2: #2b7ad6;
	--brand-dark: #144c8f;
	--brand-soft: #e8f1fb;
	--success: #1c8f26;
	--success-soft: #1c8f2654;
	--text: #0f172a;
	--muted: #757575;
	--border: #e2e2e2;
	--bg: #ffffff;
	--page-bg: #f5f7fb;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}
html {
	scroll-behavior: smooth;
}
html.no-animations {
	scroll-behavior: auto;
}
html.no-animations *,
html.no-animations *::before,
html.no-animations *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}
body {
	font-family: "Poppins", system-ui, sans-serif;
	background: var(--page-bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	line-height: 1.35;
	font-size: 13px;
}

.demo-toggle {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 999;
	display: flex;
	gap: 6px;
	background: rgba(255, 255, 255, 0.95);
	padding: 5px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	font-family: Poppins, sans-serif;
}
.demo-toggle button {
	border: 0;
	padding: 6px 10px;
	border-radius: 6px;
	background: #f1f5f9;
	color: #64748b;
	font-size: 11px;
	cursor: pointer;
	font-weight: 600;
}
.demo-toggle button.active {
	background: var(--brand);
	color: #fff;
}

.page {
	max-width: 460px;
	margin: 0 auto;
	min-height: 100dvh;
	background: var(--bg);
	padding: 12px 20px 28px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
@media (min-width: 500px) {
	.page {
		margin-top: 16px;
		margin-bottom: 16px;
		border-radius: 20px;
		box-shadow: 0 25px 60px -20px rgba(15, 23, 42, 0.15);
		min-height: calc(100dvh - 32px);
	}
}

/* ---------------- Header card ---------------- */
.header {
	display: flex;
	gap: 10px;
	padding: 10px;
	border-radius: 12px;
	background: #f0efef;
}
.header .logo {
	width: 80px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 6px;
	background: #fff center no-repeat;
	background-size: 80%;
	background-image: url("../imgs/logo.png");
}
.header .content {
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.header h2 {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
}
.header p {
	font-size: 11.5px;
	color: var(--muted);
	font-weight: 400;
	margin-top: 2px;
}

/* ---------------- Price row ---------------- */
.price-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: #333;
}
.price-row .lang {
	border: 1px solid #000;
	padding: 3px 8px;
	border-radius: 5px;
	font-weight: 600;
	font-size: 10px;
	text-decoration: none;
	color: #000;
}

/* ---------------- Hero (collapses with keyboard) ---------------- */
.hero {
	display: flex;
	justify-content: center;
	overflow: hidden;
	transition:
		max-height 0.25s ease,
		margin 0.25s ease,
		opacity 0.2s ease;
	max-height: 180px;
	margin: 2px 0;
}
.hero img {
	width: 100%;
	height: auto;
	filter: drop-shadow(0 6px 12px rgba(24, 103, 192, 0.2));
}
body.keyboard-open .hero {
	max-height: 0 !important;
	margin: 0 !important;
	opacity: 0;
}

/* ---------------- Section title ---------------- */
.section-title {
	color: var(--muted);
	font-size: 16px;
	font-weight: 600;
	text-align: center;
}

/* ---------------- Category tiles ---------------- */
.categories {
	display: flex;
	justify-content: space-around;
	padding: 12px 10px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
	border: 1px solid var(--border);
}
.category {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}
.category .ic {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: linear-gradient(135deg, #5a8fcf, var(--brand));
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	position: relative;
}
.category .ic svg {
	width: 22px;
	height: 22px;
}
.category .ic .badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: #e11d48;
	color: #fff;
	width: 16px;
	height: 16px;
	font-size: 9px;
	font-weight: 700;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: blink 1.2s infinite;
}
.category p {
	font-size: 11px;
	font-weight: 600;
	color: var(--success);
}
@keyframes blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

/* ==========================================================
   THE FORM - input, arrow animation, carrier, button
   ========================================================== */

/* "Beat" helper text above input */
.help-text {
	text-align: center;
	color: var(--muted);
	font-size: 15px;
	font-weight: 700;
	margin: 10px 0;
}
.help-text.beat {
	animation: beat 1.5s ease-in-out infinite both;
}
@keyframes beat {
	0% {
		transform: scale(1);
		animation-timing-function: ease-out;
	}
	10% {
		transform: scale(0.91);
		animation-timing-function: ease-in;
	}
	17% {
		transform: scale(0.98);
		animation-timing-function: ease-out;
	}
	33% {
		transform: scale(0.87);
		animation-timing-function: ease-in;
	}
	45% {
		transform: scale(1.1);
		animation-timing-function: ease-out;
	}
}

.phone-verification {
	display: flex;
	align-items: center;
	width: 98%;
	height: 66px;
	border: 1px solid var(--brand);
	border-radius: 10px;
	box-shadow:
		inset 0 0 0 1px var(--brand),
		0 0 18px rgba(24, 103, 192, 0.22);
	background: #f7fbff;
	position: relative;
	transition: all 0.2s;
}
.phone-verification.valid {
	border-color: var(--success);
	box-shadow:
		inset 0 0 0 1px var(--success),
		0 0 18px var(--success-soft);
	background: #f5fff6;
}
.phone-verification.pin-verification {
	justify-content: center;
}
.pin-verification .phone-input {
	padding: 0 24px;
}
.pin-input {
	text-align: center;
}
.country-code {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px;
	border-right: 2px solid #a6a6a6;
	height: 100%;
	font-weight: 600;
	font-size: 14px;
}
.country-code .flag {
	width: 22px;
	height: 22px;
	border-radius: 3px;
	background: linear-gradient(180deg, #00843d 33%, #fff 33%, #fff 66%, #000 66%);
	position: relative;
	overflow: hidden;
}
.country-code .flag::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 30%;
	background: #ce1126;
}
.phone-input {
	flex: 1;
	padding: 0 14px;
	position: relative;
}
.phone-input input {
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	font-size: 16px;
	letter-spacing: 2px;
	font-family: inherit;
	font-weight: 500;
}
.phone-input input::placeholder {
	color: #94a3b8;
}
.user-avatar {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #ddd;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.25s;
}
.user-avatar svg {
	width: 14px;
	height: 14px;
	color: #a3a3a3;
	transition: color 0.25s;
}
.phone-verification.valid .user-avatar {
	background: var(--success);
}
.phone-verification.valid .user-avatar svg {
	color: #fff;
}

/* ===== THE ARROW ANIMATION (the key move) ===== */
.phone-verification.active::before,
.phone-verification.active::after,
.cta.active::before,
.cta.active::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 28px;
	height: 28px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23468432' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>")
		center/contain no-repeat;
	z-index: 2;
}
.cta.active::before,
.cta.active::after {
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23468432' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>")
		center/contain no-repeat;
}
.phone-verification.active::before,
.cta.active::before {
	transform: translateY(-50%) scaleX(1);
	animation: arrowLeft 0.8s infinite;
}
.phone-verification.active::after,
.cta.active::after {
	transform: translateY(-50%) scaleX(-1);
	animation: arrowRight 0.8s infinite;
}
@keyframes arrowLeft {
	0% {
		left: -18px;
	}
	50% {
		left: -34px;
	}
	100% {
		left: -18px;
	}
}
@keyframes arrowRight {
	0% {
		right: -18px;
	}
	50% {
		right: -34px;
	}
	100% {
		right: -18px;
	}
}
html.no-animations .phone-verification.active::before,
html.no-animations .cta.active::before {
	left: -18px;
}
html.no-animations .phone-verification.active::after,
html.no-animations .cta.active::after {
	right: -18px;
}

/* ---------------- Carrier confirmation card ---------------- */
.carrier {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: #f8f8f8;
}
.carrier .left {
	display: flex;
	align-items: center;
	gap: 10px;
}
.carrier .logo-icon {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 11px;
}
.carrier h3 {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
}
.carrier .tick {
	color: var(--success);
}
.carrier .tick svg {
	width: 20px;
	height: 20px;
}

/* ---------------- CTA ---------------- */
.cta {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	border: 0;
	color: #fff;
	text-align: center;
	font-size: 20px;
	font-weight: 700;
	width: 98%;
	height: 64px;
	border-radius: 10px;
	background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
	box-shadow: 0 4px 4px rgba(0, 0, 0, 0.18);
	padding: 12px;
	font-family: inherit;
	cursor: pointer;
	position: relative;
	transition: background 0.3s;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}
.cta .subtxt {
	display: block;
	font-size: 11px;
	font-weight: 400;
	text-transform: none;
	opacity: 0.85;
	margin-top: 2px;
	letter-spacing: 0.3px;
}
.cta:active {
	filter: brightness(0.96);
}
.cta.disabled {
	background: #d9d9d9;
	color: #fff;
	box-shadow: none;
	cursor: pointer;
}
.cta.loading {
	pointer-events: none;
}
.cta.loading::before,
.cta.loading::after {
	display: none !important;
}
.cta-spinner {
	display: inline-block;
	width: 26px;
	height: 26px;
	border: 3px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: cta-spin 0.8s linear infinite;
}
@keyframes cta-spin {
	to {
		transform: rotate(360deg);
	}
}
html.no-animations .cta-spinner {
	animation: none;
}

/* ---------------- Inline form error ---------------- */
.form-error {
	text-align: center;
	color: #dc2626;
	font-size: 12px;
	font-weight: 500;
	margin-top: 8px;
	min-height: 1.2em;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.form-error.visible {
	opacity: 1;
}

/* ---------------- Exit & price ---------------- */
.exit {
	display: block;
	text-align: center;
	color: #000;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}
.price-sub {
	text-align: center;
	font-size: 12px;
	color: var(--muted);
	margin-top: 2px;
}
.price-sub.sent-to {
	margin-top: -6px;
}

/* ---------------- Thumbnails ---------------- */
.thumbs {
	margin-top: 8px;
}
.thumbs img {
	width: 100%;
	border-radius: 10px;
	display: block;
}

/* ---------------- Terms & disclaimer ---------------- */
.below-fold {
	display: block;
	font-size: 11.5px;
	color: #475569;
	line-height: 1.55;
	text-align: left;
	margin-top: 8px;
}
.below-fold .intro {
	color: #475569;
	margin-bottom: 8px;
}
.below-fold .terms-lead {
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 6px;
}
.below-fold ul {
	padding-left: 18px;
	margin-bottom: 12px;
}
.below-fold li {
	margin-bottom: 5px;
}
.below-fold a {
	color: var(--brand);
}
.footer-links {
	display: flex;
	justify-content: center;
	gap: 16px;
	list-style: none;
	margin-top: 14px;
	font-size: 11px;
}
.footer-links a {
	color: var(--muted);
	text-decoration: underline;
}

.spacer-sm {
	height: 10px;
}
.spacer-md {
	height: 14px;
}
.center {
	text-align: center;
}
.hidden {
	display: none !important;
}
