/* ==========================================================================
   APH Technologies — main stylesheet
   Layered on top of Bootstrap 5 utilities/grid. Brand tokens are defined in
   style.css :root and can be overridden live via inc/customizer.php.
   ========================================================================== */

/* ---- Base ---------------------------------------------------------------- */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	font-family: var(--aph-font-body);
	color: var(--aph-color-dark);
	background-color: var(--aph-color-background);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--aph-font-heading);
	font-weight: var(--aph-font-weight-heading);
	color: var(--aph-color-dark);
}

a {
	color: var(--aph-color-secondary);
}

a:hover {
	color: var(--aph-color-primary);
}

.py-6 { padding-top: 5.5rem; padding-bottom: 5.5rem; }

img { max-width: 100%; height: auto; }

.object-fit-cover { object-fit: cover; }

/* ---- Accessibility -------------------------------------------------------- */

.aph-skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	z-index: 2000;
	padding: 0.75rem 1.25rem;
	background: var(--aph-color-primary);
	color: #fff;
	text-decoration: none;
}

.aph-skip-link:focus {
	top: 0;
}

:focus-visible {
	outline: 3px solid var(--aph-color-accent);
	outline-offset: 2px;
}

/* ---- Brand utility classes (color/background/border/buttons) -------------- */

.bg-aph-primary   { background-color: var(--aph-color-primary) !important; }
.bg-aph-secondary { background-color: var(--aph-color-secondary) !important; }
.bg-aph-accent    { background-color: var(--aph-color-accent) !important; }
.bg-aph-dark      { background-color: var(--aph-color-dark) !important; }
.bg-aph-surface   { background-color: var(--aph-surface) !important; }

.text-aph-primary   { color: var(--aph-color-primary) !important; }
.text-aph-secondary { color: var(--aph-color-secondary) !important; }
.text-aph-accent    { color: var(--aph-color-accent) !important; }

.border-aph-accent { border: 2px solid var(--aph-color-accent) !important; }

.btn {
	font-family: var(--aph-font-body);
	font-weight: var(--aph-font-weight-button);
	border-radius: var(--aph-radius);
	transition: transform var(--aph-transition), box-shadow var(--aph-transition), background-color var(--aph-transition), color var(--aph-transition);
}

.btn-aph-primary {
	background-color: var(--aph-color-primary);
	border-color: var(--aph-color-primary);
	color: #fff;
}
.btn-aph-primary:hover, .btn-aph-primary:focus {
	background-color: var(--aph-color-secondary);
	border-color: var(--aph-color-secondary);
	color: #fff;
	transform: translateY(-1px);
}

.btn-aph-accent {
	background-color: var(--aph-color-accent);
	border-color: var(--aph-color-accent);
	color: var(--aph-color-primary);
}
.btn-aph-accent:hover, .btn-aph-accent:focus {
	background-color: #33c2f2;
	border-color: #33c2f2;
	color: var(--aph-color-primary);
	transform: translateY(-1px);
}

.btn-outline-aph-primary {
	border: 2px solid var(--aph-color-primary);
	color: var(--aph-color-primary);
	background: transparent;
}
.btn-outline-aph-primary:hover {
	background-color: var(--aph-color-primary);
	color: #fff;
}

.btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: inherit;
}
.btn-icon:hover { background-color: rgba(var(--aph-color-primary-rgb), 0.08); }

.aph-icon { width: 1.5em; height: 1.5em; }
.aph-service-icon, .aph-hero-service-icon { width: 2.5rem; height: 2.5rem; color: var(--aph-color-secondary); }
.aph-why-icon { width: 3rem; height: 3rem; color: var(--aph-color-accent); }

