/* Onefold Agency ERP: public website polish (phones, sliders, protected project images). */

/* ------------------------------------------------------------------
   Phones, tablets and touch screens: bubbles instead of still dots
   ------------------------------------------------------------------ */
@media (max-width: 1024px), (pointer: coarse) {
	.of-dots-yes:not(.of-dots-live) {
		background-image: none;
	}
}

@media (max-width: 1024px) and (prefers-reduced-motion: no-preference), (pointer: coarse) and (prefers-reduced-motion: no-preference) {
	.of-aurora-yes::after {
		animation: of-aurora-drift 18s ease-in-out infinite alternate;
		will-change: transform;
	}
}

.ofs-bubbles {
	position: absolute !important;
	inset: 0;
	z-index: 0 !important;
	overflow: hidden;
	pointer-events: none;
	contain: strict;
}

.ofs-bubbles > span {
	position: absolute;
	display: block;
	width: var(--s, 120px);
	height: var(--s, 120px);
	border-radius: 50%;
	background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 38%), radial-gradient(circle, var(--c, rgba(108, 92, 231, 0.22)) 0%, var(--c, rgba(108, 92, 231, 0.22)) 45%, rgba(108, 92, 231, 0) 72%);
	opacity: 1;
	animation: ofs-float var(--d, 12s) ease-in-out var(--w, 0s) infinite alternate;
	will-change: transform;
}

.ofs-bubbles > span:nth-child(1) { --s: 150px; --c: rgba(108, 92, 231, 0.20); top: 6%; left: -30px; --d: 13s; }
.ofs-bubbles > span:nth-child(2) { --s: 90px; --c: rgba(0, 194, 255, 0.22); top: 18%; right: -12px; --d: 11s; --w: -3s; }
.ofs-bubbles > span:nth-child(3) { --s: 56px; --c: rgba(108, 92, 231, 0.26); top: 42%; left: 62%; --d: 9s; --w: -5s; }
.ofs-bubbles > span:nth-child(4) { --s: 120px; --c: rgba(0, 194, 255, 0.18); top: 60%; left: 8%; --d: 15s; --w: -7s; }
.ofs-bubbles > span:nth-child(5) { --s: 38px; --c: rgba(91, 75, 216, 0.30); top: 30%; left: 30%; --d: 8s; --w: -2s; }
.ofs-bubbles > span:nth-child(6) { --s: 170px; --c: rgba(108, 92, 231, 0.14); top: 76%; right: -50px; --d: 17s; --w: -9s; }
.ofs-bubbles > span:nth-child(7) { --s: 44px; --c: rgba(0, 194, 255, 0.28); top: 88%; left: 46%; --d: 10s; --w: -4s; }

@keyframes ofs-float {
	0% { transform: translate3d(0, 0, 0) scale(1); }
	33% { transform: translate3d(18px, -26px, 0) scale(1.06); }
	66% { transform: translate3d(-14px, -48px, 0) scale(0.96); }
	100% { transform: translate3d(10px, -70px, 0) scale(1.04); }
}

.ofs-bubbles.is-paused > span {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.ofs-bubbles > span {
		animation: none;
	}
}

/* Computers keep their moving dots; the bubbles are only added on touch / small screens. */

/* ------------------------------------------------------------------
   Header "Let's Talk" on phones: smaller, text centred
   ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.of-header-cta .elementor-button {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		min-height: 38px;
		padding: 0 14px !important;
		font-size: 13.5px !important;
		line-height: 1 !important;
		white-space: nowrap;
	}

	.of-header-cta .elementor-button-content-wrapper {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
		line-height: 1;
	}

	.of-header-cta .elementor-button-text {
		display: block;
		line-height: 1;
		padding: 0 !important;
		margin: 0 !important;
	}
}

@media (max-width: 380px) {
	.of-header-cta .elementor-button {
		min-height: 36px;
		padding: 0 12px !important;
		font-size: 12.5px !important;
	}
}

/* ------------------------------------------------------------------
   Phone sliders for "Agency vs freelancer vs in-house" and pricing
   ------------------------------------------------------------------ */
.ofs-slider-ctl {
	display: none;
}

.ofs-slider.is-sliding + .ofs-slider-ctl {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 14px 0 0;
}

