/*
Theme Name: DealerHub
Theme URI: https://example.ca/dealerhub-theme
Author: Your Company
Author URI: https://example.ca
Description: A dealership platform theme for the Canadian market. Ships a marketing home page for your SaaS, a dealer inventory front end, and a dashboard page template. Designed to run with the DealerHub plugin, but works on its own too.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dealerhub-theme
Tags: business, portfolio, custom-logo, custom-menu, featured-images, translation-ready, block-styles, wide-blocks, full-width-template
*/

/* ==========================================================================
   Design tokens
   The palette comes from the lot itself: asphalt ink, road-salt grey,
   registration-plate blue for actions, sticker amber for attention.
   ========================================================================== */

:root {
	--ink: #101418;
	--steel: #5a6672;
	--line: #d8dcdf;
	--salt: #f0f2f1;
	--paper: #fff;
	--plate: #1b3fcc;
	--plate-dark: #142f9b;
	--amber: #f5b841;
	--sold: #b3271e;
	--green: #1a7f45;

	--mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--display: "Archivo", system-ui, -apple-system, sans-serif;
	--body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--wrap: 1180px;
	--gut: clamp(1.25rem, 4vw, 3rem);
	--radius: 4px;
}

/* ==========================================================================
   Reset and base
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--plate); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 3px solid var(--amber);
	outline-offset: 2px;
}

h1, h2, h3, h4 {
	font-family: var(--display);
	letter-spacing: -.025em;
	line-height: 1.1;
	margin: 0 0 .6em;
}

h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 800; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1.2em; }

blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.5rem;
	background: var(--salt);
	border-left: 3px solid var(--plate);
}

code, pre, .mono { font-family: var(--mono); }
pre { padding: 1rem; background: var(--salt); border-radius: var(--radius); overflow-x: auto; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.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;
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	padding: .75rem 1.25rem; background: var(--ink); color: #fff;
	text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap--narrow { max-width: 760px; }

.site-main { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.eyebrow {
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--steel);
	margin: 0 0 1rem;
}

.section-head { max-width: 60ch; margin-bottom: 3rem; }
.section-head p { color: var(--steel); font-size: 1.05rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn,
.wp-block-button__link,
input[type="submit"],
button.submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .85rem 1.5rem;
	border: 1px solid var(--ink);
	border-radius: 3px;
	background: transparent;
	color: var(--ink);
	font-family: var(--body);
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn:hover, input[type="submit"]:hover { background: var(--ink); color: #fff; }

.btn--primary, input[type="submit"], .wp-block-button__link {
	background: var(--plate);
	border-color: var(--plate);
	color: #fff;
}
.btn--primary:hover, input[type="submit"]:hover { background: var(--plate-dark); border-color: var(--plate-dark); color: #fff; }

.btn--light { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--white { background: #fff; border-color: #fff; color: var(--ink); }
.btn--white:hover { background: var(--salt); border-color: var(--salt); color: var(--ink); }

.btn--block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: sticky; top: 0; z-index: 60;
	background: rgba(255,255,255,.94);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}

.site-nav {
	display: flex; align-items: center; justify-content: space-between;
	gap: 2rem; padding-block: 1rem;
}

.site-brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.site-brand__mark {
	width: 30px; height: 22px; border-radius: 3px;
	background: var(--plate); color: #fff;
	display: grid; place-items: center;
	font-family: var(--mono); font-size: .6rem; font-weight: 600;
}
.site-brand__name { font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; }
.site-brand img { max-height: 40px; width: auto; }

.site-nav__menu { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav__menu a { color: var(--steel); text-decoration: none; font-size: .92rem; font-weight: 500; }
.site-nav__menu a:hover, .site-nav__menu .current-menu-item > a { color: var(--ink); }
.site-nav__menu .sub-menu {
	display: none; position: absolute; z-index: 70;
	min-width: 200px; padding: .5rem 0; margin-top: .5rem;
	list-style: none; background: #fff;
	border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: 0 12px 30px rgba(16,20,24,.1);
}
.site-nav__menu li { position: relative; }
.site-nav__menu li:hover > .sub-menu, .site-nav__menu li:focus-within > .sub-menu { display: block; }
.site-nav__menu .sub-menu a { display: block; padding: .5rem 1rem; }

.site-nav__actions { display: flex; align-items: center; gap: .75rem; }
.site-nav__signin { font-size: .92rem; font-weight: 600; text-decoration: none; color: var(--ink); }

.nav-toggle {
	display: none;
	width: 42px; height: 42px;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: transparent; cursor: pointer;
	align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: block; width: 18px; height: 2px; background: var(--ink); position: relative;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after { content: ""; position: absolute; top: 6px; }

@media (max-width: 980px) {
	.nav-toggle { display: flex; }
	.site-nav__menu, .site-nav__signin { display: none; }
	.site-nav__menu.is-open {
		display: flex; flex-direction: column; gap: .25rem;
		position: absolute; left: 0; right: 0; top: 100%;
		padding: 1rem var(--gut) 1.5rem;
		background: #fff; border-bottom: 1px solid var(--line);
	}
	.site-nav__menu.is-open a { padding: .6rem 0; font-size: 1rem; }
	.site-nav__menu.is-open .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-left: 1rem; }
}

/* ==========================================================================
   Hero and the window-sticker signature
   ========================================================================== */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.3vw, 4rem); }
