/* ==========================================================================
   TextCRM Hero Widget
   Mirrors demo-html/home page.html → "Hero Section"
   Palette: green #00f5a0 · deep #0b1326 · surface #131b2e
   ========================================================================== */

.textcrm-hero {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding-top: 128px;   /* pt-32 */
	padding-bottom: 80px; /* pb-20 */
	background-color: #0b1326;
	font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;

	/* Alignment driven by the Style → Layout control (defaults = centered). */
	--hero-text-align: center;
	--hero-justify: center;
	--hero-mx-left: auto;
	--hero-mx-right: auto;
}

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

/* --------------------------------------------------------------------------
   Background glows
   -------------------------------------------------------------------------- */
.textcrm-hero__glow {
	position: absolute;
	z-index: 0;
	border-radius: 9999px;
	pointer-events: none;
}

/* Top centered glow — w-[800px] h-[400px] blur-[120px] bg-brand-green/10 */
.textcrm-hero__glow--top {
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 800px;
	height: 400px;
	background-color: rgba(0, 245, 160, 0.1);
	filter: blur(120px);
	opacity: 0.2;
}

.textcrm-hero__glow--top.is-animated {
	animation: textcrm-hero-pulse 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes textcrm-hero-pulse {
	0%, 100% { opacity: 0.1; }
	50%      { opacity: 0.3; }
}

/* --------------------------------------------------------------------------
   Content container
   -------------------------------------------------------------------------- */
.textcrm-hero__container {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 24px;  /* px-6 */
	padding-right: 24px;
	text-align: var(--hero-text-align, center);
}

/* --------------------------------------------------------------------------
   Floating badge
   -------------------------------------------------------------------------- */
.textcrm-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;          /* py-1.5 px-4 */
	border-radius: 9999px;
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.1em;      /* tracking-widest */
	color: #00f5a0;
	margin-bottom: 32px;        /* mb-8 */
}

.textcrm-hero__badge-dot {
	position: relative;
	display: inline-flex;
	height: 8px;
	width: 8px;
	flex-shrink: 0;
}

.textcrm-hero__badge-ping {
	position: absolute;
	inset: 0;
	display: inline-flex;
	height: 100%;
	width: 100%;
	border-radius: 9999px;
	background-color: currentColor;
	opacity: 0.75;
	animation: textcrm-hero-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.textcrm-hero__badge-core {
	position: relative;
	display: inline-flex;
	height: 8px;
	width: 8px;
	border-radius: 9999px;
	background-color: currentColor;
}

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

/* --------------------------------------------------------------------------
   Title
   -------------------------------------------------------------------------- */
.textcrm-hero__title {
	margin: 0 0 24px;           /* mb-6 */
	font-size: 48px;            /* text-5xl */
	line-height: 1.05;
	font-weight: 800;           /* font-extrabold */
	letter-spacing: -0.025em;   /* tracking-tight */
	color: #ffffff;
}

.textcrm-hero__title-accent {
	color: #00f5a0;
}

/* --------------------------------------------------------------------------
   Subtitle
   -------------------------------------------------------------------------- */
.textcrm-hero__subtitle {
	max-width: 672px;           /* max-w-2xl */
	margin-top: 0;
	margin-bottom: 40px;        /* mb-10 */
	margin-left: var(--hero-mx-left, auto);
	margin-right: var(--hero-mx-right, auto);
	font-size: 18px;            /* text-lg */
	line-height: 1.625;         /* leading-relaxed */
	color: #9ca3af;             /* text-gray-400 */
}

/* --------------------------------------------------------------------------
   Action buttons
   -------------------------------------------------------------------------- */
.textcrm-hero__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: var(--hero-justify, center);
	gap: 16px;                  /* gap-4 */
	margin-bottom: 48px;        /* mb-12 */
}

.textcrm-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;                /* w-full (mobile) */
	padding: 16px 32px;         /* py-4 px-8 */
	border-radius: 12px;        /* rounded-xl */
	font-size: 18px;            /* text-lg */
	font-weight: 700;           /* font-bold */
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.textcrm-hero__btn-icon {
	display: inline-flex;
	width: 20px;                /* w-5 */
	height: 20px;
	flex-shrink: 0;
}

.textcrm-hero__btn-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Primary */
.textcrm-hero__btn--primary {
	background-color: #00f5a0;
	color: #000000;
	box-shadow: 0 0 0 rgba(0, 245, 160, 0);
}

.textcrm-hero__btn--primary:hover,
.textcrm-hero__btn--primary:focus-visible {
	box-shadow: 0 0 20px rgba(0, 245, 160, 0.4);
	outline: none;
}

