/* 
 * Hero Component Styles - v2 (Premium SaaS Design) 
 */

:root {
	--hp-primary: #4f46e5;
	--hp-primary-light: #8b5cf6;
	--hp-text-dark: #0f172a;
	--hp-text-gray: #475569;
	--hp-text-light: #94a3b8;
	--hp-bg-light: #f8fafc;
	--hp-border: #e2e8f0;
}

.hp-hero--v2 {
	position: relative;
	padding: 80px 0 0 0;
	overflow: visible;
	background-color: #fafbfc;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--hp-text-dark);
}

/* Background Effects */
.hp-hero__bg-effects {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.hp-hero__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(120px);
	opacity: 0.15;
}

.hp-hero__glow--1 {
	top: 20%; left: -10%;
	width: 600px; height: 600px;
	background: #8b5cf6;
}

.hp-hero__glow--2 {
	top: 10%; right: 0;
	width: 500px; height: 500px;
	background: #3b82f6;
}

.hp-hero__wireframe {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	opacity: 0.4;
}

/* Container */
.h-container {
	position: relative;
	z-index: 1;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Main Grid */
.hp-hero__main-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: -40px; /* Overlap with bottom bar */
}

/* Left Column: Content */
.hp-hero__content {
	flex: 1 1 500px;
	padding-bottom: 80px;
	padding-right: 40px;
	z-index: 2;
}

/* Badge */
.hp-hero__badge-pill {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(139, 92, 246, 0.15);
	border-radius: 100px;
	font-size: 13px;
	font-weight: 500;
	color: var(--hp-primary-light);
	margin-bottom: 32px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
	backdrop-filter: blur(10px);
}

