/**
 * Apex homepage styles.
 * Loaded only on the front page (see functions.php, handle "apex-home-style").
 * Reuses global design tokens from the theme's main style.css :root block —
 * do not redefine --apex-* custom properties here.
 * Organized into one banner per template-parts/home/*.php file, in the
 * same order front-page.php renders them.
 */

/* === shared layout === */

.apex-home section {
	padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.apex-container {
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}

.apex-section-title {
	font-family: var(--apex-ff-display), sans-serif;
	text-transform: uppercase;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.1;
	margin: 0 0 0.75rem;
}

.apex-section-intro {
	font-family: var(--apex-ff-body), sans-serif;
	max-width: 46rem;
	margin: 0 0 2.5rem;
	color: var(--apex-ink);
	opacity: 0.8;
}

/* === shared buttons (used across every section) === */

.apex-btn {
	display: inline-block;
	font-family: var(--apex-ff-body), sans-serif;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	text-decoration: none;
	background-color: var(--apex-amber);
	color: var(--apex-ink);
	border: 2px solid var(--apex-ink);
	border-radius: 2px;
	padding: 0.85em 1.6em;
	box-shadow: 3px 3px 0 var(--apex-ink);
	transition: box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.apex-btn:hover {
	background-color: var(--apex-amber-dark);
	color: var(--apex-ink);
}

.apex-btn:active {
	box-shadow: 0 0 0 var(--apex-ink);
	transform: translate(3px, 3px);
}

.apex-btn--ghost {
	background-color: transparent;
	color: var(--apex-ink);
	border: 2px solid var(--apex-ink);
	box-shadow: 3px 3px 0 var(--apex-ink);
}

.apex-btn--ghost:hover {
	background-color: transparent;
	border-color: var(--apex-amber-dark);
	color: var(--apex-amber-dark);
}

/* Dark sections (hero, cta) sit on --apex-ink, so ghost + primary buttons
   need a light border/text and a black hard-shadow instead of an ink one. */
.apex-hero .apex-btn,
.apex-cta .apex-btn {
	box-shadow: 3px 3px 0 #000000;
}

.apex-hero .apex-btn--ghost,
.apex-cta .apex-btn--ghost {
	color: var(--apex-footer-text);
	border-color: var(--apex-footer-text);
	background-color: transparent;
}

.apex-hero .apex-btn--ghost:hover,
.apex-cta .apex-btn--ghost:hover {
	border-color: var(--apex-amber);
	color: var(--apex-amber);
}

.apex-textlink {
	display: inline-block;
	margin-top: 1.5rem;
	font-family: var(--apex-ff-body), sans-serif;
	font-weight: 600;
	color: var(--apex-teal);
	text-decoration: none;
	border-bottom: 2px solid var(--apex-teal);
}

.apex-textlink:hover {
	color: var(--apex-red);
	border-color: var(--apex-red);
}

/* === accessibility: focus + reduced motion (applies site-wide on this page) === */

.apex-btn:focus-visible,
.apex-textlink:focus-visible,
.apex-cat-card:focus-visible,
.apex-faq__summary:focus-visible {
	outline: 3px solid var(--apex-amber);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.apex-home * {
		transition: none !important;
		animation: none !important;
	}

	.apex-btn:active {
		transform: none;
	}
}

/* === hero.php === */

.apex-hero {
	position: relative;
	background-color: var(--apex-ink);
	color: var(--apex-footer-text);
	background-image:
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 32px),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 32px);
	overflow: hidden;
}

.apex-hero::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 6px;
	background: var(--apex-hazard);
}

.apex-hero__inner {
	position: relative;
	text-align: left;
}

.apex-hero__eyebrow {
	font-family: var(--apex-ff-mono), monospace;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8rem;
	color: var(--apex-amber);
	margin: 0 0 1rem;
}

.apex-hero__title {
	font-family: var(--apex-ff-display), sans-serif;
	text-transform: uppercase;
	font-size: clamp(2.5rem, 6.5vw, 5rem);
	line-height: 1.02;
	margin: 0 0 1.25rem;
	max-width: 18ch;
	/* explicit color required: style.css sets h1 to ink, invisible on this dark section */
	color: #FFFFFF;
}

.apex-hero__sub {
	font-family: var(--apex-ff-body), sans-serif;
	font-size: clamp(1rem, 1.6vw, 1.25rem);
	max-width: 46rem;
	margin: 0 0 2rem;
	color: var(--apex-footer-text);
	opacity: 0.9;
}

.apex-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 3rem;
}

.apex-hero__specs {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	font-family: var(--apex-ff-mono), monospace;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
}

.apex-hero__specs li {
	padding: 0.85rem 0;
	border-top: 1px solid rgba(232, 234, 235, 0.25);
}

.apex-hero__specs li:last-child {
	border-bottom: 1px solid rgba(232, 234, 235, 0.25);
}

@media (min-width: 768px) {
	.apex-hero__specs {
		flex-direction: row;
	}

	.apex-hero__specs li {
		flex: 1;
		border-top: none;
		border-left: 1px solid rgba(232, 234, 235, 0.25);
		padding: 0 1.5rem;
	}

	.apex-hero__specs li:first-child {
		padding-left: 0;
	}

	.apex-hero__specs li:last-child {
		border-bottom: none;
		border-right: 1px solid rgba(232, 234, 235, 0.25);
	}
}

/* === products.php === */

.apex-products {
	background-color: var(--apex-bg);
}

.apex-products__grid {
	margin-bottom: 2.5rem;
}

.apex-products__fallback {
	font-family: var(--apex-ff-body), sans-serif;
}

