/**
 * NextExtManager — JoomCoder brand homepage.
 *
 * Decorative layers for the JoomCoder home that neither the shared home.css nor
 * Tailwind utilities express cleanly: the full-height hero, the blueprint grid,
 * the soft glow, the oversized </> watermark and the brand-blue CTA override.
 *
 * Loaded only on view=home when siteTheme=joomcoder (Home\HtmlView picks the
 * com_nextextmanager.home.joomcoder asset, which depends on com_nextextmanager.home
 * so it cascades after the shared rules). Brand colour variables live separately in
 * templates/nextsoftware/css/brands/joomcoder.css.
 */

/* Full-height hero (minus the sticky header). dvh handles mobile browser chrome. */
.nxt-jc-hero {
	min-height: calc(100vh - var(--nxt-header-height, 80px));
	min-height: calc(100dvh - var(--nxt-header-height, 80px));
}

/* Soft blue radial glow behind the hero headline. */
.nxt-jc-glow {
	background: radial-gradient(55% 45% at 50% 32%, rgba(37, 99, 235, 0.12), transparent 70%);
	pointer-events: none;
}

[data-theme="dark"] .nxt-jc-glow {
	background: radial-gradient(55% 45% at 50% 32%, rgba(59, 130, 246, 0.20), transparent 70%);
}

/* Faint blueprint grid, masked so it fades at the edges. */
.nxt-jc-grid {
	background-image:
		linear-gradient(to right, rgba(100, 116, 139, 0.06) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(100, 116, 139, 0.06) 1px, transparent 1px);
	background-size: 52px 52px;
	-webkit-mask-image: radial-gradient(70% 60% at 50% 38%, #000, transparent 78%);
	mask-image: radial-gradient(70% 60% at 50% 38%, #000, transparent 78%);
	pointer-events: none;
}

[data-theme="dark"] .nxt-jc-grid {
	background-image:
		linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}

/* Oversized </> monogram — fills the hero edge to edge as the brand backdrop.
 * Sized in vw so the glyph spans the full width on every screen; the soft
 * radial mask fades it before the hero edges so there's no hard crop line. */
.nxt-jc-watermark {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 800;
	font-size: clamp(22rem, 62vw, 82rem);
	line-height: 1;
	letter-spacing: -0.05em;
	color: var(--nxt-primary);
	opacity: 0.06;
	pointer-events: none;
	-webkit-mask-image: radial-gradient(120% 115% at 50% 50%, #000 50%, transparent 100%);
	mask-image: radial-gradient(120% 115% at 50% 50%, #000 50%, transparent 100%);
}

[data-theme="dark"] .nxt-jc-watermark {
	opacity: 0.10;
}

/* Primary CTA uses the brand BLUE for JoomCoder (the default brand keeps amber). */
.nxt-jc .nxt-home-cta {
	background: linear-gradient(135deg, var(--nxt-primary) 0%, var(--nxt-primary-dark, var(--nxt-primary)) 100%);
}

.nxt-jc .nxt-home-cta:hover {
	background: linear-gradient(135deg, var(--nxt-primary-light, var(--nxt-primary)) 0%, var(--nxt-primary-dark, var(--nxt-primary)) 100%);
}

/* Hero staggered entrance — pure CSS, runs once on load (delays set inline). */
@keyframes nxtJcIn {
	from { opacity: 0; transform: translateY(18px); }
	to   { opacity: 1; transform: none; }
}

.nxt-jc-in {
	animation: nxtJcIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Scroll-cue chevron bounce. */
@keyframes nxtJcBounce {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(5px); }
}

.nxt-jc-scroll {
	animation: nxtJcBounce 1.8s ease-in-out infinite;
}

/* Respect reduced-motion: stop the brand hero's once/looping animations. */
@media (prefers-reduced-motion: reduce) {
	.nxt-jc-in { animation: none; }
	.nxt-jc-scroll { animation: none; }
}
