/*
Theme Name: Ell Grove
Theme URI: https://ellgrove.co.uk/
Author: Gladys Abaka
Description: Premium, fast, mobile-first theme for Ell Grove Ltd, Civil & Building Contractor (Edinburgh and Somerset). Brand colours and logo built in, Home / About / Services / Portfolio / Contact layouts, working quote form, Customizer settings and full Elementor support with drag-and-drop Ell Grove widgets.
Version: 2.1.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: ellgrove
*/

/* ---------- Brand ----------
   Brand blue  #0F75BB  (logo wordmark)
   Brand navy  #20419C  (logo line-art + strapline)
   Ink         #0B1736  (deep navy for dark sections)
------------------------------ */
:root {
	--blue: #0f75bb;
	--blue-light: #5fb3ea;
	--navy: #20419c;
	--ink: #0b1736;
	--ink-2: #13224a;
	--text: #3a4560;
	--muted: #6a7590;
	--line: #e2e7f0;
	--bg: #ffffff;
	--bg-soft: #f3f6fb;
	--radius: 6px;
	--max: 1200px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-head: "Archivo", "Inter", system-ui, sans-serif;
	--font-label: "Oswald", "Arial Narrow", sans-serif;
	--shadow: 0 24px 60px -32px rgba(11, 23, 54, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.7;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; margin: 0 0 .55em; font-weight: 800; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1.1em; }
::selection { background: var(--blue); color: #fff; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 999; clip: auto; width: auto; height: auto; background: #fff; padding: 10px 16px; }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.section { padding: clamp(70px, 9vw, 120px) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--ink); color: #b9c3dc; }
.section--dark h2, .section--dark h3 { color: #fff; }

/* Small condensed label — echoes the logo strapline */
.eyebrow {
	display: inline-flex; align-items: center; gap: 12px;
	font-family: var(--font-label);
	font-size: .9rem; font-weight: 500;
	letter-spacing: .16em; text-transform: uppercase;
	color: var(--blue);
	margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; }
.section--dark .eyebrow, .hero .eyebrow { color: var(--blue-light); }
.section-head { max-width: 700px; margin-bottom: 54px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .eyebrow::after { content: ""; width: 34px; height: 2px; background: currentColor; }
.lead { font-size: 1.15rem; color: var(--muted); }
.section--dark .lead { color: #b9c3dc; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 15px 28px;
	border-radius: var(--radius);
	font-family: var(--font-label);
	font-weight: 500; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn::after { content: "→"; font-family: var(--font); transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(3px); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 12px 28px -14px rgba(15,117,187,.8); }
.btn--primary:hover { background: var(--navy); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: #fff; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--navy); color: #fff; }
.btn--outline-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--outline-dark:hover { background: #fff; color: var(--ink); }
.btn--outline-dark::after { content: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Top bar + header */
.topbar { background: var(--ink); color: #9fabc8; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; flex-wrap: wrap; }
.topbar a { color: #dbe3f3; text-decoration: none; }
.topbar a:hover { color: var(--blue-light); }
.topbar span + span { margin-left: 22px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 96px; gap: 20px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img, .custom-logo { height: 70px; width: auto; max-width: none; }
.main-nav ul { list-style: none; display: flex; gap: 34px; margin: 0; padding: 0; }
.main-nav a {
	text-decoration: none; font-family: var(--font-label); font-size: 1.02rem; letter-spacing: .08em; text-transform: uppercase;
	color: var(--ink); padding: 8px 0; border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { border-color: var(--blue); color: var(--navy); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 6px 0; }

@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.header-cta .btn { display: none; }
	.site-header .container { height: 74px; }
	.brand img, .custom-logo { height: 54px; }
	.main-nav { position: absolute; top: 74px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px 20px; }
	.main-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.main-nav .mobile-quote { display: inline-flex; margin: 0 20px 20px; }
	.topbar .hide-sm { display: none; }
}
@media (min-width: 961px) { .main-nav .mobile-quote { display: none; } }

/* Hero */
.hero {
	position: relative;
	color: #d4dcee;
	background:
		linear-gradient(100deg, rgba(11,23,54,.97) 0%, rgba(11,23,54,.86) 42%, rgba(11,23,54,.35) 100%),
		var(--hero-img, linear-gradient(135deg, var(--navy), var(--ink)));
	background-size: cover;
	background-position: center;
	padding: clamp(110px, 15vw, 190px) 0 clamp(100px, 13vw, 170px);
	overflow: hidden;
	isolation: isolate;
}
/* Blueprint line motif, taken from the logo's construction lines */
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
	background:
		linear-gradient(90deg, transparent calc(100% - 1px), rgba(95,179,234,.18) 0) 0 0 / 120px 120px,
		linear-gradient(0deg, transparent calc(100% - 1px), rgba(95,179,234,.18) 0) 0 0 / 120px 120px;
	mask-image: linear-gradient(100deg, #000 0%, transparent 60%);
	-webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 60%);
}
.hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
	background: linear-gradient(90deg, var(--navy) 0 50%, var(--blue) 50% 100%);
}
.hero h1 { color: #fff; max-width: 820px; }
.hero p { max-width: 640px; font-size: 1.18rem; margin-bottom: 38px; }
.hero--page { padding: clamp(80px, 11vw, 130px) 0 clamp(70px, 9vw, 110px); }
.hero--page h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.breadcrumb { font-family: var(--font-label); letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; color: #9fabc8; }
.breadcrumb a { color: #fff; text-decoration: none; }

/* Key facts strip */
.strip { background: #fff; position: relative; z-index: 2; }
.strip .container {
	display: grid; grid-template-columns: repeat(4, 1fr);
	background: #fff; box-shadow: var(--shadow); border-radius: var(--radius);
	margin-top: -56px; border-top: 4px solid var(--blue);
}
.strip-item { padding: 28px 26px; border-right: 1px solid var(--line); }
.strip-item:last-child { border-right: 0; }
.strip-item strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
.strip-item span { font-size: .92rem; color: var(--muted); }
@media (max-width: 760px) {
	.strip .container { grid-template-columns: repeat(2, 1fr); margin-top: -36px; }
	.strip-item:nth-child(2) { border-right: 0; }
	.strip-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Split: image + text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 6vw, 90px); align-items: center; }
.split-media { position: relative; aspect-ratio: 4/3.4; }
.split-media::before {
	content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 2px solid var(--blue); border-radius: var(--radius); z-index: 0;
}
.split-media .frame { position: relative; z-index: 1; height: 100%; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--navy), var(--ink)); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media .badge {
	position: absolute; z-index: 2; left: -18px; bottom: 34px; background: var(--navy); color: #fff;
	padding: 20px 24px; border-radius: var(--radius); font-weight: 600; line-height: 1.2; box-shadow: var(--shadow);
	font-family: var(--font-label); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem;
}
.split-media .badge strong { display: block; font-family: var(--font-head); font-size: 2.4rem; letter-spacing: 0; text-transform: none; }
.checklist { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 13px; }
.checklist li { position: relative; padding-left: 34px; color: var(--ink); }
.checklist li::before {
	content: ""; position: absolute; left: 0; top: 4px; width: 21px; height: 21px; border-radius: 50%;
	background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
@media (max-width: 860px) {
	.split { grid-template-columns: 1fr; }
	.split-media::before { inset: 14px -10px -14px 14px; }
	.split-media .badge { left: 14px; }
}

/* Cards */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
	position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 30px 34px;
	transition: transform .25s, box-shadow .25s, border-color .25s;
	overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--blue); transition: width .35s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { width: 100%; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.icon {
	width: 58px; height: 58px; border-radius: var(--radius); background: rgba(15,117,187,.09); color: var(--blue);
	display: grid; place-items: center; margin-bottom: 22px; transition: background .25s, color .25s;
}
.card:hover .icon { background: var(--blue); color: #fff; }
.icon svg { width: 28px; height: 28px; }
.section--dark .card { background: var(--ink-2); border-color: rgba(255,255,255,.07); }
.section--dark .card p { color: #a9b5d2; }
.section--dark .icon { background: rgba(95,179,234,.12); color: var(--blue-light); }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding: 30px 0 0; border-top: 1px solid rgba(255,255,255,.14); }
.step::before {
	counter-increment: step; content: "0" counter(step);
	font-family: var(--font-label); font-size: 3.2rem; font-weight: 500; color: var(--blue-light); line-height: 1; display: block; margin-bottom: 16px;
}
.step p { color: #a9b5d2; margin: 0; }

/* Portfolio gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .gallery-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery-grid, .gallery-grid.cols-3 { grid-template-columns: 1fr; } }
.project { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--ink); }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.project:hover img { transform: scale(1.05); }
.project figcaption {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 24px 22px; color: #fff;
	background: linear-gradient(transparent, rgba(11,23,54,.92));
	font-family: var(--font-label); letter-spacing: .1em; text-transform: uppercase; font-size: .95rem;
}
.project figcaption small { display: block; font-family: var(--font); letter-spacing: 0; text-transform: none; color: #b9c3dc; font-size: .9rem; margin-top: 2px; }
.section-foot { margin-top: 44px; }

/* Accreditation */
.accred { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: .9rem; color: var(--ink); }
.accred svg { width: 22px; height: 22px; color: var(--blue); flex: none; }

/* FAQ */
.faq { max-width: 860px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
	cursor: pointer; list-style: none; padding: 24px 44px 24px 0; font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.1rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 17px; font-size: 1.8rem; font-weight: 300; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; margin: 0; color: var(--muted); }

/* CTA band */
.cta-band { background: linear-gradient(110deg, var(--navy), var(--blue)); padding: 64px 0; color: #e3ecf9; position: relative; overflow: hidden; }
.cta-band .container { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 26px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); color: #fff; }
.cta-band p { margin: 8px 0 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(34px, 5vw, 70px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; }
.info-list li { display: flex; gap: 18px; }
.info-list .icon { flex: none; margin: 0; width: 48px; height: 48px; }
.info-list .icon svg { width: 22px; height: 22px; }
.info-list strong { display: block; color: var(--ink); font-family: var(--font-head); }
.info-list a { text-decoration: none; }
.form-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
	width: 100%; padding: 13px 14px; border: 1px solid #ccd4e2; border-radius: var(--radius); font: inherit; font-size: 1rem; color: var(--ink); background: #fbfcfe;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(15,117,187,.18); }
.field textarea { min-height: 140px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; }
.notice--ok { background: #e6f4ec; color: #1d6b38; }
.notice--err { background: #fdecea; color: #a12a1f; }
.map { margin-top: 32px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 300px; border: 0; display: block; filter: saturate(.85); }

/* Content / blog */
.content { max-width: 780px; margin-inline: auto; }
.content img { border-radius: var(--radius); }
.post-list { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .25s, transform .25s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.post-card .thumb { display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--navy), var(--ink)); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 24px; }
.post-card time { font-family: var(--font-label); letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; color: var(--blue); }
.post-card h3 a { text-decoration: none; color: var(--ink); }
.pagination { margin-top: 40px; display: flex; gap: 8px; justify-content: center; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Footer */
.site-footer { background: var(--ink); color: #9fabc8; font-size: .95rem; padding-top: 80px; border-top: 6px solid var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 56px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: .95rem; margin-bottom: 20px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #cdd6ea; text-decoration: none; }
.site-footer a:hover { color: var(--blue-light); }
.footer-logo { display: inline-block; margin-bottom: 22px; }
.footer-logo img { width: 200px; height: auto; }
.site-footer .accred { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); color: #dbe3f3; margin-top: 8px; }
.site-footer .accred svg { color: var(--blue-light); }
.hours li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed rgba(255,255,255,.12); padding-bottom: 9px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; font-size: .85rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom .credit a { color: #fff; font-weight: 600; }
.footer-bottom .credit a:hover { color: var(--blue-light); }

/* WP core */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text { font-size: .85rem; color: var(--muted); }

/* Elementor */
#main { overflow-x: clip; }
.elementor-widget[class*="elementor-widget-eg-"] { margin-bottom: 0 !important; }
.elementor-widget[class*="elementor-widget-eg-"] .elementor-widget-container { padding: 0; }
.elementor .eg-block { width: 100vw; position: relative; left: 50%; margin-left: -50vw; }
.elementor .eg-block h1, .elementor .eg-block h2, .elementor .eg-block h3 { font-family: var(--font-head); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
