/* =============================================================
   HappyDivi — main.css
   Mobile-first. Performance-first. Accessible-first.
   Breakpoints: 480 | 640 | 768 | 1024 | 1280 | 1440
   ============================================================= */

/* ── 0. Fallback font faces — matching metrics reduce CLS from web-font swap ── */
@font-face {
	font-family: "Inter Fallback";
	src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
	size-adjust: 96.7%;
	ascent-override: 90%;
	descent-override: 22%;
	line-gap-override: 0%;
}
@font-face {
	font-family: "Bricolage Grotesque Fallback";
	src: local("Arial Black"), local("Helvetica Neue"), local("Helvetica");
	size-adjust: 96%;
	ascent-override: 89%;
	descent-override: 21%;
	line-gap-override: 0%;
}

/* ── 1. Design Tokens ──────────────────────────────────────── */
:root {
	--bg:            #111114;
	--surface:       #1c1c22;
	--surface-2:     #242430;
	--text:          #f3f4f8;
	--muted:         #9899b0;
	--line:          rgba(255, 255, 255, 0.10);
	--line-strong:   rgba(255, 255, 255, 0.18);
	--brand:         #4ade80;
	--brand-strong:  #22c55e;
	--brand-dim:     rgba(74, 222, 128, 0.12);
	--violet:        #7c3aed;
	--violet-dim:    rgba(124, 58, 237, 0.15);
	--danger:        #f87171;
	--radius:        14px;
	--radius-sm:     8px;
	--radius-lg:     20px;
	--button-radius: 999px;
	--border-width:  1px;
	--font-sans:     "Inter", "Inter Fallback", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-display:  "Bricolage Grotesque", "Bricolage Grotesque Fallback", "Inter", "Segoe UI", Roboto, sans-serif;
	--font-mono:     "DM Mono", "Fira Code", ui-monospace, monospace;
	--font-size-base: 16px;
	--transition:    180ms ease;
	--shadow-sm:     0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
	--shadow-md:     0 4px 16px rgba(0,0,0,.5);
	--shadow-glow:   0 0 40px rgba(74, 222, 128, 0.12);
	--nav-height:    68px;
	--section-y:     5rem;
	/* ── Derived — auto-updated by PHP/customizer ──────────── */
	--brand-text:    #0a190b;              /* text ON brand-bg; flips to #fff for dark brands */
	--brand-dim:     rgba(74,222,128,.12); /* icon fills, hover tints */
	--brand-border:  rgba(74,222,128,.25); /* accent borders */
	--brand-glow:    rgba(74,222,128,.15); /* glow shadows */
	--brand-tint:    rgba(74,222,128,.04); /* very subtle section tint */
	--nav-bg:        rgba(17,17,20,.88);   /* navbar backdrop — derived from --bg */
	--nav-bg-solid:  rgba(17,17,20,.97);   /* navbar scrolled — derived from --bg */
	--violet-strong: #6d28d9;              /* violet hover */
	--violet-tint:   rgba(124,58,237,.05); /* subtle violet bg tint */
}

/* ── 2. Reset & Base ───────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
	scroll-behavior: smooth;
	font-size: var(--font-size-base);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul[role="list"] { list-style: none; padding: 0; margin: 0; }
input, textarea, select { font-family: inherit; }

/* ── 3. Accessibility ─────────────────────────────────────── */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 99999;
	background: #fff;
	color: #000;
	padding: .5rem .75rem;
	font-weight: 600;
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ── 4. Layout Utilities ──────────────────────────────────── */
.container {
	width: min(1160px, 92%);
	margin-inline: auto;
}
.container-narrow {
	max-width: 720px;
	margin-inline: auto;
	margin-bottom: 2.5rem;
}
.section { padding: var(--section-y) 0; }
.hidden-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── 5. Typography ────────────────────────────────────────── */
.display-xl { font-family: var(--font-display); font-size: clamp(2.8rem, 8vw, 6rem); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; }
.display-lg { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; white-space: pre-line; }
.body-lg { font-size: 1.05rem; color: var(--muted); line-height: 1.7; margin-top: .75rem; }
.section-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-weight: 700;
	color: var(--brand);
	margin-bottom: .9rem;
}
.section-label::before {
	content: '';
	display: block;
	width: 18px;
	height: 2px;
	background: var(--brand);
	border-radius: 99px;
	flex-shrink: 0;
}

