/* =========================================================================
   Silsilah — Family Tree · marketing site
   Palette taken verbatim from the iOS app (Theme.swift / GraphTheme.swift)
   ========================================================================= */

:root {
	/* Surfaces — app parchment backgrounds */
	--bg: #f4eee1; /* Theme.background  rgb(244,238,225) */
	--surface: #faf7f2; /* Theme.contentBackground */
	--surface-2: #ffffff;

	/* Brand navy — Theme.tint + graph node cards */
	--navy: #2d4b73; /* tint rgb(45,75,115) */
	--navy-700: #243c5c;
	--card-dark: #242b47; /* GraphTheme.cardDark */
	--card-darker: #171a2e; /* GraphTheme.cardDarker */

	/* Accents */
	--accent-blue: #6685ff; /* GraphTheme.accentBlue */
	--accent-purple: #a647eb; /* GraphTheme.accentPurple */
	--gold: #d9a441;

	/* Gender tints — graph nodes */
	--male: #add8e6;
	--female: #ffb6c1;

	/* Ink */
	--ink: #1a1a1a; /* textPrimary white:0.1 */
	--muted: #6e6a63;
	--muted-2: #67625a; /* darkened to pass WCAG AA on parchment */
	--line: rgba(45, 75, 115, 0.14);
	--line-strong: rgba(45, 75, 115, 0.4); /* parentChildLink */

	--serif: Georgia, "Times New Roman", Times, serif; /* app uses Georgia */
	--sans:
		system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 14px 40px -18px rgba(36, 43, 71, 0.45);
	--shadow-sm: 0 6px 18px -10px rgba(36, 43, 71, 0.4);
	--maxw: 1120px;
}

/* ------------------------------ base ------------------------------------ */
* {
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	overflow-x: clip;    /* prevent full-bleed carousel from creating a horizontal scrollbar */
	font-family: var(--sans);
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
.serif {
	font-family: var(--serif);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}
h1 {
	font-size: clamp(2.1rem, 5vw, 3.6rem);
	margin: 0 0 0.4em;
}
h2 {
	font-size: clamp(1.7rem, 3.6vw, 2.6rem);
	margin: 0 0 0.5em;
}
h3 {
	font-size: 1.2rem;
	margin: 0 0 0.35em;
}
p {
	margin: 0 0 1rem;
}
a {
	color: var(--navy);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
img {
	max-width: 100%;
	display: block;
}
.container {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 24px;
}
.eyebrow {
	font-family: var(--sans);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.74rem;
	color: var(--navy);
	display: inline-block;
	margin-bottom: 1rem;
	opacity: 0.9;
}
.lead {
	font-size: 1.15rem;
	color: var(--muted);
	max-width: 60ch;
}
section {
	padding: clamp(56px, 8vw, 104px) 0;
}

/* reveal-on-scroll */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition:
		opacity 0.7s ease,
		transform 0.7s ease;
}
.reveal.in {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
	html {
		scroll-behavior: auto;
	}
}

/* ------------------------------ focus (a11y) ---------------------------- */
:focus-visible {
	outline: 2px solid var(--navy);
	outline-offset: 2px;
	border-radius: 4px;
}
:focus:not(:focus-visible) {
	outline: none;
}
#tree .node:focus {
	outline: none;
}
#tree .node:focus-visible {
	outline: 2px solid var(--navy);
	outline-offset: 3px;
}

/* ------------------------------ buttons --------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	padding: 0.7rem 1.5rem;
	border-radius: 14px;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition:
		transform 0.15s ease,
		box-shadow 0.2s ease,
		background 0.2s ease;
	text-decoration: none;
}
.btn:hover {
	text-decoration: none;
	transform: translateY(-2px);
}
.btn-primary {
	background: var(--navy);
	color: #fff;
	box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
	background: var(--navy-700);
}
.btn-ghost {
	background: transparent;
	color: var(--navy);
	border-color: var(--line-strong);
}
.btn-ghost:hover {
	background: rgba(45, 75, 115, 0.06);
}
.btn-light {
	background: #fff;
	color: var(--navy);
	border-color: var(--line);
}

/* App Store badge (CSS, no image dependency) */
.appstore {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	background: #111;
	color: #fff;
	padding: 0.7rem 1.15rem;
	border-radius: 14px;
	text-decoration: none;
	transition:
		transform 0.15s ease,
		opacity 0.2s ease;
	border: 1px solid #000;
}
.appstore:hover {
	text-decoration: none;
	transform: translateY(-2px);
	opacity: 0.92;
}
.appstore svg {
	width: 26px;
	height: 26px;
	flex: none;
}
.appstore .small {
	font-size: 0.66rem;
	line-height: 1;
	opacity: 0.85;
	display: block;
	letter-spacing: 0.02em;
}
.appstore .big {
	font-family: var(--serif);
	font-size: 1.22rem;
	line-height: 1.1;
}

