/* cursedalchemy.com — hand-written landing styles. No framework, no external
 * fonts (system stack), no external requests.
 *
 * The look (2026-07-31 redesign, owner prompt fix-saas-home-page part-2):
 * "dark-mode aurora tech" — a deep #0b0f19 canvas backlit by blurred aurora
 * glows, glassmorphic cards with 1px translucent edges, and a violet→cyan
 * accent gradient. Emerald stays as the product's "verified / live" semantic
 * color. The page is deliberately dark in BOTH color schemes.
 *
 * Every decorative layer has a pure-CSS base; generated art (site/assets/
 * aurora-*.webp, iso-modules.png) enriches it when present — see DECOR_ASSETS
 * in build.ts. Scroll-reveal styles apply ONLY under html.js, so a JS-disabled
 * visitor (and any crawler) sees the complete page with nothing hidden. */

:root {
	--ink: #0b0f19;
	--ink-deep: #070a12;
	--ink-raised: #0e1424;
	--glass: rgb(148 163 184 / 0.055);
	--glass-strong: rgb(148 163 184 / 0.1);
	--edge: rgb(148 163 184 / 0.16);
	--edge-soft: rgb(148 163 184 / 0.09);
	--text: #f1f5f9;
	--text-muted: #9aa8bf;
	--text-faint: #64748b;
	--cyan: #22d3ee;
	--violet: #8b5cf6;
	--magenta: #e879f9;
	--emerald: #34d399;
	--accent-gradient: linear-gradient(135deg, #22d3ee, #8b5cf6 55%, #e879f9);
	--radius: 14px;
	--radius-lg: 20px;
	--shadow: 0 18px 50px rgb(0 0 0 / 0.5);
	--shadow-soft: 0 10px 30px rgb(0 0 0 / 0.35);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--ink);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--cyan);
}

::selection {
	background: rgb(139 92 246 / 0.45);
	color: #ffffff;
}

.shell {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1.25rem;
	position: relative;
}

.shell--narrow {
	max-width: 48rem;
}

/* ---- the aurora sky (fixed backdrop behind everything) ---- */

.sky {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	background:
		radial-gradient(ellipse 120% 65% at 50% -12%, rgb(139 92 246 / 0.16), transparent 60%),
		var(--ink);
}

/* Generated aurora art (optional, dropped in by the ComfyUI pipeline). It sits
 * under the CSS blobs and fades out well before mid-page. */
.sky__image {
	position: absolute;
	inset: 0 0 auto;
	height: min(115vh, 1100px);
	background-size: cover;
	background-position: center top;
	opacity: 0.5;
	mix-blend-mode: screen;
	-webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 98%);
	mask-image: linear-gradient(180deg, #000 55%, transparent 98%);
}

.sky__blob {
	position: absolute;
	border-radius: 999px;
	filter: blur(90px);
	will-change: transform;
	mix-blend-mode: screen;
}

.sky__blob--a {
	width: 55vw;
	height: 55vw;
	min-width: 540px;
	min-height: 540px;
	left: -12vw;
	top: -18vw;
	background: radial-gradient(circle at 35% 35%, rgb(34 211 238 / 0.34), rgb(34 211 238 / 0) 62%);
	animation: drift-a 46s ease-in-out infinite alternate;
}

.sky__blob--b {
	width: 48vw;
	height: 48vw;
	min-width: 480px;
	min-height: 480px;
	right: -14vw;
	top: -10vw;
	background: radial-gradient(circle at 60% 40%, rgb(139 92 246 / 0.36), rgb(139 92 246 / 0) 64%);
	animation: drift-b 58s ease-in-out infinite alternate;
}

.sky__blob--c {
	width: 38vw;
	height: 38vw;
	min-width: 420px;
	min-height: 420px;
	left: 30vw;
	top: 22vh;
	background: radial-gradient(circle at 50% 50%, rgb(232 121 249 / 0.17), rgb(232 121 249 / 0) 62%);
	animation: drift-c 70s ease-in-out infinite alternate;
}

@keyframes drift-a {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to { transform: translate3d(7vw, 5vh, 0) scale(1.12); }
}

@keyframes drift-b {
	from { transform: translate3d(0, 0, 0) scale(1.08); }
	to { transform: translate3d(-6vw, 7vh, 0) scale(0.96); }
}

@keyframes drift-c {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(9vw, -4vh, 0); }
}

