/**
 * IT Solution — Precision Corporate design system
 * Distinctive B2B IT identity: royal blue, editorial serif, technical grid, signal accent.
 */

:root {
	--brand-accent: #1a8f7a;
	--brand-accent-soft: rgba(26, 143, 122, 0.12);
	--brand-surface: #ffffff;
	--brand-surface-muted: #f4f7fb;
	--brand-surface-elevated: #ffffff;
	--brand-ink-faint: rgba(10, 22, 40, 0.04);
	--font-mono: "Google Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 20px;
	--space-section: clamp(3.5rem, 6vw, 5rem);
	--motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--motion-duration: 0.35s;
	--focus-ring: 0 0 0 3px rgba(11, 74, 143, 0.28);
	--grid-line: rgba(11, 74, 143, 0.06);
	--hero-scrim: linear-gradient(
		105deg,
		rgba(6, 31, 61, 0.92) 0%,
		rgba(6, 31, 61, 0.72) 42%,
		rgba(6, 31, 61, 0.35) 100%
	);
}

html {
	scroll-padding-top: 5.5rem;
}

/* Site canvas */
body:has(.header-brand) {
	background-color: var(--brand-surface-muted);
	color: var(--ink-muted);
}

body:has(.header-brand) .main {
	background: transparent;
}

/* Technical grid texture (recognizable brand anchor) */
.texture-grid {
	position: relative;
}

.texture-grid::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 85%);
	opacity: 0.65;
}

.texture-grain::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.035;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: 10001;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: 0.6rem 1rem;
	background: var(--brand-royal);
	color: #fff;
	border-radius: var(--radius-sm);
	font-weight: 600;
	font-size: 0.875rem;
	box-shadow: var(--focus-ring);
}

/* Header on scroll — all branded pages */
body:has(.header-brand).scrolled .header.header-brand {
	--background-color: #ffffff !important;
	background: #ffffff !important;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	box-shadow: 0 1px 0 var(--border-subtle);
	border-bottom: 1px solid var(--border-subtle);
}

/* Header signature: gradient rail */
.header.header-brand::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(
		90deg,
		var(--brand-royal-dark) 0%,
		var(--brand-royal) 35%,
		var(--brand-accent) 70%,
		var(--brand-royal-soft) 100%
	);
	z-index: 1;
}

/* Global sections */
body:has(.header-brand) .section {
	padding-top: var(--space-section);
	padding-bottom: var(--space-section);
}

body:has(.header-brand) .section.light-background {
	--background-color: var(--brand-surface-muted);
	background: var(--brand-surface-muted);
	position: relative;
}

body:has(.header-brand) .light-background.texture-section::before,
body:has(.header-brand) .section.light-background.texture-section::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 32px 32px;
	opacity: 0.5;
}

body:has(.header-brand) .light-background.texture-section > .container,
body:has(.header-brand) .section.light-background.texture-section > .container {
	position: relative;
	z-index: 1;
}

/* Eyebrows & labels — technical mono */
.section-heading-block .section-eyebrow,
.page-hero-eyebrow,
.tagline-strip {
	font-family: var(--font-mono);
	letter-spacing: 0.14em;
}

.page-hero-eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.5rem;
	height: 2px;
	background: var(--brand-accent);
	margin-right: 0.65rem;
	vertical-align: middle;
}

.section-heading-block .section-eyebrow::before {
	content: "—";
	margin-right: 0.35rem;
	color: var(--brand-accent);
	font-weight: 500;
}

.section-heading-block.text-center .section-heading-display::after {
	content: "";
	display: block;
	width: 2.75rem;
	height: 3px;
	margin: 0.85rem auto 0;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--brand-royal), var(--brand-accent));
}

/* Service detail sidebar */
.service-details .service-box {
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	background: var(--brand-surface);
	box-shadow: var(--shadow-soft);
}

.service-details .services-list a {
	border-radius: var(--radius-sm);
	font-size: 0.875rem;
	transition: background 0.2s ease, color 0.2s ease;
}

.service-details .services-list a.active,
.service-details .services-list a:hover {
	background: var(--brand-accent-soft);
	color: var(--brand-royal-dark);
}

.service-details .help-box {
	border-radius: var(--radius-lg);
	background: linear-gradient(160deg, var(--brand-royal-dark), var(--brand-royal));
	color: rgba(255, 255, 255, 0.9);
	border: none;
}

