/* Site Previews Portfolio – front end styles (dark theme) */
.sp-portfolio {
	--sp-accent: #a78bfa;
	--sp-accent-2: #22d3ee;
	--sp-text: #f5f5f7;
	--sp-muted: #9a9aa5;
	--sp-border: rgba(255, 255, 255, .08);
	--sp-card: #0d0d10;
	--sp-soft: rgba(255, 255, 255, .05);
	--sp-radius: 20px;
	--sp-cols: 3;
	width: 100%;
	font-family: inherit;
	color: var(--sp-text);
}
.sp-portfolio *, .sp-modal *, .sp-section * { box-sizing: border-box; }

/* ---------- section (Elementor HTML page) ---------- */
/* Full-bleed: breaks out of the theme / Elementor boxed container to the full screen width. */
.sp-section {
	box-sizing: border-box; width: 100vw; max-width: 100vw;
	margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important;
	position: relative; isolation: isolate; overflow: hidden;
	background: #000; color: #f5f5f7;
	padding: clamp(72px, 10vw, 128px) 20px;
}
/* soft colour glows */
.sp-section::before {
	content: ""; position: absolute; z-index: -1; inset: -20% -10% auto;
	height: 760px; pointer-events: none;
	background:
		radial-gradient(42% 50% at 22% 30%, rgba(139, 92, 246, .28), transparent 70%),
		radial-gradient(38% 46% at 80% 18%, rgba(34, 211, 238, .18), transparent 70%);
	filter: blur(10px);
}
/* fine grid lines fading out */
.sp-section::after {
	content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
	background-size: 64px 64px;
	-webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000 30%, transparent 80%);
	        mask-image: radial-gradient(70% 55% at 50% 0%, #000 30%, transparent 80%);
}
.sp-inner { max-width: 1320px; margin: 0 auto; }