/* ------------------------------ header ---------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(244, 238, 225, 0.82);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 66px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--serif);
	font-weight: 700;
	font-size: 1.2rem;
	color: var(--ink);
}
.brand:hover {
	text-decoration: none;
}
.brand .mark {
	width: 30px;
	height: 30px;
	flex: none;
}
.nav-links {
	display: flex;
	align-items: center;
	gap: 1.6rem;
}
.nav-links a {
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 500;
}
.nav-links a:hover {
	color: var(--navy);
	text-decoration: none;
}
.nav-cta {
	padding: 0.45rem 0.9rem !important;
	font-size: 0.85rem !important;
	white-space: nowrap !important;
	color: #fff !important;
}
/* Prevent wordmark wrapping on small viewports */
.brand {
	white-space: nowrap;
	min-width: 0;
}
@media (max-width: 760px) {
	.nav-links .hide-sm {
		display: none;
	}
	.brand {
		font-size: 1rem;
	}
}

/* ------------------------------ hero ------------------------------------ */
.hero {
	padding-top: clamp(40px, 6vw, 72px);
}
.hero-grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 48px;
	align-items: center;
}
.hero-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.1rem;
	margin-top: 1.4rem;
	color: var(--muted);
	font-size: 0.9rem;
}
.hero-trust span {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.hero-trust .stars {
	color: var(--gold);
	letter-spacing: 0.05em;
}
.hero-trust .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent-blue);
}
.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: 1.6rem;
	align-items: center;
}
.hero-note {
	font-size: 0.82rem;
	color: var(--muted-2);
	margin-top: 0.9rem;
}

@media (max-width: 880px) {
	.hero-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
	.hero-art {
		order: -1;
	}
}

/* phone mockup */
.phone {
	width: min(300px, 78vw);
	aspect-ratio: 9 / 19;
	margin: 0 auto;
	background: #0a0c16;
	border-radius: 28px;
	padding: 6px;
	box-shadow: var(--shadow);
}
.phone-screen {
	width: 100%;
	height: 100%;
	border-radius: 24px;
	overflow: hidden;
	background: var(--bg);
	display: flex;
	flex-direction: column;
}
.phone-top {
	padding: 30px 16px 10px;
	text-align: center;
}
.phone-top .pt-title {
	font-family: var(--serif);
	font-weight: 700;
	color: var(--navy);
	font-size: 1rem;
}
.phone-top .pt-sub {
	font-size: 0.68rem;
	color: var(--muted);
}
.phone-canvas {
	flex: 1;
	position: relative;
}
.hero-shot {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}
.float {
	position: absolute;
	background: #fff;
	border-radius: 14px;
	box-shadow: var(--shadow-sm);
	padding: 0.7rem 0.9rem;
	font-size: 0.8rem;
}

/* ------------------------------ demo / builder -------------------------- */
.demo {
	background: linear-gradient(180deg, var(--surface), var(--bg));
}
.demo-head {
	text-align: center;
	max-width: 64ch;
	margin: 0 auto 2rem;
}
.demo-head .lead {
	margin: 0 auto;
}
.builder {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.canvas-wrap {
	position: relative;
	height: clamp(440px, 64vh, 620px);
	background:
		radial-gradient(
				circle at 1px 1px,
				rgba(45, 75, 115, 0.1) 1px,
				transparent 0
			)
			0 0 / 26px 26px,
		var(--surface);
	touch-action: none;
	overflow: hidden;
	cursor: grab;
}
.canvas-wrap.grabbing {
	cursor: grabbing;
}
#tree {
	width: 100%;
	height: 100%;
	display: block;
}

/* floating counter (top-left) */
.counter {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 8;
	font-weight: 700;
	color: var(--navy);
	font-size: 0.82rem;
	background: rgba(255, 255, 255, 0.9);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border: 1px solid var(--line);
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	box-shadow: var(--shadow-sm);
}
.counter.warn {
	background: rgba(217, 164, 65, 0.22);
	color: #8a6310;
	border-color: rgba(217, 164, 65, 0.4);
}

