/*
Theme Name: Evans Excavating
Text Domain: evans-excavating
Description: Lightweight custom theme for Evans Excavating Services Inc, built by Roll The Six Marketing. Header, footer and mobile call bar; pages built in Elementor.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
*/

/* ==========================================================================
   Tokens  (mirror these in Elementor > Site Settings > Global Colors/Fonts)
   ========================================================================== */
:root {
	--ev-ink: #07061A;
	--ev-logo-bg: #000712;
	--ev-char: #12112A;
	--ev-clay: #8A6A3B;
	--ev-hivis: #D6AA6B;          /* warm gold (wordmark metal) */
	--ev-hivis-hi: #F1C781;
	--ev-bronze: #8A5F2A;
	--ev-metal: linear-gradient(135deg, #F6DDA8 0%, #D6AA6B 38%, #B58544 72%, #8A5F2A 100%);
	--ev-sand: #EDE6D9;
	--ev-paper: #F6F4EF;
	--ev-text: #1E1D2B;
	--ev-muted: #66647A;
	--ev-line: rgba(237, 230, 217, 0.12);
	--ev-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--ev-body: "Barlow", system-ui, sans-serif;
	--ev-header-h: 76px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ev-paper);
	color: var(--ev-text);
	font-family: var(--ev-body);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ev-hivis); outline-offset: 3px; }
.ev-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.ev-skip { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--ev-hivis); padding: 10px 16px; font-weight: 700; }
.ev-skip:focus { left: 12px; top: 12px; }
.ev-main { display: block; }
[id] { scroll-margin-top: calc(var(--ev-header-h) + 24px); }

/* ==========================================================================
   Top bar
   ========================================================================== */
.ev-topbar { background: var(--ev-char); color: rgba(239,231,216,.8); font-family: var(--ev-body); font-size: 14px; font-weight: 500; }
.ev-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 38px; flex-wrap: wrap; }
.ev-topbar__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ev-topbar__item svg { width: 14px; height: 14px; color: var(--ev-hivis); }
.ev-topbar__free { color: var(--ev-hivis); font-weight: 700; }
.ev-dot { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.ev-header { position: sticky; top: 0; z-index: 100; background: var(--ev-ink); border-bottom: 1px solid var(--ev-line); transition: box-shadow .25s ease; }
.ev-header.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.admin-bar .ev-header { top: 32px; }
.ev-header__inner { display: flex; align-items: center; gap: 28px; min-height: var(--ev-header-h); }

.ev-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.ev-brand__logo { max-height: 54px; width: auto; }
.ev-brand__mark {
	width: 46px; height: 46px; display: grid; place-items: center; border-radius: 4px;
	background: var(--ev-hivis); color: var(--ev-ink);
	font-family: var(--ev-display); font-weight: 800; font-size: 32px; line-height: 1;
}
.ev-brand__text { display: flex; flex-direction: column; line-height: 1; }
.ev-brand__name { font-family: var(--ev-display); font-weight: 800; font-size: 30px; letter-spacing: .02em; text-transform: uppercase; }
.ev-brand__sub { font-family: var(--ev-display); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ev-hivis); margin-top: 4px; }

.ev-nav { margin-left: auto; }
.ev-nav__list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.ev-nav__list a { position: relative; display: block; padding: 10px 14px; text-decoration: none; font-weight: 600; font-size: 17px; }
.ev-nav__list a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--ev-hivis); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.ev-nav__list a:hover::after,
.ev-nav__list .current-menu-item > a::after,
.ev-nav__list .current_page_item > a::after { transform: scaleX(1); }
.ev-nav__mobile-call { display: none; }

.ev-header__cta { display: flex; align-items: center; gap: 18px; }
.ev-header__phone { display: flex; flex-direction: column; text-decoration: none; line-height: 1; text-align: right; }
.ev-header__phone-label { font-size: 12px; font-weight: 500; color: rgba(239,231,216,.65); margin-bottom: 4px; }
.ev-header__phone-num { font-family: var(--ev-display); font-weight: 700; font-size: 25px; letter-spacing: .01em; }

.ev-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 22px; border-radius: 3px;
	font-family: var(--ev-display); font-weight: 700; font-size: 19px; letter-spacing: .03em; text-transform: uppercase; text-decoration: none;
	transition: background-color .2s ease;
}
.ev-btn--hivis { background: var(--ev-hivis); }
.ev-btn--hivis:hover { background: var(--ev-hivis-hi); }

