/* ==========================================================================
   PERFECTION STUDIO — UI REFRESH (2026)
   Loaded after style.css. Re-tunes the design tokens used everywhere and
   adds the new landing page components (prefixed .ps-).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   Old variable names are kept so every existing page picks up the new look.
   -------------------------------------------------------------------------- */
:root {
	/* Surfaces: neutral near-black instead of brown stone */
	--bg-dark: #0A0A0B;
	--bg-card: #131315;
	--bg-elevated: #1A1A1D;
	--bg-border: rgba(255, 255, 255, 0.08);
	--bg-border-strong: rgba(255, 255, 255, 0.14);
	--bg-muted: #3A3A40;
	--tint: 255, 255, 255; /* light-on-dark tints; flipped in light mode */

	/* Brand: a single confident accent, used sparingly */
	--accent-orange: #FF6B2C;
	--accent-hover: #FF8250;
	--accent-yellow: #FFB547;
	--accent-soft: rgba(255, 107, 44, 0.12);

	/* Text */
	--text-white: #F7F7F8;
	--text-main: #E4E4E7;
	--text-muted: #9B9BA4;
	--text-placeholder: #6B6B73;

	--grad-primary: linear-gradient(135deg, #FF6B2C 0%, #FF9A3D 100%);
	--grad-dark: linear-gradient(180deg, #0A0A0B 0%, #131315 100%);

	--radius-xl: 28px;
	--radius-lg: 18px;
	--radius-md: 12px;
	--radius-sm: 8px;
	--container-width: 1240px;

	--font-sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-serif: 'Instrument Serif', Georgia, serif;
	--font-arabic: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;

	--shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
	font-family: var(--font-sans);
	background-color: var(--bg-dark);
	font-feature-settings: "ss01", "cv11";
	text-rendering: optimizeLegibility;
}

html[dir="rtl"] body,
html[lang="ar"] body { font-family: var(--font-arabic); }

::selection { background: var(--accent-orange); color: #fff; }

:focus-visible {
	outline: 2px solid var(--accent-orange);
	outline-offset: 3px;
	border-radius: 6px;
}

::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #2A2A2F; }

/* --------------------------------------------------------------------------
   2. SHARED COMPONENTS (re-skin of existing classes)
   -------------------------------------------------------------------------- */
.btn-primary {
	background: var(--accent-orange);
	border-radius: 999px;
	font-weight: 600;
	letter-spacing: -0.01em;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px -8px rgba(255, 107, 44, 0.6);
	transition: transform 0.2s var(--ease-out), background 0.2s, box-shadow 0.2s;
}
	.btn-primary:hover {
		background: var(--accent-hover);
		transform: translateY(-1px);
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px -8px rgba(255, 107, 44, 0.7);
	}

.btn-outline {
	border: 1px solid var(--bg-border-strong);
	border-radius: 999px;
	background: rgba(var(--tint), 0.03);
}
	.btn-outline:hover { background: rgba(var(--tint), 0.07); border-color: rgba(var(--tint), 0.25); }

.form-input, .settings-form input {
	background-color: var(--bg-elevated);
	border: 1px solid var(--bg-border);
	border-radius: var(--radius-md);
	padding: 13px 14px;
}
	.form-input:hover, .settings-form input:hover { border-color: var(--bg-border-strong); }
	.form-input:focus, .settings-form input:focus {
		border-color: var(--accent-orange);
		box-shadow: 0 0 0 4px var(--accent-soft);
	}

.alert { border-radius: var(--radius-md); }

.logo h1, .logo-mobile h1, .auth-logo h1 {
	background: none;
	-webkit-text-fill-color: currentColor;
	color: var(--text-white);
	font-weight: 700;
	letter-spacing: -0.03em;
}
	.logo h1 span, .logo-mobile h1 span, .auth-logo h1 span { color: var(--accent-orange); }
/* Keep the Latin wordmark's trailing dot on the right in Arabic pages */
.logo h1, .logo-mobile h1, .auth-logo h1 { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* --------------------------------------------------------------------------
   3. LANDING: PRIMITIVES
   -------------------------------------------------------------------------- */
.ps-serif {
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
	background: linear-gradient(100deg, #FFD3B8 0%, #FF8A4C 45%, #FF6B2C 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	padding-inline-end: 0.06em;
}
/* Arabic has no italic serif: keep the colour, use the Arabic face */
html[dir="rtl"] .ps-serif { font-family: var(--font-arabic); font-style: normal; font-weight: 700; }

.ps-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-orange);
	margin-bottom: 1rem;
}
html[dir="rtl"] .ps-eyebrow { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }

.ps-eyebrow--pill {
	padding: 6px 14px 6px 10px;
	border-radius: 999px;
	background: rgba(var(--tint), 0.04);
	border: 1px solid var(--bg-border-strong);
	color: var(--text-main);
	letter-spacing: 0;
	text-transform: none;
	font-size: 0.85rem;
	font-weight: 500;
	backdrop-filter: blur(8px);
}

.ps-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--accent-orange);
	box-shadow: 0 0 0 4px var(--accent-soft);
	animation: ps-pulse 2.4s ease-in-out infinite;
}
@keyframes ps-pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 107, 44, 0); } }

.ps-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: -0.01em;
	border: 1px solid transparent;
	transition: transform 0.25s var(--ease-out), background 0.2s, border-color 0.2s, box-shadow 0.25s;
	white-space: nowrap;
}
	.ps-btn i { font-size: 0.85em; transition: transform 0.25s var(--ease-out); }
	.ps-btn:hover i { transform: translateX(3px); }
	html[dir="rtl"] .ps-btn i.fa-arrow-right { transform: rotate(180deg); }
	html[dir="rtl"] .ps-btn:hover i.fa-arrow-right { transform: rotate(180deg) translateX(3px); }

.ps-btn--primary {
	background: var(--accent-orange);
	color: #fff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 30px -10px rgba(255, 107, 44, 0.8);
}
	.ps-btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); color: #fff; }

.ps-btn--ghost {
	background: rgba(var(--tint), 0.04);
	border-color: var(--bg-border-strong);
	color: var(--text-white);
}
	.ps-btn--ghost:hover { background: rgba(var(--tint), 0.08); border-color: rgba(var(--tint), 0.24); }

.ps-btn--light { background: #fff; color: #0A0A0B; }
	.ps-btn--light:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255, 255, 255, 0.45); }

