/*
Theme Name: MCIT
Theme URI: https://mcit.uk
Author: MCIT
Author URI: https://mcit.uk
Description: Custom theme for MCIT - IT support for Isle of Wight non-profits and small businesses. Covers networking, internet, CCTV, webcams, Microsoft 365, and local/remote support.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mcit
*/

/* =========================================================
   1. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-base);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.25em; }
a { color: var(--color-teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

h1, h2, h3, h4 {
	font-family: var(--font-base);
	color: var(--color-ink);
	line-height: 1.2;
	margin: 0 0 0.5em;
	font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important;
	left: -9999px;
	top: -9999px;
}

/* =========================================================
   2. VARIABLES
   ========================================================= */
:root {
	--color-ink: #0B2545;
	--color-navy: #0F2A4A;
	--color-navy-dark: #081A30;
	--color-teal: #14B8A6;
	--color-teal-dark: #0D9488;
	--color-blue: #2563EB;
	--color-violet: #7C3AED;
	--color-amber: #B45309;
	--color-amber-bright: #F59E0B;
	--color-bg: #FFFFFF;
	--color-bg-alt: #F4F7F9;
	--color-border: #E2E8F0;
	--color-text: #344050;
	--color-text-muted: #5B6B7A;
	--color-white: #FFFFFF;
	--color-success-bg: #ECFDF5;
	--color-success-text: #065F46;
	--color-error-bg: #FEF2F2;
	--color-error-text: #991B1B;

	--font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--container-width: 1160px;
	--radius: 10px;
	--shadow: 0 4px 18px rgba(11, 37, 69, 0.08);
	--shadow-lg: 0 12px 32px rgba(11, 37, 69, 0.14);
}

/* =========================================================
   3. LAYOUT
   ========================================================= */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 24px;
}

.container.narrow { max-width: 880px; }

.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-navy { background: var(--color-navy); color: rgba(255,255,255,0.92); }
.section-navy h2, .section-navy h3 { color: #fff; }

.section-head { max-width: 700px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-teal-dark);
	margin-bottom: 10px;
}
.section-navy .eyebrow { color: var(--color-teal); }
.lede { font-size: 1.1rem; color: var(--color-text-muted); }
.section-navy .lede { color: rgba(255,255,255,0.78); }

/* =========================================================
   4. BUTTONS
   ========================================================= */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.97rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
	text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
	background: var(--color-teal);
	color: #04201C;
	box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--color-teal-dark); color: #fff; }
.btn-outline {
	background: transparent;
	border-color: rgba(255,255,255,0.55);
	color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-outline-dark {
	background: transparent;
	border-color: var(--color-ink);
	color: var(--color-ink);
}
.btn-outline-dark:hover { background: var(--color-ink); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 28px; }

.hero-phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-weight: 600;
	font-size: 1.05rem;
}
.hero-phone svg { width: 18px; height: 18px; color: var(--color-teal); flex-shrink: 0; }
.hero-phone:hover { color: var(--color-teal); }

/* =========================================================
   5. TOP BAR
   ========================================================= */
