/* ============================================================
   Kapps — shared design system
   One stylesheet for every page. Light & dark via
   prefers-color-scheme. Per-app accent via body[data-app].
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
	/* Light (default) */
	--ground: #FAF9F6;
	--card: #FFFFFF;
	--card-hover: #F4F2ED;
	--ink: #1B1B1F;
	--ink-2: rgba(27, 27, 31, 0.55);
	--ink-3: rgba(27, 27, 31, 0.35);
	--hairline: rgba(27, 27, 31, 0.09);
	--nav-bg: rgba(250, 249, 246, 0.85);
	--shadow: 0 1px 2px rgba(27, 27, 31, 0.04), 0 8px 24px rgba(27, 27, 31, 0.06);
	--shadow-lift: 0 2px 4px rgba(27, 27, 31, 0.05), 0 16px 40px rgba(27, 27, 31, 0.10);

	/* Kapps studio accent (gold) */
	--accent: #A8781E;
	--accent-dim: rgba(168, 120, 30, 0.10);

	/* App accents */
	--sleek: #C05628;
	--sleek-dim: rgba(192, 86, 40, 0.10);
	--journey: #D81B55;
	--journey-dim: rgba(216, 27, 85, 0.10);

	--radius: 20px;
	--radius-sm: 12px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ground: #0E0E10;
		--card: #1A1A1E;
		--card-hover: #232328;
		--ink: #F2F2F0;
		--ink-2: rgba(242, 242, 240, 0.55);
		--ink-3: rgba(242, 242, 240, 0.35);
		--hairline: rgba(242, 242, 240, 0.08);
		--nav-bg: rgba(14, 14, 16, 0.85);
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
		--shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.5);

		--accent: #D4A43A;
		--accent-dim: rgba(212, 164, 58, 0.14);

		--sleek: #8B7CFF;               /* Sleek Midnight violet */
		--sleek-dim: rgba(139, 124, 255, 0.14);
		--journey: #FF5C8A;
		--journey-dim: rgba(255, 92, 138, 0.14);
	}
}

/* Per-app pages inherit that app's accent */
body[data-app="sleek"]   { --accent: var(--sleek);   --accent-dim: var(--sleek-dim); }
body[data-app="journey"] { --accent: var(--journey); --accent-dim: var(--journey-dim); }

html { scroll-behavior: smooth; }

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--ground);
	color: var(--ink);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main { flex: 1; }

::selection { background: var(--accent-dim); }

/* ---------- NAV ---------- */
nav {
	position: sticky;
	top: 0;
	width: 100%;
	padding: 18px 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 100;
	background: var(--nav-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--hairline);
}
.nav-brand {
	font-size: 20px;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.5px;
}
.flip-k { display: inline-block; transform: scaleX(-1); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
	color: var(--ink-2);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-dropdown { position: relative; }
.nav-dropdown > a::after {
	content: '';
	display: inline-block;
	width: 4px; height: 4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	margin-left: 6px;
	vertical-align: middle;
	margin-bottom: 2px;
}
.nav-dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	padding-top: 12px;
	min-width: 200px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu-inner {
	background: var(--card);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-sm);
	padding: 8px 0;
	box-shadow: var(--shadow-lift);
	overflow: hidden;
}
.nav-dropdown-menu a {
	display: block;
	padding: 10px 20px;
	font-size: 14px;
	white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--card-hover); }

/* ---------- HERO ---------- */
.hero {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 110px 40px 80px;
}
.hero h1 {
	font-size: clamp(38px, 6vw, 68px);
	font-weight: 700;
	letter-spacing: -2px;
	line-height: 1.08;
	max-width: 760px;
}
.hero .subtitle {
	margin-top: 20px;
	font-size: 18px;
	color: var(--ink-2);
	font-weight: 400;
	max-width: 520px;
}
.hero .app-icon {
	width: 96px;
	height: 96px;
	border-radius: 22px;
	margin-bottom: 28px;
	box-shadow: var(--shadow-lift);
}

/* ---------- PILLS & BADGES ---------- */
.pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 14px;
	border-radius: 50px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}
.pill-live { background: var(--accent-dim); color: var(--accent); }
.pill-live::before {
	content: '';
	width: 6px; height: 6px;
	border-radius: 50%;
	background: currentColor;
}
.pill-soon { background: var(--hairline); color: var(--ink-2); }

/* ---------- BUTTONS ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 28px;
	background: var(--ink);
	color: var(--ground);
	font-weight: 600;
	font-size: 15px;
	border-radius: 50px;
	text-decoration: none;
	transition: transform 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-quiet {
	background: transparent;
	color: var(--ink-2);
	border: 1px solid var(--hairline);
}
.btn-quiet:hover { color: var(--ink); }

.appstore-badge {
	height: 52px;
	transition: transform 0.2s, opacity 0.2s;
}
.appstore-badge:hover { transform: translateY(-2px); opacity: 0.9; }

/* ---------- SECTIONS ---------- */
.section {
	padding: 40px 40px 96px;
	max-width: 1000px;
	margin: 0 auto;
	width: 100%;
}
.section-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--ink-3);
	text-align: center;
	margin-bottom: 40px;
}

