/*
 * Portfolio showcase (second design) — every rule is namespaced `sr-pf-`.
 *
 * The page is built around one idea: the real first page of each project is
 * the artwork. Cards show the top of that capture; clicking opens the whole
 * capture, scrolling, in a dialog.
 */

/* ---------- Hero ---------- */

.sr-pf-hero {
	position: relative;
	overflow: hidden;
	padding: 54px 0 0;
	background: linear-gradient(160deg, var(--sr-navy) 0%, var(--sr-ink) 55%, #04101f 100%);
	color: #fff;
}

.sr-pf-hero__inner {
	position: relative;
	z-index: 2;
	padding-bottom: 62px;
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
	gap: 48px;
	align-items: center;
}

.sr-pf-hero__copy { min-width: 0; }

.sr-pf-hero__art {
	display: flex;
	justify-content: center;
	min-width: 0;
}

.sr-pf-hero__grid {
	position: absolute;
	inset: 0;
	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: 62px 62px;
	mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
	-webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
	pointer-events: none;
}

.sr-pf-hero__blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	pointer-events: none;
}

.sr-pf-hero__blob--a {
	width: 520px;
	height: 520px;
	top: -190px;
	inset-inline-end: -120px;
	background: radial-gradient(circle, rgba(11, 74, 162, .85), transparent 70%);
}

.sr-pf-hero__blob--b {
	width: 460px;
	height: 460px;
	bottom: -220px;
	inset-inline-start: -140px;
	background: radial-gradient(circle, rgba(245, 158, 11, .3), transparent 70%);
}

.sr-pf-hero .sr-breadcrumb {
	margin-bottom: 22px;
	color: rgba(255, 255, 255, .62);
}

.sr-pf-hero .sr-breadcrumb a {
	color: rgba(255, 255, 255, .8);
}

.sr-pf-hero__title {
	max-width: 20ch;
	margin: 18px 0 0;
	color: #fff;
	font-size: clamp(2rem, 4.4vw, 3.5rem);
	font-weight: 900;
	line-height: 1.4;
	letter-spacing: -.5px;
}

.sr-pf-hero__title em {
	font-style: normal;
	background: linear-gradient(180deg, transparent 62%, rgba(245, 158, 11, .42) 62%);
	padding-inline: 4px;
}

.sr-pf-hero__lead {
	max-width: 68ch;
	margin: 20px 0 0;
	color: #cbd9ef;
	font-size: 1.06rem;
	line-height: 2.05;
}

.sr-pf-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 34px 0 0;
	padding: 0;
	list-style: none;
}

.sr-pf-stats li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 132px;
	padding: 16px 20px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 16px;
	background: rgba(255, 255, 255, .05);
	backdrop-filter: blur(6px);
}

.sr-pf-stats b {
	color: #fff;
	font-size: 1.75rem;
	font-weight: 900;
	line-height: 1.2;
}

.sr-pf-stats span {
	color: rgba(255, 255, 255, .68);
	font-size: .88rem;
}

.sr-pf-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 34px;
}

.sr-pf-hero .sr-btn--ghost {
	background: #fff;
	border-color: #fff;
	color: var(--sr-primary-700);
	box-shadow: 0 12px 26px rgba(2, 14, 33, .3);
}

.sr-pf-hero .sr-btn--ghost:hover {
	background: var(--sr-primary-050);
	border-color: var(--sr-primary-050);
	color: var(--sr-primary-700);
}

/* ---------- Hero artwork ----------
 * The circular "website design" scene: a browser window, a colour palette and
 * a cursor that walks in and clicks. Every click reveals a different project
 * capture, so the hero doubles as a tiny showreel. Only CSS drives it and the
 * screenshots are the same thumbnails the grid already loads.
 */

.sr-pf-hero__art svg.sr-pfw {
	display: block;
	width: min(430px, 100%);
	height: auto;
	border-radius: 50%;
	filter: drop-shadow(0 26px 46px rgba(2, 12, 28, .45));
	animation: sr-pfw-breathe 9s ease-in-out infinite;
}

.sr-pfw__orbit {
	transform-box: view-box;
	transform-origin: 200px 200px;
	animation: sr-pfw-orbit 26s linear infinite;
}

.sr-pfw__orbit--b {
	animation-duration: 38s;
	animation-direction: reverse;
}