.ps-btn--sm { padding: 9px 16px; font-size: 0.875rem; }
.ps-btn--lg { padding: 16px 28px; font-size: 1rem; }
.ps-btn--block { width: 100%; }

.ps-icon {
	width: 44px; height: 44px;
	display: grid; place-items: center;
	border-radius: 12px;
	background: var(--accent-soft);
	border: 1px solid rgba(255, 107, 44, 0.22);
	color: var(--accent-orange);
	font-size: 1.05rem;
	margin-bottom: 1.25rem;
}

.ps-card {
	position: relative;
	background: linear-gradient(180deg, rgba(var(--tint), 0.035), rgba(var(--tint), 0.01));
	border: 1px solid var(--bg-border);
	border-radius: var(--radius-lg);
	padding: 2rem;
	overflow: hidden;
	transition: border-color 0.3s, transform 0.4s var(--ease-out);
}
	.ps-card:hover { border-color: var(--bg-border-strong); transform: translateY(-4px); }
	.ps-card h3 { color: var(--text-white); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
	.ps-card p { color: var(--text-muted); font-size: 0.975rem; line-height: 1.6; }

/* --------------------------------------------------------------------------
   4. NAVBAR
   -------------------------------------------------------------------------- */
.ps-nav {
	position: fixed;
	inset: 16px 0 auto 0;
	z-index: 1000;
	padding: 0 16px;
	pointer-events: none;
}
.ps-nav__inner {
	pointer-events: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1120px !important;
	padding: 10px 10px 10px 20px !important;
	border-radius: 999px;
	background: rgba(19, 19, 21, 0.55);
	border: 1px solid var(--bg-border);
	backdrop-filter: blur(18px) saturate(1.4);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
html[dir="rtl"] .ps-nav__inner { padding: 10px 20px 10px 10px !important; }
.ps-nav.is-scrolled .ps-nav__inner {
	background: rgba(19, 19, 21, 0.85);
	border-color: var(--bg-border-strong);
	box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
}

.ps-logo { display: inline-flex; align-items: center; gap: 10px; }
.ps-logo__mark {
	width: 26px; height: 26px;
	border-radius: 8px;
	background:
		radial-gradient(circle at 30% 30%, #FFD3B8 0 18%, transparent 19%),
		var(--grad-primary);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 16px -6px rgba(255, 107, 44, 0.9);
}
.ps-logo__word { color: var(--text-white); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em; }
	.ps-logo__word span { color: var(--accent-orange); }

.ps-nav__links { display: flex; gap: 0.25rem; }
	.ps-nav__links a {
		padding: 8px 14px;
		border-radius: 999px;
		color: var(--text-muted);
		font-size: 0.9rem;
		font-weight: 500;
	}
	.ps-nav__links a:hover { color: var(--text-white); background: rgba(var(--tint), 0.06); }
.ps-nav__mobile-only { display: none; }

.ps-nav__actions { display: flex; align-items: center; gap: 0.5rem; }
.ps-lang, .ps-nav__login {
	padding: 8px 12px;
	border-radius: 999px;
	color: var(--text-main);
	font-size: 0.9rem;
	font-weight: 500;
}
	.ps-lang:hover, .ps-nav__login:hover { color: var(--text-white); background: rgba(var(--tint), 0.06); }
.ps-lang[lang="ar"] { font-family: var(--font-arabic); }
.ps-lang[lang="en"] { font-family: var(--font-sans); }

.ps-nav__toggle {
	display: none;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: rgba(var(--tint), 0.06);
	position: relative;
}
	.ps-nav__toggle span {
		position: absolute;
		left: 12px; right: 12px;
		height: 1.5px;
		background: var(--text-white);
		border-radius: 2px;
		transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out);
	}
	.ps-nav__toggle span:first-child { top: 16px; }
	.ps-nav__toggle span:last-child { top: 23px; }
	.ps-nav.is-open .ps-nav__toggle span:first-child { top: 19.5px; transform: rotate(45deg); }
	.ps-nav.is-open .ps-nav__toggle span:last-child { top: 19.5px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. HERO
   -------------------------------------------------------------------------- */
.ps-hero {
	position: relative;
	padding: 148px 0 40px;
	overflow: hidden;
	isolation: isolate;
}
.ps-hero::before {
	/* Subtle grid that fades out */
	content: '';
	position: absolute;
	inset: 0;
	z-index: -2;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.ps-hero__glow {
	position: absolute;
	z-index: -1;
	width: 900px; height: 600px;
	top: -200px; inset-inline-end: -200px;
	background: radial-gradient(closest-side, rgba(255, 107, 44, 0.22), transparent);
	filter: blur(20px);
	pointer-events: none;
}

.ps-hero__grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 4rem;
	align-items: center;
}
/* Let wide children (the style chips row) scroll inside instead of widening the page */
.ps-hero__grid > * { min-width: 0; }

.ps-hero__title {
	font-size: clamp(2.6rem, 5.4vw, 4.75rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
	font-weight: 600;
	color: var(--text-white);
	margin-bottom: 1.5rem;
	text-wrap: balance;
}
	.ps-hero__title .ps-serif { font-size: 1.08em; line-height: 0.9; }
html[dir="rtl"] .ps-hero__title { letter-spacing: 0; line-height: 1.25; font-weight: 700; }

.ps-hero__sub {
	font-size: 1.15rem;
	line-height: 1.65;
	color: var(--text-muted);
	max-width: 520px;
	margin-bottom: 2.25rem;
	text-wrap: pretty;
}

.ps-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }

.ps-trust { display: flex; align-items: center; gap: 14px; }
.ps-trust__faces { display: flex; }
	.ps-trust__faces img {
		width: 38px; height: 38px;
		border-radius: 50%;
		object-fit: cover;
		border: 2px solid var(--bg-dark);
		margin-inline-start: -10px;
	}
	.ps-trust__faces img:first-child { margin-inline-start: 0; }
.ps-trust__text { color: var(--text-muted); font-size: 0.85rem; }

/* Hero showcase: "your photo" card + auto-playing styled results revealed by a scan line */
.ps-show { position: relative; padding-inline-start: 64px; }
.ps-show__stage {
	position: relative;
	aspect-ratio: 4 / 5;
	max-height: 600px;
	width: 100%;
	max-width: 100%;
	border-radius: var(--radius-xl);
	overflow: hidden;
	border: 1px solid var(--bg-border-strong);
	box-shadow: var(--shadow-lg);
	background: var(--bg-card);
	isolation: isolate;
}
.ps-show__result {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center top;
	clip-path: inset(0 0 100% 0);
}
.ps-show__result.is-active { clip-path: inset(0); z-index: 1; }
.ps-show__result.is-entering { z-index: 2; animation: ps-reveal 1.2s var(--ease-out) forwards; }
@keyframes ps-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

.ps-show__beam {
	position: absolute;
	left: 0; right: 0;
	top: 0;
	height: 2px;
	z-index: 3;
	opacity: 0;
	pointer-events: none;
	background: linear-gradient(90deg, transparent, #FFD3B8 20%, #fff 50%, #FFD3B8 80%, transparent);
	box-shadow: 0 0 18px 4px rgba(255, 140, 80, 0.75);
}
	.ps-show__beam::before {
		content: '';
		position: absolute;
		left: 0; right: 0;
		bottom: 2px;
		height: 120px;
		background: linear-gradient(to top, rgba(255, 107, 44, 0.28), transparent);
	}
.ps-show.is-scanning .ps-show__beam { animation: ps-beam 1.2s var(--ease-out) forwards; }
@keyframes ps-beam {
	0% { top: 0; opacity: 1; }
	85% { opacity: 1; }
	100% { top: 100%; opacity: 0; }
}

.ps-show__chip {
	position: absolute;
	inset-inline-end: 16px;
	top: 16px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	background: rgba(10, 10, 11, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}
	.ps-show__chip i { color: var(--accent-orange); }
.ps-show__progress {
	position: absolute;
	left: 16px; right: 16px; bottom: 10px;
	height: 3px;
	z-index: 4;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.18);
	overflow: hidden;
}
	.ps-show__progress span {
		display: block;
		height: 100%;
		width: 0;
		background: #fff;
		border-radius: inherit;
	}
	.ps-show.is-playing .ps-show__progress span { animation: ps-progress var(--ps-interval, 4.5s) linear forwards; }
	html[dir="rtl"] .ps-show__progress span { margin-inline-start: auto; }
@keyframes ps-progress { to { width: 100%; } }

.ps-show__input {
	position: absolute;
	inset-inline-start: 0;
	top: 40%;
	z-index: 5;
	width: 36%;
	margin: 0;
	padding: 6px 6px 0;
	border-radius: 14px;
	background: #F4F3F1;
	box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.85);
	transform: rotate(-6deg);
	transition: transform 0.5s var(--ease-out);
}
html[dir="rtl"] .ps-show__input { transform: rotate(6deg); }
.ps-show:hover .ps-show__input { transform: rotate(-3deg) translateY(-4px); }
html[dir="rtl"] .ps-show:hover .ps-show__input { transform: rotate(3deg) translateY(-4px); }
	.ps-show__input::before { content: ''; display: block; aspect-ratio: 3 / 4; }
	.ps-show__input img {
		position: absolute;
		top: 6px; left: 6px; right: 6px;
		width: calc(100% - 12px);
		aspect-ratio: 3 / 4;
		object-fit: cover;
		border-radius: 9px;
		opacity: 0;
		transition: opacity 0.5s ease;
	}
	.ps-show__input img.is-active { opacity: 1; }
	.ps-show__input figcaption {
		padding: 8px 4px 9px;
		text-align: center;
		font-size: 0.78rem;
		font-weight: 600;
		color: #2A2A2E;
	}
.ps-show__arrow {
	position: absolute;
	z-index: 6;
	top: calc(40% + 18px);
	inset-inline-start: calc(36% - 6px);
	width: 40px; height: 40px;
	display: grid; place-items: center;
	border-radius: 50%;
	color: #fff;
	background: var(--accent-orange);
	box-shadow: 0 10px 24px -8px rgba(255, 107, 44, 0.9), 0 0 0 4px var(--bg-dark);
	font-size: 0.85rem;
}

.ps-show__tabs {
	display: flex;
	gap: 8px;
	margin-top: 16px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 2px;
}
	.ps-show__tabs::-webkit-scrollbar { display: none; }
.ps-show__tab {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 14px 4px 4px;
	border-radius: 999px;
	border: 1px solid var(--bg-border);
	background: rgba(var(--tint), 0.03);
	color: var(--text-muted);
	font-size: 0.85rem;
	font-weight: 500;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
}
html[dir="rtl"] .ps-show__tab { padding: 4px 4px 4px 14px; }
	.ps-show__tab img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
	.ps-show__tab:hover { color: var(--text-white); border-color: var(--bg-border-strong); }
	.ps-show__tab[aria-selected="true"] { color: var(--text-white); border-color: rgba(255, 107, 44, 0.7); background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   6. SECTIONS
   -------------------------------------------------------------------------- */
.ps-section { padding: 120px 0; position: relative; }
.ps-section--tight { padding: 40px 0 120px; }

.ps-section__head { max-width: 680px; margin: 0 auto 4rem; text-align: center; }
	.ps-section__head h2 {
		font-size: clamp(2rem, 3.6vw, 3.1rem);
		line-height: 1.08;
		letter-spacing: -0.035em;
		font-weight: 600;
		color: var(--text-white);
		margin-bottom: 1rem;
		text-wrap: balance;
	}
	html[dir="rtl"] .ps-section__head h2 { letter-spacing: 0; line-height: 1.35; font-weight: 700; }
	.ps-section__head p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; }

.ps-section__head--row {
	max-width: none;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
	text-align: start;
}
	.ps-section__head--row > div { max-width: 620px; }

/* Bento features */
.ps-bento {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	grid-template-rows: auto auto;
	gap: 1.25rem;
}
.ps-bento__main { grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; min-height: 480px; }
.ps-bento__media {
	position: relative;
	flex: 1;
	min-height: 260px;
	margin-bottom: 2rem;
}
	.ps-bento__media img {
		position: absolute;
		top: 50%; left: 50%;
		width: 42%;
		aspect-ratio: 3 / 4;
		object-fit: cover;
		border-radius: 16px;
		border: 1px solid var(--bg-border-strong);
		box-shadow: var(--shadow-lg);
		transform: translate(calc(-50% + (var(--i) - 1) * 62%), -50%) rotate(calc((var(--i) - 1) * 6deg));
		transition: transform 0.6s var(--ease-out);
	}
	.ps-bento__media img:nth-child(2) { z-index: 2; transform: translate(-50%, -54%); }
	.ps-bento__main:hover .ps-bento__media img { transform: translate(calc(-50% + (var(--i) - 1) * 70%), -50%) rotate(calc((var(--i) - 1) * 9deg)); }
	.ps-bento__main:hover .ps-bento__media img:nth-child(2) { transform: translate(-50%, -58%) scale(1.03); }

/* Steps */
.ps-steps {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	counter-reset: none;
}
.ps-step {
	position: relative;
	padding: 2rem;
	border-radius: var(--radius-lg);
	border: 1px solid var(--bg-border);
	background: rgba(var(--tint), 0.02);
}
	.ps-step__num {
		position: absolute;
		top: 1.5rem; inset-inline-end: 1.75rem;
		font-family: var(--font-serif);
		font-style: italic;
		font-size: 2.6rem;
		line-height: 1;
		color: rgba(255, 255, 255, 0.12);
	}
	.ps-step h3 { color: var(--text-white); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.015em; }
	.ps-step p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* Style rail: one swipeable row, so the page length no longer grows with the style count */
.ps-rail {
	--rail-gutter: max(20px, calc((100vw - var(--container-width)) / 2 + 20px));
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--rail-gutter);
	padding: 4px var(--rail-gutter) 8px;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
	.ps-rail::-webkit-scrollbar { display: none; }
	.ps-rail:focus-visible { outline-offset: -2px; border-radius: 0; }
	.ps-rail .ps-tile { flex: 0 0 clamp(210px, 21vw, 270px); scroll-snap-align: start; }
.ps-rail__nav { display: flex; gap: 8px; flex-shrink: 0; }

.ps-round {
	width: 44px; height: 44px;
	flex-shrink: 0;
	display: grid; place-items: center;
	border-radius: 50%;
	border: 1px solid var(--bg-border-strong);
	background: rgba(var(--tint), 0.04);
	color: var(--text-white);
	transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
	.ps-round:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.26); }
	.ps-round:disabled { opacity: 0.3; cursor: default; }

.ps-tile {
	position: relative;
	display: block;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: start;
	cursor: zoom-in;
	aspect-ratio: 3 / 4;
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--bg-border);
	background: var(--bg-card);
	isolation: isolate;
}
	.ps-tile img {
		position: absolute;
		inset: 0;
		width: 100%; height: 100%;
		object-fit: cover;
		transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out);
	}
	.ps-tile__before { opacity: 0; }
	.ps-tile:hover .ps-tile__after { opacity: 0; }
	.ps-tile:focus-visible { outline-offset: 3px; border-radius: var(--radius-lg); }
	.ps-tile:hover .ps-tile__before { opacity: 1; transform: scale(1.04); }
	.ps-tile::after {
		content: '';
		position: absolute;
		inset: 45% 0 0 0;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
		z-index: 1;
		pointer-events: none;
	}
	.ps-tile__tag {
		position: absolute;
		top: 12px; inset-inline-start: 12px;
		z-index: 2;
		padding: 5px 10px;
		border-radius: 999px;
		font-size: 0.72rem;
		font-weight: 600;
		color: #fff;
		background: rgba(10, 10, 11, 0.55);
		backdrop-filter: blur(8px);
		opacity: 0;
		transform: translateY(-4px);
		transition: opacity 0.3s, transform 0.3s var(--ease-out);
	}
	.ps-tile:hover .ps-tile__tag { opacity: 1; transform: none; }
	.ps-tile__meta {
		position: absolute;
		inset: auto 16px 16px 16px;
		z-index: 2;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		color: #fff;
	}
		.ps-tile__meta strong { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
		.ps-tile__meta i {
			width: 32px; height: 32px;
			flex-shrink: 0;
			display: grid; place-items: center;
			border-radius: 50%;
			background: rgba(255, 255, 255, 0.14);
			backdrop-filter: blur(8px);
			font-size: 0.75rem;
			transition: background 0.3s, transform 0.3s var(--ease-out);
		}
		.ps-tile:hover .ps-tile__meta i, .ps-tile:focus-visible .ps-tile__meta i { background: var(--accent-orange); transform: scale(1.08); }

/* Pricing */
.ps-plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 1.25rem;
	max-width: 1040px;
	margin: 0 auto;
	align-items: stretch;
}
.ps-plan {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 2rem;
	border-radius: var(--radius-lg);
	border: 1px solid var(--bg-border);
	background: rgba(var(--tint), 0.02);
	transition: transform 0.4s var(--ease-out), border-color 0.3s;
}
	.ps-plan:hover { transform: translateY(-4px); border-color: var(--bg-border-strong); }