/* Hide the sideways scrollbar 100vw can cause, and remove Kadence's white gaps around the page content. */
html:has(.sp-section), body:has(.sp-section) { overflow-x: clip; }
body:has(.sp-section) .content-area { margin-top: 0 !important; margin-bottom: 0 !important; }
body:has(.sp-section) .entry-content-wrap { padding: 0 !important; }
body:has(.sp-section) .site-main > article,
body:has(.sp-section) .content-bg { background: transparent; box-shadow: none; }
body:has(.sp-section) .entry-header { display: none; }
body:has(.sp-section) .site-content { background: #000; }
.elementor-widget-html:has(.sp-section) { margin: 0 !important; }

.sp-head { text-align: center; max-width: 700px; margin: 0 auto clamp(48px, 7vw, 80px); }
.sp-eyebrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
	color: #d4d4dc; padding: 8px 16px; border-radius: 999px; margin-bottom: 26px;
	background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1);
	backdrop-filter: blur(8px);
}
.sp-eyebrow::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%;
	background: #22d3ee; box-shadow: 0 0 0 0 rgba(34, 211, 238, .7);
	animation: sp-pulse 2s infinite;
}
@keyframes sp-pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
.sp-title {
	font-size: clamp(44px, 8vw, 88px); line-height: 1; letter-spacing: -.035em;
	margin: 0 0 22px; font-weight: 800; color: #fff;
}
.sp-title span {
	background: linear-gradient(100deg, #c4b5fd 0%, #a78bfa 35%, #22d3ee 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.sp-sub { font-size: clamp(16px, 2vw, 19px); line-height: 1.65; color: #9a9aa5; margin: 0 auto; max-width: 560px; }

/* ---------- grid ---------- */
.sp-grid {
	display: grid;
	grid-template-columns: repeat(var(--sp-cols), minmax(0, 1fr));
	gap: 28px;
	counter-reset: sp;
}
@media (max-width: 1024px) { .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .sp-grid { grid-template-columns: 1fr; gap: 22px; } }

.sp-skeleton {
	height: 420px; border-radius: var(--sp-radius); border: 1px solid var(--sp-border);
	background: linear-gradient(90deg, #0d0d10 25%, #17171c 50%, #0d0d10 75%);
	background-size: 200% 100%; animation: sp-shimmer 1.3s infinite;
}
@keyframes sp-shimmer { to { background-position: -200% 0; } }
.sp-empty { text-align: center; color: var(--sp-muted); padding: 40px 0; }

/* ---------- card ---------- */
.sp-card {
	counter-increment: sp;
	position: relative;
	background: linear-gradient(180deg, #111115 0%, #0a0a0c 100%);
	border: 1px solid var(--sp-border);
	border-radius: var(--sp-radius);
	padding: 10px;
	display: flex; flex-direction: column;
	transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .35s, box-shadow .35s;
	animation: sp-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.sp-card:nth-child(2) { animation-delay: .08s; }
.sp-card:nth-child(3) { animation-delay: .16s; }
.sp-card:nth-child(4) { animation-delay: .24s; }
.sp-card:nth-child(n+5) { animation-delay: .3s; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(18px); } }
/* gradient border glow on hover */
.sp-card::before {
	content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
	background: linear-gradient(140deg, rgba(167, 139, 250, .9), rgba(34, 211, 238, .5) 45%, transparent 70%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude;
	opacity: 0; transition: opacity .35s;
}
.sp-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(139, 92, 246, .45); }
.sp-card:hover::before { opacity: 1; }

.sp-thumb {
	all: unset; cursor: pointer; display: block; position: relative; overflow: hidden;
	border-radius: 13px; background: #16161b; border: 1px solid var(--sp-border);
}
.sp-thumb:focus-visible { outline: 2px solid var(--sp-accent); outline-offset: 2px; }
.sp-browser {
	display: flex; align-items: center; gap: 10px;
	height: 30px; padding: 0 12px; background: #141418; border-bottom: 1px solid var(--sp-border);
}
.sp-dots { display: flex; gap: 5px; }
.sp-dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a3a44; display: block; }
.sp-card:hover .sp-dots i:nth-child(1) { background: #ff5f57; }
.sp-card:hover .sp-dots i:nth-child(2) { background: #febc2e; }
.sp-card:hover .sp-dots i:nth-child(3) { background: #28c840; }
.sp-addr {
	flex: 1; min-width: 0; font-size: 11px; color: #7c7c88; background: rgba(255, 255, 255, .05);
	border-radius: 6px; padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-shot { display: block; position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.sp-shot img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; object-position: top center; display: block;
	transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.sp-card:hover .sp-shot img { transform: scale(1.05); }
.sp-shot-fallback {
	position: absolute; inset: 0; display: grid; place-items: center;
	font-size: 46px; font-weight: 800; letter-spacing: -.02em; color: rgba(255, 255, 255, .18);
	background:
		radial-gradient(60% 70% at 30% 20%, rgba(139, 92, 246, .25), transparent 70%),
		radial-gradient(50% 60% at 80% 90%, rgba(34, 211, 238, .15), transparent 70%),
		#101014;
}
.sp-overlay {
	position: absolute; inset: 30px 0 0 0; display: grid; place-items: center;
	background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .65));
	opacity: 0; transition: opacity .3s ease;
}
.sp-thumb:hover .sp-overlay, .sp-thumb:focus-visible .sp-overlay { opacity: 1; }
.sp-overlay-pill {
	display: inline-flex; align-items: center; gap: 8px;
	background: #fff; color: #0a0a0c; font-size: 14px; font-weight: 600;
	padding: 11px 20px; border-radius: 999px;
	transform: translateY(8px); transition: transform .3s ease;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.sp-thumb:hover .sp-overlay-pill { transform: none; }
.sp-overlay-pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sp-body { padding: 20px 12px 10px; display: flex; flex-direction: column; flex: 1; }
.sp-name {
	font-size: 20px; line-height: 1.3; margin: 0 0 8px; color: #fff; font-weight: 700; letter-spacing: -.01em;
}
.sp-name::before {
	content: counter(sp, decimal-leading-zero);
	display: block; margin-bottom: 10px;
	font-size: 12px; font-weight: 600; letter-spacing: .14em; color: var(--sp-accent);
	font-variant-numeric: tabular-nums;
}
.sp-text { font-size: 15px; line-height: 1.6; color: var(--sp-muted); margin: 0 0 20px; }
.sp-actions {
	margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding-top: 16px; border-top: 1px solid var(--sp-border);
}

/* ---------- device buttons ---------- */
.sp-devices {
	display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px;
	background: rgba(255, 255, 255, .04); border: 1px solid var(--sp-border);
}
.sp-dev-btn {
	all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-width: 36px; height: 34px; padding: 0 8px; border-radius: 8px;
	color: #8a8a96; font-size: 13px; font-weight: 600;
	transition: background .2s, color .2s;
}
.sp-dev-btn svg, .sp-visit svg, .sp-open-new svg, .sp-close svg {
	width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2;
	stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.sp-dev-btn:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.sp-dev-btn:focus-visible { outline: 2px solid var(--sp-accent); }
.sp-dev-btn.is-active { background: #fff; color: #0a0a0c; }

.sp-visit {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: 14px; font-weight: 600; color: #fff; text-decoration: none; white-space: nowrap;
	padding: 9px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14);
	transition: background .2s, border-color .2s, color .2s;
}
.sp-visit svg { width: 15px; height: 15px; transition: transform .2s; }
.sp-visit:hover { background: #fff; color: #0a0a0c; border-color: #fff; }
.sp-visit:hover svg { transform: translate(2px, -2px); }

/* ---------- modal ---------- */
html.sp-lock, html.sp-lock body { overflow: hidden !important; }
.sp-modal {
	--sp-accent: #818cf8;
	position: fixed; inset: 0; z-index: 999999;
	display: flex; flex-direction: column;
	background: rgba(0, 0, 0, .94);
	backdrop-filter: blur(6px);
	color: #e2e8f0; font-family: inherit;
	opacity: 0; transition: opacity .2s ease;
}
.sp-modal[hidden] { display: none; }
.sp-modal.is-open { opacity: 1; }

.sp-modal-bar {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
	padding: 12px 20px; border-bottom: 1px solid rgba(148, 163, 184, .18);
}
.sp-modal-info { min-width: 0; display: flex; flex-direction: column; }
.sp-modal-info strong { font-size: 16px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-modal-url { font-size: 12px; color: #94a3b8; }
.sp-modal-devices { background: rgba(148, 163, 184, .12); }
.sp-modal .sp-dev-btn { color: #cbd5e1; padding: 0 12px; }
.sp-modal .sp-dev-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sp-modal .sp-dev-btn.is-active { background: #fff; color: #0a0a0c; }
.sp-modal-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sp-size { font-size: 12px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.sp-open-new, .sp-close {
	all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
	height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
	color: #e2e8f0; background: rgba(148, 163, 184, .12);
}
.sp-close { width: 36px; padding: 0; justify-content: center; }
.sp-open-new:hover, .sp-close:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.sp-open-new:focus-visible, .sp-close:focus-visible { outline: 2px solid var(--sp-accent); }

.sp-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }

/* device frames */
.sp-frame {
	background: #0b1120; border: 1px solid #334155;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
}
.sp-frame.is-desktop { padding: 30px 0 0; border-radius: 10px; position: relative; }
.sp-frame.is-desktop::before {
	content: ""; position: absolute; top: 11px; left: 14px; width: 8px; height: 8px; border-radius: 50%;
	background: #f87171; box-shadow: 14px 0 0 #fbbf24, 28px 0 0 #34d399;
}
.sp-frame.is-tablet { padding: 22px; border-radius: 28px; }
.sp-frame.is-mobile { padding: 14px; border-radius: 40px; }

.sp-screen { position: relative; overflow: hidden; background: #fff; transition: width .3s ease, height .3s ease; }
.sp-frame.is-desktop .sp-screen { border-radius: 0 0 10px 10px; }
.sp-frame.is-tablet .sp-screen { border-radius: 10px; }
.sp-frame.is-mobile .sp-screen { border-radius: 28px; }
.sp-modal .sp-screen iframe {
	position: absolute !important; top: 0 !important; left: 0 !important;
	border: 0 !important; display: block !important; background: #fff;
	margin: 0 !important; padding: 0 !important;
	max-width: none !important; max-height: none !important;
	min-width: 0 !important; min-height: 0 !important;
	aspect-ratio: auto !important;
	transform-origin: 0 0 !important;
}

.sp-loader {
	position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
	background: #f8fafc; transition: opacity .3s ease;
}
.sp-loader span {
	width: 40px; height: 40px; border-radius: 50%;
	border: 3px solid #e2e8f0; border-top-color: #8b5cf6; animation: sp-spin .8s linear infinite;
}
.sp-loader.is-done { opacity: 0; pointer-events: none; }
@keyframes sp-spin { to { transform: rotate(360deg); } }

.sp-hint { margin: 0; padding: 0 20px 14px; text-align: center; font-size: 12px; color: #94a3b8; }
.sp-hint a { color: #a5b4fc; }

@media (max-width: 760px) {
	.sp-modal-bar { grid-template-columns: 1fr auto; padding: 10px 12px; gap: 10px; }
	.sp-modal-devices { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
	.sp-modal .sp-dev-btn span, .sp-open-new span, .sp-size { display: none; }
	.sp-open-new { width: 36px; padding: 0; justify-content: center; }
	.sp-stage { padding: 8px; }
	.sp-frame.is-tablet { padding: 12px; border-radius: 20px; }
	.sp-frame.is-mobile { padding: 8px; border-radius: 30px; }
}

@media (prefers-reduced-motion: reduce) {
	.sp-card, .sp-card::before, .sp-shot img, .sp-screen, .sp-frame, .sp-modal { transition: none; animation: none; }
	.sp-eyebrow::before { animation: none; }
}
