*, *::before, *::after {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #f0eff5;
	overflow-x: hidden;
	scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
	display: none;
}

/* ── Canvas section ── */

.canvas-section {
	position: relative;
	height: 100vh;
	background: #0a0a0f;
	overflow: visible;
	z-index: 1;
}

#web {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
}

.title {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	text-align: center;
	user-select: none;
	z-index: 2;
}

.title h1 {
	margin: 0;
	font-size: clamp(2rem, 7vw, 5rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	color: #f4f4f8;
	text-shadow: 0 0 40px rgba(120, 110, 220, 0.35);
}

.title h2 {
	margin: -1.5rem 0 0;
	font-size: clamp(1.4rem, 5vw, 3rem);
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #f4f4f8;
}

#shiny {
	background-image: linear-gradient(
		135deg,
		#f4f4f8 0%,
		#f4f4f8 30%,
		#dcefff 40%,
		#c3e6ff 45%,
		#ffffff 50%,
		#c3e6ff 55%,
		#dcefff 60%,
		#f4f4f8 70%,
		#f4f4f8 100%
	);
	background-size: 300% 300%;
	background-position: 100% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

#shiny.sweep {
	animation: sheen var(--sweep-dur) linear;
}

@keyframes sheen {
	0%   { background-position: 100% 100%; }
	100% { background-position: 0% 0%; }
}

.title h3 {
	margin: 2.5rem 0 0;
	font-size: clamp(0.9rem, 2.5vw, 1.35rem);
	font-weight: 400;
	letter-spacing: 0.35em;
	text-transform: uppercase;
	color: #f4f4f8;
}

.title h4 {
	margin: 0.7rem 0 0;
	font-size: clamp(0.6rem, 1vw, 0.8rem);
	font-weight: 300;
	letter-spacing: 0.45em;
	text-transform: uppercase;
	color: #f4f4f8;
	transition: opacity 0.4s ease;
}

/* ── Sparkles ── */

#sparkles {
	display: none; /* sparks now rendered on canvas */
}

.spark {
	position: absolute;
	opacity: 0;
	will-change: transform, opacity;
	animation: twinkle var(--dur) cubic-bezier(0.22, 0.7, 0.3, 1) var(--delay) forwards;
}

.spark svg {
	display: block;
	shape-rendering: geometricPrecision;
	filter: blur(0.6px) drop-shadow(0 0 4px rgba(198, 232, 255, 0.6));
}

@keyframes twinkle {
	0%   { opacity: 0;    animation-timing-function: ease-in-out;
	       transform: translate(-50%, -50%) translateY(0)                       scale(0.15); }
	22%  { opacity: 0.75; animation-timing-function: ease-in-out;
	       transform: translate(-50%, -50%) translateY(calc(var(--dy) * 0.22))  scale(1.02); }
	42%  { opacity: 1;    animation-timing-function: ease-in-out;
	       transform: translate(-50%, -50%) translateY(calc(var(--dy) * 0.42))  scale(0.9); }
	64%  { opacity: 0.7;  animation-timing-function: ease-in-out;
	       transform: translate(-50%, -50%) translateY(calc(var(--dy) * 0.64))  scale(0.98); }
	100% { opacity: 0;
	       transform: translate(-50%, -50%) translateY(var(--dy))               scale(0.35); }
}

/* ── Content section ── */

.content-section {
	position: relative;
	background: #f0eff5;
	padding: 14rem 2rem 8rem;
	min-height: 100vh;
}

.content-inner {
	max-width: 820px;
	margin: 0 auto;
}

