/*
 * Media Creative Hub — Design tokens, reset, base typography and layout.
 */

:root {
	/* Color system */
	--mch-color-primary: #081B3A;
	--mch-color-secondary: #102A56;
	--mch-color-soft-blue: #EAF2FF;
	--mch-color-bg-light: #F5F8FC;
	--mch-color-white: #FFFFFF;
	--mch-color-warm-white: #FDFDFC;
	--mch-color-text: #0B1830;
	--mch-color-text-secondary: #5E6878;
	--mch-color-border: #E5EAF1;
	--mch-color-success: #158567;
	--mch-color-error: #C83B4D;

	/* Typography */
	--mch-font-body: "Cairo", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--mch-font-heading: "Cairo", "DM Sans", var(--mch-font-body);

	--mch-size-display: clamp(3rem, 7vw, 7rem);
	--mch-size-h1: clamp(2.7rem, 5vw, 5rem);
	--mch-size-h2: clamp(2.1rem, 4vw, 3.75rem);
	--mch-size-h3: clamp(1.4rem, 2.2vw, 2rem);
	--mch-size-body-lg: 1.1875rem;
	--mch-size-body: 1rem;
	--mch-size-label: 0.8125rem;

	/* Layout */
	--mch-container-width: 1200px;
	--mch-container-wide: 1560px;
	--mch-section-padding: 120px;
	--mch-radius-card: 16px;
	--mch-radius-sm: 8px;
	--mch-radius-pill: 999px;
	--mch-border-width: 1px;
	--mch-transition-fast: 0.25s ease;
	--mch-transition-hover: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------- Reset ---------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--mch-color-white);
	color: var(--mch-color-text);
	font-family: var(--mch-font-body);
	font-size: var(--mch-size-body);
	line-height: 1.65;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.mch-main-content {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

img,
picture,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: 0;
	cursor: pointer;
}

/* ---------------- Typography ---------------- */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--mch-font-heading);
	color: var(--mch-color-text);
	line-height: 1.15;
	font-weight: 600;
	margin: 0 0 0.5em;
}

h1 { font-size: var(--mch-size-h1); }
h2 { font-size: var(--mch-size-h2); }
h3 { font-size: var(--mch-size-h3); }

p {
	margin: 0 0 1.25em;
	color: var(--mch-color-text);
}

.mch-eyebrow {
	display: inline-block;
	font-size: var(--mch-size-label);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mch-color-primary);
	background: var(--mch-color-soft-blue);
	border-radius: var(--mch-radius-pill);
	padding: 0.4em 1em;
	margin-bottom: 1em;
}

/* ---------------- Layout ---------------- */

.mch-container {
	width: 100%;
	max-width: var(--mch-container-width);
	margin-inline: auto;
	padding-inline: 24px;
}

.mch-container-wide {
	width: 100%;
	max-width: var(--mch-container-wide);
	margin-inline: auto;
	padding-inline: 24px;
}

.mch-content-area {
	padding-block: 64px;
}

section[class^="mch-"] {
	padding-block: var(--mch-section-padding);
}

/* ---------------- Buttons ---------------- */

.mch-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.9em 1.8em;
	border-radius: var(--mch-radius-pill);
	font-weight: 600;
	font-size: 0.9375rem;
	transition: transform var(--mch-transition-fast), background-color var(--mch-transition-fast), color var(--mch-transition-fast), box-shadow var(--mch-transition-fast);
	min-height: 44px;
}

.mch-btn-primary {
	background: var(--mch-color-primary);
	color: var(--mch-color-white);
}

.mch-btn-primary:hover,
.mch-btn-primary:focus-visible {
	background: var(--mch-color-secondary);
	transform: translateY(-2px);
}

.mch-btn-secondary {
	background: transparent;
	color: var(--mch-color-primary);
	box-shadow: inset 0 0 0 1.5px var(--mch-color-primary);
}

.mch-btn-secondary:hover,
.mch-btn-secondary:focus-visible {
	background: var(--mch-color-soft-blue);
}

.mch-btn .mch-icon-arrow {
	transition: transform var(--mch-transition-fast);
}