/* floating controls (bottom-centre — matches the app) */
.tree-controls {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	z-index: 8;
	display: flex;
	gap: 10px;
}
.ctrl-btn {
	width: 50px;
	height: 50px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
	display: grid;
	place-items: center;
	color: var(--navy);
	cursor: pointer;
	transition:
		transform 0.12s ease,
		background 0.15s ease;
}
.ctrl-btn:hover {
	transform: translateY(-2px);
}
.ctrl-btn:active {
	transform: translateY(0) scale(0.96);
}
.ctrl-btn svg {
	width: 22px;
	height: 22px;
}
@media (max-width: 520px) {
	.ctrl-btn {
		width: 44px;
		height: 44px;
	}
	.tree-controls {
		gap: 7px;
	}
}

/* selection action popover (light icon grid) */
.node-actions {
	position: absolute;
	z-index: 10;
	display: none;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	width: 232px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 9px;
	box-shadow: var(--shadow);
	transform: translateX(-50%);
}
.node-actions.show {
	display: grid;
}
.node-actions button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	background: var(--surface);
	border: 1px solid transparent;
	border-radius: 11px;
	padding: 0.55rem 0.3rem;
	color: var(--navy);
	font-size: 0.68rem;
	font-weight: 600;
	font-family: var(--sans);
	transition: background 0.14s ease;
}
.node-actions button:hover {
	background: rgba(45, 75, 115, 0.08);
}
.node-actions button svg {
	width: 19px;
	height: 19px;
}
.node-actions button.danger {
	color: #b23b3b;
}
.node-actions button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.node-actions .arrow {
	position: absolute;
	top: -6px;
	left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 12px;
	height: 12px;
	background: #fff;
	border-left: 1px solid var(--line);
	border-top: 1px solid var(--line);
}
.node-actions.above .arrow {
	top: auto;
	bottom: -6px;
	border: none;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

/* limit card */
.limit-card {
	position: absolute;
	inset: auto 16px 80px 16px;
	z-index: 12;
	display: none;
	background: linear-gradient(135deg, var(--card-dark), var(--card-darker));
	color: #fff;
	border-radius: 16px;
	padding: 1.1rem 1.2rem;
	box-shadow: var(--shadow);
	align-items: center;
	gap: 1rem;
}
.limit-card.show {
	display: flex;
}
.limit-card p {
	margin: 0;
	font-size: 0.9rem;
	color: #e9ecf6;
	padding-right: 1rem;
}
.limit-card strong {
	color: #fff;
}
.limit-card .appstore {
	flex: none;
}
.limit-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	padding: 2px 6px;
}
.limit-close:hover {
	color: #fff;
}
@media (max-width: 620px) {
	.limit-card {
		inset: auto 12px 84px 12px;
		flex-direction: column;
		text-align: center;
	}
}

.demo-foot {
	text-align: center;
	color: var(--muted-2);
	font-size: 0.82rem;
	margin-top: 1rem;
}
.demo-foot svg {
	width: 14px;
	height: 14px;
	vertical-align: -2px;
}

/* ------------------------------ features -------------------------------- */
.features-head {
	text-align: center;
	max-width: 62ch;
	margin: 0 auto 2.6rem;
}
.feature-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
@media (max-width: 900px) {
	.feature-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.feature-grid {
		grid-template-columns: 1fr;
	}
}
.feature {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.6rem;
	box-shadow: var(--shadow-sm);
	position: relative;
	overflow: hidden;
}
.feature .ficon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #2e5283, #21426a);
	color: #fff;
	margin-bottom: 1rem;
}
.feature .ficon svg {
	width: 24px;
	height: 24px;
}
.feature p {
	color: var(--muted);
	margin: 0;
	font-size: 0.96rem;
}
.feature .tag {
	position: absolute;
	top: 14px;
	right: 14px;
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--navy);
	background: rgba(45, 75, 115, 0.08);
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
}