.sr-pfw__ripple,
.sr-pfw__shot {
	transform-box: fill-box;
	transform-origin: center;
}

.sr-pfw__shot {
	opacity: 0;
	animation: sr-pfw-reveal 15s linear infinite;
}

.sr-pfw__url {
	opacity: 0;
	animation: sr-pfw-url 15s linear infinite;
}

.sr-pfw__shot--1,
.sr-pfw__url--1 { animation-delay: 5s; }

.sr-pfw__shot--2,
.sr-pfw__url--2 { animation-delay: 10s; }

.sr-pfw__shine {
	animation: sr-pfw-shine 5s ease-in-out infinite;
}

.sr-pfw__cursor {
	transform-box: view-box;
	transform-origin: 0 0;
	animation: sr-pfw-cursor 5s ease-in-out infinite;
}

.sr-pfw__ripple {
	animation: sr-pfw-ripple 5s ease-out infinite;
}

@keyframes sr-pfw-breathe {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.012); }
}

@keyframes sr-pfw-orbit {
	to { transform: rotate(360deg); }
}

/* The click lands at the end of the cycle; the next capture fades in right after. */
@keyframes sr-pfw-reveal {
	0%          { opacity: 0; transform: scale(1.04); }
	1.4%        { opacity: 1; transform: scale(1); }
	31%         { opacity: 1; transform: scale(1); }
	33.4%, 100% { opacity: 0; }
}

@keyframes sr-pfw-url {
	0%          { opacity: 0; }
	1.4%        { opacity: 1; }
	31%         { opacity: 1; }
	33.4%, 100% { opacity: 0; }
}

@keyframes sr-pfw-shine {
	0%        { transform: translateX(-90px); opacity: 0; }
	22%       { opacity: .85; }
	62%, 100% { transform: translateX(210px); opacity: 0; }
}

@keyframes sr-pfw-cursor {
	0%, 6%  { transform: translate(250px, 212px) scale(1); }
	40%     { transform: translate(300px, 326px) scale(1); }
	72%     { transform: translate(300px, 326px) scale(1); }
	93%     { transform: translate(250px, 212px) scale(1); }
	97%     { transform: translate(250px, 212px) scale(.8); }
	100%    { transform: translate(250px, 212px) scale(1); }
}

@keyframes sr-pfw-ripple {
	0%, 88% { opacity: 0; transform: scale(.3); }
	93%     { opacity: .95; transform: scale(1); }
	100%    { opacity: 0; transform: scale(3.4); }
}

/* ---------- Domain marquee ---------- */

.sr-pf-marquee {
	position: relative;
	z-index: 2;
	direction: ltr;
	overflow: hidden;
	padding: 15px 0;
	border-top: 1px solid rgba(255, 255, 255, .1);
	background: rgba(0, 0, 0, .22);
	mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.sr-pf-marquee__track {
	display: flex;
	width: max-content;
	animation: sr-pf-slide 46s linear infinite;
}

.sr-pf-marquee__track span {
	position: relative;
	padding: 0 26px;
	color: rgba(255, 255, 255, .58);
	font-size: .95rem;
	letter-spacing: .4px;
	white-space: nowrap;
}

.sr-pf-marquee__track span::after {
	content: "";
	position: absolute;
	inset-inline-end: 0;
	top: 50%;
	width: 5px;
	height: 5px;
	margin-top: -2.5px;
	border-radius: 50%;
	background: rgba(245, 158, 11, .7);
}

@keyframes sr-pf-slide {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Section shell ---------- */

.sr-pf-section {
	background: var(--sr-bg);
}

/* ---------- Toolbar ---------- */

.sr-pf-toolbar {
	position: sticky;
	top: var(--sr-header-h, 72px);
	z-index: 6;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 30px 0 26px;
	padding: 12px 14px;
	border: 1px solid var(--sr-border);
	border-radius: 18px;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: blur(10px);
	box-shadow: 0 12px 30px rgba(10, 31, 60, .07);
}

.sr-pf-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sr-pf-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--sr-border);
	border-radius: 999px;
	background: #fff;
	color: var(--sr-text);
	font-family: inherit;
	font-size: .93rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .18s ease;
}

.sr-pf-filter:hover {
	border-color: var(--sr-primary);
	color: var(--sr-primary);
	transform: translateY(-1px);
}

.sr-pf-filter.is-active {
	border-color: var(--sr-primary-700);
	background: var(--sr-primary-700);
	color: #fff;
}

