/* Strona Demo. Ten plik ładuje się tylko na podstronie /demo/. */

@font-face {
	font-family: 'Sousweb Serif';
	src: url('fonts/sousweb-serif-italic.woff') format('woff');
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
}
@font-face {
	font-family: 'Sousweb Display';
	src: url('fonts/poppins-700.woff') format('woff');
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

.demo { background: var(--black); color: var(--light-text); }

/* Pokazuje tylko elementy wybranej branży */
.demo[data-branza="salon"] [data-only]:not([data-only="salon"]),
.demo[data-branza="bistro"] [data-only]:not([data-only="bistro"]),
.demo[data-branza="gabinet"] [data-only]:not([data-only="gabinet"]) { display: none !important; }

/* Nagłówek i przełączniki */

.demo-hero { padding: 96px 24px 40px; }
.demo-hero__inner { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.demo-hero__title { margin: 0; font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 600; line-height: 1.04; letter-spacing: -.035em; color: var(--light-text); }
.demo-hero__lead { margin: 0; max-width: 38rem; font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.45; color: var(--muted-dark); }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-top: 14px; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #1D1D1F; }
.seg button {
	min-height: 40px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #D2D2D7;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: background .25s, color .25s;
}
.seg button[aria-pressed="true"] { background: var(--light-text); color: var(--ink); }

.explain-toggle {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0 6px;
	border: 0;
	background: transparent;
	color: var(--light-text);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}
.explain-toggle__track { position: relative; display: inline-block; width: 46px; height: 26px; border-radius: 999px; background: #3A3A3C; transition: background .25s; }
.explain-toggle__knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); transition: left .25s; }
.explain-toggle[aria-pressed="true"] .explain-toggle__track { background: var(--blue); }
.explain-toggle[aria-pressed="true"] .explain-toggle__knob { left: 22px; }

/* Telefon i opisy */

.demo-stage { padding: 24px 24px 128px; }
.demo-stage__inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px 48px; }

.callouts {
	flex: 1 1 260px;
	min-width: 0;
	max-width: 340px;
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 36px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .4s, transform .4s;
}
.demo.is-explaining .callouts { opacity: 1; transform: none; }
.callouts li { display: flex; gap: 14px; align-items: flex-start; }
.callouts__n {
	flex: 0 0 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--blue);
	color: var(--white);
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.callouts__body { display: flex; flex-direction: column; gap: 4px; }
.callouts__title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--light-text); }
.callouts__text { font-size: 15px; line-height: 1.45; color: #A1A1A6; }

.phone-col { flex: 0 0 auto; width: 380px; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.phone {
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border-radius: 56px;
	background: #1C1C1E;
	box-shadow: 0 0 0 1px #3A3A3C, 0 40px 120px rgba(0, 113, 227, .18);
}
.phone__screen { position: relative; height: 760px; border-radius: 46px; overflow: hidden; background: var(--black); }
.phone__variant { position: absolute; inset: 0; }
.phone__scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.phone__scroll::-webkit-scrollbar, .hscroll::-webkit-scrollbar { display: none; }
.hscroll { overflow-x: auto; scrollbar-width: none; }
.scroll-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-dark); }
.scroll-hint svg { animation: nudge 1.8s ease-in-out infinite; }

.demo-dot {
	position: absolute;
	z-index: 3;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--blue);
	color: var(--white);
	font-family: var(--font);
	font-size: 13px;
	font-style: normal;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s;
}
.demo.is-explaining .demo-dot { opacity: 1; animation: dotPulse 2s ease-out infinite; }

.f-serif { font-family: 'Sousweb Serif', Georgia, 'Times New Roman', serif; font-style: italic; }
.f-display { font-family: 'Sousweb Display', var(--font); font-weight: 700; }

/* Przed i po */

.ba { background: var(--paper); color: var(--ink); padding: 128px 24px; }
.ba__inner { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.ba__head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.ba__frame {
	--split: 50%;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 22px;
	overflow: hidden;
	container-type: inline-size;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .12);
}
.ba__variant { position: absolute; inset: 0; }
.ba__layer { position: absolute; inset: 0; }
.ba__before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.ba__divider {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--split);
	width: 2px;
	margin-left: -1px;
	background: var(--white);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
	pointer-events: none;
}
.ba__handle {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border-radius: 50%;
	background: var(--white);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
	display: flex;
	align-items: center;
	justify-content: center;
}
.ba__tag { position: absolute; bottom: 16px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: var(--white); font-size: 13px; font-weight: 600; }
.ba__tag--before { left: 16px; }
.ba__tag--after { right: 16px; }
.ba__control { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--muted-light); text-align: center; }
.ba__range { width: 100%; min-height: 32px; accent-color: var(--blue); }

/* Efekty */

.fx { background: var(--white); color: var(--ink); padding: 128px 24px; }
.fx__inner { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }
.fx__grid { display: flex; flex-wrap: wrap; gap: 24px; }
.fx__card { flex: 1 1 300px; min-width: 0; border-radius: 26px; background: var(--paper); padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.fx__card h3 { margin: 0; font-size: 1.375rem; font-weight: 600; letter-spacing: -.015em; }
.fx__card p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--muted-light); }
.fx__stage { height: 220px; border-radius: 18px; overflow: hidden; }

/* Wezwanie na końcu */

.demo-cta { background: var(--black); padding: 140px 24px 100px; }
.demo-cta__inner { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.demo-cta .h2 { color: var(--light-text); }
.demo-cta .lead { max-width: 40rem; }
.demo-cta .btn { margin-top: 10px; }

@keyframes dotPulse { 0% { box-shadow: 0 0 0 0 rgba(0, 113, 227, .55); } 70% { box-shadow: 0 0 0 12px rgba(0, 113, 227, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); } }
@keyframes riseIn { 0%, 8% { opacity: 0; transform: translateY(18px); } 28%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes feed { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(6deg); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Na węższych ekranach telefon stoi pierwszy, a opisy pojawiają się pod nim dopiero po włączeniu podglądu */
@media (max-width: 900px) {
	.phone-col { order: -1; }
	.callouts { display: none; }
	.demo.is-explaining .callouts { display: flex; }
}

@media (max-width: 600px) {
	.demo-hero { padding: 64px 20px 32px; }
	.demo-stage { padding: 16px 16px 96px; }
	.phone__screen { height: 700px; }
	.ba, .fx { padding: 96px 20px; }
	.ba__tag { bottom: 10px; font-size: 12px; }
	.ba__tag--before { left: 10px; }
	.ba__tag--after { right: 10px; }
	.demo-cta { padding: 112px 20px 72px; }
}

@media (prefers-reduced-motion: reduce) {
	.demo *, .demo *::before, .demo *::after { animation: none !important; transition: none !important; }
}