.ps-plan--popular {
	background:
		linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
		linear-gradient(160deg, rgba(255, 107, 44, 0.9), rgba(255, 107, 44, 0.1) 60%) border-box;
	border: 1px solid transparent;
	box-shadow: 0 30px 80px -30px rgba(255, 107, 44, 0.45);
}
.ps-plan__badge {
	position: absolute;
	top: -12px; inset-inline-start: 2rem;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background: var(--accent-orange);
	box-shadow: 0 6px 18px -6px rgba(255, 107, 44, 0.9);
}
.ps-plan__tokens { display: flex; align-items: baseline; gap: 10px; margin-bottom: 1.25rem; }
	.ps-plan__tokens strong { font-size: 3.25rem; line-height: 1; letter-spacing: -0.05em; font-weight: 600; color: var(--text-white); }
	.ps-plan__tokens span { color: var(--text-muted); font-size: 0.95rem; }
.ps-plan__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--bg-border);
}
	.ps-plan__currency { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; }
	.ps-plan__amount { color: var(--text-white); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
	.ps-plan__usd { color: var(--text-placeholder); font-size: 0.85rem; margin-inline-start: auto; }
.ps-plan__features { list-style: none; display: grid; gap: 0.75rem; margin-bottom: 2rem; flex: 1; }
	.ps-plan__features li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-main); font-size: 0.93rem; }
	.ps-plan__features i {
		flex-shrink: 0;
		width: 18px; height: 18px;
		margin-top: 2px;
		display: grid; place-items: center;
		border-radius: 50%;
		font-size: 0.6rem;
		color: var(--accent-orange);
		background: var(--accent-soft);
	}