.sr-pf-tools {
	display: flex;
	align-items: center;
	gap: 14px;
}

.sr-pf-search {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 13px;
	border: 1px solid var(--sr-border);
	border-radius: 999px;
	background: var(--sr-surface);
	color: var(--sr-muted);
	transition: border-color .18s ease, box-shadow .18s ease;
}

.sr-pf-search:focus-within {
	border-color: var(--sr-primary);
	box-shadow: 0 0 0 4px rgba(11, 74, 162, .1);
}

.sr-pf-search svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.sr-pf-search input {
	width: 200px;
	border: 0;
	background: none;
	color: var(--sr-text);
	font-family: inherit;
	font-size: .93rem;
	outline: none;
}

.sr-pf-search input::-webkit-search-cancel-button { display: none; }

/* ---------- Grid ---------- */

.sr-pf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
}

.sr-pf-grid > [hidden] { display: none !important; }

.sr-pf-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--sr-border);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 26px rgba(10, 31, 60, .06);
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .6s ease, transform .6s ease, box-shadow .25s ease, border-color .25s ease;
}

.sr-pf-card.is-in {
	opacity: 1;
	transform: none;
}

.sr-pf-card:hover {
	border-color: rgba(11, 74, 162, .35);
	box-shadow: 0 22px 46px rgba(10, 31, 60, .14);
}

.sr-pf-card--wide {
	grid-column: span 2;
}

.sr-pf-card__ribbon {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	z-index: 3;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--sr-accent);
	color: #3a2a00;
	font-size: .78rem;
	font-weight: 800;
	box-shadow: 0 8px 18px rgba(217, 119, 6, .3);
}

/* ---------- Card shot ---------- */

.sr-pf-card__shot {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 20px 20px 0 0;
	background: var(--sr-navy);
	color: #fff;
	font-family: inherit;
	text-align: inherit;
	cursor: pointer;
	overflow: hidden;
}

.sr-pf-card__bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	background: #0f2542;
}

.sr-pf-card__bar > span {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .26);
	flex-shrink: 0;
}

.sr-pf-card__bar > span:first-child { background: #ff5f57; }
.sr-pf-card__bar > span:nth-child(2) { background: #febc2e; }
.sr-pf-card__bar > span:nth-child(3) { background: #28c840; }

.sr-pf-card__bar i {
	flex: 1;
	min-width: 0;
	margin-inline-start: 8px;
	padding: 3px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .1);
	color: rgba(255, 255, 255, .82);
	font-size: .78rem;
	font-style: normal;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	direction: ltr;
	text-align: left;
}

/* A project without a stored URL gets a bare window bar. */
.sr-pf-card__bar--plain i { display: none; }

.sr-pf-card__media {
	display: block;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	/*
	 * While the capture is still downloading the tile shows a quiet shimmer
	 * instead of a flat white rectangle, so a slow connection never looks broken.
	 */
	background:
		linear-gradient(100deg, #eef2f8 30%, #f7f9fc 45%, #eef2f8 60%) #eef2f8;
	background-size: 220% 100%;
	animation: sr-pf-shimmer 1.6s linear infinite;
}

@keyframes sr-pf-shimmer {
	from { background-position: 180% 0; }
	to   { background-position: -60% 0; }
}

.sr-pf-card__media.is-loaded {
	animation: none;
	background: #fff;
}

.sr-pf-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	/* Show the whole first page: nothing is cropped, only letter-boxed on white. */
	object-fit: contain;
	object-position: center top;
	background: #fff;
	transition: transform .5s ease;
}

.sr-pf-card:hover .sr-pf-card__media img {
	transform: scale(1.035);
}

.sr-pf-card__veil {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 40px 14px 16px;
	background: linear-gradient(0deg, rgba(4, 16, 31, .88), transparent);
	color: #fff;
	font-size: .95rem;
	font-weight: 700;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .28s ease, transform .28s ease;
}

.sr-pf-card__veil svg {
	width: 20px;
	height: 20px;
}

.sr-pf-card:hover .sr-pf-card__veil,
.sr-pf-card__shot:focus-visible .sr-pf-card__veil {
	opacity: 1;
	transform: none;
}

.sr-pf-card__shot:focus-visible {
	outline: 3px solid var(--sr-accent);
	outline-offset: -3px;
}

/* ---------- Card body ---------- */

.sr-pf-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 12px;
	padding: 20px 22px 22px;
}

.sr-pf-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.sr-pf-card__head h3 {
	margin: 0;
	color: var(--sr-heading);
	font-size: 1.13rem;
	font-weight: 800;
	line-height: 1.7;
}

.sr-pf-chip {
	flex-shrink: 0;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--sr-primary-050);
	color: var(--sr-primary-700);
	font-size: .8rem;
	font-weight: 700;
}

