/*
 * CouponVerity 0.6.23 — isolated public UI hotfix.
 * Scope only:
 * 1) CouponFollow-inspired Lato typography and readable type scale,
 * 2) hero Browse-all-stores alignment,
 * 3) tablet/zoom-safe footer layout,
 * 4) looping hero trust-line reveal,
 * 5) touch/tablet Coupon Code conversion modal.
 * No data, SEO, verification, URL, publication, or Get Deal logic lives here.
 */

:root {
	--cv-font-family: 'Lato', Arial, Helvetica, sans-serif;
	--cv-font-heading: var(--cv-font-family);
}

body.cv-public,
.cv-public :is(button, input, select, textarea) {
	font-family: var(--cv-font-family);
}

.cv-public :is(h1, h2, h3, .cv-button, .cv-store-card__name),
.cv-public .cv-brand-lockup__text,
.cv-public .cv-home-top .cv-home-top__heading h1,
.cv-public .cv-home-top__heading p.cv-brand-signature,
.cv-public :is(.cv-category-index-page, .cv-category-detail-page) > .cv-page-header h1,
.cv-public .cv-footer__explore h2,
.cv-public .cv-footer__signature,
.cv-public .cv-footer__promise {
	font-family: var(--cv-font-heading);
}

/* Header: preserve structure, only improve legibility and visual consistency. */
.cv-public .cv-brand-lockup__text {
	font-size: 28px;
	font-weight: 780;
	letter-spacing: -0.045em;
}

.cv-public .cv-primary-nav a {
	font-size: 14px;
	font-weight: 650;
}

.cv-public .cv-header__search-input {
	font-size: 14px;
}

.cv-public .cv-header__search-button,
.cv-public .cv-menu__toggle {
	font-family: var(--cv-font-family);
	font-size: 13px;
}

/* Home hero: same sans family as the rest of the product, with stable alignment. */
.cv-public .cv-home-top .cv-home-top__heading h1 {
	font-family: var(--cv-font-heading);
	font-weight: 780;
	line-height: 1.06;
	letter-spacing: -0.045em;
}

.cv-public .cv-home-top__heading p.cv-brand-signature {
	font-family: var(--cv-font-heading);
	font-weight: 720;
	letter-spacing: -0.035em;
}

.cv-public :is(.cv-category-index-page, .cv-category-detail-page) > .cv-page-header h1 {
	font-family: var(--cv-font-heading);
	font-weight: 760;
	line-height: 1.02;
}

.cv-public .cv-hero-discovery {
	width: 100%;
	align-items: center;
}

.cv-public .cv-hero-art {
	margin-inline: auto;
}

.cv-public .cv-hero-discovery > a {
	align-self: center;
	margin-inline: auto;
	text-align: center;
}

/* Progressive looping reveal: real text stays in the DOM for SEO/accessibility. */
.cv-public .cv-home-top__heading h1 > span:first-child {
	animation: cv-verity-line-one 7.2s ease-in-out infinite;
	will-change: opacity, transform, clip-path;
}

.cv-public .cv-home-top__heading .cv-hero-statement {
	animation: cv-verity-line-two 7.2s ease-in-out infinite;
	will-change: opacity, transform, clip-path;
}

.cv-public .cv-home-top__heading p.cv-brand-signature {
	animation: cv-verity-line-three 7.2s ease-in-out infinite;
	will-change: opacity, transform, clip-path;
}