/* Final CTA */
.ps-cta {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	text-align: center;
	padding: 6rem 2rem;
	border-radius: var(--radius-xl);
	border: 1px solid var(--bg-border-strong);
	background: #111113;
}
.ps-cta__glow {
	position: absolute;
	inset: auto -20% -60% -20%;
	height: 120%;
	z-index: -1;
	background: radial-gradient(ellipse at 50% 100%, rgba(255, 107, 44, 0.55), rgba(255, 107, 44, 0.1) 40%, transparent 70%);
}
.ps-cta h2 {
	font-size: clamp(2rem, 4.2vw, 3.4rem);
	line-height: 1.05;
	letter-spacing: -0.04em;
	font-weight: 600;
	color: var(--text-white);
	margin-bottom: 2.25rem;
	text-wrap: balance;
}
html[dir="rtl"] .ps-cta h2 { letter-spacing: 0; line-height: 1.35; }
.ps-cta p { color: var(--text-main); opacity: 0.8; font-size: 1.1rem; margin-bottom: 2.25rem; }

/* Footer */
body.landing-page footer { border-top: 1px solid var(--bg-border); padding: 2.5rem 0; }
	body.landing-page footer .logo h2 { font-weight: 700; letter-spacing: -0.03em; }
	body.landing-page footer .logo h2 span { color: var(--accent-orange); }