.badge.aph-badge-accent { background-color: var(--aph-color-accent); color: var(--aph-color-primary); font-weight: 600; }
.badge.aph-badge-outline { background-color: transparent; border: 1px solid var(--aph-surface-border); color: var(--aph-color-dark); font-weight: 600; }
.badge.aph-badge-filter { background-color: var(--aph-surface); border: 1px solid var(--aph-surface-border); color: var(--aph-color-dark); font-weight: 600; text-decoration: none; }
.badge.aph-badge-filter:hover { background-color: var(--aph-color-secondary); color: #fff; }

.aph-eyebrow { color: var(--aph-color-secondary); letter-spacing: 0.06em; font-size: 0.85rem; }

.aph-link-arrow { color: var(--aph-color-secondary); text-decoration: none; }
.aph-link-arrow:hover { color: var(--aph-color-primary); }

/* ---- Header / navigation ---------------------------------------------------- */

.aph-site-header { background-color: var(--aph-surface); z-index: 1030; }
.aph-header-bar { border-color: var(--aph-surface-border) !important; }

.aph-logo svg { height: 40px; width: auto; display: block; }

.aph-nav-link {
	color: var(--aph-color-dark);
	font-weight: 500;
	padding: 0.5rem 0.9rem !important;
}
.aph-nav-link:hover, .aph-nav-link:focus { color: var(--aph-color-secondary); }

.aph-mega-panel {
	border: none;
	box-shadow: var(--aph-shadow-lg);
	border-radius: var(--aph-radius-lg);
	padding: 1.5rem 0;
	left: 0;
	right: 0;
	width: 100%;
	margin-top: 0.5rem;
}
.aph-mega-col-title { color: var(--aph-color-secondary); }
.aph-mega-link { white-space: normal; padding: 0.4rem 0; }
.aph-mega-desc { line-height: 1.3; }

.aph-hamburger { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.aph-hamburger span { display: block; height: 2px; background: currentColor; border-radius: 1px; }

.aph-mobile-menu { background: var(--aph-surface); border-top: 1px solid var(--aph-surface-border); }
.aph-mobile-nav-list li { border-bottom: 1px solid var(--aph-surface-border); }
.aph-mobile-nav-list a { display: block; padding: 0.75rem 0; color: var(--aph-color-dark); text-decoration: none; }

.aph-search-overlay {
	position: fixed;
	inset: 0;
	background: rgba(var(--aph-color-primary-rgb), 0.97);
	z-index: 2000;
	color: #fff;
}
.aph-search-overlay[hidden] { display: none; }
.aph-search-overlay .form-label { color: #fff; }
.aph-search-close { filter: invert(1); position: absolute; top: 1.5rem; right: 1.5rem; }

.aph-cookie-banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	background: var(--aph-color-dark);
	color: #fff;
	z-index: 1900;
	box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}
.aph-cookie-banner a { color: var(--aph-color-accent); }

/* ---- Hero ------------------------------------------------------------------ */

.aph-hero {
	background: linear-gradient(135deg, var(--aph-color-primary) 0%, var(--aph-color-secondary) 100%);
	min-height: 640px;
	display: flex;
	align-items: center;
}
.aph-hero-bg {
	position: absolute;
	inset: 0;
	opacity: 0.35;
	pointer-events: none;
}
.aph-hero-network { width: 100%; height: 100%; }
.aph-hero-line { stroke: rgba(255,255,255,0.5); stroke-width: 1.5; }
.aph-hero-node { fill: var(--aph-color-accent); }
.aph-hero-sub { max-width: 640px; color: rgba(255,255,255,0.9); }

@media (prefers-reduced-motion: no-preference) {
	.aph-hero-node-group {
		animation: aph-hero-drift 18s ease-in-out infinite alternate;
	}
}
@keyframes aph-hero-drift {
	from { transform: translateY(0); }
	to { transform: translateY(-16px); }
}

.aph-page-hero { background: linear-gradient(135deg, var(--aph-color-primary) 0%, var(--aph-color-secondary) 100%); }

/* ---- Cards / sections -------------------------------------------------------- */

.aph-service-card, .card.aph-card, .aph-coming-soon-card {
	border-radius: var(--aph-radius-lg);
	transition: transform var(--aph-transition), box-shadow var(--aph-transition);
}
.aph-service-card:hover, .card.aph-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--aph-shadow-md) !important;
}