.hero h1 em { font-style: normal; color: var(--plate); }
.hero__lede { font-size: 1.12rem; color: var(--steel); max-width: 46ch; margin: 1.35rem 0 2rem; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero__note { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--steel); margin-top: 1.25rem; }

.sticker {
	background: var(--paper);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	box-shadow: 14px 14px 0 rgba(27,63,204,.11);
	overflow: hidden;
}
.sticker__top {
	background: var(--ink); color: #fff;
	padding: .85rem 1.1rem;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.sticker__stock { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--amber); }
.sticker__live { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; display: flex; align-items: center; gap: .4rem; }
.sticker__dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; animation: dh-pulse 2.4s ease-in-out infinite; }
@keyframes dh-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

.sticker__body { padding: 1.25rem 1.1rem; }
.sticker__title { font-family: var(--display); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.sticker__price { display: flex; align-items: baseline; gap: .6rem; margin: .35rem 0 1rem; }
.sticker__price b { font-family: var(--display); font-size: 2.1rem; font-weight: 900; letter-spacing: -.035em; }
.sticker__price s { color: var(--steel); font-size: .95rem; }

/* Spec rows with dotted leaders — lifted straight off a window sticker */
.spec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.spec li { display: flex; align-items: baseline; gap: .5rem; padding: .44rem 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.spec .k { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); white-space: nowrap; }
.spec .leader { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-3px); }
.spec .v { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sticker__foot { padding: .9rem 1.1rem; background: var(--salt); border-top: 1px solid var(--line); }
.sticker__foot p { margin: 0 0 .55rem; font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
	font-family: var(--mono); font-size: .66rem;
	padding: .28rem .55rem;
	background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
	display: flex; align-items: center; gap: .35rem;
}
.chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #3ddc84; }

@media (max-width: 880px) {
	.hero__grid { grid-template-columns: 1fr; }
	.sticker { box-shadow: 8px 8px 0 rgba(27,63,204,.11); }
}

/* ==========================================================================
   Home page sections
   ========================================================================== */

.strip { padding-block: 1.75rem; border-bottom: 1px solid var(--line); background: var(--salt); }
.strip__inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.strip__label { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.strip__item { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); opacity: .55; }

.home-section { padding-block: clamp(3.5rem, 8vw, 6rem); }

.modules {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
	gap: 1px; background: var(--line);
	border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.module { background: var(--paper); padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: .75rem; }
.module__n { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--plate); }
.module h3 { margin: 0; font-size: 1.15rem; }
.module p { margin: 0; color: var(--steel); font-size: .94rem; }
.module ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .88rem; color: var(--steel); }
.module li { padding: .15rem 0; }

