/* ==========================================================================
   Apex — homepage
   ========================================================================== */

/* Hero -------------------------------------------------------------------- */
.apex-hero {
	position: relative;
	overflow: hidden;
	background: #0a1428;
	color: #d7dfef;
}
.apex-hero__slider { overflow: hidden; }
.apex-hero__track { display: flex; transition: transform 0.7s var(--apex-ease); }
.apex-hero__slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	min-height: clamp(420px, 58vh, 620px);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.55;
	transition: opacity 0.5s var(--apex-ease);
}
.apex-hero__slide.is-active { opacity: 1; }
.apex-hero__slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(10,20,40,0.94) 0%, rgba(10,20,40,0.78) 40%, rgba(10,20,40,0.25) 100%),
		radial-gradient(70% 120% at 0% 50%, rgba(10,20,40,0.5), transparent 65%);
	pointer-events: none;
}

.apex-hero__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
	padding-block: clamp(3.5rem, 8vw, 6rem);
	min-height: clamp(420px, 58vh, 620px);
}
.apex-hero__title { color: #fff; letter-spacing: -0.02em; }
.apex-hero .apex-eyebrow { color: #9db4f5; }
.apex-hero__lede {
	font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.25rem);
	color: #c3cfe8;
	max-width: 48ch;
	margin-top: 1.1rem;
}
.apex-hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }
.apex-hero__trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.6rem;
	list-style: none;
	margin: 1.9rem 0 0;
	padding: 0;
	font-size: 0.9rem;
	color: #a9b8d8;
}
.apex-hero__trust li { display: inline-flex; align-items: center; gap: 0.5rem; }
.apex-hero__trust svg { color: #9db4f5; }

.apex-hero__bars {
	position: absolute;
	left: 50%;
	bottom: 1.25rem;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	z-index: 5;
}
.apex-hero__bar {
	position: relative;
	width: 44px;
	height: 4px;
	border: 0;
	padding: 0;
	border-radius: 999px;
	background: rgba(255,255,255,0.35);
	cursor: pointer;
	overflow: hidden;
}
.apex-hero__bar:hover { background: rgba(255,255,255,0.6); }
.apex-hero__bar-fill {
	position: absolute;
	inset: 0;
	width: 0;
	background: #fff;
	border-radius: 999px;
}
.apex-hero__bar.is-active .apex-hero__bar-fill {
	width: 100%;
	animation: apex-hero-progress 5s linear forwards;
}
.apex-hero.is-paused .apex-hero__bar.is-active .apex-hero__bar-fill {
	animation-play-state: paused;
}
@keyframes apex-hero-progress {
	from { width: 0; }
	to { width: 100%; }
}

.apex-hero__live {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 960px) {
	.apex-hero__grid { grid-template-columns: 1fr; min-height: auto; }
	.apex-hero__slide { min-height: clamp(460px, 70vh, 580px); }
	.apex-hero__slide::before {
		background: linear-gradient(180deg, rgba(10,20,40,0.94) 0%, rgba(10,20,40,0.72) 55%, rgba(10,20,40,0.35) 100%);
	}
}
@media (max-width: 520px) {
	.apex-hero__grid { padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 6vw, 3rem); }
	.apex-hero__cta .apex-btn { width: 100%; }
}