.apex-products__more {
	text-align: center;
}

/* === categories.php === */

.apex-categories {
	background-color: var(--apex-card);
}

.apex-categories__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 768px) {
	.apex-categories__grid {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	}
}

.apex-cat-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	background-color: var(--apex-card);
	border: 2px solid var(--apex-line);
	border-radius: 2px;
	padding: 1.5rem;
	text-decoration: none;
	color: var(--apex-ink);
	box-shadow: 0 0 0 var(--apex-amber);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.apex-cat-card:hover {
	border-color: var(--apex-ink);
	box-shadow: 4px 4px 0 var(--apex-amber);
	transform: translate(-2px, -2px);
}

.apex-cat-card__count {
	font-family: var(--apex-ff-mono), monospace;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	color: var(--apex-teal);
}

.apex-cat-card__name {
	font-family: var(--apex-ff-display), sans-serif;
	text-transform: uppercase;
	font-size: 1.35rem;
	margin: 0;
}

.apex-cat-card__arrow {
	margin-top: auto;
	font-family: var(--apex-ff-mono), monospace;
	font-size: 1.1rem;
}

/* === know-how.php === */

.apex-knowhow {
	background-color: var(--apex-bg);
}

.apex-knowhow__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	align-items: start;
}

@media (min-width: 768px) {
	.apex-knowhow__grid {
		grid-template-columns: 1.1fr 0.9fr;
		gap: 4rem;
	}
}

.apex-knowhow__copy p {
	font-family: var(--apex-ff-body), sans-serif;
	max-width: 42rem;
}

.apex-checklist {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	font-family: var(--apex-ff-body), sans-serif;
}

.apex-checklist li {
	padding-left: 1.75rem;
	position: relative;
}

.apex-checklist li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	font-family: var(--apex-ff-mono), monospace;
	color: var(--apex-amber-dark);
	font-weight: 600;
}

.apex-spec-plate {
	background-color: var(--apex-ink);
	color: var(--apex-footer-text);
	border: 2px solid var(--apex-amber);
	border-radius: 2px;
	padding: 1.5rem;
}

.apex-spec-plate__row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0;
	border-top: 1px solid rgba(232, 234, 235, 0.2);
	font-family: var(--apex-ff-mono), monospace;
	text-transform: uppercase;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
}

.apex-spec-plate__row:first-child {
	border-top: none;
}

.apex-spec-plate__key {
	opacity: 0.7;
}

.apex-spec-plate__value {
	font-weight: 600;
	text-align: right;
}

.apex-spec-plate__caption {
	font-family: var(--apex-ff-mono), monospace;
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	color: var(--apex-ink);
	opacity: 0.6;
	margin: 0.75rem 0 0;
	text-align: center;
}

/* === testimonials.php === */

.apex-testimonials {
	background-color: var(--apex-card);
}

.apex-testimonials__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 1024px) {
	.apex-testimonials__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.apex-quote-card {
	margin: 0;
	background-color: var(--apex-card);
	border: 2px solid var(--apex-line);
	border-radius: 2px;
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.apex-quote-card__quote p {
	margin: 0;
	font-family: var(--apex-ff-body), sans-serif;
	font-size: 1.05rem;
	line-height: 1.5;
}

.apex-quote-card__attribution {
	font-family: var(--apex-ff-mono), monospace;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--apex-ink);
	opacity: 0.75;
}

.apex-quote-card__name {
	font-weight: bold;
	opacity: 1;
}

/* === faq.php === */

.apex-faq {
	background-color: var(--apex-bg);
}

.apex-faq__container {
	max-width: 760px;
}

.apex-faq__list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.apex-faq__item {
	background-color: var(--apex-card);
	border: 2px solid var(--apex-line);
	border-left: 4px solid var(--apex-line);
	border-radius: 2px;
	padding: 0.25rem 1.25rem;
	transition: border-color 0.15s ease;
}

.apex-faq__item[open] {
	border-left-color: var(--apex-amber);
}

.apex-faq__summary {
	cursor: pointer;
	list-style: none;
	font-family: var(--apex-ff-body), sans-serif;
	font-weight: 700;
	padding: 1.1rem 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.apex-faq__summary::-webkit-details-marker {
	display: none;
}

.apex-faq__summary::after {
	content: "+";
	font-family: var(--apex-ff-mono), monospace;
	font-size: 1.25rem;
	color: var(--apex-amber-dark);
	flex-shrink: 0;
}

.apex-faq__item[open] .apex-faq__summary::after {
	content: "\2013";
}

.apex-faq__answer {
	margin: 0 0 1.25rem;
	font-family: var(--apex-ff-body), sans-serif;
	color: var(--apex-ink);
	opacity: 0.85;
}

/* === cta.php === */

.apex-cta {
	position: relative;
	background-color: var(--apex-ink);
	color: var(--apex-footer-text);
	text-align: center;
}

.apex-cta::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 0;
	height: 6px;
	background: var(--apex-hazard);
}

.apex-cta__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

.apex-cta__title {
	font-family: var(--apex-ff-display), sans-serif;
	text-transform: uppercase;
	font-size: clamp(2rem, 5vw, 3.5rem);
	line-height: 1.05;
	margin: 0;
	max-width: 20ch;
	/* explicit color required: style.css sets h2 to ink, invisible on this dark section */
	color: #FFFFFF;
}

.apex-cta__sub {
	font-family: var(--apex-ff-body), sans-serif;
	font-size: 1.1rem;
	margin: 0 0 0.5rem;
	opacity: 0.9;
}