.band { background: var(--ink); color: #fff; }
.band h2 { color: #fff; }
.band .section-head p { color: #a9b3bd; }
.band .eyebrow { color: var(--amber); }
.band__note { color: #7e8a95; font-size: .82rem; margin-top: 2rem; max-width: 70ch; }

.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; }
.flow__box { border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 1.5rem; }
.flow__box h3 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.flow__box p { color: #a9b3bd; font-size: .88rem; margin: 0; }
.flow__arrow { font-family: var(--mono); color: var(--amber); font-size: 1.4rem; }
.dests { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.dests li {
	display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
	padding: .5rem .7rem; background: rgba(255,255,255,.06);
	border-radius: 3px; font-size: .88rem;
}
.dests code { font-family: var(--mono); font-size: .66rem; color: var(--amber); letter-spacing: .08em; }
@media (max-width: 820px) { .flow { grid-template-columns: 1fr; } .flow__arrow { transform: rotate(90deg); justify-self: center; } }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.5rem; align-items: start; }
.tier {
	border: 1px solid var(--line); border-radius: var(--radius);
	padding: 2rem 1.75rem; background: var(--paper);
	display: flex; flex-direction: column; gap: .9rem;
}
.tier--featured { border: 2px solid var(--plate); position: relative; }
.tier__flag {
	position: absolute; top: -11px; left: 1.75rem;
	background: var(--plate); color: #fff;
	font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
	padding: .25rem .6rem; border-radius: 2px;
}
.tier h3 { margin: 0; font-size: 1.05rem; }
.tier__price { display: flex; align-items: baseline; gap: .35rem; }
.tier__price b { font-family: var(--display); font-size: 2.5rem; font-weight: 900; letter-spacing: -.04em; }
.tier__price span { font-family: var(--mono); font-size: .7rem; color: var(--steel); letter-spacing: .08em; }
.tier__blurb { color: var(--steel); font-size: .92rem; margin: 0; }
.tier ul { list-style: none; margin: .5rem 0 auto; padding: 0; font-size: .9rem; }
.tier li { padding: .45rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .55rem; align-items: baseline; }
.tier li::before { content: "·"; color: var(--plate); font-weight: 900; }
.tier__note { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; color: var(--steel); text-align: center; margin-top: 2rem; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary {
	font-family: var(--display); font-weight: 700; font-size: 1.05rem;
	cursor: pointer; list-style: none;
	display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--plate); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--steel); margin: .85rem 0 0; font-size: .96rem; }

/* CTA */
.cta { background: var(--plate); color: #fff; text-align: center; }
.cta h2 { color: #fff; max-width: 20ch; margin-inline: auto; font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 900; }
.cta p { color: rgba(255,255,255,.85); max-width: 52ch; margin: 1.25rem auto 2rem; }
.cta__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Posts and pages
   ========================================================================== */

.entry-header { margin-bottom: 2rem; }
.entry-meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content img { border-radius: var(--radius); }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { padding: .2rem 0; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .6rem; border-bottom: 1px solid var(--line); text-align: left; }

.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card__media { aspect-ratio: 16/9; background: var(--salt); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card h2 { font-size: 1.15rem; margin: 0; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--plate); }
.post-card p { color: var(--steel); font-size: .92rem; margin: 0; }

.pagination { display: flex; justify-content: center; gap: .35rem; margin-top: 3rem; }
.pagination .page-numbers {
	display: grid; place-items: center;
	min-width: 2.5rem; height: 2.5rem; padding: 0 .6rem;
	border: 1px solid var(--line); border-radius: var(--radius);
	text-decoration: none; color: var(--ink); font-weight: 600;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }

.error-404 { text-align: center; padding-block: 4rem; }
.error-404 .code { font-family: var(--mono); font-size: 5rem; font-weight: 600; color: var(--plate); letter-spacing: -.04em; }

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.comment-form label { display: block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--steel); margin-bottom: .35rem; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--ink); color: #a9b3bd; padding-block: 3.5rem 2rem; font-size: .9rem; margin-top: 4rem; }
.site-footer a { color: #a9b3bd; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; }
.footer__about { max-width: 34ch; margin-top: 1rem; }
.site-footer h4 { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: .28rem 0; }
.footer__bar {
	margin-top: 3rem; padding-top: 1.5rem;
	border-top: 1px solid rgba(255,255,255,.12);
	display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem;
}
.footer__legal { max-width: 62ch; font-size: .8rem; color: #7e8a95; margin-top: 1rem; }
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   Dashboard page template — let the plugin's app breathe
   ========================================================================== */

.dashboard-template .site-main { padding-block: 2rem; }
.dashboard-template .site-footer { margin-top: 2rem; padding-block: 2rem 1.5rem; }
.dashboard-template .footer__grid, .dashboard-template .footer__legal { display: none; }
.dashboard-template .footer__bar { margin-top: 0; border-top: 0; }

/* ==========================================================================
   WordPress core classes
   ========================================================================== */

.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.alignwide { max-width: calc(var(--wrap) + 160px); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, .wp-element-caption { font-size: .82rem; color: var(--steel); text-align: center; margin-top: .5rem; }
.sticky .entry-header::before { content: "Featured"; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--plate); display: block; margin-bottom: .5rem; }

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