@keyframes cv-verity-line-one {
	0%, 4% { opacity: 0; transform: translateY(8px); clip-path: inset(0 100% 0 0); }
	15%, 78% { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
	90%, 100% { opacity: 0; transform: translateY(-4px); clip-path: inset(0 0 0 0); }
}

@keyframes cv-verity-line-two {
	0%, 13% { opacity: 0; transform: translateY(8px); clip-path: inset(0 100% 0 0); }
	25%, 78% { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
	90%, 100% { opacity: 0; transform: translateY(-4px); clip-path: inset(0 0 0 0); }
}

@keyframes cv-verity-line-three {
	0%, 23% { opacity: 0; transform: translateY(8px); clip-path: inset(0 100% 0 0); }
	35%, 78% { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
	90%, 100% { opacity: 0; transform: translateY(-4px); clip-path: inset(0 0 0 0); }
}

/* Footer: tablet/zoom-safe grids. This replaces the too-tight 4-column tablet state. */
.cv-public .cv-footer__explore,
.cv-public .cv-footer .cv-footer__inner--trust-grid,
.cv-public .cv-footer__bottom,
.cv-public .cv-footer__nav,
.cv-public .cv-footer__brand {
	min-width: 0;
	box-sizing: border-box;
}

.cv-public .cv-footer__explore h2,
.cv-public .cv-footer__signature,
.cv-public .cv-footer__promise {
	font-family: var(--cv-font-heading);
	font-weight: 720;
}

@media (max-width: 1180px) {
	.cv-public .cv-footer .cv-footer__inner--trust-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px 34px;
	}

	.cv-public .cv-footer__brand {
		grid-column: 1 / -1;
		max-width: none;
	}

	.cv-public .cv-footer__explore {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}

	.cv-public .cv-footer__explore-actions {
		justify-content: end;
	}

	.cv-public .cv-footer__bottom {
		flex-wrap: wrap;
	}
}

@media (max-width: 900px) {
	.cv-public .cv-footer__explore {
		grid-template-columns: minmax(0, 1fr);
		align-items: stretch;
	}

	.cv-public .cv-footer__explore-actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
		justify-content: stretch;
	}

	.cv-public .cv-footer__explore-actions .cv-button {
		box-sizing: border-box;
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}

@media (max-width: 600px) {
	.cv-public .cv-brand-lockup__text {
		font-size: 22px;
	}

	.cv-public .cv-footer .cv-footer__inner--trust-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.cv-public .cv-footer__explore-actions {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cv-public .cv-home-top__heading h1 > span:first-child,
	.cv-public .cv-home-top__heading .cv-hero-statement,
	.cv-public .cv-home-top__heading p.cv-brand-signature {
		animation: none;
		opacity: 1;
		transform: none;
		clip-path: none;
	}
}

/* Touch/tablet Coupon Code conversion modal. Desktop keeps its existing flow. */
body.cv-coupon-modal-open {
	overflow: hidden;
}

.cv-coupon-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(4, 15, 24, 0.74);
}

.cv-coupon-modal__panel {
	position: relative;
	box-sizing: border-box;
	width: min(100%, 430px);
	max-height: calc(100dvh - 36px);
	overflow: auto;
	padding: 30px 22px 22px;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 22px;
	background: #17232d;
	color: #ffffff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
	text-align: center;
}

.cv-coupon-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #ffffff;
	font: 300 31px/1 var(--cv-font-family);
	cursor: pointer;
}

.cv-coupon-modal__close:focus-visible,
.cv-coupon-modal__copy:focus-visible,
.cv-coupon-modal__cta:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.78);
	outline-offset: 3px;
}

.cv-coupon-modal__brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 12px 36px 16px;
	font-size: 14px;
	font-weight: 700;
}

.cv-coupon-modal__brand img,
.cv-coupon-modal__brand .cv-offer-card__merchant-fallback {
	box-sizing: border-box;
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	padding: 8px;
	border-radius: 50%;
	background: #ffffff;
	object-fit: contain;
}

.cv-coupon-modal__title {
	margin: 0 0 22px;
	color: #ffffff;
	font-family: var(--cv-font-heading);
	font-size: 23px;
	line-height: 1.28;
	font-weight: 760;
	letter-spacing: -0.02em;
}

.cv-coupon-modal__code-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: stretch;
	gap: 8px;
	margin-bottom: 22px;
	padding: 8px;
	border: 1px solid rgba(124, 194, 255, 0.30);
	border-radius: 999px;
	background: #101b27;
}

.cv-coupon-modal__code {
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 9px 8px 9px 14px;
	color: #40f5a2;
	font-family: var(--cv-font-mono);
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.04em;
	word-break: break-all;
	user-select: all;
}