.ev-burger { display: none; width: 48px; height: 48px; cursor: pointer; }
.ev-burger svg { width: 26px; height: 26px; }

@media (max-width: 1100px) {
	.ev-header__phone-label { display: none; }
	.ev-nav__list a { padding: 10px 10px; }
}
@media (max-width: 960px) {
	.ev-burger { display: grid; place-items: center; }
	.ev-nav {
		position: absolute; left: 0; right: 0; top: 100%; height: calc(100vh - var(--ev-header-h)); height: calc(100dvh - var(--ev-header-h));
		background: var(--ev-ink); padding: 24px 20px 120px; overflow-y: auto;
		transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
		margin: 0;
	}
	.ev-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.ev-nav__list { flex-direction: column; gap: 0; }
	.ev-nav__list a { font-family: var(--ev-display); font-weight: 700; font-size: 34px; text-transform: uppercase; padding: 12px 0; border-bottom: 1px solid var(--ev-line); }
	.ev-nav__list a::after { display: none; }
	.ev-nav__mobile-call { display: flex; align-items: center; gap: 10px; margin-top: 28px; font-family: var(--ev-display); font-weight: 700; font-size: 28px; text-decoration: none; }
	.ev-nav__mobile-call svg { width: 24px; height: 24px; }
	.ev-header__cta { margin-left: auto; }
	body.ev-nav-open { overflow: hidden; }
}
@media (max-width: 720px) {
	.ev-header__phone { display: none; }
	.ev-topbar__inner { justify-content: center; }
	.ev-hide-sm { display: none; }
	:root { --ev-header-h: 68px; }
	.ev-brand__mark { width: 40px; height: 40px; font-size: 28px; }
	.ev-brand__name { font-size: 27px; }
}
@media (max-width: 480px) {
	.ev-header__cta .ev-btn { display: none; }
	.ev-topbar__item:first-child { display: none; }
}
@media (max-width: 782px) { .admin-bar .ev-header { top: 46px; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.ev-footer { background: var(--ev-ink); color: rgba(239,231,216,.78); font-size: 16px; }
.ev-hazard { height: 4px; background: var(--ev-metal); }
.ev-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-top: 72px; padding-bottom: 56px; }
.ev-footer__about { margin: 20px 0 0; max-width: 360px; }
.ev-footer__coords { display: none; }
.ev-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ev-footer__list a, .ev-footer__list span { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.ev-footer__list svg { width: 16px; height: 16px; color: var(--ev-hivis); flex-shrink: 0; }
.ev-footer__bottom { border-top: 1px solid var(--ev-line); font-size: 14px; color: rgba(239,231,216,.55); }
.ev-footer__bottom-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
@media (max-width: 960px) { .ev-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; } .ev-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ev-footer__grid { grid-template-columns: 1fr; padding-top: 56px; } }

/* ==========================================================================
   Mobile sticky contact bar
   ========================================================================== */
.ev-mobilebar { display: none; }
@media (max-width: 768px) {
	.ev-mobilebar {
		display: grid; grid-template-columns: 1fr 1fr 1.3fr;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
		background: var(--ev-ink); border-top: 1px solid var(--ev-line);
		padding-bottom: env(safe-area-inset-bottom);
	}
	.ev-mobilebar__btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 62px; text-decoration: none; font-family: var(--ev-display); font-weight: 700; font-size: 16px; letter-spacing: .03em; text-transform: uppercase; border-right: 1px solid var(--ev-line); }
	.ev-mobilebar__btn svg { width: 20px; height: 20px; color: var(--ev-hivis); }
	.ev-mobilebar__btn--hivis { background: var(--ev-hivis); border-right: 0; }
	.ev-mobilebar__btn--hivis svg { color: var(--ev-ink); }
	body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   Simple prose (non-Elementor pages, 404)
   ========================================================================== */
.ev-prose { max-width: 820px; padding-top: 72px; padding-bottom: 96px; }

/* ==========================================================================
   Elementor helpers (decorative only; content stays native)
   ========================================================================== */
.elementor-button { transition: background-color .2s ease, color .2s ease, border-color .2s ease !important; }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }
/* Icons inside flex rows never get squeezed by neighbouring text */
.e-con > .elementor-widget-icon, .e-con-inner > .elementor-widget-icon { flex-shrink: 0; }
/* Text column beside an icon takes the remaining space, never the full row */
.e-con:has(> .elementor-widget-icon) > .e-con { --width: auto; width: auto !important; flex: 1 1 0 !important; min-width: 0; }