/* Fine grain so the big soft gradients never band. Inline SVG noise — still
 * zero external requests. */
body::after {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	pointer-events: none;
	opacity: 0.05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---- shared glass primitives ---- */

.glass-card {
	background: var(--glass);
	border: 1px solid var(--edge-soft);
	border-radius: var(--radius-lg);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: var(--shadow-soft);
}

.glass-frame {
	position: relative;
	padding: 0.6rem;
	background: var(--glass);
	border: 1px solid var(--edge);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
}

.glass-frame img {
	border-radius: calc(var(--radius-lg) - 0.55rem);
	border: 1px solid rgb(148 163 184 / 0.12);
}

/* Ambient light bleeding out from behind each framed shot. */
.glass-frame::before {
	content: '';
	position: absolute;
	inset: -2.2rem;
	z-index: -1;
	border-radius: 50%;
	background:
		radial-gradient(ellipse 60% 55% at 30% 25%, rgb(34 211 238 / 0.16), transparent 70%),
		radial-gradient(ellipse 60% 55% at 75% 75%, rgb(139 92 246 / 0.18), transparent 70%);
	filter: blur(26px);
}

/* Kicker chips — the small glowing section tags. */
.kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.9rem;
	padding: 0.32rem 0.85rem;
	border-radius: 999px;
	background: rgb(11 15 25 / 0.55);
	border: 1px solid var(--edge);
	color: var(--cyan);
	font-weight: 600;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.kicker__dot {
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--cyan);
	box-shadow: 0 0 10px 1px rgb(34 211 238 / 0.85);
	animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.55; transform: scale(0.82); }
}

/* ---- header ---- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: transparent;
	border-bottom: 1px solid transparent;
	transition: background-color 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header--scrolled {
	background: rgb(11 15 25 / 0.72);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom-color: var(--edge-soft);
}

.site-header__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1rem;
	padding-bottom: 1rem;
	transition: padding 220ms ease;
}

.site-header--scrolled .site-header__row {
	padding-top: 0.55rem;
	padding-bottom: 0.55rem;
}

.brand {
	font-weight: 700;
	font-size: 1.08rem;
	letter-spacing: 0.01em;
	background: linear-gradient(90deg, #f8fafc, #a5f3fc);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.btn {
	display: inline-block;
	padding: 0.5rem 1.15rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.btn--ghost {
	color: var(--text);
	border: 1px solid var(--edge);
	background: rgb(148 163 184 / 0.06);
}

.btn--ghost:hover {
	border-color: rgb(34 211 238 / 0.65);
	color: #ffffff;
	box-shadow: 0 0 18px rgb(34 211 238 / 0.25);
}

/* ---- hero ---- */

.hero {
	padding: 5.5rem 0 5rem;
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 3.5rem;
	align-items: center;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 1.1rem;
	padding: 0.38rem 0.95rem;
	border-radius: 999px;
	border: 1px solid rgb(52 211 153 / 0.35);
	background: rgb(52 211 153 / 0.07);
	color: var(--emerald);
	font-weight: 600;
	font-size: 0.82rem;
	letter-spacing: 0.01em;
}

.eyebrow__dot {
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--emerald);
	box-shadow: 0 0 10px 1px rgb(52 211 153 / 0.9);
	animation: pulse 2.4s ease-in-out infinite;
	flex: none;
}

