/**
 * Home-only styles — preloader, cursor, hero decor, callouts.
 * Loaded only on the front page.
 *
 * @package Chelure_Enterprise
 */

/* =========================================================================
 * KEYFRAMES
 * ====================================================================== */
@keyframes ce-float1 { 0%,100% { transform: translate(0,0) scale(1); }    50% { transform: translate(40px,-60px) scale(1.1); } }
@keyframes ce-float2 { 0%,100% { transform: translate(0,0) scale(1); }    50% { transform: translate(-50px,50px) scale(1.15); } }
@keyframes ce-float3 { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(30px,30px) rotate(20deg); } }
@keyframes ce-spin   { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ce-grid-pan { from { background-position: 0 0; } to { background-position: 60px 60px; } }
@keyframes ce-pop-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ce-loader-bar { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes ce-rise { from { transform: translateY(0); opacity: 0; } 10%,90% { opacity: .7; } to { transform: translateY(-100vh); opacity: 0; } }

/* =========================================================================
 * PRELOADER
 * ====================================================================== */
.ce-preloader {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: var(--ce-bg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	opacity: 1;
	transition: opacity .5s ease;
	pointer-events: none;
}

.ce-preloader[hidden] { display: none; }
.ce-preloader.is-done { opacity: 0; }

.ce-preloader__logo {
	height: 90px;
	width: auto;
	animation: ce-pop-in .8s var(--ce-ease) both;
}

.ce-preloader__bar {
	width: 180px;
	height: 2px;
	border-radius: 2px;
	background: var(--ce-surface-3);
	overflow: hidden;
}

.ce-preloader__bar span {
	display: block;
	height: 100%;
	width: 100%;
	background: var(--ce-gradient-90);
	animation: ce-loader-bar 1.2s var(--ce-ease) both;
}

/* =========================================================================
 * CUSTOM CURSOR
 *
 * Only activates when home.js adds .ce-has-cursor to <html>, which requires a
 * fine pointer, hover capability and no reduced-motion preference. Without
 * that class the native cursor is untouched — which is the fallback if JS
 * fails entirely.
 * ====================================================================== */
.ce-cursor { display: none; }

.ce-has-cursor .ce-cursor {
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	mix-blend-mode: difference;
	pointer-events: none;
	z-index: 9999;
	transform: translate(-50%, -50%);
	will-change: transform;
	transition: width .2s var(--ce-ease), height .2s var(--ce-ease), background .2s var(--ce-ease);
}

.ce-has-cursor .ce-cursor.is-hovering {
	width: 42px;
	height: 42px;
	background: rgba(236, 30, 156, .55);
	mix-blend-mode: normal;
}

/* Hide the native cursor ONLY when ours is confirmed active. */
.ce-has-cursor.ce-home,
.ce-has-cursor.ce-home a,
.ce-has-cursor.ce-home button { cursor: none; }

/* Keyboard users get the native cursor back the moment they tab. */
.ce-has-cursor.ce-kbd,
.ce-has-cursor.ce-kbd a,
.ce-has-cursor.ce-kbd button { cursor: auto; }
.ce-has-cursor.ce-kbd .ce-cursor { display: none; }

/* =========================================================================
 * HERO
 * ====================================================================== */
.ce-hero {
	position: relative;
	padding-block: calc(var(--ce-nav-h) + 72px) var(--ce-section-y);
	overflow: hidden;
	isolation: isolate;
}

/* The design's hero is full-bleed with 60px gutters — capping it at the
   1280px container squeezed the headline onto a third line. */
.ce-hero .ce-hero__inner {
	max-width: none;
	padding-inline: var(--ce-nav-pad-x);
}

.ce-hero__inner {
	display: grid;
	grid-template-columns: 1.15fr .85fr;   /* design ratio */
	gap: 60px;
	align-items: center;
	min-height: 840px;
	position: relative;
	z-index: 2;
}

/* Design hero padding: 170px top, 120px bottom. */
.ce-hero { padding-block: 170px 120px; }

/* --- Decorative layer ---------------------------------------------------- */
.ce-hero__decor {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.ce-hero__aurora {
	position: absolute;
	top: -260px;
	left: -260px;
	width: 900px;
	height: 900px;
	background: conic-gradient(
		from 0deg,
		rgba(123, 47, 247, .5),
		rgba(236, 30, 156, .45),
		rgba(160, 91, 255, .4),
		rgba(123, 47, 247, .5)
	);
	filter: blur(90px);
	animation: ce-spin 40s linear infinite;
	opacity: 1;
}

/* The aurora is tuned for the dark ground; dial it back on light. */
:root:not([data-theme="dark"]) .ce-hero__aurora { opacity: .45; }

.ce-hero__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--ce-grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--ce-grid-line) 1px, transparent 1px);
	background-size: 60px 60px;
	animation: ce-grid-pan 6s linear infinite;
	-webkit-mask-image: radial-gradient(ellipse 900px 600px at 30% 30%, #000, transparent);
	mask-image: radial-gradient(ellipse 900px 600px at 30% 30%, #000, transparent);
}

.ce-blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .5;
}

.ce-blob--1 { width: 380px; height: 380px; top: -80px;  left: -60px;  background: var(--ce-violet);  animation: ce-float1 18s ease-in-out infinite; }
.ce-blob--2 { width: 300px; height: 300px; bottom: -60px; right: 8%;   background: var(--ce-magenta); animation: ce-float2 22s ease-in-out infinite; }
.ce-blob--3 { width: 220px; height: 220px; top: 40%;     right: -40px; background: var(--ce-violet);  animation: ce-float3 26s ease-in-out infinite; }

.ce-hero__stage {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(1000px, 84vw);
	height: min(1000px, 84vw);
	transform: translate(-50%, -50%);
	z-index: 1;
	pointer-events: none;
	will-change: transform;
}

.ce-hero__spin {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: ce-cspin 28s linear infinite;
}

.ce-hero__mark {
	width: 85%;
	height: 85%;
	max-width: none;
	object-fit: contain;
	opacity: .5;
	filter: drop-shadow(0 0 70px rgba(236, 30, 156, .55));
	user-select: none;
}

/* Restrained on light, where .5 over a pale ground reads as muddy. */
:root:not([data-theme="dark"]) .ce-hero__mark { opacity: .2; }

@media (prefers-reduced-motion: reduce) {
	.ce-hero__spin { animation: none; }
}

.ce-particles { position: absolute; inset: 0; }

.ce-particle {
	position: absolute;
	bottom: -10px;
	border-radius: 50%;
	background: var(--ce-gradient);
	opacity: 0;
	animation: ce-rise linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.ce-hero__aurora,
	.ce-hero__grid,
	.ce-hero__mark,
	.ce-blob,
	.ce-particle { animation: none; }
	.ce-particles { display: none; }
}

/* --- Hero copy ----------------------------------------------------------- */
.ce-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	border-radius: var(--ce-radius-pill);
	border: 1px solid var(--ce-border-2);
	background: var(--ce-surface-3);
	color: var(--ce-muted);
	font-size: var(--ce-fs-xs);
	font-weight: var(--ce-fw-medium);
	margin-bottom: 28px;
}

.ce-hero__badge-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ce-magenta);
	box-shadow: 0 0 0 4px rgba(236, 30, 156, .18);
}