/* ---------- APP CARDS (home) ---------- */
.apps-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}
.app-card {
	background: var(--card);
	border: 1px solid var(--hairline);
	border-radius: var(--radius);
	padding: 36px;
	display: flex;
	flex-direction: column;
	gap: 0;
	text-decoration: none;
	color: var(--ink);
	box-shadow: var(--shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	position: relative;
	overflow: hidden;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.app-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--app-accent);
	opacity: 0;
	transition: opacity 0.25s;
}
.app-card:hover::before { opacity: 1; }
.app-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 24px;
}
.app-card-icon {
	width: 72px;
	height: 72px;
	border-radius: 17px;
	box-shadow: var(--shadow);
}
.app-card h3 {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.5px;
}
.app-card .app-tagline {
	font-size: 14px;
	font-weight: 500;
	color: var(--app-accent);
	margin-top: 2px;
	margin-bottom: 14px;
}
.app-card p {
	font-size: 14.5px;
	color: var(--ink-2);
	line-height: 1.65;
	flex: 1;
}
.app-card-footer {
	margin-top: 26px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.app-card .learn-more {
	font-size: 14px;
	font-weight: 600;
	color: var(--app-accent);
}
.app-card .learn-more::after {
	content: ' →';
	transition: margin-left 0.2s;
}
.app-card:hover .learn-more::after { margin-left: 3px; }
.app-card-footer .appstore-badge { height: 40px; }

/* ---------- FEATURE GRID (app pages) ---------- */
.features {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
.feature-card {
	background: var(--card);
	border: 1px solid var(--hairline);
	border-radius: var(--radius);
	padding: 32px;
	box-shadow: var(--shadow);
	transition: background 0.2s;
}
.feature-card:hover { background: var(--card-hover); }
.feature-icon {
	width: 44px;
	height: 44px;
	background: var(--accent-dim);
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}
.feature-icon svg { stroke: var(--accent); }
.feature-card h3 {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 8px;
}
.feature-card p {
	font-size: 14px;
	color: var(--ink-2);
	line-height: 1.6;
}

/* ---------- SCREENSHOTS CAROUSEL ---------- */
.screenshots {
	margin-bottom: 72px;
	position: relative;
	overflow: hidden;
}
.screenshots-track {
	display: flex;
	gap: 20px;
	transition: transform 0.5s ease;
}
.screenshots-track img {
	flex-shrink: 0;
	width: calc((100% - 40px) / 3);
	border-radius: 16px;
	border: 1px solid var(--hairline);
}
.screenshots-nav {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
}
.screenshots-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hairline);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s;
}
.screenshots-dot.active { background: var(--accent); }

/* ---------- DOWNLOAD / CTA ---------- */
.download-section {
	text-align: center;
	padding: 24px 40px 110px;
}

/* ---------- LEGAL / TEXT CONTENT ---------- */
.content {
	max-width: 760px;
	margin: 0 auto;
	padding: 72px 40px 96px;
	width: 100%;
}
.content h2 {
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -1px;
	margin-bottom: 8px;
}
.content .doc-meta {
	font-size: 14px;
	color: var(--ink-3);
	margin-bottom: 40px;
}
.content h3 {
	font-size: 20px;
	font-weight: 600;
	margin-top: 36px;
	margin-bottom: 12px;
	color: var(--accent);
}
.content h4 {
	font-size: 17px;
	font-weight: 600;
	margin-top: 24px;
	margin-bottom: 10px;
}
.content p {
	margin-bottom: 12px;
	font-size: 15px;
	color: var(--ink-2);
}
.content ul, .content ol {
	margin: 0 0 16px 22px;
	color: var(--ink-2);
	font-size: 15px;
}
.content li { margin-bottom: 6px; }
.content a { color: var(--accent); text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content strong { color: var(--ink); }

/* ---------- 404 ---------- */
.notfound {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 80px 40px;
}
.notfound h1 {
	font-size: clamp(64px, 12vw, 120px);
	font-weight: 700;
	letter-spacing: -4px;
	color: var(--ink-3);
	line-height: 1;
}
.notfound p { margin: 16px 0 32px; color: var(--ink-2); font-size: 17px; }

/* ---------- FOOTER ---------- */
footer {
	border-top: 1px solid var(--hairline);
	padding: 36px 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	max-width: 1000px;
	margin: 0 auto;
	width: 100%;
}
.footer-left {
	font-size: 13px;
	color: var(--ink-3);
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
	font-size: 13px;
	color: var(--ink-2);
	text-decoration: none;
	transition: color 0.2s;
}
.footer-links a:hover { color: var(--ink); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
	nav { padding: 14px 20px; }
	.nav-links { gap: 18px; }
	.nav-links a { font-size: 13px; }
	.hero { padding: 80px 24px 60px; }
	.section { padding: 24px 20px 72px; }
	.apps-grid { grid-template-columns: 1fr; }
	.features { grid-template-columns: 1fr; }
	.screenshots-track { gap: 14px; }
	.screenshots-track img { width: calc((100% - 28px) / 2); }
	.content { padding: 56px 24px 72px; }
	.download-section { padding: 16px 24px 80px; }
	footer {
		flex-direction: column;
		text-align: center;
		padding: 32px 24px;
	}
}
