/* Demo websites page. Uses the site tokens from custom.css (--primary-color etc.). */

.demo-showcase{
	padding: 100px 0 60px;
}

/* --- toolbar: count + industry filters ---------------------------------- */
.demo-toolbar{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 40px;
}

.demo-count{
	margin: 0;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	color: var(--primary-color);
}

.demo-filter-title{
	order: -2;
	width: 100%;
	margin: 0;
	font-size: clamp(20px, 2vw, 26px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--white-color, #fff);
}

.demo-filters{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	order: -1;
	width: 100%;
}

.demo-filters[hidden],
.demo-card[hidden],
.demo-empty-filter[hidden]{
	display: none;
}

.demo-chip{
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--text-color);
	background: transparent;
	border: 1px solid var(--dark-divider-color);
	border-radius: 100px;
	padding: 11px 20px;
	cursor: pointer;
	transition: color 0.2s ease-out, border-color 0.2s ease-out, background-color 0.2s ease-out;
}

.demo-chip:hover{
	color: var(--primary-color);
	border-color: var(--primary-color);
}

.demo-chip[aria-pressed="true"]{
	color: var(--primary-color);
	background: linear-gradient(to right, var(--accent-color), var(--accent-secondary-color));
	border-color: transparent;
}

.demo-chip:focus-visible,
.demo-link:focus-visible,
.demo-frame:focus-visible{
	outline: 2px solid var(--primary-color);
	outline-offset: 3px;
}

/* --- grid --------------------------------------------------------------- */
.demo-grid{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

@media (max-width: 1099px){
	.demo-grid{
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 699px){
	.demo-grid{
		grid-template-columns: minmax(0, 1fr);
	}
}

.demo-card{
	display: flex;
	flex-direction: column;
	background: var(--secondary-color);
	border: 1px solid var(--divider-color);
	border-radius: 24px;
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease-out;
}

.demo-card:hover{
	transform: translateY(-4px);
	border-color: var(--dark-divider-color);
}

/* --- browser frame ------------------------------------------------------ */
.demo-frame{
	display: block;
	text-decoration: none;
	color: inherit;
}

.demo-chrome{
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: #111216;
	border-bottom: 1px solid var(--divider-color);
}

.demo-dots{
	display: inline-flex;
	gap: 6px;
	flex-shrink: 0;
}

.demo-dots i{
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--dark-divider-color);
}

.demo-address{
	flex: 1;
	min-width: 0;
	font-size: 13px;
	line-height: 1.2;
	color: var(--text-color);
	background: rgba(255, 255, 255, 0.05);
	border-radius: 100px;
	padding: 6px 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.demo-viewport{
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #0f1013;
}

.demo-viewport img{
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0%;
	transition: object-position 0.9s cubic-bezier(0.25, 1, 0.5, 1);
}

/* tall full-page screenshots scroll slowly while the pointer is on the frame */
@media (hover: hover){
	a.demo-frame:hover .demo-viewport img,
	a.demo-frame:focus-visible .demo-viewport img{
		object-position: 50% 100%;
		transition: object-position 6s cubic-bezier(0.45, 0.05, 0.3, 1);
	}
}

/* --- card body ---------------------------------------------------------- */
.demo-body{
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 28px;
}

.demo-meta{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 14px;
	line-height: 1.2;
}

.demo-industry{
	font-size: 13px;
	font-weight: 600;
	color: #F4B8A2;
	background: rgba(169, 62, 23, 0.16);
	border: 1px solid rgba(169, 62, 23, 0.5);
	border-radius: 100px;
	padding: 5px 12px;
}

.demo-client{
	font-size: 14px;
	color: var(--text-color);
}

.demo-card h3{
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	color: var(--primary-color);
}

.demo-desc{
	max-width: 60ch;
	margin: 0 0 18px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--text-color);
}

.demo-highlights{
	display: grid;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.demo-highlights li{
	position: relative;
	padding-left: 22px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--primary-color);
}

.demo-highlights li::before{
	content: "";
	position: absolute;
	left: 2px;
	top: 0.55em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent-color);
}

.demo-foot{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid var(--divider-color);
}

.demo-link{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--primary-color);
	text-decoration: none;
	transition: color 0.2s ease-out;
}

