/*
Theme Name: DTC Services
Theme URI: https://dtcservices.ca
Author: DTC Services
Description: Lead-generation theme for DTC Services, installation company in Metro Vancouver (TV mounting, security cameras, appliances, smart home, home theatre). Activating it creates all pages automatically.
Version: 1.3.3
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: dtc-services
*/

:root {
	--bg: #F7F8FA;
	--surface: #FFFFFF;
	--ink: #111C2C;
	--ink-2: #3A4658;
	--muted: #5E6878;
	--accent: #2554E8;
	--accent-dark: #1B41BC;
	--accent-soft: #EAF0FD;
	--line: #E2E6EC;
	--radius: 8px;
	--radius-sm: 6px;
	--font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 3.6vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.icon { width: 1.1em; height: 1.1em; vertical-align: -.18em; flex: none; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(800px, 100% - 32px); }
.section { padding: clamp(48px, 6vw, 80px) 0; }
.section-line { border-top: 1px solid var(--line); }
.section-tight { padding: 24px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.section-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 20px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .65em 1.2em; border-radius: var(--radius); font-weight: 600; font-size: 1rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; font-family: inherit; line-height: 1.2; }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .95rem; }
.btn-lg { min-height: 50px; padding: .8em 1.4em; }
.btn-block { width: 100%; }
.btn-primary, .btn-accent { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { color: var(--accent); }
.btn-ghost-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 28px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-list { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .97rem; }
.nav-list a:hover { color: var(--accent); }
.nav-list li { position: relative; }
.nav-list .sub, .nav-list .sub-menu { display: none; position: absolute; top: 100%; left: -14px; background: var(--surface); list-style: none; padding: 8px 0; margin: 0; min-width: 230px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17, 28, 44, .08); }
.nav-list li:hover > .sub, .nav-list li:focus-within > .sub,
.nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { display: block; }
.nav-list .sub a, .nav-list .sub-menu a { display: block; padding: 8px 16px; }
.has-sub > a::after, .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-call { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav-call:hover { color: var(--accent); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 11px; }
.nav-toggle span:not(.sr) { display: block; height: 1.5px; background: var(--ink); margin: 5px 0; }

/* Hero */
.hero { padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 5vw, 64px); }
.hero-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 17ch; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.page-hero { padding: clamp(40px, 5vw, 64px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-bottom: 0; }
.page-hero .hero-actions { margin-top: 20px; }
.eyebrow { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }
.hero-note { font-size: .95rem; color: var(--muted); margin-top: 14px; }
.hero-note strong { color: var(--ink); }

/* Visuals (illustrations) */
.visual { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.visual img { width: 100%; height: 100%; object-fit: cover; }
.visual figcaption { position: absolute; left: 10px; bottom: 10px; font-size: .72rem; font-weight: 500; letter-spacing: .02em; color: var(--ink); background: rgba(255,255,255,.92); border-radius: 4px; padding: 2px 8px; }
.hero-media .visual { aspect-ratio: 16 / 10; }

/* Service tabs */
.section-tabs { padding-top: 8px; }
.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab-list::-webkit-scrollbar { display: none; }
.tab { flex: none; font: inherit; font-weight: 500; font-size: 1rem; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 16px; min-height: 48px; cursor: pointer; transition: color .15s, border-color .15s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: var(--radius); }
.visual--detail img { transform: scale(1.45); transform-origin: 60% 42%; }
.tab-panel { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding: 32px 0 8px; opacity: 0; transform: translateY(6px); transition: opacity .28s var(--ease), transform .28s var(--ease); }
.tab-panel.is-active { opacity: 1; transform: none; }
.tab-panel[hidden] { display: none; }
.tab-panel:focus-visible { outline-offset: 6px; }
.tab-copy p { color: var(--ink-2); max-width: 46ch; }
.tab-price { font-size: 1.05rem; }
.tab-price strong { font-size: 1.5rem; font-weight: 600; color: var(--ink); }
.tab-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 8px; }
.tab-media .visual { aspect-ratio: 3 / 2; }
.tab-list-plain { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tab-list-plain li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tab-list-plain li:last-child { border-bottom: 0; }
.tab-list-plain li span:last-child { font-weight: 600; white-space: nowrap; }
.tabs-more { margin-top: 24px; }

/* Trust bar */
.trust-bar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-bar li { display: flex; gap: 12px; align-items: flex-start; }
.trust-bar .icon { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.trust-bar strong { display: block; font-weight: 600; }
.trust-bar span { font-size: .9rem; color: var(--muted); line-height: 1.45; display: block; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.card:hover { border-color: var(--accent); color: var(--ink); }
.card-icon { color: var(--accent); margin-bottom: 14px; }
.card-icon .icon { width: 26px; height: 26px; }
.card p { color: var(--muted); font-size: .95rem; flex: 1; }
.card-price { font-weight: 600; }

/* Quote calculator */
.quote { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.quote-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; }
.quote-form h3 { margin-bottom: 0; }
.quote-form label, .form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.quote-form em, .form em { font-style: normal; color: var(--muted); font-weight: 500; }
select, input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], textarea {
	font: inherit; font-size: 1rem; padding: .65em .8em; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); width: 100%;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 84, 232, .15); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
legend { font-weight: 600; padding: 0 6px; }
label.check { display: flex !important; gap: 8px; align-items: center; font-weight: 400 !important; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.quote-total { position: sticky; top: 88px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px; }
.quote-total strong[data-total] { display: block; font-size: 2.6rem; font-weight: 600; line-height: 1.1; margin: 4px 0 14px; }
.quote-lines { list-style: none; padding: 0; margin: 0 0 20px; font-size: .9rem; display: grid; gap: 6px; }
.quote-lines li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.14); padding-bottom: 6px; }
.quote-total .small { opacity: .75; margin-top: 12px; }

/* Price tables */
.price-table table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.price-table th, .price-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.price-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.price-table td:last-child { font-weight: 600; white-space: nowrap; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table .small { margin-top: 10px; }
.price-block { margin-bottom: 48px; scroll-margin-top: 90px; }
.link-more { display: inline-block; font-weight: 600; text-decoration: none; }
.link-more:hover { text-decoration: underline; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.jump a { color: var(--ink); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; text-decoration: none; font-size: .9rem; }
.jump a:hover { border-color: var(--accent); color: var(--accent); }

/* Panels, lists */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { color: var(--accent); margin-top: .3em; }
.chips { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); background: var(--surface); padding: 4px 12px; border-radius: 999px; font-size: .88rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { border-top: 1px solid var(--ink); padding-top: 16px; }
.step-n { display: block; font-size: .85rem; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.steps h3 { font-size: 1.05rem; }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Cities */
.city-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 20px; }
.city-grid a { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.city-grid a:hover { color: var(--accent); }
.city-grid .icon { color: var(--muted); width: 1em; height: 1em; }
.area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 24px; }
.area { display: block; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface); }
.area:hover { border-color: var(--accent); color: var(--ink); }
.area h2 { font-size: 1.2rem; display: flex; gap: 8px; align-items: center; }
.area h2 .icon { color: var(--accent); }
.area p { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); padding-bottom: 8px; }

/* Booking form */
.form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notice { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; }
.notice.ok { background: #E6F4EC; color: #17633A; }
.notice.err { background: #FDECEA; color: #9B2C1F; }
#booking { scroll-margin-top: 90px; }

/* Quote dialog */
.quote-dialog { width: min(640px, 100% - 24px); max-height: calc(100vh - 32px); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.quote-dialog::backdrop { background: rgba(17, 28, 44, .45); }
.quote-dialog[open] { animation: dlg-in .22s var(--ease); }
.quote-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.quote-dialog-head h2 { margin: 0; font-size: 1.4rem; }
.dialog-close { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink); }
.dialog-close:hover { border-color: var(--ink); }
.quote-dialog .form { padding: 20px; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; padding: 40px 0; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: .2em; }
.cta-band p { margin: 0; opacity: .8; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Content (editor pages / blog) */
.content h2 { margin-top: 1.4em; }
.post-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-item h2 { font-size: 1.3rem; margin-bottom: .2em; }
.post-item a { color: var(--ink); text-decoration: none; }

/* Footer */
.site-footer { background: var(--ink); color: #AEB8C6; padding: 56px 0 0; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #9DB4FF; }
.site-footer h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.5fr; gap: 40px; }
.footer-cities ul { grid-template-columns: 1fr 1fr; }
.brand-footer { display: inline-block; font-weight: 600; font-size: 1.2rem; margin-bottom: 12px; }
.social { display: flex; gap: 14px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding: 20px 0; font-size: .85rem; }
.mobile-bar { display: none; }

/* Responsive */
@media (max-width: 1100px) {
	.nav-call { display: none; }
	.nav-list { gap: 16px; }
}
@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 12px; max-height: calc(100vh - 64px); overflow-y: auto; }
	.site-nav.open { display: flex; }
	.nav-list { flex-direction: column; gap: 0; }
	.nav-list > li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
	.nav-list .sub, .nav-list .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 8px 12px; min-width: 0; background: none; }
	.nav-cta { flex-direction: column; align-items: stretch; }
	.nav-call { display: block; padding: 10px 0; }
	.hero-inner, .two-col, .quote, .tab-panel { grid-template-columns: 1fr; }
	.hero-inner { gap: 28px; }
	.hero h1 { max-width: none; }
	.tab-panel { gap: 24px; }
	.tab-media { order: -1; }
	.trust-bar { grid-template-columns: 1fr 1fr; }
	.steps { grid-template-columns: 1fr 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-grid > div:first-child { grid-column: 1 / -1; }
	.quote-total { position: static; }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 640px) {
	body { font-size: 16px; padding-bottom: 72px; }
	.trust-bar, .steps, .grid-2, fieldset { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.hero-actions .btn { flex: 1 1 100%; }
	.quote-form, .form, .panel { padding: 20px; }
	.price-table td:last-child { white-space: normal; }
	.tab { padding: 12px; font-size: .95rem; }
	.mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
	.mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; }
	.mobile-bar a.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
	.quote-dialog { padding: 16px; }
	.quote-dialog .form { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.tab-panel { transform: none; }
}

/* Local SEO sections (city pages) */
.seo-section { scroll-margin-top: 90px; }
.seo-section + .seo-section { margin-top: 32px; }