/* ------------------------------ privacy band ---------------------------- */
.privacy {
	background: linear-gradient(135deg, var(--card-dark), var(--card-darker));
	color: #fff;
	border-radius: 0;
	position: relative;
	overflow: hidden;
}
.privacy::after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.5;
	background:
		radial-gradient(
			600px 300px at 85% 10%,
			rgba(102, 133, 255, 0.18),
			transparent
		),
		radial-gradient(
			500px 300px at 5% 90%,
			rgba(166, 71, 235, 0.16),
			transparent
		);
	pointer-events: none;
}
.privacy .container {
	position: relative;
	z-index: 1;
}
.privacy h2 {
	color: #fff;
}
.privacy .lead {
	color: #cfd4e6;
}
.privacy-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
	margin-top: 2.2rem;
}
@media (max-width: 760px) {
	.privacy-grid {
		grid-template-columns: 1fr;
	}
}
.pcard {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius);
	padding: 1.4rem;
}
.pcard h3 {
	color: #fff;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
/* Give pcard icons a tile background — matches feature section treatment on dark */
.pcard h3 svg {
	width: 20px;
	height: 20px;
	color: #fff;
	flex: none;
	padding: 9px;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.16);
	box-sizing: border-box;
}
.pcard p {
	color: #c3c8db;
	margin: 0;
	font-size: 0.94rem;
}

/* ------------------------------ platforms ------------------------------- */
.platforms-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}
@media (max-width: 760px) {
	.platforms-grid {
		grid-template-columns: 1fr;
	}
}
.pf {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 2rem;
	box-shadow: var(--shadow-sm);
}
.pf .pf-os {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 700;
	color: var(--navy);
	margin-bottom: 0.4rem;
}
.pf .pf-os svg {
	width: 22px;
	height: 22px;
}
.pf .status {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.pf .status.live {
	color: #2e7d52;
}
.pf .status.soon {
	color: var(--gold);
}
.signup {
	display: flex;
	gap: 0.6rem;
	margin-top: 1.1rem;
	flex-wrap: wrap;
}
.signup input {
	flex: 1;
	min-width: 180px;
	padding: 0.8rem 1rem;
	border-radius: 12px;
	border: 1.5px solid var(--line);
	font-family: var(--sans);
	font-size: 1rem;
	background: #fff;
	color: var(--ink);
}
.signup input:focus {
	outline: none;
	border-color: var(--navy);
}
.signup .ok {
	color: #2e7d52;
	font-weight: 600;
	font-size: 0.92rem;
	align-self: center;
}

/* ------------------------------ FAQ ------------------------------------- */
.faq-wrap {
	max-width: 760px;
	margin: 0 auto;
}
.faq-item {
	border-bottom: 1px solid var(--line);
}
.faq-q {
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--serif);
	font-weight: 700;
	font-size: 1.08rem;
	color: var(--ink);
	padding: 1.15rem 2.2rem 1.15rem 0;
	position: relative;
}
.faq-q::after {
	content: "+";
	position: absolute;
	right: 0.2rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--sans);
	color: var(--navy);
	font-size: 1.4rem;
	transition: transform 0.2s ease;
}
.faq-item.open .faq-q::after {
	content: "−";
}
.faq-a {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.28s ease;
	color: var(--muted);
}
.faq-a p {
	padding-bottom: 1.15rem;
	margin: 0;
}