.mch-btn:hover .mch-icon-arrow {
	transform: translate(2px, -2px);
}

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

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mch-skip-link {
	position: fixed;
	top: -100px;
	left: 1rem;
	z-index: 100000;
	background: var(--mch-color-primary);
	color: var(--mch-color-white);
	padding: 0.75em 1.25em;
	border-radius: var(--mch-radius-sm);
	transition: top var(--mch-transition-fast);
}

.mch-skip-link:focus {
	top: 1rem;
	width: auto;
	height: auto;
	clip: auto;
	margin: 0;
}

:focus-visible {
	outline: 2px solid var(--mch-color-primary);
	outline-offset: 2px;
}

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

/* ---------------- Preloader ---------------- */

.mch-preloader {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #F5F8FD;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mch-preloader.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.mch-preloader img {
	width: 96px;
	height: 96px;
}

body.mch-is-loading {
	cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
	.mch-preloader {
		transition-duration: 0.001ms;
	}
}

/* ---------------- One-page anchor sections ---------------- */

/*
 * Matches the header/footer nav anchors exactly (see header.php's
 * mch_fallback_items and footer.php) so section headings never end up
 * hidden behind the sticky header when scrolled to.
 */
#mch-home,
#mch-about,
#mch-capabilities,
#mch-approach,
#mch-projects,
#mch-founder,
#mch-partners,
#mch-contact {
	scroll-margin-top: 110px;
}

@media (max-width: 900px) {
	#mch-home,
	#mch-about,
	#mch-capabilities,
	#mch-approach,
	#mch-projects,
	#mch-founder,
	#mch-partners,
	#mch-contact {
		scroll-margin-top: 88px;
	}
}

/* ---------------- Fallback header ---------------- */

.mch-fallback-header-bar {
	position: sticky;
	top: 0;
	z-index: 999;
	border-bottom: 1px solid var(--mch-color-border);
	background: var(--mch-color-white);
	transition: padding var(--mch-transition-fast), box-shadow var(--mch-transition-fast);
}

body.admin-bar .mch-fallback-header-bar {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .mch-fallback-header-bar {
		top: 46px;
	}
}

/*
 * Elementor's editor iframe computes where to place its "add new section"
 * UI without accounting for a sticky header holding its own space — this
 * makes new/empty sections look like they start behind the header. Sticky
 * positioning is only meaningful on the live, scrollable front end anyway,
 * so it's simply turned off while editing.
 */
body.elementor-editor-active .mch-fallback-header-bar {
	position: relative;
}

.mch-fallback-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-block: 20px;
	gap: 32px;
}

.mch-fallback-header-bar.is-stuck .mch-fallback-header-inner {
	padding-block: 14px;
}

.mch-fallback-logo {
	display: inline-flex;
	flex-shrink: 0;
	color: var(--mch-color-primary);
}

.mch-logo-image {
	display: block;
	width: auto;
	object-fit: contain;
}

/* Header logo: compact, shrinks further once the header goes sticky/compact */
.mch-logo-image-header {
	height: 40px;
	max-height: 40px;
	transition: height var(--mch-transition-fast), max-height var(--mch-transition-fast);
}

.mch-fallback-header-bar.is-stuck .mch-logo-image-header {
	height: 32px;
	max-height: 32px;
}

.mch-mobile-nav .mch-logo-image-header {
	height: 36px;
	max-height: 36px;
}

/* Footer logo: a little more room to breathe than the header */
.mch-logo-image-footer {
	height: 56px;
	max-height: 56px;
}

.mch-fallback-logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.mch-fallback-logo-line-1 {
	font-family: var(--mch-font-heading);
	font-weight: 800;
	font-style: italic;
	font-size: 1.5rem;
	letter-spacing: -0.01em;
}

.mch-fallback-logo-line-2 {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.3em;
	color: var(--mch-color-text-secondary);
	margin-top: 2px;
	margin-left: 2px;
}

/* Primary nav + dropdowns */

.mch-fallback-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.mch-nav-menu,
.mch-mobile-nav-menu {
	display: flex;
	align-items: center;
	gap: 32px;
}

.mch-nav-menu li {
	position: relative;
}

.mch-nav-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	padding: 0.5em 0;
}

.mch-nav-menu .menu-item-has-children > a::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	margin-top: -4px;
	transition: transform var(--mch-transition-fast);
}

.mch-nav-menu .menu-item-has-children.is-open > a::after,
.mch-nav-menu .menu-item-has-children:hover > a::after {
	transform: rotate(225deg);
	margin-top: 2px;
}