.hero h1 {
	margin: 0 0 1.1rem;
	font-size: clamp(2.3rem, 5vw, 3.6rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
	font-weight: 800;
	background: linear-gradient(180deg, #ffffff 30%, #b7c5e4 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.hero__subtitle {
	margin: 0 0 1.7rem;
	color: var(--text-muted);
	font-size: 1.12rem;
	max-width: 36rem;
}

.hero__cta {
	display: inline-block;
	margin: 0;
	padding: 0.78rem 1.6rem;
	border-radius: 999px;
	background:
		linear-gradient(rgb(11 15 25 / 0.35), rgb(11 15 25 / 0.35)),
		var(--accent-gradient);
	color: #ffffff;
	font-weight: 700;
	font-size: 1rem;
	border: 1px solid rgb(165 243 252 / 0.35);
	box-shadow: 0 0 28px rgb(139 92 246 / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.25);
	animation: cta-glow 3.2s ease-in-out infinite;
}

@keyframes cta-glow {
	0%, 100% { box-shadow: 0 0 22px rgb(139 92 246 / 0.35), inset 0 1px 0 rgb(255 255 255 / 0.25); }
	50% { box-shadow: 0 0 38px rgb(34 211 238 / 0.5), inset 0 1px 0 rgb(255 255 255 / 0.25); }
}

.hero__shot {
	margin: 0;
}

.feature__shot {
	margin: 0;
}

/* ---- sections ---- */

.section {
	padding: 4.5rem 0;
	position: relative;
}

.section__backdrop {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.35;
	mix-blend-mode: screen;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
	mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.section__backdrop--ribbon {
	opacity: 0.28;
}

.section__heading {
	margin: 0 0 1rem;
	font-size: clamp(1.7rem, 3.2vw, 2.4rem);
	letter-spacing: -0.02em;
	font-weight: 750;
	background: linear-gradient(180deg, #ffffff 30%, #c3cfeb 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.section__heading--tight {
	margin-bottom: 0.75rem;
}

/* ---- features ---- */

.features__stack {
	display: grid;
	gap: 2.25rem;
}

.feature {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	gap: 2.75rem;
	align-items: center;
	padding: 2.4rem 2.6rem;
	transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.feature:hover {
	transform: translateY(-4px);
	border-color: var(--edge);
	box-shadow: var(--shadow);
}

.feature--reverse .feature__text {
	order: 2;
}

.feature h3 {
	margin: 0 0 0.7rem;
	font-size: 1.55rem;
	letter-spacing: -0.015em;
	line-height: 1.2;
	color: #ffffff;
}

.feature__body {
	margin: 0;
	color: var(--text-muted);
	font-size: 1.02rem;
}

/* ---- modules band (Batteries included) ---- */

.modules__head {
	max-width: 44rem;
}

.modules__body {
	margin: 0 0 2.5rem;
	color: var(--text-muted);
	font-size: 1.05rem;
}

/* Generated isometric art: rendered on solid black, so screen-blending drops
 * the background without any alpha post-processing. */
.modules__art {
	width: 100%;
	aspect-ratio: 21 / 9;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	mix-blend-mode: screen;
	filter: drop-shadow(0 0 34px rgb(139 92 246 / 0.3));
}

/* Pure-CSS fallback: floating glass module tiles in isometric space. */
.iso-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 21 / 9;
	min-height: 240px;
}

.iso {
	position: absolute;
	left: var(--ix);
	top: var(--iy);
	width: calc(7.2rem * var(--is));
	height: calc(7.2rem * var(--is));
	transform: rotateX(58deg) rotateZ(45deg);
	transform-style: preserve-3d;
	border-radius: 18%;
	background: linear-gradient(135deg, rgb(148 163 184 / 0.16), rgb(148 163 184 / 0.05) 60%);
	border: 1px solid rgb(255 255 255 / 0.22);
	box-shadow:
		0 0 0 1px rgb(255 255 255 / 0.05) inset,
		0 26px 48px rgb(0 0 0 / 0.5);
	animation: iso-float 7s ease-in-out infinite;
}

/* The glowing light core inside each tile. */
.iso::after {
	content: '';
	position: absolute;
	inset: 22%;
	border-radius: 24%;
	background: radial-gradient(circle at 50% 45%, var(--iso-glow, #22d3ee), transparent 72%);
	filter: blur(7px);
	opacity: 0.95;
}

/* The soft pool of light each tile casts on the canvas. */
.iso::before {
	content: '';
	position: absolute;
	inset: -34%;
	border-radius: 50%;
	background: radial-gradient(circle, var(--iso-glow, #22d3ee), transparent 68%);
	opacity: 0.22;
	filter: blur(20px);
}

.iso--cyan { --iso-glow: #22d3ee; animation-delay: 0s; }
.iso--violet { --iso-glow: #8b5cf6; animation-delay: -1.2s; }
.iso--magenta { --iso-glow: #e879f9; animation-delay: -2.4s; }
.iso--emerald { --iso-glow: #34d399; animation-delay: -3.6s; }
.iso--sky { --iso-glow: #38bdf8; animation-delay: -4.8s; }
.iso--amber { --iso-glow: #fbbf24; animation-delay: -6s; }

@keyframes iso-float {
	0%, 100% { margin-top: 0; }
	50% { margin-top: -14px; }
}

/* Fibre-optic connecting lines between the tiles — an SVG tracing tile
 * centers, with a slow marching-dash "data flow" shimmer. */
.iso-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 0 5px rgb(34 211 238 / 0.55));
}

.iso-svg path {
	fill: none;
	stroke: url(#isoWire);
	stroke-width: 1.5;
	vector-effect: non-scaling-stroke;
	opacity: 0.7;
	stroke-dasharray: 6 5;
	animation: link-flow 3.2s linear infinite;
}

.iso-svg path:nth-child(odd) {
	animation-delay: -1.6s;
}

@keyframes link-flow {
	from { stroke-dashoffset: 44; }
	to { stroke-dashoffset: 0; }
}

/* ---- plans ---- */

.section--plans {
	background:
		radial-gradient(ellipse 90% 70% at 50% 15%, rgb(139 92 246 / 0.1), transparent 65%),
		var(--ink-raised);
	border-top: 1px solid var(--edge-soft);
	border-bottom: 1px solid var(--edge-soft);
}

.plans__note {
	margin: 0 0 2.25rem;
	color: var(--text-muted);
	max-width: 42rem;
}

.plans__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	align-items: stretch;
}

.plan {
	position: relative;
	background: rgb(11 15 25 / 0.55);
	border: 1px solid var(--edge-soft);
	border-radius: var(--radius-lg);
	padding: 1.9rem 1.7rem;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.plan:hover {
	transform: translateY(-6px);
	border-color: var(--edge);
	box-shadow: var(--shadow);
}

/* Featured tier: a glowing gradient border via a masked overlay, so the glow
 * hugs the rounded corners exactly. */
.plan--featured {
	background: rgb(14 20 36 / 0.8);
	box-shadow: 0 0 34px rgb(139 92 246 / 0.22), var(--shadow-soft);
}

.plan--featured::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1.5px;
	background: var(--accent-gradient);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	pointer-events: none;
}

.plan--featured:hover {
	box-shadow: 0 0 48px rgb(34 211 238 / 0.3), var(--shadow);
}

.plan h3 {
	margin: 0 0 0.25rem;
	font-size: 1.18rem;
	color: #ffffff;
}

.plan__price {
	margin: 0 0 0.9rem;
	font-size: 1.55rem;
	font-weight: 750;
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.plan__body {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.98rem;
	/* Plan copy is a newline-separated bullet list ("• …\n• …"). The value is a
	   single copy key whose overrides land via textContent, so the line breaks
	   must survive as text rather than markup. */
	white-space: pre-line;
}

/* ---- about / footer ---- */

.about {
	padding: 2.5rem 2.75rem;
}

.about__body {
	margin: 0;
	color: var(--text-muted);
	font-size: 1.05rem;
}

.site-footer {
	background: var(--ink-deep);
	border-top: 1px solid var(--edge-soft);
	padding: 2rem 0;
	color: var(--text-faint);
	font-size: 0.92rem;
}

.site-footer__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.site-footer__link {
	color: var(--text-muted);
	text-decoration: none;
}

.site-footer__link:hover {
	color: var(--cyan);
}

/* ---- scroll reveal (progressive: html.js only) ---- */

.js .reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 640ms ease, transform 640ms cubic-bezier(0.2, 0.65, 0.25, 1);
}

.js .reveal.in {
	opacity: 1;
	transform: none;
}

.js .features__stack .feature:nth-child(2).reveal {
	transition-delay: 60ms;
}

.js .features__stack .feature:nth-child(3).reveal {
	transition-delay: 120ms;
}

/* ---- motion & accessibility ---- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.sky__blob,
	.kicker__dot,
	.eyebrow__dot,
	.hero__cta,
	.iso,
	.iso-svg path {
		animation: none;
	}

	.js .reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.feature:hover,
	.plan:hover {
		transform: none;
	}
}

/* ---- responsive ---- */

@media (max-width: 860px) {
	.hero {
		padding: 3.25rem 0 3rem;
	}

	.hero__grid,
	.feature {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.9rem;
	}

	.feature {
		padding: 1.6rem 1.4rem;
	}

	.feature--reverse .feature__text {
		order: 0;
	}

	.plans__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.section {
		padding: 3rem 0;
	}

	.about {
		padding: 1.8rem 1.5rem;
	}

	.iso-stage {
		aspect-ratio: 16 / 10;
	}

	.iso {
		width: calc(5rem * var(--is));
		height: calc(5rem * var(--is));
	}

	.eyebrow,
	.kicker {
		border-radius: 14px;
	}
}