.service-details .help-box h4,
.service-details .help-box a {
	color: #fff;
}

.service-details .help-icon {
	color: var(--brand-accent);
}

/* Primary buttons — bespoke, not default Bootstrap */
body:has(.header-brand) .btn-primary {
	--bs-btn-bg: var(--brand-royal);
	--bs-btn-border-color: var(--brand-royal);
	--bs-btn-hover-bg: var(--brand-royal-dark);
	--bs-btn-hover-border-color: var(--brand-royal-dark);
	--bs-btn-active-bg: var(--brand-royal-dark);
	--bs-btn-active-border-color: var(--brand-royal-dark);
	font-weight: 600;
	font-family: var(--font-sans);
	border-radius: var(--radius-md);
	padding: 0.6rem 1.35rem;
	box-shadow: 0 2px 12px rgba(11, 74, 143, 0.2);
	transition: transform var(--motion-duration) var(--motion-ease),
		box-shadow var(--motion-duration) var(--motion-ease),
		background var(--motion-duration) ease;
}

body:has(.header-brand) .btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(11, 74, 143, 0.28);
}

body:has(.header-brand) .btn-outline-primary {
	--bs-btn-color: var(--brand-royal);
	--bs-btn-border-color: rgba(11, 74, 143, 0.35);
	--bs-btn-hover-bg: var(--brand-royal);
	--bs-btn-hover-border-color: var(--brand-royal);
	font-weight: 600;
	border-radius: var(--radius-md);
	border-width: 1.5px;
}

/* Form controls */
body:has(.header-brand) .contact .form-control,
body:has(.header-brand) .contact .form-select {
	border-radius: var(--radius-md);
	border-color: rgba(10, 22, 40, 0.12);
	padding: 0.65rem 0.9rem;
	font-size: 0.9375rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body:has(.header-brand) .contact .form-control:focus,
body:has(.header-brand) .contact .form-select:focus {
	border-color: var(--brand-royal);
	box-shadow: var(--focus-ring);
}

body:has(.header-brand) .contact .php-email-form {
	background: var(--brand-surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
	box-shadow: var(--shadow-soft);
}

/* Page hero — editorial + grid */
.page-hero {
	background: var(--brand-surface);
	padding-top: 7rem;
	padding-bottom: 3rem;
}

.page-hero-bg {
	background:
		linear-gradient(125deg, rgba(11, 74, 143, 0.08) 0%, transparent 50%),
		linear-gradient(245deg, rgba(26, 143, 122, 0.05) 0%, transparent 45%),
		radial-gradient(ellipse 70% 60% at 100% 0%, rgba(11, 74, 143, 0.07), transparent 55%);
	opacity: 1;
}

.page-hero.texture-grid::before {
	mask-image: linear-gradient(180deg, black 0%, transparent 70%);
	opacity: 0.4;
}

.page-hero-decor {
	position: absolute;
	right: -2rem;
	top: 50%;
	transform: translateY(-50%);
	width: min(280px, 35vw);
	height: min(280px, 35vw);
	border-radius: 50%;
	border: 1px solid rgba(11, 74, 143, 0.08);
	background: radial-gradient(circle at 30% 30%, rgba(11, 74, 143, 0.06), transparent 65%);
	pointer-events: none;
	z-index: 0;
}

.page-hero-title {
	max-width: 32rem;
}

.page-hero-lead {
	font-size: 1.0625rem;
}

/* Home hero — cinematic scrim */
.hero-brand--fullscreen .hero-brand-slider-layer::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: var(--hero-scrim);
	pointer-events: none;
}

.hero-brand--fullscreen .hero-slider-img {
	filter: brightness(0.62) contrast(1.06) saturate(0.95);
}

.hero-brand .tagline-strip {
	font-family: var(--font-mono);
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.22);
	backdrop-filter: blur(8px);
}

/* Value & explore tiles (no side accent border) */
.value-tile-card,
a.explore-tile,
a.explore-tile:hover,
a.explore-tile:focus,
a.explore-tile:focus-visible {
	border-left: none !important;
	border-radius: var(--radius-lg);
}

.value-tile-card .tile-icon {
	background: var(--brand-accent-soft);
	border-color: rgba(26, 143, 122, 0.2);
}

