/* =========================================================
   EngineAndOil — main.css
   Speed-first automotive theme. System fonts, CSS variables,
   no external fetches. Dark header, light content by default.
   ========================================================= */

:root {
	--eao-accent: #ff6a00;
	--eao-accent-2: #ffb100;
	--eao-bg: #0b0d10;
	--eao-fg: #14181d;
	--eao-muted: #5b6672;
	--eao-line: #e6e9ee;
	--eao-card: #ffffff;
	--eao-body: #ffffff;
	--eao-body-fg: #14181d;
	--eao-radius: 10px;
	--eao-shadow: 0 6px 24px rgba(10,15,20,.08);
	--eao-container: 1200px;
	--eao-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--eao-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--eao-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--eao-body-fg);
	background: var(--eao-body);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--eao-accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 2.4vw + 1rem, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.4vw + .9rem, 2rem); }
h3 { font-size: 1.25rem; }

.eao-container { width: min(100% - 32px, var(--eao-container)); margin-inline: auto; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--eao-bg); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(255,255,255,.05); }
.eao-topbar { background: #06080a; font-size: .8rem; color: #a8b0b9; }
.eao-topbar__inner { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.eao-topbar__cta { color: #fff; background: var(--eao-accent); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.eao-topbar__cta:hover { background: var(--eao-accent-2); text-decoration: none; }

.site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 20px;
	padding: 14px 0;
}
.site-title { color: #fff; font-weight: 800; font-size: 1.15rem; display: inline-flex; gap: 8px; align-items: center; }
.site-title__mark {
	background: linear-gradient(135deg, var(--eao-accent), var(--eao-accent-2));
	color: #0b0d10; padding: 4px 8px; border-radius: 6px; font-weight: 900; letter-spacing: -.03em;
}
.site-title:hover { text-decoration: none; }
.custom-logo-link img { max-height: 40px; width: auto; }

/* ---------- Nav ---------- */
.eao-menu { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.eao-menu > li { position: relative; }
.eao-menu a { color: #e6e9ee; padding: 10px 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; font-weight: 500; }
.eao-menu a:hover, .eao-menu a[aria-current="page"] { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.eao-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; background: #14181d;
	border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 8px; list-style: none; margin: 0;
	box-shadow: 0 20px 50px rgba(0,0,0,.4);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
	z-index: 60;
}
.eao-menu .sub-menu li { display: block; }
.eao-menu .sub-menu a { display: block; padding: 8px 10px; }
.eao-menu > li.has-children:hover > .sub-menu,
.eao-menu > li.has-children:focus-within > .sub-menu,
.eao-menu > li.has-children[data-open="1"] > .sub-menu {
	opacity: 1; visibility: visible; transform: translateY(0);
}
.eao-menu .sub-menu .sub-menu { position: static; box-shadow: none; border: 0; padding-left: 8px; }
.eao-menu .eao-mega { min-width: 480px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }

.eao-caret { font-size: .7em; opacity: .8; }
.eao-submenu-toggle { display: none; background: transparent; color: inherit; border: 0; padding: 8px 12px; font-size: 1.2rem; line-height: 1; }

/* ---------- Search in header ---------- */
.site-search { min-width: 220px; }
.eao-search-form { display: flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px; }
.eao-search-form__input { flex: 1; background: transparent; border: 0; color: #fff; padding: 6px 10px; outline: 0; }
.eao-search-form__input::placeholder { color: #a8b0b9; }
.eao-search-form__submit { background: var(--eao-accent); color: #fff; border: 0; border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }
.eao-search-form { position: relative; }
.eao-search-form__suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; color: #14181d; border: 1px solid #e6e9ee; border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.15); list-style: none; margin: 0; padding: 4px 0; max-height: 340px; overflow: auto; z-index: 80; }
.eao-search-form__suggest li a { display: block; padding: 8px 12px; color: #14181d; text-decoration: none; }
.eao-search-form__suggest li a:hover { background: #f6f8fb; color: var(--eao-accent); }

/* ---------- Mobile toggle ---------- */
.eao-menu-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; }
.eao-menu-toggle__bar { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }
.eao-menu-toggle[aria-expanded="true"] .eao-menu-toggle__bar:nth-child(2) { opacity: 0; }
.eao-menu-toggle[aria-expanded="true"] .eao-menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.eao-menu-toggle[aria-expanded="true"] .eao-menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
	.site-header__inner { grid-template-columns: 1fr auto; }
	.site-search { display: none; }
	.eao-menu-toggle { display: block; justify-self: end; }
	.site-nav { grid-column: 1 / -1; display: none; }
	.site-nav.is-open { display: block; }
	.eao-menu { flex-direction: column; gap: 0; padding: 8px 0 14px; border-top: 1px solid rgba(255,255,255,.08); }
	.eao-menu a { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
	.eao-menu .sub-menu, .eao-menu .eao-mega {
		position: static; opacity: 1; visibility: visible; transform: none; background: transparent; border: 0; box-shadow: none;
		padding: 0 0 4px 16px; display: none; grid-template-columns: 1fr;
	}
	.eao-menu li[data-open="1"] > .sub-menu { display: block; }
	.eao-submenu-toggle { display: inline-block; position: absolute; right: 4px; top: 6px; }
}

/* ---------- Hero ---------- */
.eao-hero {
	background:
		radial-gradient(1200px 300px at 20% -20%, rgba(255,106,0,.25), transparent 60%),
		linear-gradient(180deg, #0b0d10 0%, #1a1f26 100%);
	color: #fff;
	padding: 56px 0 40px;
}
.eao-hero__inner { display: grid; grid-template-columns: 1fr; gap: 28px; }
.eao-hero__title { font-size: clamp(2rem, 3vw + 1rem, 3rem); margin: 0 0 12px; }
.eao-hero__sub { color: #c7cdd4; max-width: 60ch; margin: 0; }
.eao-hero--compact { padding: 32px 0 24px; }
.eao-hero__pre { color: var(--eao-accent); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin: 0 0 6px; font-weight: 600; }

.eao-related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--eao-line); }
.eao-related__title { font-size: 1.15rem; margin: 20px 0 12px; }
.eao-related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.eao-related__card { display: block; padding: 10px 12px; background: #f6f8fb; border: 1px solid var(--eao-line); border-radius: 8px; color: var(--eao-fg); font-weight: 500; transition: background .12s; }
.eao-related__card:hover { background: #eef2f7; text-decoration: none; }

.eao-spec-table { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
.eao-spec-table th, .eao-spec-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--eao-line); }
.eao-spec-table th { width: 40%; background: #f6f8fb; font-weight: 600; }

@media print {
	.site-header, .site-footer, .eao-back-to-top, .eao-related { display: none !important; }
	.eao-container { max-width: none; padding: 0; }
	body { color: #000; background: #fff; }
	a { text-decoration: none; color: #000; }
	.eao-spec-table th { background: transparent; }
}
.eao-hero__picker { background: #fff; color: var(--eao-fg); padding: 16px; border-radius: 14px; box-shadow: var(--eao-shadow); }
.eao-picker__row { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 8px; }
.eao-picker select, .eao-picker__row select {
	appearance: none; width: 100%; padding: 12px 10px; border: 1px solid var(--eao-line); border-radius: 8px; background: #fff; font: inherit;
}
.eao-picker__hint { font-size: .85rem; color: var(--eao-muted); margin: 10px 0 0; }
@media (max-width: 720px) { .eao-picker__row { grid-template-columns: 1fr 1fr; } }

.eao-btn { display: inline-block; padding: 12px 16px; border-radius: 8px; background: #14181d; color: #fff; border: 0; cursor: pointer; font-weight: 600; }
.eao-btn:hover { background: #222831; text-decoration: none; }
.eao-btn--primary { background: var(--eao-accent); }
.eao-btn--primary:hover { background: var(--eao-accent-2); }

/* ---------- Sections ---------- */
.section-title { font-size: 1.4rem; margin: 32px 0 16px; }
.eao-tools { padding: 40px 0; background: #f6f8fb; }
.eao-tools__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eao-tool { background: #fff; border: 1px solid var(--eao-line); padding: 22px; border-radius: 12px; display: flex; gap: 12px; align-items: center; color: var(--eao-fg); font-weight: 600; transition: transform .12s, box-shadow .12s; }
.eao-tool:hover { transform: translateY(-2px); box-shadow: var(--eao-shadow); text-decoration: none; }
.eao-tool__icon { font-size: 1.5rem; }
@media (max-width: 840px) { .eao-tools__grid { grid-template-columns: repeat(2, 1fr); } }

.eao-latest { padding: 40px 0 60px; }

/* ---------- Common section head ---------- */
.eao-section-head { margin: 0 0 20px; }
.eao-section-head .section-title { margin: 0 0 4px; }
.eao-section-head .section-sub { color: var(--eao-muted); margin: 0; }
.eao-empty { color: var(--eao-muted); padding: 20px 0; }

/* ---------- Popular makes ---------- */
.eao-makes { padding: 40px 0; background: #fff; }
.eao-makes__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.eao-make { background: linear-gradient(135deg, #1a1f26 0%, #0b0d10 100%); color: #fff; padding: 18px 14px; border-radius: 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; transition: transform .12s, box-shadow .12s; }
.eao-make:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.15); text-decoration: none; }
.eao-make__label { font-weight: 700; font-size: 1rem; letter-spacing: -.01em; }
.eao-make__count { font-size: .75rem; color: #a8b0b9; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) { .eao-makes__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .eao-makes__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tools grid (upgraded) ---------- */
.eao-tools__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.eao-tool { padding: 18px; border-radius: 12px; }
.eao-tool__body { display: flex; flex-direction: column; gap: 2px; }
.eao-tool__label { font-weight: 700; }
.eao-tool__note { color: var(--eao-muted); font-size: .85rem; font-weight: 400; }

/* ---------- Recent vehicles ---------- */
.eao-recent { padding: 40px 0; background: #fff; }
.eao-recent__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.eao-recent__card { background: #fff; border: 1px solid var(--eao-line); padding: 14px; border-radius: 10px; display: flex; flex-direction: column; gap: 2px; color: var(--eao-fg); transition: transform .12s, box-shadow .12s; }
.eao-recent__card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08); text-decoration: none; }
.eao-recent__year { color: var(--eao-accent); font-weight: 700; font-size: .85rem; }
.eao-recent__title { font-weight: 600; }
.eao-recent__trim { color: var(--eao-muted); font-size: .85rem; }
@media (max-width: 900px) { .eao-recent__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- How it works ---------- */
.eao-how { padding: 48px 0; background: #f6f8fb; }
.eao-how__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eao-how__step { background: #fff; border: 1px solid var(--eao-line); border-radius: 12px; padding: 24px; }
.eao-how__num { display: inline-block; background: var(--eao-accent); color: #fff; width: 32px; height: 32px; border-radius: 50%; text-align: center; line-height: 32px; font-weight: 700; margin-bottom: 12px; }
.eao-how__title { font-size: 1.1rem; margin: 0 0 8px; }
.eao-how__body { color: var(--eao-muted); margin: 0; }
@media (max-width: 720px) { .eao-how__grid { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.eao-cta { padding: 60px 0; background: linear-gradient(135deg, var(--eao-accent) 0%, var(--eao-accent-2, #ffb100) 100%); color: #0b0d10; }
.eao-cta__inner { text-align: center; }
.eao-cta__title { font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem); margin: 0 0 8px; color: #0b0d10; }
.eao-cta__body { color: rgba(11,13,16,.85); margin: 0 0 20px; }
.eao-cta .eao-btn--primary { background: #0b0d10; color: #fff; }
.eao-cta .eao-btn--primary:hover { background: #14181d; }

/* ---------- Card grid ---------- */
.eao-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.eao-card { background: var(--eao-card); border: 1px solid var(--eao-line); border-radius: var(--eao-radius); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.eao-card:hover { transform: translateY(-2px); box-shadow: var(--eao-shadow); }
.eao-card__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.eao-card__body { padding: 16px; }
.eao-card__title { font-size: 1.1rem; margin: 0 0 6px; }
.eao-card__title a { color: var(--eao-fg); }
.eao-card__title a:hover { color: var(--eao-accent); text-decoration: none; }
.eao-card__excerpt { color: var(--eao-muted); margin: 0 0 8px; font-size: .95rem; }
.eao-card__meta { color: var(--eao-muted); font-size: .8rem; }
@media (max-width: 900px) { .eao-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .eao-cards { grid-template-columns: 1fr; } }

/* ---------- Layout ---------- */
.eao-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding: 32px 0 48px; }
.eao-layout--wide { grid-template-columns: minmax(0, 1fr); }
.eao-sidebar { padding: 0; }
@media (max-width: 960px) { .eao-layout { grid-template-columns: 1fr; } }

/* ---------- Article ---------- */
.eao-article .entry-title { margin-top: 8px; }
.eao-article .entry-meta { color: var(--eao-muted); font-size: .9rem; display: flex; gap: 10px; margin-bottom: 20px; }
.entry-thumb { margin: 0 0 20px; }
.entry-content { font-size: 1.05rem; }
.entry-content p { margin: 0 0 1em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content pre { background: #0b0d10; color: #eef1f5; padding: 12px 14px; border-radius: 8px; overflow: auto; font-family: var(--eao-mono); }
.entry-content blockquote { border-left: 4px solid var(--eao-accent); margin: 1em 0; padding: 4px 14px; color: #333; background: #faf7f2; }

/* ---------- Breadcrumbs ---------- */
.eao-breadcrumbs { font-size: .85rem; color: var(--eao-muted); margin: 0 0 16px; }
.eao-breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.eao-breadcrumbs li + li::before { content: "›"; padding-right: 6px; color: #aab1b9; }
.eao-breadcrumbs a { color: var(--eao-muted); }
.eao-breadcrumbs a:hover { color: var(--eao-accent); text-decoration: none; }

/* ---------- Pagination ---------- */
.pagination, .navigation.pagination { margin-top: 24px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-links a, .nav-links span {
	display: inline-block; padding: 8px 12px; border: 1px solid var(--eao-line); border-radius: 6px; color: var(--eao-fg); background: #fff;
}
.nav-links .current { background: var(--eao-accent); color: #fff; border-color: var(--eao-accent); }

/* ---------- Footer ---------- */
.site-footer { background: #0b0d10; color: #b7bfc8; margin-top: 48px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 40px 0; }
.site-footer__grid .widget-title { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.site-footer a { color: #d5dae0; }
.site-footer a:hover { color: var(--eao-accent); }
.site-footer__nav { padding-bottom: 20px; }
.eao-footer-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.08); }
.site-footer__bar-inner { padding: 14px 0; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; }
.eao-legal-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 14px; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } .site-footer__bar-inner { flex-direction: column; gap: 8px; text-align: center; } }

.eao-back-to-top {
	position: fixed; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0;
	background: var(--eao-accent); color: #fff; font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none;
	transition: opacity .2s, transform .2s; box-shadow: var(--eao-shadow); z-index: 40;
}
.eao-back-to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ---------- 404 ---------- */
.eao-error { text-align: center; padding: 80px 0; }
.eao-error__code { font-size: 6rem; margin: 0; color: var(--eao-accent); letter-spacing: -.03em; }
.eao-error__msg { color: var(--eao-muted); }
.eao-error__actions { margin: 20px 0; }
.eao-error__search { max-width: 480px; margin: 0 auto; }

/* ---------- Widgets ---------- */
.widget { margin-bottom: 24px; }
.widget-title { font-size: 1rem; margin: 0 0 10px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 6px 0; border-bottom: 1px dashed var(--eao-line); }

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