/* ==========================================================================
   Global overflow guard — prevents any single oversized element (a wide
   flex row, a dropdown menu, an unbroken long word) from forcing horizontal
   scroll and squeezing the layout on mobile.
   ========================================================================== */
html, body {
	overflow-x: hidden;
	max-width: 100%;
}

/* ==========================================================================
   Tokens — everything below is built on an 8px grid. Every margin, padding,
   and gap in this codebase pulls from --space-1 through --space-7. No
   one-off rem values anywhere else in the stylesheet.
   ========================================================================== */
:root {
	--ink-navy: #12203A;
	--ink-navy-deep: #0C1729;
	--blueprint: #2F5D8A;
	--amber: #C97A2B;
	--amber-dark: #A8621E;
	--concrete: #6B6F76;
	--paper: #F7F5F0;
	--ink: #1A1A1A;
	--white: #FFFFFF;
	--line: rgba(18, 32, 58, 0.12);
	--line-dark: rgba(247, 245, 240, 0.12);

	--font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
	--font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
	--font-mono: "IBM Plex Mono", "Courier New", monospace;

	--radius: 4px;
	--radius-pill: 999px;
	--max-width: 1200px;

	/* Spacing scale, 8px base */
	--space-1: 0.5rem;    /* 8px  */
	--space-2: 1rem;      /* 16px */
	--space-3: 1.5rem;    /* 24px */
	--space-4: 2rem;      /* 32px */
	--space-5: 3rem;      /* 48px */
	--space-6: 4rem;      /* 64px */
	--space-7: clamp(3.5rem, 7vw, 6rem);  /* section padding, responsive */
	--header-h: 96px; /* fixed header height, used to clear content below it */

	/* Type scale */
	--text-h1: clamp(2.25rem, 4vw, 3.5rem);
	--text-h2: clamp(1.75rem, 3vw, 2.5rem);
	--text-h3: 1.125rem;
	--text-body: 1rem;
	--text-small: 0.875rem;
	--text-eyebrow: 0.8rem;
}

/* ==========================================================================
   Reset
   ========================================================================== */
.ec * {
	box-sizing: border-box;
}
.ec {
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: 1.6;
}
.ec img {
	max-width: 100%;
	display: block;
}
.ec a {
	color: inherit;
	text-decoration: none;
}
.ec h1, .ec h2, .ec h3, .ec h4 {
	font-family: var(--font-display);
	line-height: 1.15;
	margin: 0 0 var(--space-2);
	font-weight: 700;
}
.ec h1 { font-size: var(--text-h1); }
.ec h2 { font-size: var(--text-h2); }
.ec h3 { font-size: var(--text-h3); margin-bottom: var(--space-1); }
.ec p {
	margin: 0 0 var(--space-2);
	color: var(--concrete);
}
.ec p:last-child {
	margin-bottom: 0;
}
.ec .ec-container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 var(--space-3);
}
.ec .ec-mono {
	font-family: var(--font-mono);
}
/* Any bare utility button (nav toggle, close, dropdown arrow, FAQ question,
   filter tabs) that isn't an .ec-btn gets a hard reset here, so Elementor's
   own global button styling can never bleed through onto it again. */
.ec button:not(.ec-btn):not(.ec-filter-btn) {
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

/* ==========================================================================
   Layout primitives — every grid in the site reuses these instead of
   declaring its own column count and gap inline.
   ========================================================================== */
.ec-grid {
	display: grid;
	gap: var(--space-3);
}
.ec-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ec-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ec-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
	.ec-grid-3, .ec-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.ec-grid-2, .ec-grid-3, .ec-grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Card — one component, reused for services, projects, testimonials.
   Same padding, same border, same radius everywhere it appears.
   ========================================================================== */
.ec-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	padding: var(--space-3);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.ec-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	padding: var(--space-2) var(--space-4);
	border-radius: var(--radius-pill) !important;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: var(--text-small);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ec-btn:hover {
	transform: translateY(-1px);
}
.ec-btn-primary {
	background: var(--amber);
	color: var(--white);
}
.ec-btn-primary:hover {
	background: var(--amber-dark);
}
.ec-header-cta {
	padding: var(--space-1) var(--space-3);
	font-size: 0.8rem;
}
.ec-btn-outline {
	background: transparent;
	color: var(--paper);
	border-color: var(--line-dark);
}
.ec-btn-outline:hover {
	border-color: var(--paper);
}
.ec-btn-outline-dark {
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}
.ec-btn-outline-dark:hover {
	border-color: var(--ink);
}
.ec-btn:focus-visible {
	outline: 2px solid var(--amber);
	outline-offset: 2px;
}

/* ==========================================================================
   Scroll reveal — fade-up on enter, toggled by IntersectionObserver in
   base.js. Respects reduced motion preference.
   ========================================================================== */
.ec-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}
.ec-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
	.ec-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
