/*
Theme Name: DubboITS
Description: Website theme for DubboITS — managed IT, security cameras and tech support. Pairs with the MSP Portal plugin.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: dubboits
*/

/* Dark palette: override the theme.json presets so every block follows. */
:root[data-msp-theme="dark"] {
	--wp--preset--color--base: #100e15;
	--wp--preset--color--surface: #17151d;
	--wp--preset--color--surface-2: #1f1c27;
	--wp--preset--color--contrast: #ecebf1;
	--wp--preset--color--muted: #9c98aa;
	--wp--preset--color--border: #2a2733;
	--wp--preset--color--accent: #a68bfa;
	--wp--preset--color--accent-strong: #c0aefc;
	--wp--preset--color--accent-soft: #261e3a;
	--wp--preset--color--on-accent: #150c28;
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-msp-theme="light"]) {
		--wp--preset--color--base: #100e15;
		--wp--preset--color--surface: #17151d;
		--wp--preset--color--surface-2: #1f1c27;
		--wp--preset--color--contrast: #ecebf1;
		--wp--preset--color--muted: #9c98aa;
		--wp--preset--color--border: #2a2733;
		--wp--preset--color--accent: #a68bfa;
		--wp--preset--color--accent-strong: #c0aefc;
		--wp--preset--color--accent-soft: #261e3a;
		--wp--preset--color--on-accent: #150c28;
		color-scheme: dark;
	}
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a):focus-visible, :where(button):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--base) 86%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 0); }
.site-header__inner { padding-block: 14px; gap: 16px; }
.site-header .wp-block-site-title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; }
.site-header .wp-block-site-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.site-header .wp-block-site-title a::before {
	content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 9px; border-radius: 3px;
	background: var(--wp--preset--color--accent); vertical-align: 1px;
}
.site-header__right { gap: 10px 18px; align-items: center; }
.site-header .wp-block-navigation { font-size: 0.9375rem; font-weight: 500; gap: 22px; }
.site-header .wp-block-navigation a { color: var(--wp--preset--color--muted); text-decoration: none; }
.site-header .wp-block-navigation a:hover,
.site-header .wp-block-navigation .current-menu-item a { color: var(--wp--preset--color--contrast); }
.site-header .wp-block-button__link { padding: 8px 14px; font-size: 0.875rem; }

.msp-theme-toggle {
	display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer; border-radius: 8px;
	background: transparent; border: 1px solid var(--wp--preset--color--border); color: var(--wp--preset--color--contrast);
}
.msp-theme-toggle:hover { background: var(--wp--preset--color--surface-2); }
.msp-theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.msp-theme-toggle .msp-i-sun { display: none; }
:root[data-msp-theme="dark"] .msp-theme-toggle .msp-i-sun { display: block; }
:root[data-msp-theme="dark"] .msp-theme-toggle .msp-i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-msp-theme="light"]) .msp-theme-toggle .msp-i-sun { display: block; }
	:root:not([data-msp-theme="light"]) .msp-theme-toggle .msp-i-moon { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--alt { background: var(--wp--preset--color--surface-2); border-block: 1px solid var(--wp--preset--color--border); }
.eyebrow {
	margin: 0 0 12px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.lede { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); color: var(--wp--preset--color--muted); max-width: 60ch; }
.muted { color: var(--wp--preset--color--muted); }

/* Hero */
.hero { padding-block: clamp(64px, 10vw, 128px) clamp(48px, 7vw, 88px); }
.hero h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); line-height: 1.04; letter-spacing: -0.035em; max-width: 16ch; margin: 0 0 20px; }
.hero h1 em { font-style: normal; color: var(--wp--preset--color--accent); }
.hero .wp-block-buttons { margin-top: 28px; }
.hero__index { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--wp--preset--color--border); }
.hero__index .wp-block-column { padding: 20px 0 0; }
.hero__index h3 { font-size: 1rem; margin: 0 0 6px; }
.hero__index p { margin: 0; font-size: 0.9375rem; color: var(--wp--preset--color--muted); }
.num { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; color: var(--wp--preset--color--accent); margin: 0 0 10px; }

/* Service blocks */
.service { padding: 28px; border: 1px solid var(--wp--preset--color--border); border-radius: 14px; background: var(--wp--preset--color--surface); height: 100%; }
.service h3 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -0.015em; }
.service > p { color: var(--wp--preset--color--muted); margin: 0 0 16px; }
.service ul, .checklist { margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.service li, .checklist li { position: relative; padding: 7px 0 7px 22px; border-top: 1px solid var(--wp--preset--color--border); }
.service li::before, .checklist li::before {
	content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 2px;
	background: var(--wp--preset--color--accent); opacity: 0.85;
}
.service .wp-block-buttons { margin-top: 18px; }
.split-head { gap: 32px; align-items: end; margin-bottom: 32px; }
.split-head h2 { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.1; }

/* Steps */
.steps .wp-block-column { border-top: 2px solid var(--wp--preset--color--accent); padding-top: 18px; }
.steps h3 { margin: 0 0 6px; font-size: 1.125rem; }
.steps p { margin: 0; color: var(--wp--preset--color--muted); }

/* CTA band */
.cta { padding: clamp(32px, 5vw, 56px); border-radius: 18px; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }
.cta h2 { color: inherit; margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.02em; }
.cta p { margin: 0; opacity: 0.9; }
.cta .wp-block-button__link { background: var(--wp--preset--color--on-accent); color: var(--wp--preset--color--accent); }
.cta .is-style-outline .wp-block-button__link { background: transparent; color: inherit; border-color: currentColor; }
.cta-row { gap: 24px; align-items: center; }

/* Status strip */
.status-strip { gap: 16px; padding: 18px 22px; border: 1px solid var(--wp--preset--color--border); border-radius: 12px; background: var(--wp--preset--color--surface); }
.status-strip p { margin: 0; }

/* Page header */
.page-head { padding-block: clamp(48px, 7vw, 88px) 8px; }
.page-head .wp-block-post-title, .page-head h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); letter-spacing: -0.03em; line-height: 1.08; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--wp--preset--color--border); padding-block: 48px 32px; font-size: 0.9375rem; }
.site-footer h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--wp--preset--color--muted); margin: 0 0 10px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.site-footer a:hover { color: var(--wp--preset--color--accent); }
.site-footer__base { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--wp--preset--color--border); color: var(--wp--preset--color--muted); font-size: 0.8125rem; }

@media (max-width: 781px) {
	.split-head { flex-direction: column; align-items: flex-start; }
}

.section h2.wp-block-heading, .page-head + * h2.wp-block-heading { font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.1; margin-top: 0; }
.section + .section--tight { padding-top: 0; }
.site-footer .wp-block-site-title { font-weight: 700; font-size: 1rem; }