.mch-nav-menu a:hover,
.mch-nav-menu .current-menu-item > a {
	color: var(--mch-color-secondary);
}

.mch-nav-menu .current-menu-item > a {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}

.mch-nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--mch-color-white);
	border: 1px solid var(--mch-color-border);
	border-radius: var(--mch-radius-sm);
	box-shadow: 0 24px 48px -24px rgba(8, 27, 58, 0.2);
	padding: 10px;
	display: none;
	flex-direction: column;
	gap: 2px;
	z-index: 10;
}

.mch-nav-menu .menu-item-has-children:hover > .sub-menu,
.mch-nav-menu .menu-item-has-children:focus-within > .sub-menu,
.mch-nav-menu .menu-item-has-children.is-open > .sub-menu {
	display: flex;
}

.mch-nav-menu .sub-menu a {
	display: block;
	padding: 0.6em 0.8em;
	border-radius: var(--mch-radius-sm);
}

.mch-nav-menu .sub-menu a:hover {
	background: var(--mch-color-soft-blue);
}

/* Header actions cluster */

.mch-header-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

.mch-header-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	flex-shrink: 0;
	border-radius: 50%;
	border: 1px solid var(--mch-color-border);
	color: var(--mch-color-primary);
	transition: background-color var(--mch-transition-fast);
	box-sizing: border-box;
}

.mch-header-icon-btn:hover {
	background: var(--mch-color-soft-blue);
}

.mch-header-phone {
	display: none;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--mch-color-primary);
	white-space: nowrap;
}

.mch-header-cta {
	white-space: nowrap;
}

.mch-header-cta-stuck {
	display: none;
}

.mch-header-menu-toggle {
	display: none;
}

.mch-fallback-header-bar.is-stuck .mch-header-phone {
	display: inline-flex;
}

.mch-fallback-header-bar.is-stuck .mch-header-cta-default {
	display: none;
}

.mch-fallback-header-bar.is-stuck .mch-header-cta-stuck {
	display: inline-flex;
}

/* Mobile nav drawer */

.mch-mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 1001;
	background: linear-gradient(180deg, var(--mch-color-white) 0%, var(--mch-color-bg-light) 100%);
	padding: 24px 24px 32px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.mch-mobile-nav[hidden] {
	display: none;
}

.mch-mobile-nav-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--mch-color-border);
}

.mch-mobile-nav-menu {
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	width: 100%;
}

.mch-mobile-nav-menu li {
	width: 100%;
}