.ec-nav-overlay {
	display: none;
}
.ec-header {
	background: transparent;
	padding: var(--space-2) 0;
	position: fixed;
	top: var(--admin-bar-offset, 0px);
	left: 0;
	right: 0;
	width: 100%;
	z-index: 130; /* must stay above .ec-nav-overlay (105): .ec-header creates its own stacking context, so .ec-nav's z-index inside it never competes directly with the overlay - only this value does */
	border-bottom: 1px solid transparent;
	transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.ec-header.is-scrolled {
	background: var(--ink-navy-deep);
	border-bottom-color: var(--line-dark);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.ec-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
}
.ec-logo {
	display: inline-flex;
	align-items: center;
}
.ec-logo-img {
	height: 32px;
	width: auto;
}
.ec-nav {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}
.ec-nav a {
	color: rgba(247, 245, 240, 0.85);
	font-size: var(--text-small);
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}
.ec-nav a:hover {
	color: var(--amber);
}

/* Services dropdown — native <details>/<summary>, browser-guaranteed
   toggle on click/tap, no JavaScript and no custom class-toggling
   involved, so there is nothing here that can fail to attach. */
.ec-nav-dropdown {
	position: relative;
}
.ec-nav-dropdown-summary {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	cursor: pointer;
	list-style: none;
	color: rgba(247, 245, 240, 0.85);
	font-size: var(--text-small);
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: var(--space-2) var(--space-3);
}
.ec-nav-dropdown-summary::-webkit-details-marker {
	display: none;
}
.ec-nav-dropdown-summary:hover {
	color: var(--amber);
}
.ec-nav-dropdown-arrow {
	font-size: 0.6rem;
	transition: transform 0.15s ease;
}
.ec-nav-dropdown[open] .ec-nav-dropdown-arrow {
	transform: rotate(180deg);
}
.ec-nav-dropdown-menu {
	background: var(--ink-navy-deep);
	border: 1px solid var(--line-dark);
	border-radius: var(--radius);
	padding: var(--space-1) 0;
	margin-top: var(--space-1);
}
.ec-nav-dropdown-menu a {
	display: block;
	padding: var(--space-1) var(--space-4);
	font-size: var(--text-small);
	font-weight: 500;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
}
@media (min-width: 861px) {
	.ec-nav-dropdown-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 220px;
		max-width: calc(100vw - var(--space-4));
		box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
		z-index: 60;
	}
}

.ec-nav-toggle {
	display: none;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	color: var(--white) !important;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	padding: var(--space-1);
	flex-shrink: 0;
}
.ec-nav-close {
	display: none;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
}
@media (max-width: 860px) {
	.ec-nav {
		display: flex;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: auto;
		width: 300px;
		max-width: 85vw;
		height: 100vh;
		background: var(--ink-navy);
		flex-direction: column;
		gap: 0;
		padding: calc(var(--admin-bar-offset, 0px) + var(--space-6)) 0 var(--space-4);
		border-top: none;
		border-left: 1px solid var(--line-dark);
		box-shadow: -12px 0 40px rgba(0, 0, 0, 0.4);
		z-index: 110;
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform 0.25s ease;
	}
	.ec-nav.is-open {
		transform: translateX(0);
	}
	.ec-nav-close {
		position: absolute;
		top: var(--admin-bar-offset, 0px);
		right: var(--space-2);
		background: none;
		border: none;
		color: var(--white);
		font-size: 2rem;
		line-height: 1;
		padding: var(--space-2);
		cursor: pointer;
	}
	.ec-nav a {
		padding: var(--space-2) var(--space-3);
		display: block;
	}
	.ec-nav-toggle {
		display: block;
	}
	.ec-header-cta {
		display: none;
	}
	.ec-nav-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 105;
	}
	.ec-nav-overlay.is-visible {
		display: block;
	}
	.ec-nav-dropdown-summary {
		width: 100%;
	}
	.ec-nav-dropdown-menu {
		background: rgba(0, 0, 0, 0.2);
		border: none;
		box-shadow: none;
	}
	.ec-nav-dropdown-menu a {
		padding-left: var(--space-5);
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */
.ec-footer {
	background: var(--ink-navy);
	color: rgba(247, 245, 240, 0.7);
	padding: var(--space-7) 0 var(--space-4);
}
.ec-footer-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: var(--space-5);
}
.ec-footer-brand p {
	color: rgba(247, 245, 240, 0.6);
	font-size: var(--text-small);
	max-width: 34ch;
	margin-top: var(--space-1);
}
.ec-footer h4 {
	color: var(--white);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: var(--space-2);
}
.ec-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--space-1);
	font-size: var(--text-small);
}
.ec-footer a:hover {
	color: var(--amber);
}
.ec-footer-bottom {
	margin-top: 4rem !important;
	padding-top: 2rem !important;
	border-top: 1px solid var(--line-dark);
	font-size: var(--text-small);
	text-align: center;
	color: rgba(247, 245, 240, 0.5);
}
@media (max-width: 860px) {
	.ec-footer-grid {
		grid-template-columns: 1fr 1fr;
	}
	.ec-footer-brand {
		grid-column: 1 / -1;
	}
}
@media (max-width: 480px) {
	.ec-footer-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Footer legal links row
   ========================================================================== */
.ec-footer-legal-links {
	display: flex;
	justify-content: center;
	gap: var(--space-3);
	flex-wrap: wrap;
	margin-bottom: var(--space-2);
}
.ec-footer-legal-links a {
	font-size: var(--text-small);
	color: rgba(247, 245, 240, 0.55);
}
.ec-footer-legal-links a:hover {
	color: var(--amber);
}