.value-tile-card .tile-icon .material-symbols-outlined {
	color: var(--brand-accent);
}

/* Service cards — top accent bar */
.service-category-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--brand-royal), var(--brand-accent));
	opacity: 0;
	transition: opacity 0.25s ease;
	z-index: 2;
}

.service-category-card:hover::before {
	opacity: 1;
}

/* CTA panel */
.cta-panel {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-xl);
	background: linear-gradient(135deg, var(--brand-royal-dark) 0%, var(--brand-royal) 55%, #0e5c9e 100%);
	color: rgba(255, 255, 255, 0.92);
	padding: clamp(2rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
	box-shadow: 0 20px 50px rgba(7, 47, 94, 0.25);
}

.cta-panel::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 24px 24px;
	pointer-events: none;
}

.cta-panel .container,
.cta-panel__inner {
	position: relative;
	z-index: 1;
}

.cta-panel__title {
	font-family: var(--font-display);
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 600;
	color: #fff;
	letter-spacing: -0.02em;
	margin-bottom: 0.5rem;
}

.cta-panel__text {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
	margin: 0;
	max-width: 36rem;
}

.cta-panel .btn-cta-light {
	background: #fff;
	color: var(--brand-royal);
	font-weight: 600;
	border: none;
	border-radius: var(--radius-md);
	padding: 0.6rem 1.35rem;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	transition: transform var(--motion-duration) var(--motion-ease);
}

.cta-panel .btn-cta-light:hover {
	background: #f0f6ff;
	color: var(--brand-royal-dark);
	transform: translateY(-1px);
}

.cta-panel .btn-cta-ghost {
	background: transparent;
	color: #fff;
	font-weight: 600;
	border: 1.5px solid rgba(255, 255, 255, 0.5);
	border-radius: var(--radius-md);
	padding: 0.55rem 1.25rem;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.cta-panel .btn-cta-ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: #fff;
	color: #fff;
}

/* Footer — deep navy band (memorable contrast) */
.footer.footer-brand {
	background: linear-gradient(180deg, #061f3d 0%, #041528 100%);
	border-top: none;
	color: rgba(255, 255, 255, 0.72);
	box-shadow: none;
}

.footer.footer-brand .footer-main {
	color: rgba(255, 255, 255, 0.75);
}

.footer.footer-brand .footer-main h4 {
	color: rgba(255, 255, 255, 0.95);
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
}

.footer.footer-brand .footer-main a {
	color: rgba(255, 255, 255, 0.88);
}

.footer.footer-brand .footer-main a:hover {
	color: #fff;
}

.footer.footer-brand .footer-tagline {
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 600;
	color: #fff;
	letter-spacing: -0.02em;
	margin-bottom: 0.75rem;
}

.footer.footer-brand .footer-contact-line .footer-contact-icon .material-symbols-outlined {
	color: var(--brand-accent);
}

.footer.footer-brand .copyright-line {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer.footer-brand .footer-copyright-block,
.footer.footer-brand .footer-copy-details {
	color: rgba(255, 255, 255, 0.55);
}

.footer.footer-brand .footer-copy-brand {
	color: rgba(255, 255, 255, 0.85);
}

.footer.footer-brand .footer-copy-link {
	color: rgba(255, 255, 255, 0.75);
}

.footer.footer-brand .footer-copy-link:hover {
	color: #fff;
}

/* Industry / why cards */
.why-choose-item:hover,
.industry-card:hover {
	transform: translateY(-2px);
}

.why-choose-item {
	transition: transform var(--motion-duration) var(--motion-ease), box-shadow 0.25s ease;
}

/* Focus accessibility */
body:has(.header-brand) a:focus-visible,
body:has(.header-brand) button:focus-visible,
body:has(.header-brand) .btn:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

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

	body:has(.header-brand) .btn-primary:hover,
	.value-tile-card:hover,
	a.explore-tile:hover,
	.service-category-card:hover {
		transform: none;
	}
}

@media (max-width: 767px) {
	.page-hero-decor {
		display: none;
	}

	.cta-panel .cta-panel__actions {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		width: 100%;
	}

	.cta-panel .btn-cta-light,
	.cta-panel .btn-cta-ghost {
		width: 100%;
		text-align: center;
	}
}