.ce-hero__title {
	font-size: var(--ce-fs-h1);
	letter-spacing: var(--ce-ls-h1);
	line-height: var(--ce-lh-tight);
	margin: 0 0 24px;
}

.ce-hero__line { display: block; }

.ce-hero__line--gradient {
	background: var(--ce-gradient);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.ce-hero__text {
	font-size: var(--ce-fs-lead);
	color: var(--ce-muted);
	line-height: var(--ce-lh-loose);
	max-width: 52ch;
	margin-bottom: 32px;
}

.ce-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 44px;
}

.ce-hero__callouts {
	display: flex;
	gap: 44px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ce-callout__value {
	display: block;
	font-family: var(--ce-font-heading);
	font-size: 32px;
	font-weight: var(--ce-fw-bold);
	color: var(--ce-heading);
	line-height: 1.1;
}

/* Sentence case, no letterspacing — the design reads these as labels, not
   as eyebrow chrome. */
.ce-callout__label {
	display: block;
	font-size: var(--ce-fs-xs);
	color: var(--ce-muted);
	margin-top: 4px;
}

/* --- Hero form ----------------------------------------------------------- */
.ce-hero__form .ce-form {
	border-radius: 28px;
	padding: 38px;
	border-color: var(--ce-border-3);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	box-shadow: 0 30px 80px rgba(40, 20, 70, .18);
}

[data-theme="dark"] .ce-hero__form .ce-form {
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

/* --- Section foot -------------------------------------------------------- */
.ce-section__foot { text-align: center; margin-top: 48px; }

.ce-process .ce-section__head { margin-bottom: 80px; }

/* =========================================================================
 * RESPONSIVE
 * ====================================================================== */
@media (max-width: 1024px) {
	.ce-hero__inner { grid-template-columns: 1fr; gap: 48px; }
	.ce-hero { padding-block: calc(var(--ce-nav-h) + 48px) var(--ce-section-y); }
	.ce-hero__text { max-width: none; }
	.ce-hero__stage { width: 90vw; height: 90vw; }
}

@media (max-width: 680px) {
	.ce-hero__actions { gap: 10px; }
	.ce-hero__actions .ce-btn { width: 100%; }
	.ce-hero__callouts { gap: 28px; }
	.ce-preloader__logo { height: 64px; }
}


/* =========================================================================
 * SECTION DECORATIONS
 * Rotating CE marks bleeding off the section edges, per the design.
 * ====================================================================== */
/* .ce-decor base and the ce-cspin keyframe live in components.css:
   inner pages use them too, and this sheet only loads on the front page. */

.ce-decor--services {
	top: -160px;
	right: -180px;
	width: 560px;
	height: 560px;
	opacity: .08;
	animation: ce-cspin 32s linear infinite;
}

.ce-decor--stats {
	top: 50%;
	left: -140px;
	width: 420px;
	height: 420px;
	transform: translateY(-50%);
	opacity: .1;
	animation: ce-cspin 24s linear infinite;
}

.ce-decor--process {
	bottom: -200px;
	right: -160px;
	width: 520px;
	height: 520px;
	opacity: .08;
	animation: ce-cspin 30s linear infinite;
}

.ce-decor--portfolio {
	top: -180px;
	left: -180px;
	width: 520px;
	height: 520px;
	opacity: .08;
	animation: ce-cspin 34s linear infinite;
}

.ce-decor--testimonials {
	top: 50%;
	right: -150px;
	width: 460px;
	height: 460px;
	transform: translateY(-50%);
	opacity: .09;
	animation: ce-cspin 27s linear infinite;
}

.ce-decor--cta {
	bottom: -220px;
	right: 5%;
	width: 600px;
	height: 600px;
	opacity: .1;
	animation: ce-cspin 30s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.ce-decor { animation: none; }
}

@media (max-width: 680px) {
	.ce-decor { display: none; }
}

/* =========================================================================
 * STATS BAND — the design gives it its own tinted panel, not a plain section.
 * ====================================================================== */
.ce-section--stats {
	padding-block: var(--ce-section-y-sm);
	background: linear-gradient(135deg, rgba(123, 47, 247, .12), rgba(236, 30, 156, .08));
	border-block: 1px solid var(--ce-surface-3);
	position: relative;
	overflow: hidden;
}

.ce-section--services,
.ce-section--portfolio { position: relative; overflow: hidden; }

/* Testimonials sit on their own surface band in the design. */
.ce-section--testimonials {
	background: var(--ce-surface);
	border-block: 1px solid var(--ce-surface-3);
	padding-inline: 0;
	position: relative;
	overflow: hidden;
}

/* Closing CTA bloom. */
.ce-cta { overflow: hidden; }

.ce-cta::before {
	content: "";
	position: absolute;
	top: -80px;
	left: 20%;
	width: 400px;
	height: 400px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(236, 30, 156, .4), transparent 70%);
	animation: ce-float2 10s ease-in-out infinite;
	pointer-events: none;
	z-index: 0;
}

.ce-cta .ce-container { position: relative; z-index: 1; }
