/* Design: Liquid Glass theme — ambient gradients, frosted glass surfaces,
   specular edge highlights, refined iOS typography. */

:root {
	--bg: #f4f1ec;
	--bg-tint-1: rgba(255, 138, 76, 0.28);
	--bg-tint-2: rgba(94, 92, 230, 0.26);
	--bg-tint-3: rgba(48, 209, 88, 0.22);
	--bg-tint-4: rgba(10, 132, 255, 0.22);

	--text: #1d1d1f;
	--text-secondary: #4a4a52;
	--text-muted: #6e6e78;

	--glass-bg: rgba(255, 255, 255, 0.55);
	--glass-bg-strong: rgba(255, 255, 255, 0.72);
	--glass-bg-soft: rgba(255, 255, 255, 0.38);
	--glass-border: rgba(255, 255, 255, 0.55);
	--glass-edge: rgba(255, 255, 255, 0.85);
	--glass-shadow: 0 10px 40px rgba(20, 22, 40, 0.10), 0 2px 8px rgba(20, 22, 40, 0.06);
	--glass-shadow-lg: 0 24px 70px rgba(20, 22, 40, 0.18), 0 4px 14px rgba(20, 22, 40, 0.08);

	--card-bg: var(--glass-bg);
	--card-shadow: var(--glass-shadow);
	--card-hover-shadow: var(--glass-shadow-lg);

	--accent: #0a84ff;
	--accent-2: #5e5ce6;
	--accent-gradient: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 50%, #bf5af2 100%);

	--badge-mac: #1d1d1f;
	--badge-ios: #0a84ff;

	--radius: 26px;
	--radius-sm: 16px;
	--radius-pill: 999px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #05060a;
		--bg-tint-1: rgba(255, 110, 64, 0.28);
		--bg-tint-2: rgba(94, 92, 230, 0.32);
		--bg-tint-3: rgba(48, 209, 88, 0.20);
		--bg-tint-4: rgba(10, 132, 255, 0.30);

		--text: #f5f5f7;
		--text-secondary: #c7c7cf;
		--text-muted: #8e8e98;

		--glass-bg: rgba(28, 28, 34, 0.50);
		--glass-bg-strong: rgba(28, 28, 34, 0.72);
		--glass-bg-soft: rgba(28, 28, 34, 0.32);
		--glass-border: rgba(255, 255, 255, 0.14);
		--glass-edge: rgba(255, 255, 255, 0.22);
		--glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
		--glass-shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.6), 0 4px 14px rgba(0, 0, 0, 0.4);

		--badge-mac: #f5f5f7;
		--badge-ios: #0a84ff;
	}
}

html, body { min-height: 100%; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	position: relative;
	overflow-x: hidden;
}

/* Ambient aurora — soft animated gradient blobs behind all content */
body::before {
	content: "";
	position: fixed;
	inset: -20vmax;
	z-index: -2;
	background:
		radial-gradient(38vmax 38vmax at 12% 10%, var(--bg-tint-1), transparent 60%),
		radial-gradient(42vmax 42vmax at 88% 18%, var(--bg-tint-2), transparent 62%),
		radial-gradient(36vmax 36vmax at 20% 92%, var(--bg-tint-3), transparent 60%),
		radial-gradient(44vmax 44vmax at 82% 88%, var(--bg-tint-4), transparent 62%);
	filter: blur(40px) saturate(1.1);
	animation: aurora 24s ease-in-out infinite alternate;
	pointer-events: none;
}

body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image:
		radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px);
	background-size: 3px 3px;
	mix-blend-mode: overlay;
	opacity: 0.20;
	pointer-events: none;
}

@media (prefers-color-scheme: dark) {
	body::after {
		background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
		opacity: 0.35;
	}
}