.demo-link svg{
	transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.demo-link:hover{
	color: #F4B8A2;
}

.demo-link:hover svg{
	transform: translate(2px, -2px);
}

.demo-link .visually-hidden{
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.demo-soon{
	font-size: 15px;
	font-weight: 600;
	color: var(--text-color);
}

.demo-tags{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.demo-tags li{
	font-size: 12.5px;
	line-height: 1;
	color: var(--text-color);
	border: 1px solid var(--divider-color);
	border-radius: 100px;
	padding: 6px 11px;
}

/* --- empty states ------------------------------------------------------- */
.demo-empty{
	max-width: 680px;
	margin: 0 auto;
	padding: 64px 32px;
	text-align: center;
	background: var(--secondary-color);
	border: 1px solid var(--divider-color);
	border-radius: 24px;
}

.demo-empty h2{
	margin: 0 0 14px;
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.2;
	text-transform: none;
	color: var(--primary-color);
}

.demo-empty p{
	max-width: 52ch;
	margin: 0 auto 28px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--text-color);
}

.demo-empty-actions{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 20px 28px;
}

.demo-empty-filter{
	margin: 32px 0 0;
	text-align: center;
	font-size: 17px;
	color: var(--text-color);
}

/* --- small screens ------------------------------------------------------ */
@media (max-width: 767px){
	.demo-showcase{
		padding: 60px 0 30px;
	}
	.demo-toolbar{
		margin-bottom: 28px;
	}
	.demo-grid{
		gap: 24px;
	}
	.demo-body{
		padding: 22px;
	}
	.demo-card h3{
		font-size: 21px;
	}
	.demo-empty{
		padding: 44px 22px;
	}
}

/* --- reduced motion: no scroll preview, no lift ------------------------- */
@media (prefers-reduced-motion: reduce){
	.demo-card,
	.demo-chip,
	.demo-link,
	.demo-link svg,
	.demo-viewport img{
		transition: none;
	}
	.demo-card:hover{
		transform: none;
	}
	a.demo-frame:hover .demo-viewport img,
	a.demo-frame:focus-visible .demo-viewport img{
		object-position: 50% 0%;
	}
	.demo-link:hover svg{
		transform: none;
	}
}

/* ===== Demo detail page ================================================== */
.demo-detail{
	padding: 90px 0 30px;
}

.demo-detail-grid{
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.demo-detail h2{
	margin: 0 0 18px;
	font-size: clamp(28px, 3.2vw, 40px);
	line-height: 1.15;
	text-transform: none;
	color: var(--primary-color);
}

.demo-detail h3{
	margin: 32px 0 14px;
	font-size: 20px;
	font-weight: 700;
	text-transform: none;
	color: var(--primary-color);
}

.demo-detail-lead{
	max-width: 62ch;
	margin: 0;
	font-size: 18px;
	line-height: 1.7;
	color: var(--text-color);
}

.demo-checklist{
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.demo-checklist li{
	position: relative;
	padding-left: 24px;
	font-size: 16px;
	line-height: 1.55;
	color: var(--primary-color);
}

.demo-checklist li::before{
	content: "";
	position: absolute;
	left: 2px;
	top: 0.55em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent-color);
}

.demo-facts{
	padding: 28px;
	background: var(--secondary-color);
	border: 1px solid var(--divider-color);
	border-radius: 24px;
}

.demo-facts dl{
	display: grid;
	gap: 16px;
	margin: 0;
}

.demo-facts dl div{
	display: grid;
	gap: 2px;
}

.demo-facts dt{
	font-size: 13px;
	font-weight: 600;
	color: var(--text-color);
}

.demo-facts dd{
	margin: 0;
	font-size: 17px;
	line-height: 1.4;
	color: var(--primary-color);
}

.demo-facts h3{
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--divider-color);
}

/* viewer */
.demo-viewer{
	padding: 60px 0 50px;
}

.demo-viewer-head{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 28px;
	margin-bottom: 28px;
}

.demo-viewer-head h2{
	margin: 0;
	font-size: clamp(26px, 3vw, 36px);
	text-transform: none;
	color: var(--primary-color);
}

.demo-tools{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.demo-tools .demo-chip[hidden]{
	display: none;
}

.demo-stage{
	padding: clamp(10px, 2vw, 24px);
	background: var(--secondary-color);
	border: 1px solid var(--divider-color);
	border-radius: 28px;
}

.demo-device{
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	background: #111216;
	border: 1px solid var(--divider-color);
	border-radius: 18px;
	transition: max-width 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.demo-device[data-device="tablet"]{
	max-width: 820px;
}

.demo-device[data-device="mobile"]{
	max-width: 390px;
}

.demo-iframe{
	display: block;
	width: 100%;
	height: clamp(520px, 78vh, 900px);
	border: 0;
	background: #fff;
}

.demo-device[data-device="mobile"] .demo-iframe{
	height: min(760px, 78vh);
}

.demo-stage:fullscreen{
	display: flex;
	flex-direction: column;
	padding: 12px;
	border-radius: 0;
}

.demo-stage:fullscreen .demo-device{
	flex: 1;
	display: flex;
	flex-direction: column;
	max-width: 100%;
}

.demo-stage:fullscreen .demo-iframe{
	flex: 1;
	height: auto;
}

.demo-note{
	margin: 24px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--text-color);
}

.demo-legal{
	max-width: 80ch;
}

@media (max-width: 991px){
	.demo-detail{
		padding: 60px 0 20px;
	}
	.demo-detail-grid{
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
}

@media (prefers-reduced-motion: reduce){
	.demo-device{
		transition: none;
	}
}

@media print{
	.demo-viewer{
		display: none;
	}
}

/* draft preview banner (demo detail page, signed preview link only) */
.demo-preview-banner{
	position: sticky;
	top: 0;
	z-index: 1030;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	color: #3A2D00;
	background: #FFE9A8;
}