.sr-pf-card__body p {
	margin: 0;
	color: var(--sr-muted);
	font-size: .95rem;
	line-height: 1.95;
}

.sr-pf-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--sr-border);
}

.sr-pf-card__links {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* ---------- Empty + more ---------- */

.sr-pf-empty {
	margin: 40px 0 0;
	padding: 40px 20px;
	border: 1px dashed var(--sr-border-strong);
	border-radius: 18px;
	background: var(--sr-surface);
	color: var(--sr-muted);
	text-align: center;
}

.sr-pf-empty[hidden] { display: none; }

.sr-pf-more {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.sr-pf-more[hidden] { display: none; }

/* ---------- Lightbox ---------- */

.sr-pf-lb {
	position: fixed;
	inset: 0;
	z-index: 9990;
	display: grid;
	place-items: center;
	padding: 22px;
}

.sr-pf-lb[hidden] { display: none; }

.sr-pf-lb__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 10, 20, .88);
	backdrop-filter: blur(5px);
	animation: sr-pf-fade .25s ease both;
}

.sr-pf-lb__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(1500px, 100%);
	height: calc(100vh - 44px);
	max-height: calc(100vh - 44px);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
	overflow: hidden;
	animation: sr-pf-pop .3s ease both;
}

@keyframes sr-pf-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes sr-pf-pop {
	from { opacity: 0; transform: translateY(18px) scale(.97); }
	to   { opacity: 1; transform: none; }
}

.sr-pf-lb__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--sr-border);
	background: var(--sr-surface);
}

.sr-pf-lb__id {
	min-width: 0;
}

.sr-pf-lb__id h3 {
	margin: 0;
	color: var(--sr-heading);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.6;
}

.sr-pf-lb__domain {
	display: block;
	color: var(--sr-muted);
	font-size: .85rem;
	direction: ltr;
	text-align: right;
}