.cv-coupon-modal__copy {
	min-width: 74px;
	min-height: 42px;
	padding: 0 15px;
	border: 0;
	border-radius: 999px;
	background: #405064;
	color: #ffffff;
	font-family: var(--cv-font-family);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.cv-coupon-modal__copy:disabled {
	opacity: 0.56;
	cursor: wait;
}

.cv-coupon-modal__cta {
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: 12px;
	background: #2be58d;
	color: #07130e;
	font-family: var(--cv-font-heading);
	font-size: 16px;
	font-weight: 800;
	text-decoration: none;
}

.cv-coupon-modal__cta:hover {
	background: #40f5a2;
	color: #07130e;
}

.cv-coupon-modal__cta--disabled {
	background: #52606b;
	color: #d7dee4;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.cv-coupon-modal {
		padding: 12px;
	}

	.cv-coupon-modal__panel {
		width: 100%;
		padding: 28px 18px 18px;
		border-radius: 20px;
	}

	.cv-coupon-modal__title {
		font-size: 21px;
	}
}


/* 0.6.23 typography pass — aligned to CouponFollow's public brand guidance:
 * Lato 700 for headings, Lato 400 for body/navigation, 16px base copy.
 * Marketing hero remains intentionally larger than ordinary page titles.
 */
body.cv-public {
	font-family: var(--cv-font-family);
	font-size: 16px;
	line-height: 1.55;
	font-weight: 400;
}

.cv-public :is(p, li, dd, dt, input, select, textarea) {
	font-family: var(--cv-font-family);
}

.cv-public :is(
	.cv-store-intro h1,
	.cv-page-header h1,
	.cv-editorial-hero h1,
	.cv-guide-article__header h1
) {
	font-family: var(--cv-font-heading);
	font-size: clamp(34px, 4vw, 40px);
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.025em;
}

.cv-public :is(
	.cv-section-heading h2,
	.cv-store-guides__heading h2,
	.cv-guide-listing > h2,
	.cv-offer-section__heading h2
) {
	font-family: var(--cv-font-heading);
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.015em;
}

.cv-public :is(
	.cv-offer-card__title,
	.cv-offer-card--deal .cv-offer-card__title,
	.cv-guide-card__title,
	.cv-store-card__name
) {
	font-family: var(--cv-font-heading);
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.012em;
}

.cv-public .cv-primary-nav a,
.cv-public .cv-header__search-input,
.cv-public .cv-footer__nav a {
	font-family: var(--cv-font-family);
	font-weight: 400;
}

.cv-public :is(.cv-button, .cv-show-code__button, .cv-show-code__peek) {
	font-family: var(--cv-font-family);
	font-weight: 700;
}

/* Footer logo: transparent vector mark, square proportions, no white raster tile. */
.cv-public .cv-footer__logo {
	gap: 9px;
}

.cv-public .cv-footer__logo .cv-brand-lockup__mark,
.cv-public .cv-footer__logo .cv-brand-lockup__image {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	object-fit: contain;
}

.cv-public .cv-footer__logo .cv-brand-lockup__text {
	font-family: var(--cv-font-heading);
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.035em;
}

/* Category pages: reserve breathing room before the footer so the final guide/card
 * and its shadow never visually collide with the footer boundary. */
.cv-public .cv-category-detail-page {
	padding-bottom: 48px;
}

@media (max-width: 767px) {
	.cv-public .cv-category-detail-page {
		padding-bottom: 36px;
	}
}

/* Category hero had an older high-specificity display rule; explicitly normalize it
 * to the same 40px CouponFollow-style page-title scale. */
.cv-public :is(.cv-category-index-page, .cv-category-detail-page) > .cv-page-header h1 {
	font-family: var(--cv-font-heading);
	font-size: clamp(34px, 4vw, 40px);
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.025em;
}

@media (max-width: 600px) {
	.cv-public .cv-footer__logo .cv-brand-lockup__mark,
	.cv-public .cv-footer__logo .cv-brand-lockup__image {
		width: 38px;
		height: 38px;
		flex-basis: 38px;
	}

	.cv-public .cv-footer__logo .cv-brand-lockup__text {
		font-size: 25px;
	}
}

/* Homepage only: make the trust eyebrow easier to scan without changing the shared type scale. */
.cv-public .cv-home-top .cv-section-heading__eyebrow {
	font-size: 18px;
}

@media (max-width: 720px) {
	.cv-public .cv-home-top .cv-section-heading__eyebrow {
		font-size: 15px;
	}
}