.ofs-slider.is-sliding {
	scroll-behavior: smooth;
	scroll-padding-inline: 16px;
	scrollbar-width: none;
}

.ofs-slider.is-sliding::-webkit-scrollbar {
	display: none;
}

.ofs-slider.is-sliding > * {
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.ofs-slider-ctl__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #E3E6F0;
	border-radius: 50%;
	background: #FFFFFF;
	color: #4B3BC9;
	box-shadow: 0 6px 16px rgba(11, 16, 32, 0.08);
	cursor: pointer;
}

.ofs-slider-ctl__btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.ofs-slider-ctl__btn:focus-visible,
.ofs-slider-ctl__dot:focus-visible {
	outline: 3px solid rgba(108, 92, 231, 0.35);
	outline-offset: 2px;
}

.ofs-slider-ctl__dots {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ofs-slider-ctl__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #C9CDE0;
	cursor: pointer;
	transition: width 0.2s ease, background 0.2s ease;
}

.ofs-slider-ctl__dot[aria-current="true"] {
	width: 24px;
	background: linear-gradient(135deg, #6C5CE7, #00C2FF);
}

/* Shorter "Agency vs freelancer" cards on phones: facts in two columns */
@media (max-width: 767px) {
	.of-compare--cards .of-compare__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 14px;
	}

	.of-compare--cards .of-compare__fact {
		padding: 10px 0;
	}
}

/* ------------------------------------------------------------------
   Completed project images: blurred, not draggable or saveable
   ------------------------------------------------------------------ */
.of-frame__screen,
.of-showcase__thumb,
.single-of_work #main .of-entry-media,
.single-of_work #main .of-prose figure,
.single-of_work #main .elementor-widget-image {
	position: relative;
	overflow: hidden;
}

.of-frame__screen img,
.of-showcase__thumb img,
.single-of_work #main img {
	filter: blur(var(--ofs-blur, 6px));
	transform: scale(1.04);
	-webkit-user-drag: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	pointer-events: none;
}

.of-showcase__thumb img {
	--ofs-blur: 2.5px;
}

.ofs-shield {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: transparent;
	-webkit-touch-callout: none;
}

.single-of_work #main .ofs-shield {
	cursor: zoom-in;
}

.ofs-view {
	position: fixed;
	inset: 0;
	z-index: 100002;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 16px 24px;
	background: rgba(11, 16, 32, 0.86);
	-webkit-touch-callout: none;
	user-select: none;
}

.ofs-view[hidden] {
	display: none;
}

.ofs-view__frame {
	position: relative;
	max-width: min(1100px, 100%);
	max-height: 100%;
	overflow: hidden;
	border-radius: 14px;
}

.ofs-view__frame img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 100px);
	height: auto;
	filter: blur(8px);
	transform: scale(1.03);
	pointer-events: none;
	-webkit-user-drag: none;
}

.ofs-view__frame::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ofs-view__note {
	position: absolute;
	right: 16px;
	bottom: 14px;
	left: 16px;
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	text-align: center;
}

.ofs-view__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #FFFFFF;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

@media print {
	.of-frame__screen img,
	.of-showcase__thumb img,
	.single-of_work #main img {
		visibility: hidden;
	}
}

/* Header menu: "Portal Login" as a soft button, so clients notice it. */
.of-menu-portal {
	--ofs-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

.of-menu-portal > a {
	display: inline-flex !important;
	align-items: center;
	gap: 7px;
	border: 1.5px solid rgba(108, 92, 231, 0.35);
	background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 194, 255, 0.08));
	color: #4B3BC9 !important;
	font-weight: 600 !important;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.of-menu-portal > a::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--ofs-lock) center / contain no-repeat;
	mask: var(--ofs-lock) center / contain no-repeat;
}

.of-menu-portal > a:hover,
.of-menu-portal > a:focus-visible {
	border-color: #6C5CE7;
	background: linear-gradient(135deg, rgba(108, 92, 231, 0.14), rgba(0, 194, 255, 0.14));
	box-shadow: 0 6px 18px rgba(108, 92, 231, 0.18);
}

@media (max-width: 1024px) {
	.of-menu-portal {
		margin-top: 10px;
	}

	.of-menu-portal > a {
		justify-content: center;
		width: 100%;
		box-sizing: border-box;
		border-radius: 14px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.of-menu-portal > a {
		transition: none;
	}
}
