/*
 * Hero — Announcement
 * Tailwind equivalents are noted so the port back to the 21st.dev source stays traceable.
 */

.cw-hero {
	--cw-hero-align: center;
	--cw-hero-items: center;
	--cw-hero-width: 768px;

	position: relative;
	background-color: var(--background);
	padding: 6rem 1.5rem; /* py-24 px-6 */
	overflow: hidden;
}

.cw-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: var(--cw-hero-items);
	text-align: var(--cw-hero-align);
	gap: 1.5rem; /* gap-6 */
	max-width: var(--cw-hero-width);
	margin-inline: auto;
}

/* Announcement pill — inline-flex items-center gap-2 rounded-full border px-4 py-1.5 text-sm */
.cw-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border-width: 1px;
	border-color: var(--border);
	border-radius: 9999px;
	background-color: var(--background);
	padding: 0.375rem 1rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	color: var(--muted-foreground);
	box-shadow: var(--cw-shadow-xs);
	transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

a.cw-hero__badge:hover {
	color: var(--foreground);
	background-color: var(--accent);
}

.cw-hero__badge-icon {
	width: 0.875rem;
	height: 0.875rem;
	flex-shrink: 0;
	transition: transform 150ms ease;
}

a.cw-hero__badge:hover .cw-hero__badge-icon {
	transform: translateX(2px);
}

/* Title — text-4xl md:text-6xl font-semibold tracking-tight */
.cw-w .cw-hero__title {
	font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
	line-height: 1.05;
	font-weight: 600;
	letter-spacing: -0.025em;
	color: var(--foreground);
	text-wrap: balance;
}

/* Description — text-lg text-muted-foreground */
.cw-hero__description {
	font-size: 1.125rem;
	line-height: 1.75rem;
	color: var(--muted-foreground);
	max-width: 42rem;
	text-wrap: pretty;
}

.cw-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--cw-hero-items);
	gap: 0.75rem;
	margin-top: 0.5rem;
}

/* Button base — shadcn <Button size="lg"> */
.cw-w .cw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	white-space: nowrap;
	border-radius: var(--radius-md);
	height: 2.75rem;
	padding-inline: 1.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease,
		opacity 150ms ease, box-shadow 150ms ease;
}

.cw-w .cw-btn--primary {
	background-color: var(--primary);
	color: var(--primary-foreground);
	box-shadow: var(--cw-shadow-xs);
}

.cw-w .cw-btn--primary:hover {
	opacity: 0.9;
}

.cw-w .cw-btn--outline {
	border-width: 1px;
	border-color: var(--border);
	background-color: var(--background);
	color: var(--foreground);
	box-shadow: var(--cw-shadow-xs);
}

.cw-w .cw-btn--outline:hover {
	background-color: var(--accent);
	color: var(--accent-foreground);
}

/* Entrance animation, applied by script.js only when motion is allowed. */
.cw-hero[data-cw-animate="ready"] .cw-hero__inner > * {
	opacity: 0;
	transform: translateY(12px);
	animation: cw-hero-in 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cw-hero[data-cw-animate="ready"] .cw-hero__inner > *:nth-child(2) {
	animation-delay: 80ms;
}
.cw-hero[data-cw-animate="ready"] .cw-hero__inner > *:nth-child(3) {
	animation-delay: 160ms;
}
.cw-hero[data-cw-animate="ready"] .cw-hero__inner > *:nth-child(4) {
	animation-delay: 240ms;
}

@keyframes cw-hero-in {
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 767px) {
	.cw-hero {
		padding: 4rem 1.25rem;
	}

	.cw-w .cw-hero__actions .cw-btn {
		width: 100%;
	}
}