/* Card hover */
.ev-card { transition: box-shadow .25s ease, border-color .25s ease; }
.ev-card:hover { box-shadow: 0 14px 34px rgba(20,18,14,.14); border-color: var(--ev-hivis) !important; }

/* Image crops */
/* Photo crops: the WIDGET box carries the ratio and the photo fills it absolutely.
   (Putting aspect-ratio on the <img> inside an Elementor flex column breaks in
   iOS Safari: the box sizes to the photo's native ratio and text overlaps it.) */
html body .elementor-widget-image.ev-cover {
	position: relative; display: block; overflow: hidden;
	width: 100% !important; max-width: 100% !important; align-self: stretch !important;
	flex: 0 0 auto !important; height: auto !important;
	aspect-ratio: 1 / 1;
}
@supports not (aspect-ratio: 1) { html body .elementor-widget-image.ev-cover { height: 0 !important; padding-top: 100%; } }
html body .elementor-widget-image.ev-cover--wide { aspect-ratio: 1 / 1; }
html body .elementor-widget-image.ev-cover--tall { aspect-ratio: 4 / 5; }
@media (max-width: 1024px) { html body .elementor-widget-image.ev-cover--tall { aspect-ratio: 1 / 1; } }
html body .elementor-widget-image.ev-cover > img,
html body .elementor-widget-image.ev-cover > a,
html body .elementor-widget-image.ev-cover > a > img,
html body .elementor-widget-image.ev-cover .elementor-widget-container,
html body .elementor-widget-image.ev-cover .elementor-widget-container img {
	position: absolute !important; inset: 0; display: block;
	width: 100% !important; height: 100% !important; max-width: none !important;
	object-fit: cover; margin: 0 !important;
	object-position: 50% 68%; /* job photos are portrait with the machine low in frame */
}
html body .elementor-widget-image.ev-round { border-radius: 4px; }

/* Body copy: always left-aligned unless a widget sets its own alignment */
.elementor-widget-text-editor { text-align: left; word-spacing: normal; }
.elementor-widget-text-editor p { text-align: inherit; }

/* FAQ toggles */
.ev-faq .elementor-tab-title { border-bottom: 1px solid rgba(20,18,14,.12) !important; }
.ev-faq .elementor-toggle-item { border: 0 !important; }

/* GHL form embed: fill its column */
.ev-ghlform, .ev-ghlform .elementor-widget-container, .ev-ghlform iframe { width: 100% !important; align-self: stretch; }

/* Long email addresses */
.ev-wrap-any .elementor-heading-title { overflow-wrap: anywhere; }

/* Hazard stripe on the top edge of a section */
.ev-hazard-top { position: relative; }
.ev-hazard-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; z-index: 2; background: var(--ev-metal); }

/* Fade-in on scroll (only with JS, never inside the Elementor editor) */
.ev-js body:not(.elementor-editor-active) .ev-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.ev-js body:not(.elementor-editor-active) .ev-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ev-js body .ev-reveal { opacity: 1 !important; transform: none !important; } }

/* ==========================================================================
   Kit-leak guards: Elementor's kit CSS loads after the theme and styles
   links, headings and buttons globally. Keep theme chrome on its own palette.
   ========================================================================== */
html body .ev-brand,
html body .ev-nav__list a,
html body .ev-header__phone { color: var(--ev-sand); }
html body .ev-nav__list a:hover { color: #fff; }
html body .ev-header__phone:hover .ev-header__phone-num { color: var(--ev-hivis); }
html body .ev-btn--hivis,
html body .ev-btn--hivis:hover { color: var(--ev-ink); }
html body .ev-nav__mobile-call { color: var(--ev-hivis); }
html body .ev-footer__list a, html body .ev-footer__list span { color: rgba(239,231,216,.85); }
html body .ev-footer__list a:hover,
html body .ev-footer__bottom a:hover { color: var(--ev-hivis); }
html body .ev-footer__bottom a { color: rgba(239,231,216,.8); }
html body .ev-mobilebar__btn { color: var(--ev-sand); }
html body .ev-mobilebar__btn--hivis { color: var(--ev-ink); }
html body .ev-skip { color: var(--ev-ink); }
html body .ev-burger,
html body .ev-burger:hover,
html body .ev-burger:focus { background: transparent; color: var(--ev-sand); border: 1px solid rgba(239,231,216,.22); padding: 0; border-radius: 3px; box-shadow: none; }
html body .ev-burger[aria-expanded="true"] { background: var(--ev-hivis); color: var(--ev-ink); border-color: var(--ev-hivis); }
html body .ev-prose__title { font-family: var(--ev-display); font-weight: 800; font-size: clamp(42px, 7vw, 68px); line-height: .95; color: var(--ev-ink); text-transform: uppercase; margin: 0 0 28px; }
html body .ev-prose h2 { font-family: var(--ev-display); font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--ev-ink); }
html body .ev-prose a { color: var(--ev-clay); }
html body .ev-footer .ev-footer__h { font-family: var(--ev-display); font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: .02em; color: var(--ev-hivis); text-transform: uppercase; margin: 0 0 16px; }