.mch-mobile-nav-menu > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 1.05em 1.25em;
	border-radius: 18px;
	font-size: 1.375rem;
	font-family: var(--mch-font-heading);
	font-weight: 700;
	color: var(--mch-color-text);
	transition: background-color 0.25s ease, color 0.25s ease;
	animation: mch-mobile-item-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mch-mobile-nav-menu > li > a::after {
	content: "";
	flex-shrink: 0;
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	opacity: 0.4;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.mch-mobile-nav-menu > li > a:hover,
.mch-mobile-nav-menu > li > a:focus-visible {
	background: var(--mch-color-soft-blue);
}

.mch-mobile-nav-menu > li > a:hover::after,
.mch-mobile-nav-menu > li > a:focus-visible::after {
	opacity: 1;
	transform: rotate(-45deg) translate(3px, -3px);
}

.mch-mobile-nav-menu .current-menu-item > a {
	background: var(--mch-color-primary);
	color: var(--mch-color-white);
}

.mch-mobile-nav-menu .current-menu-item > a::after {
	opacity: 1;
}

.mch-mobile-nav-menu li:nth-child(1) > a { animation-delay: 0.03s; }
.mch-mobile-nav-menu li:nth-child(2) > a { animation-delay: 0.06s; }
.mch-mobile-nav-menu li:nth-child(3) > a { animation-delay: 0.09s; }
.mch-mobile-nav-menu li:nth-child(4) > a { animation-delay: 0.12s; }
.mch-mobile-nav-menu li:nth-child(5) > a { animation-delay: 0.15s; }
.mch-mobile-nav-menu li:nth-child(6) > a { animation-delay: 0.18s; }
.mch-mobile-nav-menu li:nth-child(7) > a { animation-delay: 0.21s; }
.mch-mobile-nav-menu li:nth-child(8) > a { animation-delay: 0.24s; }

@keyframes mch-mobile-item-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mch-mobile-nav-menu .sub-menu {
	padding-left: 20px;
	display: flex;
	flex-direction: column;
}

.mch-mobile-nav-menu .sub-menu a {
	padding: 0.7em 1.25em;
	color: var(--mch-color-text-secondary);
	border-radius: 14px;
	font-weight: 500;
}

.mch-mobile-nav-menu .sub-menu a:hover {
	background: var(--mch-color-soft-blue);
}

.mch-mobile-nav-phone {
	font-size: 1.125rem;
	padding-left: 4px;
}

body.mch-mobile-nav-open {
	overflow: hidden;
}

/* ---------------- Fallback footer ---------------- */

.mch-fallback-footer-bar {
	border-top: 1px solid var(--mch-color-border);
	background-color: var(--mch-color-bg-light);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	margin-top: auto;
	padding-top: 80px;
}

.mch-footer-grid {
	display: grid;
	grid-template-columns: 1.7fr 0.85fr 0.85fr 1.4fr;
	gap: 32px;
	padding-bottom: 56px;
}

.mch-footer-brand .mch-fallback-logo {
	margin-bottom: 20px;
}

.mch-footer-description {
	color: var(--mch-color-text-secondary);
	max-width: 320px;
}

.mch-footer-cta {
	margin-top: 8px;
}

.mch-footer-social {
	margin-top: 40px;
}

.mch-footer-social-label {
	display: block;
	font-size: var(--mch-size-label);
	font-weight: 600;
	color: var(--mch-color-text-secondary);
	margin-bottom: 12px;
}

.mch-footer-social-icons {
	display: flex;
	gap: 10px;
}

.mch-footer-social-icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--mch-color-white);
	color: var(--mch-color-primary);
	transition: background-color var(--mch-transition-fast), color var(--mch-transition-fast);
}

.mch-footer-social-icons a:hover {
	background: var(--mch-color-primary);
	color: var(--mch-color-white);
}

.mch-footer-column-title {
	font-size: 1rem;
	margin-bottom: 6px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--mch-color-primary);
	display: inline-block;
}

.mch-footer-menu {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
}

.mch-footer-menu a {
	color: var(--mch-color-text-secondary);
}

.mch-footer-menu a:hover {
	color: var(--mch-color-primary);
}

.mch-footer-company-name {
	font-family: var(--mch-font-heading);
	font-weight: 700;
	color: var(--mch-color-text);
	margin: 12px 0 0;
}

.mch-footer-contact-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 12px 0 32px;
}

.mch-footer-contact-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--mch-color-text-secondary);
	font-size: 0.9375rem;
}

.mch-footer-contact-list svg {
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--mch-color-primary);
}

.mch-newsletter-title {
	margin-top: 8px;
}

.mch-newsletter-text {
	color: var(--mch-color-text-secondary);
	font-size: 0.9375rem;
	margin: 12px 0 16px;
}

.mch-newsletter-form {
	display: flex;
	border: 1px solid var(--mch-color-border);
	border-radius: var(--mch-radius-pill);
	overflow: hidden;
	background: var(--mch-color-white);
}

.mch-newsletter-form input[type="email"] {
	flex: 1;
	border: 0;
	padding: 0.85em 1.2em;
	background: transparent;
	min-width: 0;
}

.mch-newsletter-form button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	background: var(--mch-color-primary);
	color: var(--mch-color-white);
	flex-shrink: 0;
}

.mch-newsletter-form[data-mch-newsletter-unconfigured] button {
	opacity: 0.5;
}

.mch-footer-bottom {
	border-top: 1px solid var(--mch-color-border);
	padding-block: 24px;
}

.mch-footer-bottom-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
}

.mch-footer-copyright {
	font-size: var(--mch-size-label);
	color: var(--mch-color-text-secondary);
	margin: 0;
}

/* Prevent double spacing / overflow around Elementor content */
.mch-elementor-built .mch-main-content,
body.mch-elementor-page main {
	overflow-x: hidden;
}

.elementor-section.elementor-section-full_width,
.elementor-section.elementor-section-stretched {
	max-width: none !important;
}
