/* ==========================================
   Hero Persistence — Independence Week 2026
   ========================================== */

/* --- Design Tokens --- */
.hero-persistence {
	--hp-bg: #00120b;
	--hp-card-bg: rgba(11, 11, 11, 0.9);
	--hp-card-border: rgba(255, 255, 255, 0.08);
	--hp-input-bg: #0b0b0b;
	--hp-input-border: #cbced3;
	--hp-input-border-focus: #36c665;
	--hp-accent: #36c665;
	--hp-accent-hover: #4ae077;
	--hp-gold: #d1b592;
	--hp-desc: #f1f5f8;
	--hp-white: #ffffff;
	--hp-error: #ff4d4d;
	--hp-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Section --- */
.hero-persistence {
	background-color: var(--hp-bg);
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px 40px;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

@media (min-width: 992px) {
	.hero-persistence {
		height: 724px;
		max-height: 724px;
		padding: 0 120px;
	}
}

/* --- Content Grid --- */
.hero-persistence__content {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	align-items: center;
}

/* --- Left Column --- */
.hero-persistence__left {
	display: flex;
	flex-direction: column;
	gap: 32px;
	max-width: 576px;
	width: 100%;
}

.hero-persistence__badge {
	color: #4ae077;
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 32px;
}

.hero-persistence__title {
	font-family: var(--title-font-family, 'AvenueProDisplay', Georgia, serif);
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 46px;
	letter-spacing: -0.75px;
	color: var(--hp-desc);
}

.hero-persistence__subtitle {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 32px;
	color: var(--hp-gold);
}

.hero-persistence__description {
	font-size: 1.1875rem;
	font-weight: 400;
	line-height: 32px;
	color: var(--hp-desc);
}

/* --- Right Column --- */
.hero-persistence__right {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	width: 100%;
}

/* --- Form Card --- */
.hero-persistence__form-card {
	background-color: var(--hp-card-bg);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	border-radius: 8px;
	padding: 24px;
	width: 100%;
	max-width: 540px;
	min-height: 480px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
	position: relative;
	overflow: hidden;
}

.hero-persistence__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-persistence__form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.hero-persistence__form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hero-persistence__form-group label {
	font-size: 1rem;
	font-weight: 700;
	color: var(--hp-white);
	line-height: 24px;
}

.hero-persistence__form-group input {
	background-color: var(--hp-input-bg);
	border: 1px solid var(--hp-input-border);
	border-radius: 8px;
	color: var(--hp-white);
	font-family: var(--title-font-family, 'AvenueProDisplay', Georgia, serif);
	font-size: 15.6px;
	height: 54px;
	padding: 0 17px;
	outline: none;
	transition: var(--hp-transition);
	width: 100%;
}

.hero-persistence__form-group input::placeholder {
	color: rgba(250, 246, 242, 0.4);
	font-weight: 400;
	font-size: 15.6px;
}

.hero-persistence__form-group input:focus {
	border-color: var(--hp-input-border-focus);
	box-shadow: 0 0 0 1px rgba(54, 198, 101, 0.2);
}

.hero-persistence__form-group.has-error input {
	border-color: var(--hp-error);
}

.hero-persistence__error {
	color: var(--hp-error);
	font-size: 0.75rem;
	font-weight: 500;
	min-height: 14px;
	margin-top: 2px;
}

/* --- Consent Checkbox --- */
.hero-persistence__consent {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 8px 0;
}

.hero-persistence__checkbox-container {
	display: flex;
	align-items: center;
	position: relative;
	cursor: pointer;
	user-select: none;
	padding-left: 26px;
}

.hero-persistence__checkbox-container input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.hero-persistence__checkmark {
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	height: 14px;
	width: 14px;
	background-color: transparent;
	border: 1px solid #767676;
	border-radius: 2.5px;
	transition: var(--hp-transition);
}

.hero-persistence__checkbox-container:hover input~.hero-persistence__checkmark {
	border-color: var(--hp-accent);
}

.hero-persistence__checkbox-container input:checked~.hero-persistence__checkmark {
	background-color: var(--hp-white);
	border-color: var(--hp-white);
}

.hero-persistence__checkmark:after {
	content: "";
	position: absolute;
	display: none;
}

.hero-persistence__checkbox-container input:checked~.hero-persistence__checkmark:after {
	display: block;
}

.hero-persistence__checkbox-container .hero-persistence__checkmark:after {
	left: 4px;
	top: 1px;
	width: 3px;
	height: 7px;
	border: solid var(--hp-bg);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.hero-persistence__consent.has-error .hero-persistence__checkmark {
	border-color: var(--hp-error);
}

.hero-persistence__consent-text {
	color: var(--hp-white);
	font-size: 1rem;
	font-weight: 700;
	line-height: 24px;
}

.hero-persistence__consent-small {
	font-size: 14px;
	font-weight: 400;
	line-height: 140%;
	color: var(--hp-white);
	margin-top: 4px;
}

/* --- Submit Button --- */
.hero-persistence__submit {
	background-color: var(--hp-accent);
	border: none;
	border-radius: 100px;
	color: #002820;
	cursor: pointer;
	font-family: var(--default-font-family, 'AvenuePro', sans-serif);
	font-size: 1rem;
	font-weight: 700;
	height: 54px;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	transition: var(--hp-transition);
	width: 228px;
	padding: 0;
	margin-top: 10px;
	letter-spacing: 0.35px;
}

.hero-persistence__submit:hover {
	background-color: var(--hp-accent-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 211, 118, 0.25);
}

.hero-persistence__submit:active {
	transform: translateY(1px);
}

.hero-persistence__loader {
	display: none;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(0, 45, 30, 0.3);
	border-radius: 50%;
	border-top-color: var(--hp-bg);
	animation: hp-spin 0.8s linear infinite;
	position: absolute;
}

.hero-persistence__submit.is-loading .hero-persistence__btn-text {
	visibility: hidden;
	opacity: 0;
}

.hero-persistence__submit.is-loading .hero-persistence__loader {
	display: block;
}

/* --- Success Message --- */
.hero-persistence__success {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 100%;
	animation: hp-fadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.hero-persistence__success-icon {
	width: 80px;
	height: 80px;
	margin-bottom: 24px;
}

.hero-persistence__checkmark-svg {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	display: block;
	stroke-width: 2;
	stroke: var(--hp-accent);
	stroke-miterlimit: 10;
	box-shadow: inset 0px 0px 0px var(--hp-accent);
	animation: hp-fillSvg .4s ease-in-out .4s forwards, hp-scaleSvg .3s ease-in-out .9s both;
}

.hero-persistence__checkmark-circle {
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	stroke-width: 2;
	stroke-miterlimit: 10;
	stroke: var(--hp-accent);
	fill: none;
	animation: hp-strokeCircle .6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.hero-persistence__checkmark-check {
	transform-origin: 50% 50%;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	stroke-width: 3;
	animation: hp-strokeCheck .3s cubic-bezier(0.25, 0.8, 0.25, 1) .8s forwards;
}

.hero-persistence__success h2 {
	font-family: var(--title-font-family, 'AvenueProDisplay', Georgia, serif);
	font-size: 1.85rem;
	font-weight: 400;
	color: var(--hp-white);
	margin-bottom: 12px;
}

.hero-persistence__success p {
	font-size: 0.95rem;
	color: var(--hp-desc);
	line-height: 1.6;
	max-width: 320px;
}

/* --- Keyframes --- */
@keyframes hp-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes hp-strokeCircle {
	100% {
		stroke-dashoffset: 0;
	}
}

@keyframes hp-strokeCheck {
	100% {
		stroke-dashoffset: 0;
	}
}

@keyframes hp-scaleSvg {

	0%,
	100% {
		transform: none;
	}

	50% {
		transform: scale3d(1.1, 1.1, 1);
	}
}

@keyframes hp-fillSvg {
	100% {
		box-shadow: inset 0px 0px 0px 40px rgba(0, 211, 118, 0.05);
	}
}

@keyframes hp-fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* --- Responsive --- */
@media (max-width: 1199px) {
	.hero-persistence {
		padding: 80px 40px;
	}

	.hero-persistence__content {
		gap: 32px;
	}

	.hero-persistence__title {
		font-size: 2.25rem;
	}

	.hero-persistence__subtitle {
		font-size: 1.3rem;
	}
}

@media (max-width: 991px) {
	.hero-persistence {
		padding: 60px 30px;
	}

	.hero-persistence__content {
		grid-template-columns: 1fr;
		gap: 50px;
	}

	.hero-persistence__left {
		max-width: 100%;
	}

	.hero-persistence__right {
		justify-content: center;
	}

	.hero-persistence__form-card {
		max-width: 100%;
	}
}

@media (max-width: 575px) {
	.hero-persistence {
		padding: 40px 20px;
	}

	.hero-persistence__title {
		font-size: 2.15rem;
		line-height: 1.2;
	}

	.hero-persistence__subtitle {
		font-size: 1.15rem;
	}

	.hero-persistence__description {
		font-size: 0.95rem;
	}

	.hero-persistence__form-card {
		padding: 24px;
		min-height: auto;
	}

	.hero-persistence__form-row {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.hero-persistence__form-group input {
		height: 48px;
	}

	.hero-persistence__submit {
		width: 100%;
		height: 48px;
	}
}

.share-container {
	/* position: absolute;
	top: 24px;
	left: 24px; */
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 16px;
}

/* Base button style (Image 1) */
.share-btn {
	font-family: inherit;
	font-size: 18px;
	font-weight: 500;
	color: var(--primary-color);
	background: transparent;
	border: none;
	padding: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	transition: all 0.2s ease;
	line-height: 1;
}

.share-btn:hover {
	opacity: 0.8;
}

.share-btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.share-btn__icon svg {
	width: 26px;
	height: 21px;
	/* Maintains the 130:105 aspect ratio */
	display: block;
}

/* Share Options menu - hidden by default */
.share-options {
	display: none;
	align-items: center;
	gap: 16px;
}

/* Container group for Twitter, Facebook, WhatsApp, Telegram */
.share-options__group {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	border: none;
	padding: 0;
	height: 40px;
}

.share-option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--primary-color);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.share-option:hover {
	opacity: 0.7;
}

.share-option svg {
	width: 22px;
	height: 22px;
	display: block;
	fill: currentColor;
}

/* Active states (Image 2) - Borders removed */
.share-container--active .share-btn {
	width: 40px;
	height: 40px;
	border: none;
	padding: 0;
	display: inline-flex;
	justify-content: center;
	align-items: center;
}

.share-container--active .share-btn__text {
	display: none;
}

.share-container--active .share-btn__icon svg {
	width: 26px;
	height: 21px;
	/* keeps original scale since there is no border box constraint */
}

.share-container--active .share-options {
	display: inline-flex;
	animation: fadeInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInRight {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}