.sr-pf-lb__tools {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.sr-pf-lb__tools .sr-btn {
	padding: 9px 16px;
	font-size: .88rem;
}

.sr-pf-lb__nav,
.sr-pf-lb__close {
	width: 38px;
	height: 38px;
	border: 1px solid var(--sr-border);
	border-radius: 50%;
	background: #fff;
	color: var(--sr-text);
	font-family: inherit;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: all .18s ease;
}

.sr-pf-lb__nav:hover,
.sr-pf-lb__close:hover {
	border-color: var(--sr-primary);
	background: var(--sr-primary-050);
	color: var(--sr-primary-700);
}

.sr-pf-lb__close {
	font-size: 1rem;
}

.sr-pf-lb__stage {
	position: relative;
	flex: 1;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	background:
		repeating-linear-gradient(45deg, #f2f5fa 0 12px, #eef2f8 12px 24px);
}

.sr-pf-lb__stage img {
	display: block;
	width: 100%;
	height: auto;
}

.sr-pf-lb__spinner {
	position: absolute;
	top: 50%;
	inset-inline-start: 50%;
	width: 42px;
	height: 42px;
	margin: -21px 0 0 -21px;
	border: 4px solid rgba(11, 74, 162, .18);
	border-top-color: var(--sr-primary);
	border-radius: 50%;
	animation: sr-pf-spin .8s linear infinite;
}

.sr-pf-lb__spinner[hidden] { display: none; }

@keyframes sr-pf-spin {
	to { transform: rotate(360deg); }
}

.sr-pf-lb__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 18px;
	border-top: 1px solid var(--sr-border);
	background: var(--sr-surface);
	color: var(--sr-muted);
	font-size: .85rem;
}

.sr-pf-lb__counter b {
	color: var(--sr-heading);
}

body.sr-pf-lock {
	overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
	.sr-pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sr-pf-card--wide { grid-column: span 2; }
	.sr-pf-hero__title { max-width: 26ch; }
	.sr-pf-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
	.sr-pf-hero__art { order: 2; }
	.sr-pf-hero__art svg.sr-pfw { width: min(370px, 100%); }
}

@media (max-width: 900px) {
	.sr-pf-toolbar { position: static; }
	.sr-pf-tools { width: 100%; justify-content: space-between; }
	.sr-pf-search { flex: 1; }
	.sr-pf-search input { width: 100%; }
	.sr-pf-lb { padding: 12px; }
	.sr-pf-lb__dialog { height: calc(100vh - 24px); max-height: calc(100vh - 24px); }
}

@media (max-width: 700px) {
	.sr-pf-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.sr-pf-card--wide { grid-column: span 1; }
	.sr-pf-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.sr-pf-filter { flex-shrink: 0; }
	.sr-pf-stats li { flex: 1 1 132px; }
	.sr-pf-tools { flex-wrap: wrap; }
	.sr-pf-lb__head { flex-wrap: wrap; }
	.sr-pf-lb__tools { width: 100%; justify-content: flex-end; }
	.sr-pf-lb__foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 520px) {
	.sr-pf-hero { padding-top: 34px; }
	.sr-pf-hero__title { font-size: 1.75rem; }
	.sr-pf-hero__actions .sr-btn { flex: 1 1 100%; justify-content: center; }
	.sr-pf-card__body { padding: 16px 18px 18px; }
	.sr-pf-card__veil { opacity: 1; transform: none; padding-top: 30px; }
	.sr-pf-hero__art svg.sr-pfw { width: min(300px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
	.sr-pf-marquee__track { animation: none; }
	.sr-pf-card { opacity: 1; transform: none; transition: none; }
	.sr-pf-card:hover .sr-pf-card__media img { transform: none; }
	.sr-pf-lb__backdrop,
	.sr-pf-lb__dialog { animation: none; }
	.sr-pf-lb__spinner { animation-duration: 1.6s; }

	/*
	 * The hero artwork is the only thing that shows the page is alive, so it
	 * keeps a slow loop even when the OS asks for reduced motion.
	 */
	.sr-pf-hero__art svg.sr-pfw { animation: sr-pfw-breathe 12s ease-in-out infinite !important; }
	.sr-pfw__shot { animation: sr-pfw-reveal 18s linear infinite !important; }
	.sr-pfw__url { animation: sr-pfw-url 18s linear infinite !important; }
	.sr-pfw__shot--1,
	.sr-pfw__url--1 { animation-delay: 6s !important; }
	.sr-pfw__shot--2,
	.sr-pfw__url--2 { animation-delay: 12s !important; }
	.sr-pfw__orbit { animation: sr-pfw-orbit 34s linear infinite !important; }
	.sr-pfw__orbit--b { animation: sr-pfw-orbit 46s linear infinite reverse !important; }
	.sr-pfw__shine { animation: sr-pfw-shine 7s ease-in-out infinite !important; }
	.sr-pfw__cursor { animation: sr-pfw-cursor 7s ease-in-out infinite !important; }
	.sr-pfw__ripple { animation: sr-pfw-ripple 7s ease-out infinite !important; }
}

/* ---------- Live preview: card buttons, mode switch, phone frame ---------- */

/* The three window dots breathe so the tiles always look alive. */
.sr-pf-card__bar > span {
	animation: sr-pf-dot 2.6s ease-in-out infinite;
}

.sr-pf-card__bar > span:first-child { --dot: #ff5f57; animation-delay: 0s; }
.sr-pf-card__bar > span:nth-child(2) { --dot: #febc2e; animation-delay: .3s; }
.sr-pf-card__bar > span:nth-child(3) { --dot: #28c840; animation-delay: .6s; }

@keyframes sr-pf-dot {
	0%, 100% { transform: translateY(0) scale(1); opacity: .62; box-shadow: 0 0 0 0 transparent; }
	45% { transform: translateY(-2px) scale(1.22); opacity: 1; box-shadow: 0 0 10px 1px var(--dot); }
}

.sr-pf-views {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.sr-pf-view {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--sr-border);
	border-radius: 12px;
	background: #fff;
	color: var(--sr-primary-700);
	cursor: pointer;
	transition: all .18s ease;
}

.sr-pf-view svg { width: 17px; height: 17px; }

.sr-pf-view:hover {
	border-color: var(--sr-primary);
	background: var(--sr-primary-700);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 18px -8px rgba(11, 74, 162, .6);
}

/* Tooltip: shown above the icon, never clipped by the card. */
.sr-pf-view::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 9px);
	left: 50%;
	z-index: 5;
	padding: 6px 10px;
	border-radius: 8px;
	background: #0f2542;
	color: #fff;
	font-size: .74rem;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-50%, 4px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.sr-pf-view:hover::after,
.sr-pf-view:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.sr-pf-site {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--sr-primary-700), var(--sr-primary));
	color: #fff;
	font-size: .85rem;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 10px 22px -12px rgba(11, 74, 162, .85);
	transition: all .18s ease;
}

.sr-pf-site svg { width: 15px; height: 15px; transition: transform .18s ease; }

.sr-pf-site:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 14px 26px -12px rgba(11, 74, 162, .95);
}

.sr-pf-site:hover svg { transform: translateX(-3px); }

.sr-pf-lb__modes {
	display: inline-flex;
	flex-shrink: 0;
	padding: 3px;
	border: 1px solid var(--sr-border);
	border-radius: 999px;
	background: #eef2f8;
}

.sr-pf-lb__mode {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--sr-muted);
	font-family: inherit;
	font-size: .85rem;
	font-weight: 700;
	cursor: pointer;
	transition: all .18s ease;
}

.sr-pf-lb__mode svg { width: 16px; height: 16px; }

.sr-pf-lb__mode.is-active {
	background: #fff;
	color: var(--sr-primary-700);
	box-shadow: 0 2px 8px rgba(11, 74, 162, .16);
}

.sr-pf-lb__stage {
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 0 22px;
}

.sr-pf-lb__viewport {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 420px;
	background: #fff;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior: contain;
	transition: width .26s ease, max-width .26s ease, border-radius .26s ease;
}

.sr-pf-lb__viewport iframe {
	display: block;
	/* A real desktop width, so the page keeps its layout; the frame scrolls sideways. */
	width: 1400px;
	min-width: 1400px;
	/* Centre the frame when it fits; when it is wider, the viewport scrolls. */
	margin: 0 auto;
	height: 100%;
	border: 0;
	background: #fff;
}

.sr-pf-lb__notch { display: none; }

.sr-pf-lb.is-mobile .sr-pf-lb__stage { padding: 22px 18px; }

.sr-pf-lb.is-mobile .sr-pf-lb__viewport iframe {
	width: 100%;
	min-width: 0;
}

.sr-pf-lb.is-mobile .sr-pf-lb__viewport {
	flex: 0 0 auto;
	width: 390px;
	max-width: 100%;
	border: 12px solid #101a2c;
	border-radius: 42px;
	box-shadow: 0 26px 60px -20px rgba(2, 10, 25, .6);
	overflow: hidden;
}

.sr-pf-lb.is-mobile .sr-pf-lb__notch {
	display: block;
	position: absolute;
	top: 0;
	inset-inline-start: 50%;
	width: 116px;
	height: 20px;
	margin-inline-start: -58px;
	border-radius: 0 0 14px 14px;
	background: #101a2c;
	z-index: 2;
}

.sr-pf-lb__blocked {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	padding: 56px 24px;
	text-align: center;
	color: var(--sr-muted);
}

.sr-pf-lb__blocked svg { width: 46px; height: 46px; color: var(--sr-primary); }

.sr-pf-lb__blocked h4 {
	margin: 0;
	color: var(--sr-heading);
	font-size: 1.05rem;
	font-weight: 800;
}

.sr-pf-lb__blocked p { margin: 0; max-width: 44ch; font-size: .92rem; line-height: 1.9; }

/* `display: flex` above would otherwise beat the hidden attribute. */
.sr-pf-lb__viewport[hidden],
.sr-pf-lb__blocked[hidden],
.sr-pf-lb__stage img[hidden] { display: none; }

@media (max-width: 720px) {
	.sr-pf-lb__modes { order: -1; }
	.sr-pf-lb.is-mobile .sr-pf-lb__stage { padding: 14px 10px; }
	.sr-pf-lb.is-mobile .sr-pf-lb__viewport { width: 100%; border-width: 8px; border-radius: 30px; }
	.sr-pf-lb__viewport { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
	.sr-pf-card__bar > span { animation: none; opacity: 1; }
	.sr-pf-lb__viewport { transition: none; }
}