.top-bar {
	background: var(--color-navy-dark);
	color: rgba(255,255,255,0.85);
	font-size: 0.85rem;
}
.top-bar .container {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	justify-content: space-between;
	align-items: center;
	padding-top: 8px;
	padding-bottom: 8px;
}
.top-bar-info { display: flex; flex-wrap: wrap; gap: 18px; }
.top-bar a { color: #fff; }
.top-bar-info span { display: inline-flex; align-items: center; gap: 6px; }
.top-bar svg { width: 14px; height: 14px; flex-shrink: 0; }

/* =========================================================
   6. HEADER / NAV
   ========================================================= */
.site-header {
	background: var(--color-navy);
	position: relative;
	z-index: 50;
}
.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 14px;
	padding-bottom: 14px;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding a { display: flex; align-items: center; gap: 10px; color: #fff; }
.site-branding a:hover { text-decoration: none; }
.site-logo-mark {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--color-teal);
	color: var(--color-navy-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.05rem;
	flex-shrink: 0;
}
.site-title {
	font-weight: 800;
	font-size: 1.3rem;
	color: #fff;
	letter-spacing: 0.01em;
}
.site-tagline {
	display: block;
	font-size: 0.7rem;
	font-weight: 500;
	color: rgba(255,255,255,0.6);
	letter-spacing: 0.04em;
}
.site-logo {
	height: 44px;
	width: auto;
	max-width: 230px;
	object-fit: contain;
	display: block;
	/* The supplied logo is solid navy on transparent — invisible on this
	   dark navy header, so force it to render as a white silhouette.
	   Swap this filter out (or remove it) if you upload a light/white
	   logo variant instead. */
	filter: brightness(0) invert(1);
}

.main-nav-toggle {
	display: none;
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	padding: 8px;
}
.main-nav-toggle svg { width: 26px; height: 26px; }
.main-nav-toggle .icon-close { display: none; }
.main-nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.main-nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.main-nav-inner {
	display: flex;
	align-items: center;
	gap: 6px;
}

.main-nav ul {
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.main-nav a {
	display: inline-block;
	padding: 10px 16px;
	color: rgba(255,255,255,0.88);
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: 8px;
}
.main-nav a:hover,
.main-nav li.current-menu-item > a {
	background: rgba(255,255,255,0.1);
	color: #fff;
	text-decoration: none;
}
.main-nav .btn-primary { margin-left: 8px; padding: 10px 20px; }

/* =========================================================
   7. HERO
   ========================================================= */
.hero {
	background: linear-gradient(155deg, var(--color-navy) 0%, var(--color-navy-dark) 70%);
	color: #fff;
	padding: 76px 0 84px;
	position: relative;
	overflow: hidden;
}
.hero-video {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}
.hero-video iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw;
	min-height: 100%;
	min-width: 177.78vh;
	transform: translate(-50%, -50%);
	border: 0;
}
.hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(135deg, rgba(15,42,74,0.93) 0%, rgba(13,148,136,0.8) 48%, rgba(124,58,237,0.68) 100%);
}
.hero .container {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	align-items: center;
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p.lede { color: rgba(255,255,255,0.82); max-width: 540px; }
.hero-simple .container { grid-template-columns: 1fr; }
.hero-simple .hero-copy { max-width: 760px; }

.hero-art {
	background: rgba(7, 18, 35, 0.6);
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 18px;
	padding: 28px;
	backdrop-filter: blur(8px);
	box-shadow: 0 24px 48px rgba(0,0,0,0.38);
}
.hero-art-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.hero-art-item {
	background: rgba(9, 23, 44, 0.92);
	border: 1px solid rgba(255,255,255,0.22);
	border-radius: 12px;
	padding: 18px 14px;
	text-align: center;
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 10px 22px rgba(0,0,0,0.3);
}
.hero-art-item:hover { transform: translateY(-3px); background: rgba(9, 23, 44, 1); border-color: rgba(255,255,255,0.4); }
.hero-art-item .icon-badge {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 10px;
	background: rgba(20, 184, 166, 0.25);
}
.hero-art-item svg { width: 22px; height: 22px; color: var(--color-teal); transition: transform 0.2s ease; }
.hero-art-item:hover svg { transform: scale(1.15); }
.hero-art-item span { display: block; font-size: 0.85rem; color: #fff; font-weight: 700; letter-spacing: 0.01em; }
.hero-art-item--blue .icon-badge { background: rgba(56, 189, 248, 0.25); }
.hero-art-item--blue svg { color: #7DD3FC; }
.hero-art-item--violet .icon-badge { background: rgba(167, 139, 250, 0.25); }
.hero-art-item--violet svg { color: #C4B5FD; }
.hero-art-item--amber .icon-badge { background: rgba(245, 158, 11, 0.25); }
.hero-art-item--amber svg { color: var(--color-amber-bright); }

/* =========================================================
   8. TRUST STRIP
   ========================================================= */
.trust-strip {
	background: var(--color-bg-alt);
	border-bottom: 1px solid var(--color-border);
}
.trust-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	padding: 30px 0;
}
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item svg { width: 30px; height: 30px; color: var(--color-teal-dark); flex-shrink: 0; }
.trust-item strong { display: block; color: var(--color-ink); font-size: 0.97rem; }
.trust-item span { font-size: 0.85rem; color: var(--color-text-muted); }
.trust-item--blue svg { color: var(--color-blue); }
.trust-item--violet svg { color: var(--color-violet); }
.trust-item--amber svg { color: var(--color-amber); }

/* =========================================================
   8b. SCROLL-REVEAL ANIMATION
   ========================================================= */
.js-anim .reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-anim .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js-anim .reveal-d1.is-visible { transition-delay: 0.08s; }
.js-anim .reveal-d2.is-visible { transition-delay: 0.16s; }
.js-anim .reveal-d3.is-visible { transition-delay: 0.24s; }
.js-anim .reveal-d4.is-visible { transition-delay: 0.32s; }
.js-anim .reveal-d5.is-visible { transition-delay: 0.4s; }
.js-anim .reveal-d6.is-visible { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
	.js-anim .reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* =========================================================
   9. CARDS / GRIDS
   ========================================================= */
.grid {
	display: grid;
	gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 28px;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-icon {
	width: 50px;
	height: 50px;
	border-radius: 12px;
	background: rgba(20,184,166,0.12);
	color: var(--color-teal-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}
.card-icon svg { width: 26px; height: 26px; }
.card-icon--blue { background: rgba(37,99,235,0.12); color: var(--color-blue); }
.card-icon--violet { background: rgba(124,58,237,0.12); color: var(--color-violet); }
.card-icon--amber { background: rgba(245,158,11,0.16); color: var(--color-amber); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--color-text-muted); margin-bottom: 0; font-size: 0.95rem; }
.card .card-link { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 0.9rem; }

/* Centre a lone last card when 7 cards wrap to a single item on the final row (desktop, 3-col grid only). */
@media (min-width: 981px) {
	.services-grid .card:last-child:nth-child(3n+1) { grid-column: 2; }
}

.service-detail {
	display: grid;
	grid-template-columns: 64px 1fr;
	gap: 20px;
	padding: 32px 0;
	border-bottom: 1px solid var(--color-border);
}
.service-detail:last-child { border-bottom: none; }
.service-detail .card-icon { width: 56px; height: 56px; margin-bottom: 0; }
.service-detail h3 { margin-bottom: 10px; font-size: 1.3rem; }
.service-detail p { color: var(--color-text-muted); }
.service-detail ul { color: var(--color-text-muted); margin: 10px 0 0; padding-left: 1.1em; }
.service-detail li { margin-bottom: 4px; }

/* =========================================================
   10. CTA BANNER
   ========================================================= */
.cta-banner {
	background: linear-gradient(135deg, var(--color-teal-dark), var(--color-teal));
	border-radius: 20px;
	padding: 48px;
	color: #04201C;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	flex-wrap: wrap;
}
.cta-banner h2 { color: #04201C; margin-bottom: 6px; }
.cta-banner p { margin: 0; color: rgba(4,32,28,0.75); }
.cta-banner .btn-primary { background: #04201C; color: #fff; }
.cta-banner .btn-primary:hover { background: #061f1a; }

/* =========================================================
   11. ABOUT / STATS
   ========================================================= */
.stat-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin: 36px 0;
}
.stat-box {
	background: var(--color-bg-alt);
	border-radius: var(--radius);
	padding: 24px;
	text-align: center;
}
.stat-box strong {
	display: block;
	font-size: 1.9rem;
	color: var(--color-teal-dark);
	font-weight: 800;
}
.stat-box span { font-size: 0.85rem; color: var(--color-text-muted); }

.values-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.values-list li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 18px 20px;
}
.values-list svg { width: 22px; height: 22px; color: var(--color-teal-dark); flex-shrink: 0; margin-top: 2px; }
.values-list strong { display: block; color: var(--color-ink); margin-bottom: 2px; }
.values-list span.desc { color: var(--color-text-muted); font-size: 0.92rem; }

/* =========================================================
   12. FORMS / CONTACT
   ========================================================= */
.contact-layout {
	display: grid;
	grid-template-columns: 1.3fr 0.9fr;
	gap: 48px;
	align-items: flex-start;
}
.contact-card {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 36px;
	box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--color-ink);
	margin-bottom: 6px;
}
.form-group .required { color: var(--color-error-text); }
.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 0.97rem;
	background: #fff;
	color: var(--color-text);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--color-teal);
	box-shadow: 0 0 0 3px rgba(20,184,166,0.18);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-hp { position: absolute; left: -9999px; top: -9999px; }
.form-note { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 14px; }

.form-notice {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 22px;
	font-weight: 600;
	font-size: 0.92rem;
}
.form-notice.success { background: var(--color-success-bg); color: var(--color-success-text); }
.form-notice.error { background: var(--color-error-bg); color: var(--color-error-text); }

.contact-info-card {
	background: var(--color-navy);
	color: rgba(255,255,255,0.9);
	border-radius: var(--radius);
	padding: 32px;
	margin-bottom: 24px;
}
.contact-info-card h3 { color: #fff; }
.contact-info-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.contact-info-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-info-list svg { width: 20px; height: 20px; color: var(--color-teal); flex-shrink: 0; margin-top: 2px; }
.contact-info-list a { color: #fff; font-weight: 600; }
.contact-map {
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--color-border);
}
.contact-map iframe { width: 100%; height: 280px; border: 0; display: block; }

/* =========================================================
   13. FOOTER
   ========================================================= */
.site-footer {
	background: var(--color-navy-dark);
	color: rgba(255,255,255,0.75);
	padding: 56px 0 24px;
	font-size: 0.92rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 36px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 {
	color: #fff;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 16px;
}
.footer-brand .site-title { color: #fff; }
.footer-logo {
	height: 36px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
	display: block;
	margin-bottom: 4px;
	filter: brightness(0) invert(1);
}
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 12px; max-width: 320px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: rgba(255,255,255,0.75); }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 22px;
	font-size: 0.82rem;
	color: rgba(255,255,255,0.5);
}

/* =========================================================
   14. 404
   ========================================================= */
.error-404 { text-align: center; padding: 100px 0; }
.error-404 .code { font-size: 5rem; font-weight: 800; color: var(--color-teal-dark); margin-bottom: 0; }

/* =========================================================
   15. RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
	.hero .container { grid-template-columns: 1fr; }
	.hero-art { order: -1; }
	.trust-grid { grid-template-columns: repeat(2, 1fr); }
	.grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
	.stat-row { grid-template-columns: repeat(2, 1fr); }
	.contact-layout { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
	.top-bar .container { justify-content: center; text-align: center; }
	.main-nav-toggle { display: inline-flex; }
	.main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--color-navy);
		border-top: 1px solid rgba(255,255,255,0.1);
		box-shadow: var(--shadow-lg);
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 18px; }
	.main-nav a { display: block; padding: 12px 6px; }
	.main-nav .btn-primary { margin: 10px 0 0; text-align: center; justify-content: center; }
	.grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
	.service-detail { grid-template-columns: 1fr; }
	.cta-banner { flex-direction: column; text-align: center; padding: 36px 24px; }
	.form-row { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.section { padding: 48px 0; }
	.hero-video { display: none; }
	.hero-overlay { background: linear-gradient(150deg, var(--color-navy) 0%, var(--color-teal-dark) 55%, #6D28D9 130%); }
	.cta-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	.hero-video { display: none; }
	.hero-overlay { background: linear-gradient(150deg, var(--color-navy) 0%, var(--color-teal-dark) 55%, #6D28D9 130%); }
}