@keyframes aurora {
	0%   { transform: translate3d(0, 0, 0) scale(1); }
	50%  { transform: translate3d(-2vmax, 1vmax, 0) scale(1.06); }
	100% { transform: translate3d(2vmax, -1vmax, 0) scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
	body::before { animation: none; }
}

/* Hero */
.hero-icon {
	border-radius: 22px;
	box-shadow: 0 14px 40px rgba(20, 22, 40, 0.18), inset 0 1px 0 rgba(255,255,255,0.6);
}

.hero h1 {
	font-size: 64px;
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1.05;
	background: linear-gradient(180deg, var(--text) 0%, color-mix(in srgb, var(--text) 72%, transparent) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero p {
	font-size: 21px;
	font-weight: 400;
	color: var(--text-secondary);
	line-height: 1.5;
}

/* Liquid glass card */
.card {
	position: relative;
	background: var(--glass-bg);
	backdrop-filter: blur(30px) saturate(1.6);
	-webkit-backdrop-filter: blur(30px) saturate(1.6);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius);
	box-shadow:
		var(--glass-shadow),
		inset 0 1px 0 var(--glass-edge),
		inset 0 -1px 0 rgba(255,255,255,0.08);
	transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.35s ease, background 0.35s ease;
	overflow: hidden;
	isolation: isolate;
}

.card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(140deg, rgba(255,255,255,0.85), rgba(255,255,255,0.05) 40%, rgba(255,255,255,0) 70%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	        mask-composite: exclude;
	pointer-events: none;
	opacity: 0.9;
}

.card::after {
	content: "";
	position: absolute;
	top: -40%;
	left: -10%;
	width: 60%;
	height: 80%;
	background: radial-gradient(ellipse at center, rgba(255,255,255,0.28), transparent 60%);
	transform: rotate(-14deg);
	pointer-events: none;
	z-index: -1;
}

@media (prefers-color-scheme: dark) {
	.card::after {
		background: radial-gradient(ellipse at center, rgba(255,255,255,0.10), transparent 60%);
	}
}

.card:hover {
	transform: translateY(-6px);
	box-shadow:
		var(--glass-shadow-lg),
		inset 0 1px 0 var(--glass-edge),
		inset 0 -1px 0 rgba(255,255,255,0.08);
	background: var(--glass-bg-strong);
}

/* App icon tile */
.card-icon {
	border-radius: 16px;
	font-size: 26px;
	overflow: hidden;
	box-shadow: 0 10px 24px rgba(20,22,40,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}

.card-icon img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.card-icon.json-xml { background: linear-gradient(135deg, #5e5ce6, #bf5af2); }
.card-icon.reel-brand { background: linear-gradient(135deg, #ff375f, #ff6482); }
.card-icon.prax { background: linear-gradient(135deg, #30d158, #34c759); }

.card h2 {
	font-size: 28px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.card h2 a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

.card h2 a:hover {
	color: var(--accent);
}

.card .description {
	font-size: 17px;
	color: var(--text-secondary);
	line-height: 1.5;
}

/* Glass pill badges */
.badge {
	font-size: 12px;
	font-weight: 600;
	border-radius: var(--radius-pill);
	letter-spacing: 0.02em;
	padding: 5px 12px;
	backdrop-filter: blur(16px) saturate(1.4);
	-webkit-backdrop-filter: blur(16px) saturate(1.4);
	background: rgba(255,255,255,0.45);
	border: 1px solid rgba(255,255,255,0.6);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 6px rgba(20,22,40,0.08);
}

@media (prefers-color-scheme: dark) {
	.badge {
		background: rgba(255,255,255,0.08);
		border-color: rgba(255,255,255,0.18);
		box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 6px rgba(0,0,0,0.3);
	}
}

.badge.macos { color: var(--badge-mac); }
.badge.ios { color: var(--badge-ios); }

.app-store-badge {
	display: inline-block;
	transition: transform 0.25s ease, filter 0.25s ease;
}

.app-store-badge:hover {
	transform: translateY(-1px);
	filter: drop-shadow(0 8px 20px rgba(20,22,40,0.25));
}

.app-store-badge img {
	display: block;
	border-radius: 9px;
	cursor: pointer;
}

/* Footer */
.footer {
	color: var(--text-secondary);
	font-size: 14px;
	border-top: 1px solid rgba(255,255,255,0.30);
}

@media (prefers-color-scheme: dark) {
	.footer { border-top-color: rgba(255,255,255,0.08); }
}

.footer-section h3 {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text);
}

.footer-section p {
	line-height: 1.5;
}

.footer a {
	color: var(--accent);
	text-decoration: none;
}

.footer a:hover {
	text-decoration: underline;
}

.copyright {
	font-size: 13px;
	color: var(--text-muted);
}

.footer-apps p {
	display: flex;
	align-items: center;
	gap: 8px;
}

.soon-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-secondary);
	background: rgba(255,255,255,0.45);
	border: 1px solid rgba(255,255,255,0.35);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

@media (prefers-color-scheme: dark) {
	.soon-badge {
		background: rgba(255,255,255,0.08);
		border-color: rgba(255,255,255,0.16);
		box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
	}
}

/* Simple pages (Privacy, Support, Prax) */
.simple-page-hero {
	padding-bottom: 48px;
}

.simple-card {
	position: relative;
	background: var(--glass-bg);
	backdrop-filter: blur(30px) saturate(1.6);
	-webkit-backdrop-filter: blur(30px) saturate(1.6);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius);
	padding: 32px;
	box-shadow:
		var(--glass-shadow),
		inset 0 1px 0 var(--glass-edge);
	overflow: hidden;
	isolation: isolate;
}

.simple-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(140deg, rgba(255,255,255,0.75), rgba(255,255,255,0.05) 45%, rgba(255,255,255,0) 75%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	        mask-composite: exclude;
	pointer-events: none;
}

.simple-card h2 {
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-bottom: 12px;
}

.simple-card p {
	font-size: 17px;
	color: var(--text-secondary);
	line-height: 1.6;
}

.simple-card p + p {
	margin-top: 12px;
}

.simple-card a {
	color: var(--accent);
	text-decoration: none;
}

.simple-card a:hover {
	text-decoration: underline;
}

/* FAQ List Enhancement */
.faq-list {
	margin-top: 2rem;
}

.faq-item {
	padding-block: 1.5rem;
	border-top: 1px solid var(--glass-border);
}

.faq-item:first-child {
	padding-top: 0;
	border-top: none;
}

.faq-item h3 {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 0.75rem;
	color: var(--text);
	letter-spacing: -0.01em;
}

.faq-item p {
	font-size: 17px !important;
	color: var(--text-secondary);
	line-height: 1.6;
	margin-top: 0 !important;
}

.simple-page-footer {
	padding-top: 0;
}

@media (max-width: 600px) {
	.hero h1 { font-size: 40px; }
	.hero p { font-size: 17px; }
}

/* Accessibility — focus indicators, reduced motion, anchored sections */

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

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.card:focus-within {
	box-shadow: 0 0 0 3px var(--accent), var(--card-hover-shadow);
}

.card h2 a:focus-visible {
	outline: none;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.app-store-badge:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
	border-radius: 8px;
}

.footer a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

select:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

[id] { scroll-margin-top: 92px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
	.card:hover { transform: none; }
	.button:hover, .button:active { transform: none; }
}