/* Headline */
.hp-hero__headline {
	font-size: clamp(40px, 5vw, 56px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin-bottom: 24px;
	color: var(--hp-text-dark);
}

.hp-text-gradient {
	background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Description */
.hp-hero__desc {
	font-size: 18px;
	line-height: 1.6;
	color: var(--hp-text-gray);
	margin-bottom: 40px;
	max-width: 540px;
}

/* Buttons */
.hp-hero__action-group {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 32px;
}


.hp-btn--secondary {
	background: white;
	color: var(--hp-text-dark);
	border: 1px solid var(--hp-border);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.hp-btn--secondary:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
	transform: translateY(-2px);
}

/* Availability */
.hp-hero__availability-bar {
	display: flex;
	align-items: center;
	font-size: 14px;
	color: var(--hp-text-gray);
}

@keyframes hpPulseGreen {
	0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
	70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
	100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hp-hero__status-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #10b981;
	margin-right: 8px;
	box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
	animation: hpPulseGreen 2s infinite ease-in-out;
}

.hp-hero__status-text {
	font-weight: 500;
	color: var(--hp-text-dark);
}

.hp-hero__status-divider {
	margin: 0 12px;
	color: #cbd5e1;
}

/* Right Column Visuals */
.hp-hero__visual-column {
	flex: 1 1 500px;
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-end;
	min-height: 600px;
}

/* Portrait */
.hp-hero__portrait {
	position: absolute;
	bottom: 0;
	left: -20px; /* Shifted slightly left as requested */
	width: 100%;
	max-width: 500px;
	z-index: 2;
	display: flex;
	justify-content: center;
}

.hp-hero__portrait-img {
	width: 100%;
	height: auto;
	max-height: 650px;
	object-fit: contain;
	object-position: bottom center;
	display: block;
	filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

/* Floating Stack */
.hp-hero__floating-stack {
	position: absolute;
	right: -40px; /* Shifted slightly right as requested */
	bottom: 60px; /* Moved down as requested */
	display: flex;
	flex-direction: column;
	gap: 20px;
	z-index: 3;
}

.hp-hero__float-card {
	background: rgba(255, 255, 255, 0.95);
	padding: 16px 20px;
	border-radius: 16px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(255, 255, 255, 1);
	backdrop-filter: blur(10px);
	min-width: 240px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hp-hero__float-card:hover {
	transform: translateX(-5px) translateY(-5px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.hp-hero__float-icon {
	width: 44px; height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.hp-hero__float-content {
	flex: 1;
}

.hp-hero__float-val {
	font-size: 22px;
	font-weight: 800;
	color: var(--hp-text-dark);
	line-height: 1.1;
}

.hp-hero__float-lbl {
	font-size: 12px;
	color: var(--hp-text-gray);
	line-height: 1.3;
	margin-top: 4px;
}

.hp-hero__float-graph {
	width: 48px;
	height: 24px;
	flex-shrink: 0;
}

/* Bottom Sections (Floating Container) */
.hp-hero__bottom-panel {
	position: relative;
	z-index: 10;
	background: white;
	border-radius: 24px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.8);
	overflow: hidden;
	margin-top: 40px; /* spacing from the grid above */
}

/* Stats Bar */
.hp-hero__stats-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 40px 48px;
	border-bottom: 1px solid #f1f5f9;
	flex-wrap: wrap;
	gap: 24px;
}

.hp-hero__stat-item {
	display: flex;
	align-items: center;
	gap: 16px;
}

.hp-hero__stat-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.hp-hero__stat-info {
	display: flex;
	flex-direction: column;
}

.hp-hero__stat-num {
	font-size: 26px;
	font-weight: 800;
	color: var(--hp-text-dark);
	line-height: 1.1;
}

.hp-hero__stat-txt {
	font-size: 13px;
	color: var(--hp-text-gray);
	font-weight: 500;
	margin-top: 4px;
}

/* Technologies Bar */
.hp-hero__tech-bar {
	display: flex;
	align-items: center;
	padding: 24px 48px;
	background: #fafbfc;
	flex-wrap: wrap;
	gap: 32px;
}

.hp-hero__tech-title {
	font-size: 12px;
	font-weight: 700;
	color: var(--hp-text-light);
	letter-spacing: 0.1em;
	white-space: nowrap;
}

.hp-hero__tech-divider {
	width: 1px;
	height: 24px;
	background-color: var(--hp-border);
}

.hp-hero__tech-list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px; /* Tighter gap for better fitting */
	flex-wrap: nowrap; /* Strictly one line */
	flex: 1; /* Take up remaining space, don't force 100% width! */
	overflow: hidden; /* Never go outside */
}

.hp-hero__tech-logo {
	color: var(--hp-text-gray);
	opacity: 0.8;
	transition: opacity 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0; /* Grow if few items, shrink if many items */
	min-width: 0; /* Allow shrinking below content size */
}

.hp-hero__tech-placeholder {
	font-weight: 700;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	border-radius: 100px;
	width: 100%;
	padding: 0 10px;
	font-size: clamp(10px, 1.5vw, 14px); /* Dynamically shrink text on small screens */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis; /* Add ... if text strictly can't fit */
}

/* Forces any user-uploaded <img> or inline <svg> inside the tech logo to scale down gracefully */
.hp-hero__tech-logo img,
.hp-hero__tech-logo svg {
	max-height: 32px;
	max-width: 100%; /* Never overflow container */
	height: auto;
	display: block;
	object-fit: contain;
}

.hp-hero__tech-logo:hover {
	opacity: 1;
}

/* Hide mobile/tablet injected stats by default on Desktop */
.hp-hero__stat-item--mobile-injected {
	display: none;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
	.hp-hero__main-grid {
		flex-direction: column;
		text-align: center;
		margin-bottom: 0;
	}

	.hp-hero__content,
	.hp-hero__visual-column {
		flex: 1 1 auto;
	}

	.hp-hero__content {
		padding-right: 0;
		padding-bottom: 20px;
	}

	.hp-hero__badge-pill, .hp-hero__action-group {
		justify-content: center;
	}
	
	.hp-hero__desc {
		margin-left: auto;
		margin-right: auto;
	}

	.hp-hero__availability-bar {
		justify-content: center;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;
	}
	
	.hp-hero__status-divider {
		display: none;
	}
	
	.hp-hero__status-subtext {
		width: 100%;
		display: block;
		margin-top: 4px;
	}

	.hp-hero__visual-column {
		min-height: 0;
		width: 100%;
		height: auto;
		padding-top: 20px;
	}
	
	.hp-hero__portrait {
		position: relative;
		left: 0;
		bottom: 0;
	}
	
	.hp-hero__portrait-img {
		max-height: 450px;
	}

	/* Restore floating Card 1 only on tablet */
	.hp-hero__floating-stack {
		display: block; 
	}
	.hp-hero__float-card--1 { top: 5%; right: 0; }
	
	/* Hide Card 2 & 3 from floating stack on tablet/mobile (they are injected into stats bar) */
	.hp-hero__float-card--2,
	.hp-hero__float-card--3 {
		display: none !important;
	}

	.hp-hero__bottom-panel {
		margin-top: -20px;
	}

	.hp-hero__stats-bar {
		display: grid;
		grid-template-columns: repeat(3, 1fr); /* 3 perfect columns on tablet */
		gap: 24px;
		padding: 32px 20px;
	}
	
	/* Show injected stats on tablet/mobile */
	.hp-hero__stat-item--mobile-injected {
		display: flex;
	}
	
	/* Stack icons and text for all stats on tablet so they fit in 3 columns perfectly */
	.hp-hero__stat-item {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 12px;
	}
	.hp-hero__stat-info {
		align-items: center;
	}
	
	.hp-hero__tech-bar {
		flex-direction: column;
		padding: 32px 20px;
		gap: 24px;
	}
	
	.hp-hero__tech-title {
		margin-right: 0;
		margin-bottom: 8px;
	}
	
	.hp-hero__tech-divider {
		display: none;
	}
	
	.hp-hero__tech-list {
		justify-content: center;
		gap: 16px;
	}

	/* Make placeholders look like premium pills on mobile until replaced with images */
	.hp-hero__tech-placeholder {
		background: #f1f5f9;
		padding: 10px 20px;
		border-radius: 100px;
		font-size: 14px;
		color: var(--hp-text-gray);
		border: 1px solid var(--hp-border);
		box-shadow: 0 2px 4px rgba(0,0,0,0.02);
	}
}

@media (max-width: 640px) {
	.hp-hero--v2 {
		padding-top: 40px;
	}
	.hp-hero__action-group {
		flex-direction: column;
		width: 100%;
	}
	.hp-btn {
		width: 100%;
	}
	
	/* Premium Mobile Stats Grid (Slimmer & Stacked) */
	.hp-hero__stats-bar {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 24px 12px;
		padding: 24px 16px;
	}
	.hp-hero__stat-item {
		width: 100%;
		flex-direction: column; /* Icon on top */
		align-items: center;    /* Centered */
		justify-content: flex-start;
		text-align: center;     /* Centered text */
		gap: 6px;
	}
	.hp-hero__stat-icon {
		margin-top: 0;
		margin-bottom: 4px;
	}
	.hp-hero__stat-icon svg {
		width: 24px; /* Slightly larger icon since it has its own line now */
		height: 24px;
	}
	.hp-hero__stat-info {
		align-items: center; /* Centered */
		word-break: normal; /* Remove break-word so it doesn't split words in half */
	}
	.hp-hero__stat-num {
		font-size: 16px;
		line-height: 1.2;
		margin-bottom: 4px;
	}
	.hp-hero__stat-txt {
		font-size: 11px;
		line-height: 1.4;
	}
	/* Make the 5th odd item span full width so it looks balanced and purposeful */
	.hp-hero__stat-item:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		justify-content: center;
		text-align: center;
	}

	/* Strict Grid for Tech Logos on Mobile (2 per line as requested) */
	.hp-hero__tech-list {
		display: grid;
		grid-template-columns: 1fr 1fr; /* 2 items per line */
		gap: 12px;
		width: 100%;
		overflow: visible; /* Override desktop hidden */
	}
	.hp-hero__tech-logo {
		width: 100%;
		justify-content: center;
		min-width: 0;
	}

	/* Make placeholders look like premium pills on mobile until replaced with images */
	.hp-hero__tech-placeholder {
		background: #f1f5f9;
		padding: 10px 20px;
		border-radius: 100px;
		font-size: 14px;
	}

	/* Responsive Floating Cards for Mobile */
	.hp-hero__floating-stack {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		pointer-events: none;
		display: block; /* Ensure it's not flex so absolute children work perfectly */
	}
	.hp-hero__float-card {
		position: absolute;
		padding: 10px 14px;
		min-width: 130px;
		pointer-events: auto;
		transform-origin: center;
	}
	.hp-hero__float-val {
		font-size: 16px;
	}
	.hp-hero__float-lbl {
		font-size: 10px;
	}
	.hp-hero__float-icon {
		width: 32px;
		height: 32px;
	}
	
	/* Card 1: Restore to original Top Right position */
	.hp-hero__float-card--1 {
		top: 5%;
		right: 0px;
		left: auto;
		transform: scale(0.85);
		min-width: 130px;
	}
	
	/* Hide Card 2 & 3 from floating stack on mobile (they are injected into stats bar) */
	.hp-hero__float-card--2,
	.hp-hero__float-card--3 {
		display: none !important;
	}
	
	/* Show injected stats in the stats bar */
	.hp-hero__stat-item--mobile-injected {
		display: flex;
	}
}