/* Links inside dark sections */
html body .ev-dark .elementor-widget-text-editor a { color: var(--ev-hivis); text-decoration: underline; text-underline-offset: 3px; }
html body .ev-dark .elementor-widget-text-editor a:hover { color: #fff; }
html body .elementor-widget-text-editor a { text-underline-offset: 3px; }

/* Policy text */
html body .ev-policy h2 { font-size: 30px; line-height: 1.1; margin: 40px 0 12px; }
html body .ev-policy p { margin: 0 0 16px; }
html body .ev-policy a { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Logo branding (navy + metallic gold, matched to the Evans badge)
   ========================================================================== */
:root { --ev-header-h: 88px; }
html body .ev-header { background: var(--ev-logo-bg); }
html body .ev-topbar { background: var(--ev-ink); border-bottom: 1px solid var(--ev-line); }
.ev-header__inner { min-height: var(--ev-header-h); }
.ev-brand { gap: 0; }
.ev-brand__logo { height: 52px !important; width: auto !important; max-width: none; max-height: none; display: block; }
.ev-brand__text { display: none !important; }
@media (max-width: 1180px) { .ev-brand__logo { height: 46px !important; } }
@media (max-width: 720px) {
	:root { --ev-header-h: 72px; }
	.ev-brand__logo { height: 40px !important; }
}
@media (max-width: 380px) { .ev-brand__logo { height: 34px !important; } }

/* Metallic gold buttons in theme chrome */
html body .ev-btn--hivis { background: var(--ev-metal); color: var(--ev-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
html body .ev-btn--hivis:hover { background: var(--ev-metal); filter: brightness(1.08); color: var(--ev-ink); }
html body .ev-mobilebar__btn--hivis { background: var(--ev-metal); color: var(--ev-ink); }
html body .ev-burger[aria-expanded="true"] { background: var(--ev-hivis); border-color: var(--ev-hivis); }

/* Footer badge */
.ev-footer__logo { width: 300px !important; max-width: 100%; height: auto !important; display: block; }
html body .ev-footer { background: var(--ev-logo-bg); }

/* Gold text accents inside headings render with a subtle metal sheen */
html body .ev-dark h1 span[style*="D6AA6B"],
html body .ev-dark h2 span[style*="D6AA6B"],
html body .ev-dark h1 span[style*="d6aa6b"],
html body .ev-dark h2 span[style*="d6aa6b"] {
	background: linear-gradient(180deg, #F6DDA8 0%, #D6AA6B 55%, #A87A3E 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* 404 */
html body .ev-404 { background: var(--ev-ink); color: var(--ev-sand); padding: 120px 0 130px; }
html body .ev-404 .ev-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
html body .ev-404__eyebrow { margin: 0 0 14px; color: var(--ev-hivis); font-weight: 700; font-size: 15px; }
html body .ev-404__title { margin: 0 0 20px; font-family: var(--ev-display); font-weight: 800; text-transform: uppercase; font-size: clamp(46px, 8vw, 88px); line-height: .95; color: var(--ev-sand); }
html body .ev-404__title span { background: var(--ev-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
html body .ev-404__text { max-width: 620px; margin: 0 0 32px; font-size: 19px; color: rgba(239,231,216,.82); }
html body .ev-404__actions { display: flex; flex-wrap: wrap; gap: 12px; }
html body .ev-404 .ev-btn--hivis { color: var(--ev-ink); }
html body .ev-404__ghost { color: var(--ev-sand); border: 2px solid rgba(237,230,217,.35); }
html body .ev-404__ghost:hover { border-color: var(--ev-hivis); color: var(--ev-hivis); }
@media (max-width: 720px) { html body .ev-404 { padding: 72px 0 90px; } html body .ev-404__actions .ev-btn { width: 100%; } }

/* Site-wide side gutter for top-level Elementor sections */
html body .elementor > .e-con { --padding-left: 20px !important; --padding-right: 20px !important; }
