/* ============================================================================
   CMP CTA Band — widget styles (handle: cmp-w-cmp-cta-band)
   Ported from frontend-v1/src/components/sections/CtaBand.tsx.
   Reads global CMP tokens from :root (tokens.css) so --amber / --inverse /
   --r-lg etc. resolve to the active light/dark skin. Decorative .grain /
   .tick-frame / .amber-mesh utilities are re-implemented here as self-contained
   has-grain / has-ticks / has-mesh modifiers (markup-copy gotcha) so the panel
   ships pixel-identical to the React section.
   Mobile-first; breakpoints at 640px / 1024px.
   ========================================================================== */

/* --- Section + container --------------------------------------------------- */
.cmp-cta-band {
	padding-block: 6rem;
}

.cmp-cta-band__container {
	max-width: var(--container, 1400px);
	margin-inline: auto;
	padding-inline: var(--gutter, 24px);
}

/* --- Panel ----------------------------------------------------------------- */
.cmp-cta-band__panel {
	position: relative;
	overflow: hidden;
	border-radius: var(--r-lg, 24px);
	background-color: #0e0d0c;
	isolation: isolate;
}

/* Grain texture overlay — re-implements .grain */
.cmp-cta-band__panel.has-grain::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-image: url("../../img/grain.png");
	background-repeat: repeat;
	background-size: 180px 180px;
	opacity: var(--grain-opacity, 0.04);
	mix-blend-mode: overlay;
}

/* Amber mesh bloom — re-implements .amber-mesh */
.cmp-cta-band__panel.has-mesh::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		radial-gradient(40% 60% at 85% 18%, color-mix(in srgb, var(--amber) 26%, transparent) 0%, transparent 70%),
		radial-gradient(45% 55% at 8% 92%, color-mix(in srgb, var(--amber) 16%, transparent) 0%, transparent 72%);
}

/* Corner registration ticks — re-implements .tick-frame */
.cmp-cta-band__panel.has-ticks {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.cmp-cta-band__panel.has-ticks .cmp-cta-band__inner::before,
.cmp-cta-band__panel.has-ticks .cmp-cta-band__inner::after {
	content: "";
	position: absolute;
	z-index: 3;
	width: 18px;
	height: 18px;
	pointer-events: none;
	color: rgba(255, 255, 255, 0.18);
}

.cmp-cta-band__panel.has-ticks .cmp-cta-band__inner::before {
	top: 14px;
	left: 14px;
	border-top: 1.5px solid currentColor;
	border-left: 1.5px solid currentColor;
}

.cmp-cta-band__panel.has-ticks .cmp-cta-band__inner::after {
	bottom: 14px;
	right: 14px;
	border-bottom: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
}

/* --- Bleed numeral --------------------------------------------------------- */
.cmp-cta-band__numeral {
	position: absolute;
	top: -4rem;
	right: -1.5rem;
	z-index: 1;
	font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
	font-weight: 700;
	font-size: clamp(8rem, 22vw, 17rem);
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, 0.04);
	user-select: none;
	pointer-events: none;
}

@media (min-width: 640px) {
	.cmp-cta-band__numeral {
		right: -1rem;
	}
}

/* --- Inner grid ------------------------------------------------------------ */
.cmp-cta-band__inner {
	position: relative;
	z-index: 2;
	display: grid;
	gap: 2.5rem;
	padding: 4rem 1.5rem;
}

@media (min-width: 640px) {
	.cmp-cta-band__inner {
		padding: 5rem 3rem;
	}
}

@media (min-width: 1024px) {
	.cmp-cta-band__inner {
		grid-template-columns: repeat(12, 1fr);
		align-items: end;
		gap: 2rem;
	}
}

.cmp-cta-band__lead {
	min-width: 0;
}

.cmp-cta-band__aside {
	min-width: 0;
}

@media (min-width: 1024px) {
	.cmp-cta-band__lead {
		grid-column: span 8;
	}

	.cmp-cta-band__aside {
		grid-column: span 4;
	}
}

/* --- Status badge ---------------------------------------------------------- */
.cmp-cta-band__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
	padding: 0.375rem 0.875rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--r-pill, 999px);
}

.cmp-cta-band__dot-wrap {
	position: relative;
	display: flex;
	width: 0.5rem;
	height: 0.5rem;
}

.cmp-cta-band__dot {
	position: relative;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background-color: var(--amber, #e8590d);
}

.cmp-cta-band__dot-ping {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-color: var(--amber, #e8590d);
	opacity: 0.6;
}

.cmp-cta-band__dot-ping.is-animated {
	animation: cmp-cta-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes cmp-cta-ping {
	75%,
	100% {
		transform: scale(2);
		opacity: 0;
	}
}

.cmp-cta-band__eyebrow {
	font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: rgba(255, 255, 255, 0.85);
}

/* --- Headline + body ------------------------------------------------------- */
.cmp-cta-band__title {
	margin: 0;
	max-width: 16ch;
	font-family: var(--font-display, "Bricolage Grotesque", system-ui, sans-serif);
	color: var(--inverse, #fcf9f8);
	text-wrap: balance;
}

.cmp-cta-band__body {
	margin-top: 1.25rem;
	margin-bottom: 0;
	max-width: 28rem;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: color-mix(in srgb, var(--inverse, #fcf9f8) 70%, transparent);
}

/* --- Spec readout ---------------------------------------------------------- */
.cmp-cta-band__spec {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1.75rem;
	padding-block: 0.75rem;
}

.cmp-cta-band__spec::before,
.cmp-cta-band__spec::after {
	content: "";
	display: block;
	width: 100%;
	height: 1px;
	background-color: rgba(255, 255, 255, 0.12);
}

.cmp-cta-band__spec::before {
	position: absolute;
	top: 0;
	left: 0;
}

.cmp-cta-band__spec::after {
	position: absolute;
	bottom: 0;
	left: 0;
}

.cmp-cta-band__spec-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

.cmp-cta-band__spec-label {
	color: rgba(255, 255, 255, 0.55);
}

.cmp-cta-band__spec-value {
	color: rgba(255, 255, 255, 0.85);
	text-align: right;
}

/* --- Actions / buttons ----------------------------------------------------- */
.cmp-cta-band__actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@media (min-width: 640px) and (max-width: 1023px) {
	.cmp-cta-band__actions {
		flex-direction: row;
	}
}

.cmp-cta-band__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--r-pill, 999px);
	font-family: inherit;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color var(--dur-base, 0.24s) var(--ease-standard, ease),
		border-color var(--dur-base, 0.24s) var(--ease-standard, ease),
		color var(--dur-base, 0.24s) var(--ease-standard, ease),
		transform var(--dur-base, 0.24s) var(--ease-standard, ease);
	will-change: transform;
}

.cmp-cta-band__btn--primary {
	background-color: var(--amber, #e8590d);
	color: #fff;
}

.cmp-cta-band__btn--primary:hover {
	background-color: var(--amber-hover, #d24e0a);
}

.cmp-cta-band__btn--ghost {
	background-color: transparent;
	border-color: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.cmp-cta-band__btn--ghost:hover {
	border-color: var(--amber, #e8590d);
	color: #fff;
}

.cmp-cta-band__btn:focus-visible {
	outline: 2px solid var(--amber, #e8590d);
	outline-offset: 2px;
}

.cmp-cta-band__btn-icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
}

.cmp-cta-band__btn-icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.cmp-cta-band__btn-label {
	line-height: 1;
}

/* --- Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.cmp-cta-band__dot-ping.is-animated {
		animation: none;
	}

	.cmp-cta-band__btn {
		transition: none;
		transform: none !important;
	}
}