/* ------------------------------ footer ---------------------------------- */
.site-footer {
	background: var(--surface);
	border-top: 1px solid var(--line);
	padding: 48px 0 36px;
}
.footer-grid {
	display: flex;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
	align-items: flex-start;
}
.footer-brand {
	max-width: 320px;
}
.footer-brand p {
	color: var(--muted);
	font-size: 0.9rem;
}
.footer-cols {
	display: flex;
	gap: 56px;
	flex-wrap: wrap;
}
.footer-cols h4 {
	font-family: var(--sans);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted-2);
	margin: 0 0 0.8rem;
}
.footer-cols a {
	display: block;
	color: var(--ink);
	font-size: 0.92rem;
	margin-bottom: 0.5rem;
}
.footer-cols a:hover {
	color: var(--navy);
	text-decoration: none;
}
.footer-bottom {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
	color: var(--muted-2);
	font-size: 0.82rem;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

/* ------------------------------ modal ----------------------------------- */
.modal-back {
	position: fixed;
	inset: 0;
	background: rgba(23, 26, 46, 0.55);
	backdrop-filter: blur(3px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 20px;
}
.modal-back.show {
	display: flex;
}
.modal {
	background: var(--surface-2);
	border-radius: 20px;
	box-shadow: var(--shadow);
	width: min(420px, 100%);
	padding: 1.6rem;
	animation: pop 0.18s ease;
}
@keyframes pop {
	from {
		transform: scale(0.96);
		opacity: 0;
	}
	to {
		transform: none;
		opacity: 1;
	}
}
.modal h3 {
	margin-bottom: 1.1rem;
}
.field {
	margin-bottom: 1rem;
}
.field label {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 0.4rem;
}
.field input[type="text"] {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1.5px solid var(--line);
	border-radius: 12px;
	font-size: 1rem;
	font-family: var(--sans);
}
.field input:focus {
	outline: none;
	border-color: var(--navy);
}
.seg {
	display: inline-flex;
	background: var(--bg);
	border-radius: 12px;
	padding: 4px;
	gap: 4px;
}
.seg button {
	border: none;
	background: none;
	padding: 0.5rem 0.9rem;
	border-radius: 9px;
	cursor: pointer;
	font-weight: 600;
	color: var(--muted);
	font-family: var(--sans);
	font-size: 0.9rem;
}
.seg button.active {
	background: #fff;
	color: var(--navy);
	box-shadow: var(--shadow-sm);
}
.field.two {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1rem;
	align-items: start;
}
.field .hint {
	font-weight: 400;
	color: var(--muted-2);
}
.emoji-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.emoji-row button {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: 1.5px solid var(--line);
	background: #fff;
	font-size: 1.2rem;
	cursor: pointer;
}
.emoji-row button.active {
	border-color: var(--navy);
	background: rgba(45, 75, 115, 0.08);
}
.avatar-pick {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 0.6rem;
}
.photo-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--surface);
	border: 1.5px solid var(--line);
	color: var(--navy);
	border-radius: 10px;
	padding: 0.45rem 0.8rem;
	font-size: 0.85rem;
	font-weight: 600;
	font-family: var(--sans);
	cursor: pointer;
}
.photo-btn:hover {
	background: rgba(45, 75, 115, 0.06);
}
.photo-btn svg {
	width: 16px;
	height: 16px;
}
.photo-thumb {
	position: relative;
	width: 44px;
	height: 44px;
}
.photo-thumb img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--navy);
}
.photo-thumb button {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: none;
	background: var(--navy);
	color: #fff;
	font-size: 0.8rem;
	line-height: 1;
	cursor: pointer;
}
.modal-actions {
	display: flex;
	gap: 0.7rem;
	justify-content: flex-end;
	margin-top: 1.4rem;
}
.modal-actions .btn {
	padding: 0.7rem 1.3rem;
}

/* ------------------------------ large button ----------------------------- */
.btn-lg {
	padding: 1rem 1.5rem;
	font-size: 1.08rem;
	letter-spacing: 0.01em;
}

/* ------------------------------ demo convert ---------------------------- */
.demo-convert {
	text-align: center;
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1.2rem;
}
.demo-convert p {
	margin: 0;
	color: var(--muted);
	max-width: 48ch;
	font-size: 0.96rem;
}
@media (max-width: 600px) {
	.demo-convert {
		flex-direction: column;
		text-align: center;
	}
}

/* ------------------------------ speed & ease ---------------------------- */
.speed {
	background: var(--surface);
}
.speed-grid {
	max-width: 760px;
	margin: 0 auto;
}
.speed-item {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
	padding: 1.8rem 0;
	border-bottom: 1px solid var(--line);
}
.speed-item:first-child {
	border-top: 1px solid var(--line);
}
.speed-item p {
	color: var(--muted);
	margin: 0;
	font-size: 0.96rem;
}
.speed-icon {
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #2e5283, #21426a);
	color: #fff;
	margin-top: 0.15rem;
}
.speed-icon svg {
	width: 24px;
	height: 24px;
}
@media (max-width: 600px) {
	.speed-item {
		flex-direction: column;
		gap: 0.8rem;
		text-align: center;
	}
	.speed-icon {
		margin: 0 auto;
	}
}

/* ------------------------------ personal & emotional -------------------- */
.personal {
	background: linear-gradient(180deg, #fbf5ec, var(--bg));
}

/* ------------------------------ screenshots gallery --------------------- */
.screenshots {
  background: var(--surface);
}
.gallery-group {
  margin-bottom: 3rem;
}
.gallery-group:last-child {
  margin-bottom: 0;
}
.gallery-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}
.gallery-header svg {
  width: 26px;
  height: 26px;
  color: var(--navy);
  flex: none;
}
.gallery-header h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
  color: var(--ink);
}