/* ── 6. Buttons ───────────────────────────────────────────── */
.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	background: var(--brand-strong);
	color: var(--brand-text);
	font-weight: 700;
	font-size: .92rem;
	padding: .75rem 1.35rem;
	border-radius: var(--button-radius);
	border: var(--border-width) solid transparent;
	transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
	text-decoration: none;
	white-space: nowrap;
}
.btn-primary:hover {
	background: var(--brand);
	transform: translateY(-1px);
	box-shadow: 0 4px 20px var(--brand-glow);
}
.btn-primary:active { transform: none; }
.btn-price {
	display: inline-flex;
	background: rgba(0,0,0,.15);
	border-radius: 999px;
	padding: 2px 8px;
	font-size: .78rem;
	font-weight: 600;
}

.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	color: var(--muted);
	font-weight: 600;
	font-size: .92rem;
	padding: .75rem 1.25rem;
	border-radius: var(--button-radius);
	border: var(--border-width) solid var(--line-strong);
	text-decoration: none;
	background: transparent;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.35); }

.btn-full { width: 100%; justify-content: center; }

.btn-violet {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	background: var(--violet);
	color: #fff;
	font-weight: 700;
	font-size: .92rem;
	padding: .75rem 1.35rem;
	border-radius: var(--button-radius);
	border: none;
	cursor: pointer;
	transition: background var(--transition), transform var(--transition);
	white-space: nowrap;
}
.btn-violet:hover { background: var(--violet-strong); transform: translateY(-1px); }

/* ── 7. Badge ─────────────────────────────────────────────── */
.badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: var(--border-width) solid var(--line-strong);
	border-radius: 999px;
	padding: 5px 14px;
	font-size: .8rem;
	font-weight: 500;
	color: var(--muted);
	background: rgba(255,255,255,.03);
}
.badge-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--brand-strong);
	flex-shrink: 0;
	animation: pulse-dot 2.2s ease infinite;
}
@keyframes pulse-dot {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: .6; transform: scale(.8); }
}

/* ── 8. Scroll Reveal ─────────────────────────────────────── */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
	opacity: 1;
	transform: none;
}

/* ── 9. Navigation ────────────────────────────────────────── */
#navbar {
	position: sticky;
	top: 0;
	z-index: 70;
	background: var(--nav-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: var(--border-width) solid var(--line);
	transition: background var(--transition);
}
.admin-bar #navbar { top: 32px; }
#navbar.scrolled { background: var(--nav-bg-solid); }

.nav-inner {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: var(--nav-height);
}

.nav-logo {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.3rem;
	text-decoration: none;
	color: var(--text);
	flex-shrink: 0;
	letter-spacing: -.01em;
}
.logo-accent { color: var(--brand); }
.logo-dot { opacity: .7; }

.nav-links {
	display: flex;
	align-items: center;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: .15rem;
}
.nav-links a {
	display: block;
	padding: .45rem .75rem;
	font-size: .9rem;
	font-weight: 500;
	color: var(--muted);
	border-radius: var(--radius-sm);
	transition: background var(--transition);
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }

.nav-studio-link { display: flex; align-items: center; gap: 5px; }
.studio-star { color: var(--brand); font-size: .8rem; }

.nav-cta { display: flex; align-items: center; gap: .75rem; }

/* Hamburger */
.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	border: var(--border-width) solid var(--line-strong);
	background: transparent;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,.07); }
.hamburger {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.hamburger span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--text);
	border-radius: 99px;
	transition: transform var(--transition), opacity var(--transition);
}
.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer — lives outside #navbar so position:fixed is relative to viewport */
.nav-mobile {
	/* Layout */
	position: fixed;
	top: var(--nav-height);
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 65;
	display: flex;          /* always flex — animation via opacity/visibility */
	flex-direction: column;
	gap: 0;
	padding: 1.25rem 1.25rem 2rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	/* Style */
	background: var(--nav-bg-solid);
	backdrop-filter: blur(20px) saturate(150%);
	-webkit-backdrop-filter: blur(20px) saturate(150%);
	border-top: var(--border-width) solid var(--line);
	/* Animation — closed state */
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition:
		opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0s linear 0.28s;
	pointer-events: none;
	will-change: opacity, transform;
}
.nav-mobile.open {
	opacity: 1;
	visibility: visible;
	transform: translateY(35px);
	transition:
		opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0s linear 0s;
	pointer-events: auto;
}