.aph-industry-chip {
	background: var(--aph-surface);
	border: 1px solid var(--aph-surface-border);
	color: var(--aph-color-dark);
	text-decoration: none;
}
.aph-industry-chip:hover { border-color: var(--aph-color-secondary); color: var(--aph-color-secondary); }
.aph-industry-chip .aph-icon { color: var(--aph-color-secondary); width: 1.25rem; height: 1.25rem; }

.aph-product-frame { background: rgba(255,255,255,0.08); }
.aph-product-frame-placeholder {
	width: 100%; height: 100%;
	background: repeating-linear-gradient(45deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06) 10px, rgba(255,255,255,0.02) 10px, rgba(255,255,255,0.02) 20px);
	color: rgba(255,255,255,0.7);
	border-radius: inherit;
}

.aph-featured-list li { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }

.aph-map-placeholder {
	height: 320px;
	background: repeating-linear-gradient(45deg, var(--aph-surface), var(--aph-surface) 12px, var(--aph-color-background) 12px, var(--aph-color-background) 24px);
	border: 1px solid var(--aph-surface-border);
	color: var(--aph-color-dark);
}

.aph-stat-number { color: #fff; }
.aph-testimonial-carousel .carousel-control-prev-icon,
.aph-testimonial-carousel .carousel-control-next-icon { filter: invert(0.4); }

/* ---- Content body (post/page prose) ------------------------------------------ */

.aph-content-body :is(h2, h3, h4) { margin-top: 2rem; }
.aph-content-body p { color: var(--aph-color-dark); }
.aph-content-body a { text-decoration: underline; }
.aph-legal-body h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.aph-legal-body h3 { font-size: 1.15rem; }

/* ---- Footer ------------------------------------------------------------------ */

.aph-site-footer { background: var(--aph-color-dark); color: rgba(255,255,255,0.85); }
.aph-site-footer .aph-footer-heading { color: rgba(255,255,255,0.6); }
.aph-footer-list a { color: rgba(255,255,255,0.85); text-decoration: none; }
.aph-footer-list a:hover { color: var(--aph-color-accent); }
.aph-footer-about { color: rgba(255,255,255,0.7); }
.aph-footer-cta { background: var(--aph-color-primary); }
.aph-footer-legal { border-color: rgba(255,255,255,0.1) !important; color: rgba(255,255,255,0.6); }
.aph-footer-legal a { color: rgba(255,255,255,0.75); text-decoration: none; }

.aph-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: rgba(255,255,255,0.1);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}
.aph-social-link:hover { background: var(--aph-color-accent); color: var(--aph-color-primary); }

.aph-back-to-top {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	z-index: 1500;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--aph-shadow-md);
}
.aph-back-to-top[hidden] { display: none; }

.aph-newsletter-popup {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	max-width: 340px;
	background: var(--aph-surface);
	border-radius: var(--aph-radius-lg);
	box-shadow: var(--aph-shadow-lg);
	padding: 1.5rem;
	z-index: 1600;
}
.aph-newsletter-popup[hidden] { display: none; }

/* ---- 404 ---------------------------------------------------------------------- */

.aph-404-code { opacity: 0.15; }

/* ---- Dark mode -------------------------------------------------------------- */

:root[data-aph-theme="dark"] body { background-color: var(--aph-color-background); color: var(--aph-color-dark); }
:root[data-aph-theme="dark"] .aph-site-header { background-color: var(--aph-surface); }
:root[data-aph-theme="dark"] .card { background-color: var(--aph-surface); color: var(--aph-color-dark); }
:root[data-aph-theme="dark"] .aph-industry-chip,
:root[data-aph-theme="dark"] .badge.aph-badge-filter { background-color: var(--aph-surface); border-color: var(--aph-surface-border); }

/* ---- Print -------------------------------------------------------------------- */

@media print {
	.aph-site-header, .aph-back-to-top, .aph-newsletter-popup, .aph-cookie-banner, .aph-search-overlay, .aph-site-footer { display: none !important; }
}