/* full-bleed overflow carousel — bleeds to viewport edge */
.gallery-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                  /* hide scrollbar — swipe UI */
  /* break out of container to viewport width */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-inline: max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
  scroll-padding-inline: max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
  padding-bottom: 8px;
}
.gallery-strip::-webkit-scrollbar {
  display: none;
}
.gallery-item {
  flex: none;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover {
  transform: translateY(-4px);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* iPhone frame — ultra-thin bezel, clean (no notch, no island) */
.phone-frame {
  width: 210px;
  aspect-ratio: 9 / 19.5;
  background: #0a0c16;
  border-radius: 36px;
  padding: 4px;                 /* ultra-thin — just enough to see the frame colour */
  box-shadow: var(--shadow);
  position: relative;
}
.phone-frame::before { content: none; }   /* no notch, no island */
.phone-frame img {
  border-radius: 33px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* iPad frame — portrait, ultra-thin bezel, no camera element */
.pad-frame {
  width: 240px;
  aspect-ratio: 41 / 59;       /* matches 1640×2360 portrait source PNGs */
  background: #0a0c16;
  border-radius: 20px;
  padding: 4px;
  box-shadow: var(--shadow);
  position: relative;
}
.pad-frame::before { content: none; }     /* no camera dot */
.pad-frame img {
  border-radius: 17px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* lightbox */
.lightbox-back {
  position: fixed;
  inset: 0;
  background: rgba(23, 26, 46, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox-back.show {
  display: flex;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 201;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.lightbox-body {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop 0.18s ease;
}
.lightbox-body img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
@media (max-width: 600px) {
  .phone-frame {
    width: 155px;
    border-radius: 30px;
    padding: 3px;
  }
  .phone-frame img {
    border-radius: 28px;
  }
  .pad-frame {
    width: 175px;
    border-radius: 16px;
    padding: 3px;
  }
  .pad-frame img {
    border-radius: 14px;
  }
}

/* ------------------------------ iPhone CTA ------------------------------ */
.cta-iphone {
	text-align: center;
	padding: clamp(64px, 8vw, 100px) 0;
	background: linear-gradient(135deg, var(--navy), var(--navy-700));
	color: #fff;
}
.cta-iphone h2 {
	color: #fff;
}
.cta-iphone .lead {
	color: rgba(255, 255, 255, 0.82);
	max-width: 58ch;
	margin-left: auto;
	margin-right: auto;
}
.cta-iphone .cta-rating {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9rem;
	margin-top: 1rem;
	font-weight: 600;
}
.cta-iphone .cta-rating .stars {
	color: var(--gold);
	letter-spacing: 0.05em;
}
.cta-iphone .cta-sub {
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.82rem;
	margin-top: 0.4rem;
}

/* larger App Store badge for CTA sections */
.appstore-lg {
	padding: 0.9rem 1.5rem;
	border-radius: 18px;
}
.appstore-lg svg {
	width: 30px;
	height: 30px;
}
.appstore-lg .big {
	font-size: 1.35rem;
}

/* ------------------------------ Android waitlist ------------------------- */
.cta-android {
	padding: clamp(48px, 6vw, 72px) 0;
}
.android-card {
	max-width: 540px;
	margin: 0 auto;
	padding: 2rem 2.2rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface-2);
	box-shadow: var(--shadow-sm);
}
.android-card h3 {
	font-family: var(--serif);
	font-size: 1.1rem;
}
.android-card p {
	color: var(--muted);
	font-size: 0.96rem;
	margin-bottom: 1.2rem;
}

/* ------------------------------ final CTA ------------------------------- */
.cta-final {
	text-align: center;
	padding: clamp(56px, 7vw, 88px) 0;
	background: linear-gradient(180deg, var(--surface), var(--bg));
}
.cta-final p {
	max-width: 56ch;
	margin-left: auto;
	margin-right: auto;
}
.cta-final-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
	align-items: center;
	margin-top: 2rem;
}

/* ------------------------------ fullscreen canvas ----------------------- */
/* CSS pseudo-fullscreen — avoids iOS Safari's requestFullscreen() no-op on non-video */
.builder.fs-active {
	position: fixed;
	inset: 0;
	z-index: 300;
	border-radius: 0;
	box-shadow: none;
	border: none;
}
.builder.fs-active .canvas-wrap {
	height: 100dvh;               /* dvh respects Safari's dynamic toolbar */
	border-radius: 0;
}
.builder.fs-active .tree-controls {
	bottom: max(16px, env(safe-area-inset-bottom));   /* safe area for home indicator */
}

/* utility */
.center {
	text-align: center;
}
.mt-2 {
	margin-top: 1.4rem;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
}