/* Secondary */
.textcrm-hero__btn--secondary {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.textcrm-hero__btn--secondary:hover,
.textcrm-hero__btn--secondary:focus-visible {
	background-color: rgba(255, 255, 255, 0.1);
	outline: none;
}

/* --------------------------------------------------------------------------
   Trust indicators
   -------------------------------------------------------------------------- */
.textcrm-hero__trust {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--hero-justify, center);
	gap: 24px;                  /* gap-6 */
	font-size: 12px;            /* text-xs */
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;      /* tracking-widest */
	color: #6b7280;             /* text-gray-500 */
}

.textcrm-hero__trust-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.textcrm-hero__trust-icon {
	display: inline-flex;
	width: 16px;                /* w-4 */
	height: 16px;
	flex-shrink: 0;
	color: #00f5a0;
}

.textcrm-hero__trust-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* --------------------------------------------------------------------------
   Dashboard preview
   -------------------------------------------------------------------------- */
.textcrm-hero__preview {
	position: relative;
	z-index: 1;
	max-width: 1152px;          /* max-w-6xl */
	margin: 80px auto 0;        /* mt-20 */
	padding-left: 24px;
	padding-right: 24px;
}

.textcrm-hero__preview-frame {
	position: relative;
	z-index: 2;
	/* Explicit individual padding properties so no inherited shorthand can break equality. */
	padding-top: 16px;
	padding-right: 16px;
	padding-bottom: 16px;
	padding-left: 16px;
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	/* Concentric corner math: outer radius = padding + inner radius (16 + 16 = 32). */
	border-radius: 32px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.textcrm-hero__preview-img {
	display: block;
	width: 100%;
	height: auto;
	/* Default = frame_radius (32) − frame_padding (16) for concentric corners. */
	border-radius: 16px;
}

/* Decorative glow behind the dashboard — w-3/4 h-32 blur-[100px] bg-brand-green/20 */
.textcrm-hero__preview-glow {
	position: absolute;
	z-index: 0;
	bottom: -40px;              /* -bottom-10 */
	left: 50%;
	transform: translateX(-50%);
	width: 75%;
	height: 128px;
	background-color: rgba(0, 245, 160, 0.2);
	filter: blur(100px);
	border-radius: 9999px;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Optional entrance animation (JS-driven, ends in the design's resting state)
   -------------------------------------------------------------------------- */
.textcrm-hero--reveal .textcrm-hero__animate {
	opacity: 0;
	transform: translateY(24px);
}

.textcrm-hero--reveal.is-revealed .textcrm-hero__animate {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.textcrm-hero--reveal.is-revealed .textcrm-hero__animate:nth-child(2) { transition-delay: 0.08s; }
.textcrm-hero--reveal.is-revealed .textcrm-hero__animate:nth-child(3) { transition-delay: 0.16s; }
.textcrm-hero--reveal.is-revealed .textcrm-hero__animate:nth-child(4) { transition-delay: 0.24s; }
.textcrm-hero--reveal.is-revealed .textcrm-hero__animate:nth-child(5) { transition-delay: 0.32s; }
.textcrm-hero--reveal.is-revealed .textcrm-hero__preview.textcrm-hero__animate { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* sm — buttons sit side by side and shrink to content width */
@media (min-width: 640px) {
	.textcrm-hero__actions {
		flex-direction: row;
	}
	.textcrm-hero__btn {
		width: auto;
	}
}

/* md — larger type + wider trust gap (matches md: utilities) */
@media (min-width: 768px) {
	.textcrm-hero__title {
		font-size: 72px;        /* md:text-7xl */
		line-height: 1.0;
	}
	.textcrm-hero__subtitle {
		font-size: 20px;        /* md:text-xl */
	}
	.textcrm-hero__trust {
		gap: 40px;              /* md:gap-10 */
	}
}

/* Small phones — tighten outer padding + headline */
@media (max-width: 480px) {
	.textcrm-hero {
		padding-top: 110px;
		padding-bottom: 64px;
	}
	.textcrm-hero__title {
		font-size: 38px;
	}
	.textcrm-hero__container,
	.textcrm-hero__preview {
		padding-left: 16px;
		padding-right: 16px;
	}
	.textcrm-hero__btn {
		font-size: 16px;
		padding: 14px 24px;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.textcrm-hero *,
	.textcrm-hero *::before,
	.textcrm-hero *::after {
		animation: none !important;
		transition: none !important;
	}
	.textcrm-hero--reveal .textcrm-hero__animate {
		opacity: 1;
		transform: none;
	}
}