/* Category tiles ---------------------------------------------------------- */
.apex-catgrid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(0.85rem, 2vw, 1.5rem);
}
.apex-cattile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.4rem 1.1rem 1.2rem;
	transition: box-shadow 0.2s var(--apex-ease), transform 0.2s var(--apex-ease);
}
.apex-cattile:hover { transform: translateY(-3px); }
.apex-cattile__media {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: transparent;
	display: grid;
	place-items: center;
	overflow: hidden;
}
.apex-cattile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	transition: transform 0.4s var(--apex-ease);
}
.apex-cattile:hover .apex-cattile__media img { transform: scale(1.06); }
.apex-cattile__icon { color: var(--apex-blue); }
.apex-cattile__body {
	padding: 0.95rem 0 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
}
.apex-cattile__name { font-family: var(--apex-font-display); font-weight: 700; font-size: 1.02rem; color: var(--apex-navy); }
.apex-cattile__count { font-size: 0.8rem; color: var(--apex-muted); }
.apex-cattile__arrow {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	background: #fff;
	border: 1px solid var(--apex-border);
	border-radius: 50%;
	color: var(--apex-navy);
	box-shadow: var(--apex-shadow-xs);
	transition: color 0.2s var(--apex-ease), transform 0.2s var(--apex-ease), border-color 0.2s var(--apex-ease), background 0.2s var(--apex-ease);
}
.apex-cattile:hover .apex-cattile__arrow { color: #fff; background: var(--apex-blue); border-color: var(--apex-blue); transform: translateX(2px); }
@media (max-width: 1100px) { .apex-catgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .apex-catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .apex-catgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .apex-catgrid { grid-template-columns: 1fr 1fr; gap: 0.7rem; } }

/* Shop by need ------------------------------------------------------------ */
.apex-needs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.85rem, 2vw, 1.5rem); }
.apex-need {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	background: #fff;
	border: 1px solid var(--apex-border);
	border-radius: var(--apex-radius);
	padding: 1.6rem 1.5rem 1.4rem;
	transition: border-color 0.2s var(--apex-ease), box-shadow 0.2s var(--apex-ease), transform 0.2s var(--apex-ease);
}
.apex-need:hover { border-color: var(--apex-blue); box-shadow: var(--apex-shadow-md); transform: translateY(-3px); }
.apex-need__icon {
	width: 52px; height: 52px;
	display: grid; place-items: center;
	background: var(--apex-blue-soft);
	color: var(--apex-blue);
	border-radius: var(--apex-radius);
	margin-bottom: 0.6rem;
	transition: background 0.2s var(--apex-ease), color 0.2s var(--apex-ease);
}
.apex-need:hover .apex-need__icon { background: var(--apex-blue); color: #fff; }
.apex-need__title { font-family: var(--apex-font-display); font-weight: 700; font-size: 1.08rem; color: var(--apex-navy); }
.apex-need__text { font-size: 0.9rem; color: var(--apex-muted); }
.apex-need .apex-link-arrow { margin-top: auto; padding-top: 0.5rem; color: var(--apex-navy); }
.apex-need:hover .apex-link-arrow { color: var(--apex-blue); }
@media (max-width: 1024px) { .apex-needs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .apex-needs { grid-template-columns: 1fr; } }

/* Repair promo ------------------------------------------------------------ */
.apex-repairpromo__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}
.apex-repairpromo h2 {
	color: #fff;
	max-width: 20em;
}
.apex-repairpromo p { color: #c3cfe8; }
.apex-repairpromo__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.6rem; }
.apex-repairpromo__note { font-size: 0.85rem; color: #93a4c8; margin-top: 1.1rem; }
.apex-repairpromo__panel {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.14);
	border-radius: var(--apex-radius-lg);
	padding: clamp(1.6rem, 3.5vw, 2.5rem);
	backdrop-filter: blur(4px);
}
.apex-repairpromo__panel h3 { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 0.85rem; margin-bottom: 1.1rem; }
.apex-repairpromo__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.apex-repairpromo__list li { display: flex; align-items: center; gap: 0.8rem; color: #e7ecf9; font-weight: 500; }
.apex-repairpromo__list svg { color: #9db4f5; flex: none; }
@media (max-width: 820px) { .apex-repairpromo__grid { grid-template-columns: 1fr; } }

/* Values ------------------------------------------------------------------ */
.apex-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.apex-value { text-align: center; padding: 1rem 0.5rem; }
.apex-value__icon {
	width: 58px; height: 58px;
	margin: 0 auto 0.9rem;
	display: grid; place-items: center;
	background: var(--apex-navy);
	color: #9db4f5;
	border-radius: 50%;
}
.apex-value__title { font-size: 1.05rem; margin-bottom: 0.35rem; }
.apex-value__text { font-size: 0.9rem; color: var(--apex-muted); margin: 0; }
@media (max-width: 920px) { .apex-values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .apex-values { grid-template-columns: 1fr; } }

/* About ------------------------------------------------------------------- */
.apex-about__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}
.apex-about__media {
	position: relative;
	border-radius: var(--apex-radius-lg);
	overflow: hidden;
	background: var(--apex-navy);
	min-height: 380px;
	display: grid;
	place-items: center;
	box-shadow: var(--apex-shadow-md);
}
.apex-about__media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.apex-about__media .apex-cattile__icon { color: #9db4f5; }
.apex-about__media-tag {
	position: absolute;
	left: 1.1rem; bottom: 1.1rem;
	background: rgba(10,20,40,0.88);
	border: 1px solid rgba(255,255,255,0.16);
	color: #fff;
	border-radius: var(--apex-radius);
	padding: 0.8rem 1.1rem;
	backdrop-filter: blur(4px);
	display: flex;
	flex-direction: column;
	line-height: 1.35;
	font-size: 0.9rem;
}
.apex-about__media-tag strong { font-family: var(--apex-font-display); }
.apex-about__media-tag span { color: #a9b8d8; font-size: 0.8rem; }
.apex-about__copy p { color: var(--apex-muted); font-size: 1rem; }
.apex-about__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.6rem; margin-top: 1.4rem; }
@media (max-width: 860px) { .apex-about__grid { grid-template-columns: 1fr; } .apex-about__media { min-height: 280px; } }

/* FAQ layout -------------------------------------------------------------- */
.apex-faq {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}
.apex-faq__intro p { color: var(--apex-muted); }
.apex-faq__intro .apex-btn { margin-top: 0.75rem; }
@media (max-width: 860px) { .apex-faq { grid-template-columns: 1fr; } }

/* Final CTA ---------------------------------------------------------------- */
.apex-finalcta { padding-block: clamp(3rem, 6vw, 5rem); }
.apex-finalcta__inner {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	align-items: center;
	gap: clamp(1.5rem, 3vw, 2.5rem);
	background: linear-gradient(135deg, #203469 0%, #101f3d 70%);
	border-radius: var(--apex-radius-lg);
	padding: clamp(2.5rem, 5vw, 4rem);
	box-shadow: var(--apex-shadow-lg);
}
.apex-finalcta__inner::before {
	content: "";
	position: absolute;
	right: -120px;
	top: -120px;
	width: 360px;
	height: 360px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
	pointer-events: none;
}
.apex-finalcta__inner::after {
	content: "";
	position: absolute;
	left: -90px;
	bottom: -150px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(65, 105, 225, 0.35), transparent 70%);
	pointer-events: none;
}
.apex-finalcta h2 { color: #fff; margin-bottom: 0.5rem; }
.apex-finalcta p { color: #c3cfe8; margin: 0; max-width: 46ch; }
.apex-finalcta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	position: relative;
	z-index: 1;
	justify-content: flex-end;
}
.apex-finalcta .apex-btn--primary { background: #fff; color: var(--apex-navy); }
.apex-finalcta .apex-btn--primary:hover { background: var(--apex-blue-soft); color: var(--apex-navy); }
@media (max-width: 820px) {
	.apex-finalcta__inner { grid-template-columns: 1fr; }
	.apex-finalcta__actions { justify-content: flex-start; }
}