.socials a {
	width: 38px; height: 38px;
	display: grid; place-items: center;
	border-radius: 50%;
	border: 1px solid var(--bg-border);
}
	.socials a:hover { border-color: var(--bg-border-strong); color: var(--text-white); }

/* Legal / contact pages share the landing layout: clear the floating nav */
.page-header-simple { padding-top: 140px; }

/* Style preview window */
.ps-lightbox {
	padding: 0;
	border: 0;
	margin: auto;
	width: min(980px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	background: transparent;
	color: var(--text-main);
	overflow: visible;
}
.ps-lightbox::backdrop { background: rgba(5, 5, 6, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ps-lightbox[open] { animation: ps-pop 0.35s var(--ease-out); }
@keyframes ps-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
html:has(.ps-lightbox[open]) { overflow: hidden; }

.ps-lightbox__panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	max-height: calc(100dvh - 32px);
	border-radius: 24px;
	overflow: hidden;
	background: var(--bg-card);
	border: 1px solid var(--bg-border-strong);
	box-shadow: var(--shadow-lg);
}
.ps-lightbox__media { position: relative; aspect-ratio: 4 / 5; max-height: calc(100dvh - 34px); background: var(--bg-elevated); }
	.ps-lightbox__media img {
		position: absolute;
		inset: 0;
		width: 100%; height: 100%;
		object-fit: cover;
		object-position: center top;
		opacity: 0;
		transition: opacity 0.45s ease;
	}
	.ps-lightbox__media img.is-shown { opacity: 1; }
.ps-toggle {
	position: absolute;
	left: 50%; bottom: 16px;
	transform: translateX(-50%);
	display: flex;
	padding: 4px;
	border-radius: 999px;
	background: rgba(10, 10, 11, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}
	.ps-toggle button { padding: 9px 18px; border-radius: 999px; color: var(--text-main); font-size: 0.86rem; font-weight: 600; transition: background 0.2s, color 0.2s; }
	.ps-toggle button[aria-pressed="true"] { background: #fff; color: #0A0A0B; }
.ps-lightbox__info { display: flex; flex-direction: column; gap: 0.9rem; padding: 3rem 2rem 1.75rem; overflow-y: auto; min-height: 0; }
	.ps-lightbox__info .ps-eyebrow { margin-bottom: 0; }
	.ps-lightbox__info h3 { font-size: 1.9rem; line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; color: var(--text-white); text-wrap: balance; }
	html[dir="rtl"] .ps-lightbox__info h3 { letter-spacing: 0; line-height: 1.4; }
	.ps-lightbox__info p { color: var(--text-muted); line-height: 1.65; margin-bottom: 0.5rem; }
.ps-lightbox__steps {
	margin-top: auto;
	padding-top: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--text-muted);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
}
.ps-lightbox__close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; background: rgba(10, 10, 11, 0.6); backdrop-filter: blur(10px); }

/* --------------------------------------------------------------------------
   7. SCROLL REVEAL (enabled by JS; content is visible without it)
   -------------------------------------------------------------------------- */
.ps-js [data-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
	transition-delay: var(--reveal-delay, 0s);
}
.ps-js [data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   8. APP (Studio / History / Profile / Pricing) RE-SKIN
   -------------------------------------------------------------------------- */
.sidebar {
	background: #0D0D0F;
	border-inline-end: 1px solid var(--bg-border);
	border-right-color: var(--bg-border);
}
.token-widget {
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(255, 107, 44, 0.18), transparent 55%),
		var(--bg-card);
	border: 1px solid var(--bg-border);
	border-radius: var(--radius-md);
}
	.token-widget strong { font-size: 1.6rem; letter-spacing: -0.03em; }
.btn-buy-nav { border-radius: 999px; background: var(--accent-orange); color: #fff; }
	.btn-buy-nav:hover { background: var(--accent-hover); color: #fff; }
.nav-link { border-radius: 10px; border: 1px solid transparent; }
	.nav-link:hover { background: rgba(var(--tint), 0.05); }
	.nav-link.active { background: rgba(var(--tint), 0.06); border-color: var(--bg-border); color: var(--text-white); }
	.nav-link.active i { color: var(--accent-orange); }

.main-content { padding: 2.5rem 3rem; }
.page-header h2 { font-size: 2rem; letter-spacing: -0.035em; font-weight: 600; }

.stepper-container {
	background: rgba(255, 255, 255, 0.025);
	border-color: var(--bg-border);
	border-radius: 999px;
	padding: 8px 10px;
}
.step-item { padding: 6px 12px 6px 6px; border-radius: 999px; }
	.step-item.active { background: rgba(var(--tint), 0.06); color: var(--text-white); }
	.step-item .circle { background: rgba(var(--tint), 0.08); }
	.step-item.active .circle { background: var(--accent-orange); }
.step-divider { color: #3A3A40; margin: 0 4px; }

.style-search-wrapper .search-input { background: var(--bg-card); border-color: var(--bg-border); padding-block: 12px; }

.style-card {
	background: rgba(var(--tint), 0.02);
	border: 1px solid var(--bg-border);
	border-radius: var(--radius-md);
	padding: 10px;
	margin-bottom: 0.6rem;
}
	.style-card:hover { border-color: var(--bg-border-strong); background: rgba(var(--tint), 0.04); }
	.style-card.selected {
		border-color: rgba(255, 107, 44, 0.7);
		background: linear-gradient(90deg, rgba(255, 107, 44, 0.1), rgba(255, 107, 44, 0.02));
		box-shadow: 0 0 0 3px var(--accent-soft);
	}
.style-card__row { display: flex; gap: 14px; align-items: stretch; }
.style-card__thumb {
	flex-shrink: 0;
	width: 72px;
	aspect-ratio: 3 / 4;
	border-radius: 10px;
	overflow: hidden;
	background: var(--bg-elevated);
}
	.style-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
	.style-card:hover .style-card__thumb img { transform: scale(1.06); }
.style-card__body { flex: 1; min-width: 0; padding: 4px 4px 2px 0; display: flex; flex-direction: column; }
	.style-card__body .card-top { margin-bottom: 0.25rem; align-items: center; gap: 8px; }
	.style-card__body h4 { font-size: 0.97rem; font-weight: 600; color: var(--text-white); letter-spacing: -0.01em; }
.style-card__desc {
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--text-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.style-card__badges { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
	.style-card__badges .badge {
		display: inline-flex; align-items: center; gap: 5px;
		padding: 3px 9px;
		border-radius: 999px;
		background: rgba(var(--tint), 0.06);
		color: var(--text-main);
		font-weight: 500;
		font-size: 0.72rem;
	}
	.style-card__badges .badge i { color: var(--accent-yellow); font-size: 0.7rem; }
.radio-dot { width: 16px; height: 16px; flex-shrink: 0; border-color: #45454C; }

.preview-box, .review-info-card, .settings-card, .pricing-card, .creation-card {
	background: rgba(var(--tint), 0.02);
	border: 1px solid var(--bg-border);
	border-radius: var(--radius-lg);
}
.preview-box { padding: 1.75rem; position: sticky; top: 1.5rem; }
.img-container { border-radius: 14px; background: var(--bg-elevated); }
.b-before, .b-after {
	position: absolute;
	top: 12px; inset-inline-start: 12px;
	bottom: auto; left: auto;
	border-radius: 999px;
	padding: 5px 11px;
	background: rgba(10, 10, 11, 0.6);
	backdrop-filter: blur(8px);
}
.b-after { background: var(--accent-orange); }
.upload-zone { border-radius: var(--radius-lg); border-color: var(--bg-border-strong); background: rgba(var(--tint), 0.02); }
	.upload-zone:hover { border-color: var(--accent-orange); background: var(--accent-soft); }

.pricing-card.popular {
	background:
		linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
		linear-gradient(160deg, rgba(255, 107, 44, 0.9), rgba(255, 107, 44, 0.1) 60%) border-box;
	border: 1px solid transparent;
}
.btn-card { border-radius: 999px; }

/* Sign-up bot trap: off-screen, never shown to people */
.ps-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Show / hide password */
.ps-pass { position: relative; display: block; }
	.ps-pass input { padding-inline-end: 48px !important; }
	.ps-pass input::-ms-reveal, .ps-pass input::-ms-clear { display: none; }
.ps-pass__toggle {
	position: absolute;
	top: 50%;
	inset-inline-end: 6px;
	transform: translateY(-50%);
	width: 38px; height: 38px;
	display: grid; place-items: center;
	border-radius: 10px;
	color: var(--text-muted);
	font-size: 0.95rem;
	transition: color 0.2s, background 0.2s;
}
	.ps-pass__toggle:hover { color: var(--text-white); background: rgba(var(--tint), 0.06); }
	.ps-pass__toggle[aria-pressed="true"] { color: var(--accent-orange); }

/* Studio: rows / grid switch */
.style-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; }
	.style-tools .style-search-wrapper { flex: 1; min-width: 0; }
.style-view-toggle {
	display: flex;
	flex-shrink: 0;
	padding: 3px;
	border-radius: 999px;
	border: 1px solid var(--bg-border);
	background: var(--bg-card);
}
	.style-view-toggle button {
		width: 36px; height: 36px;
		display: grid; place-items: center;
		border-radius: 50%;
		color: var(--text-muted);
		font-size: 0.85rem;
		transition: background 0.2s, color 0.2s;
	}
	.style-view-toggle button:hover { color: var(--text-white); }
	.style-view-toggle button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--text-white); }

.style-list.is-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	align-content: start;
}
	.style-list.is-grid .style-card.selected .radio-dot { background: var(--accent-orange); border-color: var(--accent-orange); }
@media (min-width: 769px) {
	.style-list.is-grid .style-card { margin: 0; padding: 0; overflow: hidden; position: relative; }
	.style-list.is-grid .style-card .style-card__row { display: grid; }
	.style-list.is-grid .style-card .style-card__thumb, .style-list.is-grid .style-card .style-card__body { grid-area: 1 / 1; }
	.style-list.is-grid .style-card .style-card__thumb { width: 100%; aspect-ratio: 3 / 4; border-radius: 0; }
	.style-list.is-grid .style-card .style-card__body {
		align-self: end; z-index: 1;
		padding: 34px 10px 10px;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
	}
	.style-list.is-grid .style-card .style-card__body h4 { font-size: 0.86rem; line-height: 1.25; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
	.style-list.is-grid .style-card .style-card__desc { display: none; }
	.style-list.is-grid .style-card .style-card__badges { padding-top: 6px; }
	.style-list.is-grid .style-card .style-card__badges .badge { background: rgba(10, 10, 11, 0.55); backdrop-filter: blur(6px); }
	.style-list.is-grid .style-card .radio-dot { position: absolute; top: 10px; inset-inline-end: 10px; background: rgba(10, 10, 11, 0.45); border-color: rgba(255, 255, 255, 0.7); }
	.style-list.is-grid .style-card .card-top { display: block; margin: 0; }
}
/* Phones: the chosen style opens full width with its before/after, like the rows view */
@media (max-width: 768px) {
	.style-list.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.style-list.is-grid .style-card.selected { grid-column: 1 / -1; margin: 0; }
	.style-list.is-grid .style-card:not(.selected) { margin: 0; padding: 0; overflow: hidden; position: relative; }
	.style-list.is-grid .style-card:not(.selected) .style-card__row { display: grid; }
	.style-list.is-grid .style-card:not(.selected) .style-card__thumb, .style-list.is-grid .style-card:not(.selected) .style-card__body { grid-area: 1 / 1; }
	.style-list.is-grid .style-card:not(.selected) .style-card__thumb { width: 100%; aspect-ratio: 3 / 4; border-radius: 0; }
	.style-list.is-grid .style-card:not(.selected) .style-card__body {
		align-self: end; z-index: 1;
		padding: 34px 10px 10px;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
	}
	.style-list.is-grid .style-card:not(.selected) .style-card__body h4 { font-size: 0.86rem; line-height: 1.25; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
	.style-list.is-grid .style-card:not(.selected) .style-card__desc { display: none; }
	.style-list.is-grid .style-card:not(.selected) .style-card__badges { padding-top: 6px; }
	.style-list.is-grid .style-card:not(.selected) .style-card__badges .badge { background: rgba(10, 10, 11, 0.55); backdrop-filter: blur(6px); }
	.style-list.is-grid .style-card:not(.selected) .radio-dot { position: absolute; top: 10px; inset-inline-end: 10px; background: rgba(10, 10, 11, 0.45); border-color: rgba(255, 255, 255, 0.7); }
	.style-list.is-grid .style-card:not(.selected) .card-top { display: block; margin: 0; }
}

/* Two-step verification pages */
.auth-header .ps-icon { margin-bottom: 1rem; }
.ps-code-input { font-size: 1.4rem; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; direction: ltr; }
.ps-2fa-steps { padding-inline-start: 1.25rem; display: grid; gap: 1.25rem; margin-bottom: 1.5rem; color: var(--text-main); line-height: 1.55; }
	.ps-2fa-steps li::marker { color: var(--accent-orange); font-weight: 700; }
.ps-2fa-qr { margin: 0.9rem 0; padding: 12px; background: #fff; border-radius: 14px; width: max-content; max-width: 100%; }
	.ps-2fa-qr img, .ps-2fa-qr canvas { display: block; }
.ps-2fa-key { display: grid; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
	.ps-2fa-key code { font: 600 0.95rem ui-monospace, Menlo, Consolas, monospace; color: var(--text-white); background: var(--bg-elevated); border: 1px solid var(--bg-border); border-radius: 10px; padding: 10px 12px; word-break: break-all; user-select: all; }
.ps-2fa-confirm { display: flex; gap: 8px; margin-top: 0.75rem; }
	.ps-2fa-confirm .form-input { flex: 1; min-width: 0; }

/* Auth pages */
/* Sign-in / sign-up: the style showcase sits centred on a soft glow */
.ps-auth-visual {
	background:
		radial-gradient(60% 50% at 70% 20%, rgba(255, 107, 44, 0.22), transparent 70%),
		radial-gradient(50% 40% at 20% 90%, rgba(255, 154, 61, 0.12), transparent 70%),
		var(--bg-card);
	border-inline-start: 1px solid var(--bg-border);
	justify-content: center;
	align-items: center;
	padding: 3rem;
	overflow: hidden;
}
	.ps-auth-visual::before { display: none; }
.ps-auth-visual__inner { width: 100%; max-width: 460px; }
	.ps-auth-visual .ps-show__stage { max-height: calc(100vh - 220px); }

body.auth-page .auth-container { background: var(--bg-dark); }
.auth-header h2 { font-size: 2.1rem; letter-spacing: -0.035em; font-weight: 600; }
html[dir="rtl"] .auth-header h2 { letter-spacing: 0; }
.btn-social { border-radius: 999px; background: rgba(var(--tint), 0.04); border-color: var(--bg-border-strong); padding: 12px; }
	.btn-social:hover { background: rgba(var(--tint), 0.08); }
.btn-login { border-radius: 999px; }

/* --------------------------------------------------------------------------
   9. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.ps-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; text-align: center; }
	.ps-hero__sub { margin-inline: auto; }
	.ps-hero__actions, .ps-trust { justify-content: center; }
	.ps-show { max-width: 560px; margin-inline: auto; }
	.ps-show__tabs { justify-content: flex-start; }
	.ps-bento { grid-template-columns: 1fr 1fr; }
	.ps-bento__main { grid-column: span 2; grid-row: auto; min-height: 420px; }
	.preview-box { position: static; }
}

@media (min-width: 600px) and (max-width: 900px) {
	.ps-plan { padding: 1.5rem 1.25rem; }
	.ps-plan__tokens strong { font-size: 2.6rem; }
}

@media (max-width: 860px) {
	.ps-nav__links {
		position: absolute;
		top: calc(100% + 8px);
		left: 16px; right: 16px;
		flex-direction: column;
		gap: 2px;
		padding: 8px;
		border-radius: 20px;
		background: #141416;
		border: 1px solid var(--bg-border-strong);
		box-shadow: var(--shadow-lg);
		opacity: 0;
		transform: translateY(-8px) scale(0.98);
		pointer-events: none;
		transition: opacity 0.25s, transform 0.3s var(--ease-out);
	}
		.ps-nav__links a { padding: 14px 16px; font-size: 1rem; color: var(--text-main); }
	.ps-nav.is-open .ps-nav__links { opacity: 1; transform: none; pointer-events: auto; }
	.ps-nav__mobile-only { display: block; }
	.ps-nav__mobile-only.ps-nav__signup { display: none; }
	.ps-nav__login { display: none; }
	.ps-nav__toggle { display: block; }
}

@media (max-width: 480px) {
	/* Hero already has the main CTA; keep the bar uncluttered */
	.ps-nav__actions .ps-btn--primary { display: none; }
	.ps-nav__mobile-only.ps-nav__signup { display: block; color: var(--accent-orange); }
}

@media (max-width: 768px) {
	/* Override legacy rule that hid all .nav-links on mobile */
	body.landing-page .ps-nav__links { display: flex; }

	.ps-hero { padding-top: 120px; }
	.ps-hero__title { font-size: clamp(2.3rem, 10vw, 3rem); }
	.ps-hero__sub { font-size: 1.02rem; }
	.ps-hero__actions .ps-btn { flex: 1 1 100%; }
	.ps-trust { flex-direction: column; gap: 8px; }

	.ps-section { padding: 80px 0; }
	.ps-section--tight { padding: 20px 0 80px; }
	.ps-section__head { margin-bottom: 2.5rem; }
	.ps-section__head--row { flex-direction: column; align-items: flex-start; }

	.ps-bento, .ps-steps { grid-template-columns: 1fr; }
	.ps-bento__main { grid-column: auto; min-height: 380px; }
	.ps-card, .ps-step, .ps-plan { padding: 1.5rem; }

	.ps-rail { gap: 12px; }
	.ps-rail .ps-tile { flex-basis: 40vw; }
	.ps-rail__nav { display: none; }
	.ps-tile__meta { inset: auto 12px 12px 12px; }
	.ps-tile__meta strong { font-size: 0.92rem; }

	.ps-show { padding-inline-start: 32px; }
	.ps-show__input { width: 38%; top: 46%; }
	.ps-show__arrow { top: calc(46% + 14px); inset-inline-start: calc(38% - 4px); width: 34px; height: 34px; }

	.ps-lightbox__panel { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
	.ps-lightbox__media { aspect-ratio: 4 / 5; max-height: 60dvh; width: 100%; }
	.ps-lightbox__info { padding: 1.25rem 1.25rem 1.25rem; overflow: visible; }
	.ps-lightbox__info h3 { font-size: 1.5rem; }

	.ps-cta { padding: 4rem 1.5rem; }

	.main-content { padding: 1.5rem 1rem; }
	.stepper-container { border-radius: var(--radius-md); }
	.style-card.selected .mobile-preview-container { border-top-color: var(--bg-border); }
}

@media (max-width: 480px) {
	.ps-rail .ps-tile { flex-basis: 68vw; }
}

/* Tablet landscape (e.g. iPad): keep the Studio list and preview side by side */
@media (min-width: 900px) and (max-width: 1024px) {
	.style-grid { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 1.25rem; }
	.preview-box { position: sticky; top: 1.5rem; padding: 1.25rem; }
	.main-content { padding: 2rem 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	.ps-js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   LIGHT MODE  (html[data-theme="light"], set by views/common/theme_init.php)
   Same tokens, light values. Rules below fix places that used fixed colours.
   ========================================================================== */
.ps-theme-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 999px;
	border: 1px solid var(--bg-border-strong); background: transparent;
	color: var(--text-white); cursor: pointer; font-size: 0.95rem;
	transition: border-color .2s, background-color .2s;
}
.ps-theme-toggle:hover { background: var(--bg-elevated); }
.ps-theme-icon--moon { display: none; }
html[data-theme="light"] .ps-theme-icon--sun { display: none; }
html[data-theme="light"] .ps-theme-icon--moon { display: inline-block; }

html[data-theme="light"] {
	color-scheme: light;
	--bg-dark: #F6F5F2;
	--bg-card: #FFFFFF;
	--bg-elevated: #EFEEEA;
	--bg-border: rgba(17, 17, 19, 0.09);
	--bg-border-strong: rgba(17, 17, 19, 0.16);
	--bg-muted: #D6D5D0;
	--tint: 17, 17, 19;

	--accent-orange: #F2581A;
	--accent-hover: #E04A0E;
	--accent-soft: rgba(242, 88, 26, 0.10);

	--text-white: #121214;
	--text-main: #2A2A2E;
	--text-muted: #64646C;
	--text-placeholder: #9C9CA3;

	--grad-dark: linear-gradient(180deg, #F6F5F2 0%, #FFFFFF 100%);
	--shadow-lg: 0 30px 70px -30px rgba(17, 17, 19, 0.25);
}

html[data-theme="light"] .ps-nav__inner { background: rgba(255, 255, 255, 0.72); }
html[data-theme="light"] .ps-nav.is-scrolled .ps-nav__inner { background: rgba(255, 255, 255, 0.9); box-shadow: 0 18px 40px -24px rgba(17, 17, 19, 0.35); }
html[data-theme="light"] .ps-nav__links a { color: var(--text-main); }
html[data-theme="light"] .ps-toggle button[aria-pressed="true"] { background: var(--text-white); color: #fff; }
html[data-theme="light"] .sidebar { background: var(--bg-card); }
html[data-theme="light"] .step-divider { color: var(--bg-muted); }
html[data-theme="light"] .radio-dot { border-color: #B5B5BC; }
html[data-theme="light"] .ps-logo__mark { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 16px -8px rgba(242, 88, 26, 0.7); }
@media (max-width: 860px) {
	html[data-theme="light"] .ps-nav__links { background: var(--bg-card); }
}
/* These stay dark in both modes (they sit on a dark box or a photo), so their text stays light */
html[data-theme="light"] .ps-cta h2 { color: #F7F7F8; }
html[data-theme="light"] .ps-cta p { color: #E4E4E7; }
html[data-theme="light"] .creation-title,
html[data-theme="light"] .card-overlay .btn-download { color: #F7F7F8; }

/* --------------------------------------------------------------------------
   Discount / gift code box (pricing page)
   -------------------------------------------------------------------------- */
.ps-code { max-width: 560px; margin: 0 auto 2rem; }
.ps-code__form label { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: 6px; }
.ps-code__row { display: flex; gap: 8px; }
.ps-code__row input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--bg-border-strong); background: var(--bg-card); color: var(--text-white); font: inherit; letter-spacing: .06em; text-transform: uppercase; }
.ps-code__row input::placeholder { text-transform: none; letter-spacing: 0; color: var(--text-placeholder); }
.ps-code__row input:focus { outline: none; border-color: var(--accent-orange); box-shadow: 0 0 0 3px var(--accent-soft); }
.ps-code__row button { padding: 0 20px; border-radius: 12px; border: 0; background: var(--accent-orange); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.ps-code__row button:hover { background: var(--accent-hover); }
.ps-code__applied { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--accent-orange); background: var(--accent-soft); color: var(--text-main); }
.ps-code__applied i { color: var(--accent-orange); }
.ps-code__applied span { flex: 1; }
.ps-code__applied form { margin: 0; }
.ps-code__remove { background: none; border: 0; color: var(--text-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }
.ps-code__was { color: var(--text-muted); text-decoration: line-through; font-size: .9rem; margin-bottom: 2px; }
.ps-code__extra { color: var(--accent-orange); font-weight: 600; font-size: .85rem; margin-top: 4px; }