/* Nav links — exclude .btn-primary so it keeps its own styles */
.nav-mobile a:not(.btn-primary) {
	display: block;
	font-size: 1.05rem;
	font-weight: 600;
	padding: .9rem 0;
	border-bottom: var(--border-width) solid var(--line);
	color: var(--muted);
	transition: transform var(--transition);
}
.nav-mobile a:not(.btn-primary):hover,
.nav-mobile a:not(.btn-primary):focus-visible {
	color: var(--text);
	transform: translateX(.35rem);
}

/* CTA button inside mobile nav */
.nav-mobile .btn-primary {
	margin-top: 1.25rem;
	width: 100%;
	justify-content: center;
	display: inline-flex; /* override any block from above rule */
}

/* ── 10. Hero ─────────────────────────────────────────────── */
.hero {
	position: relative;
	overflow: hidden;
	padding: 4.5rem 0 3rem;
}

/* Radial glow */
.hero::before {
	content: '';
	position: absolute;
	top: -120px;
	left: 50%;
	transform: translateX(-50%);
	width: 800px;
	height: 600px;
	background: radial-gradient(ellipse at center, var(--brand-glow) 0%, transparent 70%);
	pointer-events: none;
}

/* Grid lines */
.hero-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
	background-size: 60px 60px;
	pointer-events: none;
	mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.4) 20%, rgba(0,0,0,.4) 80%, transparent);
	-webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.4) 20%, rgba(0,0,0,.4) 80%, transparent);
}

.hero > .container {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 3rem;
	align-items: center;
}

.hero-content { text-align: center; max-width: 780px; }
.hero-badge { margin-bottom: 1.25rem; }

.hero-h1 {
	font-family: var(--font-display);
	font-size: clamp(2.4rem, 7vw, 5rem);
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: -.035em;
	margin: .5rem 0 1rem;
}
.hero-h1 em {
	font-style: normal;
	color: var(--brand);
}

.hero-sub {
	font-size: 1.05rem;
	color: var(--muted);
	max-width: 62ch;
	margin: 0 auto 1.5rem;
	line-height: 1.7;
}

.hero-ctas {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .75rem;
	margin-bottom: 1.75rem;
}

.hero-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .5rem .35rem;
	font-size: .82rem;
	color: var(--muted);
}
.trust-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.trust-item svg { color: var(--brand); flex-shrink: 0; }
.trust-sep { opacity: .35; font-size: 1rem; }

/* ── Gallery Chrome Preview ───────────────────────────────── */
.hero-gallery { width: 100%; max-width: 680px; margin: 0 auto; }

.gallery-chrome {
	border: var(--border-width) solid var(--line-strong);
	border-radius: var(--radius-lg);
	background: var(--surface);
	overflow: hidden;
	box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,255,255,.04);
}