.content-inner h2 {
	font-size: clamp(1.6rem, 3.5vw, 2.6rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	color: #12111c;
	margin: 0 0 2rem;
}

.content-inner p {
	font-size: 1.05rem;
	line-height: 1.8;
	color: #3d3a52;
	margin: 0 0 1.4rem;
}

.content-inner p:last-child {
	margin: 0;
}

/* ── Lead paragraphs ── */

.content-inner .lead {
	font-size: clamp(1.15rem, 2.2vw, 1.45rem);
	line-height: 1.75;
	color: #12111c;
	margin: 0 0 1rem;
	font-weight: 400;
}

.content-inner .sub-lead {
	font-size: 1rem;
	line-height: 1.8;
	color: #3d3a52;
	margin: 0 0 3rem;
}

/* ── Tooltips ── */

.tip {
	border-bottom: 1px dashed #8b87b8;
	cursor: help;
	position: relative;
	display: inline;
}

.tip::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	background: #12111c;
	color: #e8e7f0;
	font-size: 0.8rem;
	line-height: 1.55;
	font-weight: 400;
	padding: 0.55rem 0.8rem;
	border-radius: 7px;
	white-space: normal;
	width: max-content;
	max-width: 260px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
	z-index: 20;
	box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.tip:hover::after {
	opacity: 1;
}

/* ── Inline code ── */

.content-inner code {
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
	font-size: 0.88em;
	background: rgba(120,110,220,0.1);
	color: #4a3f9f;
	padding: 0.1em 0.35em;
	border-radius: 4px;
}

.codeblock {
	background: #1e1d2b;
	border-radius: 8px;
	padding: 0.9rem 1.2rem;
	margin: 1rem 0;
	overflow-x: auto;
}

.codeblock code {
	background: none;
	color: #b8c4ff;
	font-size: 0.95rem;
	padding: 0;
}

/* ── Capabilities grid ── */

.caps-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin: 1.5rem 0 2.5rem;
}

.cap {
	background: #fff;
	border: 1px solid rgba(120,110,220,0.12);
	border-radius: 10px;
	padding: 1.25rem 1.4rem;
}

.cap--wide {
	grid-column: 1 / -1;
}

.cap h3 {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #6b63b5;
	margin: 0 0 0.55rem;
}

.cap p {
	font-size: 0.95rem;
	line-height: 1.7;
	color: #3d3a52;
	margin: 0;
}

@media (max-width: 520px) {
	.caps-grid { grid-template-columns: 1fr; }
	.cap--wide { grid-column: 1; }
}

/* ── File rules list ── */

.file-rules {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.file-rules li {
	font-size: 0.97rem;
	line-height: 1.7;
	color: #3d3a52;
	padding-left: 1.1rem;
	position: relative;
}

.file-rules li::before {
	content: '–';
	position: absolute;
	left: 0;
	color: #8b87b8;
}

/* ── Getting started steps ── */

.steps {
	list-style: none;
	counter-reset: steps;
	padding: 0;
	margin: 1.5rem 0 0;
}

.steps > li {
	counter-increment: steps;
	position: relative;
	padding: 0 0 2.5rem 3.2rem;
	border-left: 2px solid rgba(120,110,220,0.18);
}

.steps > li:last-child {
	border-left-color: transparent;
	padding-bottom: 0;
}

.steps > li::before {
	content: counter(steps);
	position: absolute;
	left: -1.05rem;
	top: 0;
	width: 2.1rem;
	height: 2.1rem;
	background: #f0eff5;
	border: 2px solid rgba(120,110,220,0.35);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: 700;
	color: #6b63b5;
	line-height: 1;
}

.steps > li > strong {
	display: block;
	font-size: 1.05rem;
	font-weight: 600;
	color: #12111c;
	margin-bottom: 0.55rem;
}

.steps > li > p {
	font-size: 0.97rem;
	line-height: 1.75;
	color: #3d3a52;
	margin: 0 0 0.6rem;
}

.steps > li > p:last-child { margin-bottom: 0; }

.path {
	display: inline-block;
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
	font-size: 0.85rem;
	color: #4a3f9f;
	background: rgba(120,110,220,0.08);
	padding: 0.35rem 0.75rem;
	border-radius: 6px;
	margin: 0.25rem 0 0.6rem;
}

/* Sub-steps */

.substeps {
	list-style: decimal;
	padding-left: 1.4rem;
	margin: 0.5rem 0 0.75rem;
}

.substeps li {
	font-size: 0.95rem;
	line-height: 1.7;
	color: #3d3a52;
	margin-bottom: 0.3rem;
}

/* Outcome list (verify section) */

.outcomes {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.outcomes li {
	padding: 0.65rem 1rem;
	border-radius: 7px;
	font-size: 0.95rem;
	line-height: 1.6;
}

.outcomes li.ok   { background: rgba(60,180,100,0.1);  color: #1e5c35; }
.outcomes li.warn { background: rgba(220,60,60,0.09);  color: #7a1c1c; }

/* ── Links ── */

.content-inner a {
	color: #5a52a8;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.content-inner a:hover { color: #3d3685; }

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
	.spark { display: none; }
	#shiny { color: #f4f4f8; -webkit-text-fill-color: #f4f4f8; }
	#shiny.sweep { animation: none; }
}