.gallery-chrome-bar {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .6rem 1rem;
	background: rgba(255,255,255,.03);
	border-bottom: var(--border-width) solid var(--line);
}
.chrome-dots { display: flex; gap: 6px; }
.chrome-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}
.chrome-dot:nth-child(1) { background: #ff5f57; }
.chrome-dot:nth-child(2) { background: #febc2e; }
.chrome-dot:nth-child(3) { background: #28c840; }

.chrome-url {
	flex: 1;
	background: rgba(255,255,255,.06);
	border-radius: 6px;
	padding: .25rem .75rem;
	font-size: .72rem;
	color: var(--muted);
	font-family: var(--font-mono);
	text-align: center;
}

.gallery-ui { padding: .75rem; }

.gallery-filters {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	gap: .4rem;
	margin-bottom: .75rem;
	padding-bottom: 2px;
}
.gallery-filters::-webkit-scrollbar { display: none; }

.filter-pill {
	padding: .28rem .7rem;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 500;
	color: var(--muted);
	border: var(--border-width) solid var(--line-strong);
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
	transition: background var(--transition);
}
.filter-pill.active {
	background: var(--brand-strong);
	color: var(--brand-text);
	border-color: var(--brand-strong);
	font-weight: 700;
}

/* True masonry via CSS columns — items reflow naturally when filtered */
.gallery-masonry {
	columns: 3;
	column-gap: 6px;
	min-height: 130px; /* prevent collapse when few items match */
}
.gallery-item {
	break-inside: avoid;
	border-radius: var(--radius-sm);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	overflow: hidden;
	position: relative;
	width: 100%;
	margin-bottom: 6px;
	transition: opacity .18s ease;
}
.gallery-item:hover { opacity: .78; }
/* display:none removes item from column flow — masonry reflows cleanly */
.gallery-item.gallery-hidden { display: none; }
.gallery-extra { display: none; }

/* Load more button */
.gallery-pagination { margin-top: .2rem; text-align: center; }
.gallery-loadmore-btn {
	font-size: .72rem;
	font-weight: 600;
	padding: .28rem .85rem;
	background: var(--brand-dim);
	color: var(--brand);
	border: 1px solid var(--brand-border);
	border-radius: var(--button-radius);
	cursor: pointer;
	transition: background var(--transition);
	display: inline-flex;
	align-items: center;
	gap: .3rem;
}
.gallery-loadmore-btn:hover { background: var(--brand-dim); }
.gallery-loadmore-count {
	background: rgba(0,0,0,.2);
	border-radius: 99px;
	padding: 1px 6px;
	font-size: .65rem;
}

.gi-color-1 { background: linear-gradient(135deg,#1a2a1a,#243324); }
.gi-color-2 { background: linear-gradient(135deg,#1e1e28,#252533); }
.gi-color-3 { background: linear-gradient(135deg,#221a1a,#2d2222); }
.gi-color-4 { background: linear-gradient(135deg,#1a201e,#222d29); }
.gi-color-5 { background: linear-gradient(135deg,#201e1a,#2b2820); }
.gi-color-6 { background: linear-gradient(135deg,#1a1e24,#222733); }
.gi-color-7 { background: linear-gradient(135deg,#1e1a22,#27222e); }
.gi-icon { font-size: 1.1rem; opacity: .7; }
.gi-label { font-size: .58rem; color: rgba(255,255,255,.28); letter-spacing: .04em; font-weight: 500; }

/* ── 11. Proof Bar ────────────────────────────────────────── */
.proof-bar {
	padding: 1.5rem 0;
	border-top: var(--border-width) solid var(--line);
	border-bottom: var(--border-width) solid var(--line);
	background: rgba(255,255,255,.02);
}
.proof-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1.25rem 2rem;
}
.proof-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	text-align: center;
}
.proof-number {
	font-family: var(--font-display);
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--text);
	letter-spacing: -.02em;
}
.proof-unit { font-size: .9rem; font-weight: 600; opacity: .7; }
.proof-label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.proof-divider {
	width: 1px;
	height: 2rem;
	background: var(--line-strong);
}

/* ── 12. Problem Section ──────────────────────────────────── */
.problem-section { padding: var(--section-y) 0; }

.problem-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-top: 2rem;
}

.problem-col {
	background: var(--surface);
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius);
	padding: 1.25rem;
}
.solution-col {
	background: var(--brand-tint);
	border-color: var(--brand-border);
}

.problem-col-label {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-weight: 700;
	font-size: .85rem;
	margin-bottom: .9rem;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.problem-col-label.pain { color: var(--muted); }
.problem-col-label.gain { color: var(--brand); }

.problem-item {
	display: flex;
	align-items: flex-start;
	gap: .55rem;
	padding: .35rem 0;
	font-size: .9rem;
	color: var(--muted);
	border-bottom: var(--border-width) solid var(--line);
}
.problem-item:last-child { border-bottom: none; }

.problem-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .65rem;
	font-weight: 700;
	margin-top: 2px;
}
.x-icon { background: rgba(248,113,113,.15); color: var(--danger); }
.check-icon { background: var(--brand-dim); color: var(--brand); }

/* ── 13. Sources Section ──────────────────────────────────── */
.sources-section { padding: var(--section-y) 0; }
.sources-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: .8rem;
	margin-top: 1.75rem;
}
.source-card {
	background: var(--surface);
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius);
	padding: 1rem .9rem;
	transition: transform var(--transition);
}
.source-card:hover {
	border-color: var(--line-strong);
	transform: translateY(-2px);
}
.source-icon {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--brand-dim);
	border-radius: var(--radius-sm);
	margin-bottom: .6rem;
	color: var(--brand);
}
.source-name { font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.source-desc { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ── 14. Features Section ─────────────────────────────────── */
.features-section { padding: var(--section-y) 0; }
.features-intro { text-align: center; margin-bottom: 1.5rem; }
.features-intro .body-lg { max-width: 58ch; margin-inline: auto; }

.feature-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem;
	margin: 0 0 1.5rem;
}
.feature-tab {
	background: transparent;
	color: var(--muted);
	border: var(--border-width) solid var(--line-strong);
	border-radius: var(--button-radius);
	padding: .5rem 1rem;
	font-size: .88rem;
	font-weight: 600;
	transition: background var(--transition);
	cursor: pointer;
}
.feature-tab:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.feature-tab.active {
	background: var(--brand-strong);
	color: var(--brand-text);
	border-color: var(--brand-strong);
}

.feature-panel { display: none; }
.feature-panel.active {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: 1.5rem;
	align-items: start;
}

.panel-visual {
	background: var(--surface);
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius);
	padding: 1.25rem;
	min-height: 280px;
}
.panel-visual-inner { height: 100%; }

.panel-info { padding: .5rem 0; }
.panel-title {
	font-family: var(--font-display);
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.15;
	margin-bottom: .75rem;
}
.panel-desc { color: var(--muted); font-size: .95rem; line-height: 1.7; margin-bottom: 1rem; }

.panel-bullets { display: flex; flex-direction: column; gap: .55rem; }
.panel-bullet {
	display: flex;
	align-items: flex-start;
	gap: .55rem;
	font-size: .9rem;
	color: var(--muted);
}
.bullet-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	min-width: 18px;
	background: var(--brand-dim);
	border-radius: 50%;
	color: var(--brand);
	margin-top: 2px;
}

/* Filter showcase */
.filter-type-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: .4rem; font-weight: 700; }
.fdemo-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.fdemo-pill { padding: .22rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 500; border: 1px solid var(--line-strong); color: var(--muted); }
.fdemo-pill.active { background: var(--brand-strong); color: var(--brand-text); border-color: var(--brand-strong); }
.fdemo-tabs { border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.fdemo-tab { padding: .28rem .7rem; font-size: .75rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.fdemo-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.fdemo-btn { padding: .25rem .65rem; font-size: .75rem; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); }
.fdemo-btn.active { background: var(--brand-dim); color: var(--brand); border-color: var(--brand-border); }
.fdemo-select-wrap { margin-top: .4rem; }
.fdemo-select { display: block; width: 100%; padding: .4rem .7rem; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: .8rem; color: var(--muted); }

/* Layout showcase — sub-tab nav */
.ldemo-nav {
	display: flex;
	gap: .3rem;
	margin-bottom: .75rem;
	border-bottom: 1px solid var(--line);
	padding-bottom: .5rem;
}
.ldemo-tab {
	background: transparent;
	border: none;
	padding: .22rem .55rem;
	font-size: .72rem;
	font-weight: 600;
	color: var(--muted);
	border-radius: 4px;
	cursor: pointer;
	transition: background var(--transition);
}
.ldemo-tab:hover { color: var(--text); }
.ldemo-tab.active { background: var(--brand-dim); color: var(--brand); }

/* Layout views */
.ldemo-view { display: none; }
.ldemo-view.active { display: block; }

/* Grid layout demo */
.ldemo-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.ldemo-sq3 { display: block; height: 52px; border-radius: 5px; }

/* Masonry layout demo */
.ldemo-masonry-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ldemo-block { display: block; height: 50px; border-radius: 5px; }
.ldemo-block.tall { height: 104px; }
.ldemo-block.short { height: 36px; }

/* Justified layout demo */
.ldemo-justified { display: flex; flex-direction: column; gap: 5px; }
.ldemo-j-row { display: flex; gap: 5px; height: 46px; }
.ldemo-j-row > span { display: block; min-width: 0; }

/* Card layout demo */
.ldemo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ldemo-card-item {
	border-radius: 5px;
	overflow: hidden;
	background: var(--surface-2);
	border: 1px solid var(--line);
}
.ldemo-card-img { display: block; height: 42px; width: 100%; }
.ldemo-card-caption {
	display: block;
	padding: 4px 6px;
	font-size: .62rem;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.4;
}

/* Keep old .ldemo-masonry/.ldemo-grid for any remaining references */
.ldemo-masonry { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ldemo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: .3rem; }
.ldemo-sq { display: block; height: 50px; border-radius: 5px; }

/* Lightbox showcase */
.lb-frame { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.lb-img { aspect-ratio: 16/9; }
.lb-meta-row { padding: .6rem .75rem .4rem; border-bottom: 1px solid var(--line); }
.lb-meta-title { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.lb-exif { display: flex; flex-direction: column; gap: 2px; font-size: .72rem; color: var(--muted); font-family: var(--font-mono); }
.lb-nav-row { display: flex; align-items: center; justify-content: space-between; padding: .45rem .75rem; }
.lb-navbtn { width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--muted); cursor: default; }
.lb-count { font-size: .78rem; color: var(--muted); font-family: var(--font-mono); }

/* Pagination showcase */
.pgn-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: .3rem; }
.pgn-fill { height: 100%; width: 60%; background: var(--brand-strong); border-radius: 99px; }
.pgn-loadmore { text-align: center; padding: .4rem 0; }
.pgn-load-btn { display: inline-block; padding: .4rem .9rem; background: var(--brand-dim); color: var(--brand); border-radius: var(--button-radius); font-size: .78rem; font-weight: 600; border: 1px solid var(--brand-border); }
.pgn-pages { display: flex; gap: .35rem; justify-content: center; padding: .2rem 0; }
.pgn-pg { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: .8rem; color: var(--muted); }
.pgn-pg.active { background: var(--brand-strong); color: var(--brand-text); border-color: var(--brand-strong); font-weight: 700; }

/* ── 15. Settings Section ─────────────────────────────────── */
.settings-section { padding: var(--section-y) 0; }
.settings-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .75rem;
	margin-top: 2rem;
}
.settings-group {
	background: var(--surface);
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius);
	padding: 1rem;
}
.settings-group.open { border-color: var(--brand-border); }

.settings-group-header {
	display: flex;
	align-items: center;
	gap: .5rem;
	cursor: pointer;
	user-select: none;
}
.sg-title { font-weight: 700; font-size: .9rem; flex: 1; }
.sg-count { font-size: .72rem; color: var(--muted); margin-right: .25rem; white-space: nowrap; }
.toggle-chevron {
	flex-shrink: 0;
	color: var(--muted);
	transition: transform var(--transition);
}
.settings-group.open .toggle-chevron { transform: rotate(180deg); }

.settings-group-body { display: none; margin-top: .75rem; }
.settings-group.open .settings-group-body { display: block; }

.settings-items { display: flex; flex-direction: column; gap: 0; }
.settings-item {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
	font-size: .84rem;
	color: var(--muted);
	padding: .35rem 0;
	border-bottom: var(--border-width) solid var(--line);
}
.settings-item:last-child { border-bottom: none; }
.si-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--brand);
	flex-shrink: 0;
	margin-top: .45rem;
}

/* ── 16. Pricing Section ──────────────────────────────────── */
.pricing-section { padding: var(--section-y) 0; }
.pricing-intro { text-align: center; margin-bottom: 1.75rem; }
.pricing-intro .body-lg { max-width: 58ch; margin-inline: auto; }

.pricing-grid {
	display: grid;
	grid-template-columns: 1fr;
	max-width: 420px;
	margin-inline: auto;
}
.pricing-card {
	background: var(--surface);
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: .6rem;
	position: relative;
	transition: transform var(--transition);
}
.pricing-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pricing-card.popular {
	border-color: var(--brand-border);
	background: linear-gradient(135deg, var(--surface), var(--brand-tint));
	box-shadow: 0 0 30px var(--brand-glow);
}
.popular-badge {
	display: inline-block;
	background: var(--brand-strong);
	color: var(--brand-text);
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	border-radius: 99px;
	padding: 3px 10px;
	margin-bottom: .25rem;
	align-self: flex-start;
}

.pricing-tier { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pricing-price {
	display: flex;
	align-items: flex-end;
	gap: 2px;
	line-height: 1;
	margin: .25rem 0;
}
.price-currency { font-size: 1.4rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
.price-amount { font-family: var(--font-display); font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; color: var(--text); }
.price-desc { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.price-period { font-size: 1.4rem; font-weight: 600; color: var(--muted); align-self: flex-end; margin-bottom: .35rem; margin-left: 2px; }

.price-features {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: .45rem;
	flex: 1;
	margin-bottom: .75rem;
}
.price-features li {
	display: flex;
	align-items: flex-start;
	gap: .45rem;
	font-size: .87rem;
	color: var(--muted);
}
.price-features li svg { color: var(--brand); flex-shrink: 0; margin-top: 2px; }

.price-guarantee {
	display: flex;
	align-items: center;
	gap: .35rem;
	font-size: .76rem;
	color: var(--muted);
	justify-content: center;
	margin-top: .25rem;
}
.price-guarantee svg { color: var(--brand); }

.pricing-footnote {
	max-width: 680px;
	margin: 1.5rem auto 0;
	text-align: center;
	font-size: .8rem;
	color: var(--muted);
	line-height: 1.6;
}

/* ── 17. Testimonials ─────────────────────────────────────── */
.testimonials-section { padding: var(--section-y) 0; }
.testimonials-section .display-lg { text-align: center; margin-bottom: 2rem; }
.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}
.testimonial-card {
	background: var(--surface);
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius);
	padding: 1.4rem;
	display: flex;
	flex-direction: column;
	gap: .85rem;
}
.testimonial-stars { display: flex; gap: 3px; color: #f59e0b; }
.testimonial-quote { font-size: .9rem; color: var(--muted); line-height: 1.7; flex: 1; }
.testimonial-footer { display: flex; flex-direction: column; gap: 2px; border-top: var(--border-width) solid var(--line); padding-top: .75rem; }
.testimonial-author { font-style: normal; font-weight: 700; font-size: .88rem; }
.testimonial-role { font-size: .78rem; color: var(--muted); }

/* ── 18. FAQ Section ──────────────────────────────────────── */
.faq-section { padding: var(--section-y) 0; }
.faq-intro { text-align: center; margin-bottom: 1.5rem; }

.faq-list {
	max-width: 780px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: .6rem;
}
.faq-item {
	background: var(--surface);
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.faq-item.open { border-color: var(--brand-border); }

.faq-question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: transparent;
	color: var(--text);
	text-align: left;
	padding: 1rem 1.1rem;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	border: none;
	font-family: inherit;
}
.faq-question:hover { color: var(--brand); }
.faq-chevron {
	flex-shrink: 0;
	color: var(--muted);
	transition: transform .25s ease;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
	display: none;
	padding: 0 1.1rem 1rem;
	font-size: .9rem;
	color: var(--muted);
	line-height: 1.7;
	border-top: var(--border-width) solid var(--line);
}
.faq-item.open .faq-answer { display: block; padding-top: .75rem; }

/* ── 19. Studio / Waitlist ────────────────────────────────── */
.studio-section { padding: var(--section-y) 0 calc(var(--section-y) * 1.25); }
.studio-inner {
	max-width: 680px;
	margin: 0 auto;
	text-align: center;
	border: var(--border-width) solid var(--line);
	border-radius: var(--radius-lg);
	padding: 3rem 2rem;
	background: linear-gradient(135deg, var(--surface), var(--violet-tint));
	position: relative;
	overflow: hidden;
}
.studio-inner::before {
	content: '';
	position: absolute;
	top: -80px;
	left: 50%;
	transform: translateX(-50%);
	width: 400px;
	height: 300px;
	background: radial-gradient(ellipse, var(--violet-dim) 0%, transparent 70%);
	pointer-events: none;
}
.studio-badge {
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: var(--brand);
	margin-bottom: .75rem;
}
.studio-title {
	font-family: var(--font-display);
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.1;
	margin-bottom: .75rem;
}
.studio-sub { color: var(--muted); font-size: 1rem; line-height: 1.65; max-width: 52ch; margin: 0 auto 1.5rem; }
.violet { color: var(--violet); }

.email-form {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	justify-content: center;
	position: relative;
	z-index: 1;
}
.email-input {
	min-width: 260px;
	padding: .75rem 1rem;
	background: rgba(255,255,255,.06);
	border: var(--border-width) solid var(--line-strong);
	border-radius: var(--button-radius);
	color: var(--text);
	font-size: .9rem;
}
.email-input::placeholder { color: var(--muted); }
.email-input:focus { border-color: var(--brand); }

.notice.success {
	background: var(--brand-tint);
	border: 1px solid var(--brand-border);
	color: var(--brand);
	border-radius: var(--radius-sm);
	padding: .75rem 1rem;
	font-size: .9rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

/* ── 20. Footer ───────────────────────────────────────────── */
footer { border-top: var(--border-width) solid var(--line); padding-top: 2.5rem; padding-bottom: 1.5rem; }
.footer-inner {
	display: grid;
	grid-template-columns: 1.8fr 1fr 1fr 1fr;
	gap: 1.5rem 2rem;
}
.footer-logo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; margin-bottom: .4rem; }
.footer-logo span { color: var(--brand); }
.footer-tagline { font-size: .85rem; color: var(--muted); line-height: 1.55; margin-bottom: .75rem; }
.footer-col-title { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: .6rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .42rem; }
.footer-links a { font-size: .85rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
	border-top: var(--border-width) solid var(--line);
	margin-top: 1.5rem;
	padding-top: 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: .75rem;
	font-size: .8rem;
	color: var(--muted);
}
.footer-copy { flex: 1; }
.footer-legal { display: flex; gap: 1rem; }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--text); }

/* ── 21. Forms / Inputs ───────────────────────────────────── */
input[type="email"],
input[type="text"],
input[type="search"],
textarea {
	border: var(--border-width) solid var(--line-strong);
	background: rgba(255,255,255,.05);
	border-radius: var(--radius-sm);
	padding: .75rem 1rem;
	color: var(--text);
	font-size: .9rem;
}
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus { border-color: var(--brand); }

/* ── 22. Responsive: 1280px ───────────────────────────────── */
@media (max-width: 1280px) {
	.settings-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 23. Responsive: 1024px ───────────────────────────────── */
@media (max-width: 1024px) {
	:root { --section-y: 4rem; }
	.sources-grid { grid-template-columns: repeat(3, 1fr); }
	.footer-inner { grid-template-columns: 1fr 1fr; }
}

/* ── 24. Responsive: 900px ────────────────────────────────── */
@media (max-width: 900px) {
	.nav-links,
	.nav-cta .btn-primary { display: none; }
	.nav-toggle { display: flex; }

	.hero { padding: 3.5rem 0 2.5rem; }
	.hero-h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }

	.feature-panel.active { grid-template-columns: 1fr; }
	.panel-visual { min-height: auto; }

	.pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
	.testimonials-grid { grid-template-columns: 1fr; max-width: 540px; margin-inline: auto; }
	.settings-grid { grid-template-columns: 1fr; }
}

/* ── 25. Responsive: 768px ────────────────────────────────── */
@media (max-width: 768px) {
	:root { --section-y: 3.5rem; }
	.problem-grid { grid-template-columns: 1fr; }
	.sources-grid { grid-template-columns: 1fr 1fr; }
	.footer-inner { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}

/* ── 26. Responsive: 640px ────────────────────────────────── */
@media (max-width: 640px) {
	:root { --section-y: 3rem; --nav-height: 60px; }
	.hero { padding: 3rem 0 2rem; }
	.hero-h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
	.hero-ctas { flex-direction: column; align-items: center; }
	.hero-ctas .btn-primary,
	.hero-ctas .btn-ghost { width: 100%; max-width: 320px; justify-content: center; }
	.proof-divider { display: none; }
	.proof-grid { gap: .9rem 1.25rem; }
	.gallery-masonry { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 56px; }
	.studio-inner { padding: 2rem 1.25rem; }
	.email-form { flex-direction: column; align-items: stretch; }
	.email-input { min-width: 0; width: 100%; }
	.btn-violet { width: 100%; justify-content: center; }
	.footer-inner { grid-template-columns: 1fr; }
	.footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── 27. Responsive: 480px ────────────────────────────────── */
@media (max-width: 480px) {
	:root { --section-y: 2.5rem; }
	.sources-grid { grid-template-columns: 1fr; }
	.hero-trust { gap: .4rem; }
	.trust-sep { display: none; }
	.trust-item + .trust-item::before {
		content: '·';
		opacity: .35;
		margin-right: .3rem;
	}
	.container-narrow { padding: 0; }
	.feature-tabs { justify-content: flex-start; }
}

/* ── 28. Reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.reveal { opacity: 1; transform: none; transition: none; }
	.badge-dot { animation: none; }
	/* Mobile nav: skip animation, just snap open/closed */
	.nav-mobile,
	.nav-mobile.open {
		transition: visibility 0s linear 0s !important;
		transform: none !important;
	}
}

/* ── 29. Print ────────────────────────────────────────────── */
@media print {
	#navbar, .nav-toggle, .hero-gallery, .proof-bar,
	.studio-section, .hero-grid { display: none !important; }
	body { background: #fff; color: #000; }
	.hero { padding: 1rem 0; }
}

