/*
Theme Name: Handyman Tech: Techy
Template: htr-base
Description: Dark, tech-lab design for Handyman Tech Repair: grid backdrop, monospace labels, glowing brand accents and a live diagnostic readout in the hero.
Author: Mark Badaracco
Version: 1.0.0
*/

/*
 * Self-hosted fonts: Google's latin woff2 files, cut down with fontTools varLib.instancer to the weights this
 * design uses. Space Grotesk (headings) is preloaded and font-display: optional, so it never swaps in late and
 * moves the page. The text faces swap, onto local fallbacks scaled to the same average advance width
 * (size-adjust) and line metrics (ascent/descent-override), measured from the woff2 files against Arial and
 * Courier New, so a late swap barely reflows.
 */
@font-face {
	font-family: "Space Grotesk";
	src: url("fonts/space-grotesk-latin-wght.woff2") format("woff2");
	font-weight: 500 700;
	font-display: optional;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "IBM Plex Sans";
	src: url("fonts/ibm-plex-sans-latin-wght.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("fonts/jetbrains-mono-latin-wght.woff2") format("woff2");
	font-weight: 500 700;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { font-family: "Space Grotesk Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); font-weight: 500 900; size-adjust: 102.73%; ascent-override: 95.79%; descent-override: 28.42%; line-gap-override: 0%; }
@font-face { font-family: "IBM Plex Sans Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"); font-weight: 100 599; size-adjust: 101.57%; ascent-override: 100.91%; descent-override: 27.07%; line-gap-override: 0%; }
@font-face { font-family: "IBM Plex Sans Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); font-weight: 600 900; size-adjust: 98.52%; ascent-override: 104.04%; descent-override: 27.91%; line-gap-override: 0%; }
@font-face { font-family: "JetBrains Mono Fallback"; src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono"); font-weight: 100 599; size-adjust: 99.98%; ascent-override: 102.02%; descent-override: 30%; line-gap-override: 0%; }
@font-face { font-family: "JetBrains Mono Fallback"; src: local("Courier New Bold"), local("CourierNewPS-BoldMT"), local("Liberation Mono Bold"); font-weight: 600 900; size-adjust: 99.98%; ascent-override: 102.02%; descent-override: 30%; line-gap-override: 0%; }

:root {
	--hi: var(--htr-brand-2);
	--bg: #000c2a;
	--surface: #031c4d;
	--surface-2: #062560;
	--text: #e8eef8;
	--muted: #a3b3c9;
	--line: #1a3f86;
	--primary: var(--hi);
	--on-primary: var(--htr-ink);
	--link: var(--hi);
	--focus: var(--htr-paper);
	--radius: 14px;
	--radius-sm: 10px;
	--font-body: "IBM Plex Sans", "IBM Plex Sans Fallback", system-ui, sans-serif;
	--font-head: "Space Grotesk", "Space Grotesk Fallback", system-ui, sans-serif;
	--font-mono: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, Consolas, monospace;
	color-scheme: dark;
}

body {
	background:
		radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--htr-brand-2) 22%, transparent), transparent 60%),
		radial-gradient(900px 500px at -10% 20%, color-mix(in srgb, var(--htr-brand) 30%, transparent), transparent 60%),
		var(--bg);
	background-attachment: fixed;
}
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image: linear-gradient(rgba(140, 170, 220, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 170, 220, .06) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: linear-gradient(to bottom, #000 0, transparent 900px);
}

.htr-eyebrow { font-family: var(--font-mono); font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--hi); }
/* Decorative prefixes: the "/ ''" alt text keeps screen readers from reading them (plain value first as a fallback). */
.htr-eyebrow::before { content: "// "; content: "// " / ""; opacity: .7; }

/* Top bar + header */
.htr-topbar { background: #00081e; color: var(--muted); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .82rem; }
.htr-topbar a { color: var(--text); }
.htr-topbar__free { color: var(--hi); }
.htr-header { background: rgba(0, 12, 42, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.htr-nav__list a { color: var(--muted); font-family: var(--font-mono); font-size: .95rem; font-weight: 500; }
.htr-nav__list a:hover { color: var(--text); background: var(--surface-2); }
.htr-nav__list a[aria-current] { color: var(--text); text-decoration-color: var(--hi); }
@container htr-header (max-width: 60rem) { .htr-nav__panel { background: var(--surface); border-bottom: 1px solid var(--line); } }

/* Buttons */
.htr-btn, .htr-form .wpcf7-submit { font-family: var(--font-mono); font-weight: 700; letter-spacing: .01em; }
.htr-btn--primary, .htr-form .wpcf7-submit { box-shadow: 0 0 0 1px color-mix(in srgb, var(--hi) 50%, transparent), 0 8px 30px color-mix(in srgb, var(--htr-brand-2) 40%, transparent); }
.htr-btn--primary:hover, .htr-form .wpcf7-submit:hover { background: #fff; }
.htr-btn--ghost { color: var(--text); border-color: var(--line); background: rgba(255, 255, 255, .02); }
.htr-btn--ghost:hover { border-color: var(--hi); color: var(--hi); }

/* Hero */
.htr-hero__title { font-weight: 700; }
.htr-hero__title, .htr-pagehead__title { background: linear-gradient(180deg, #fff 30%, #bfe6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.htr-hero__lead { color: var(--muted); }
.htr-hero__lead strong { color: var(--text); }
.htr-hero__facts { font-family: var(--font-mono); font-size: .92rem; color: var(--muted); }
.htr-hero__facts .htr-icon { color: #4ade80; }

.htr-term { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(0, 8, 30, .92); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 60px color-mix(in srgb, var(--htr-brand-2) 20%, transparent); overflow: hidden; font: 500 .92rem/1.75 var(--font-mono); }
.htr-term__bar { display: flex; align-items: center; gap: .45rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .8rem; }
.htr-term__dot { width: 11px; height: 11px; border-radius: 50%; background: #3a4660; }
.htr-term__dot:nth-child(1) { background: #ff5f57; }
.htr-term__dot:nth-child(2) { background: #febc2e; }
.htr-term__dot:nth-child(3) { background: #28c840; }
.htr-term__name { margin-left: .5rem; }
.htr-term__body { margin: 0; padding: 1.1rem 1.25rem 1.4rem; list-style: none; }
@media (max-width: 480px) { .htr-term { font-size: .8rem; } }
.htr-term__body li { white-space: pre-wrap; opacity: 0; animation: htr-type .01s forwards; }
.htr-term__body li:nth-child(1) { animation-delay: .2s; }
.htr-term__body li:nth-child(2) { animation-delay: .7s; }
.htr-term__body li:nth-child(3) { animation-delay: 1.1s; }
.htr-term__body li:nth-child(4) { animation-delay: 1.5s; }
.htr-term__body li:nth-child(5) { animation-delay: 1.9s; }
.htr-term__body li:nth-child(6) { animation-delay: 2.4s; }
.htr-term__body li:nth-child(7) { animation-delay: 2.9s; }
.htr-term__body li:nth-child(8) { animation-delay: 3.3s; }
@keyframes htr-type { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .htr-term__body li { opacity: 1; animation: none; } .htr-term__cursor { animation: none; } }
.htr-term .p { color: var(--hi); }
.htr-term .ok { color: #4ade80; }
.htr-term .bad { color: #ff8a80; }
.htr-term .dim { color: var(--muted); }
.htr-term .hl { color: #ffd166; }
.htr-term__cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--hi); animation: htr-blink 1s steps(1) 5; /* stops within 5s (WCAG 2.2.2) */ }
@keyframes htr-blink { 50% { opacity: 0; } }

/* Page head */
.htr-pagehead { border-bottom: 1px solid var(--line); }
.htr-pagehead__lead { color: var(--muted); }
.htr-pagehead__icon { color: var(--hi); border: 1px solid var(--line); background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--htr-brand-2) 30%, transparent), var(--surface)); box-shadow: 0 0 50px color-mix(in srgb, var(--htr-brand-2) 25%, transparent); }
.htr-crumbs { font-family: var(--font-mono); color: var(--muted); }

/* Surfaces */
.htr-card__link, .htr-press__link, .htr-card--static, .htr-step, .htr-panel, .htr-faq__item, .htr-value, .htr-shoplist li, .htr-product, .htr-callout {
	position: relative;
	background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), var(--surface);
	border: 1px solid var(--line);
}
.htr-card__link { transition: border-color .2s, transform .2s, box-shadow .2s; }
.htr-card__link::before { content: ""; position: absolute; top: -1px; left: 18px; width: 40px; height: 2px; background: var(--hi); box-shadow: 0 0 12px var(--hi); }
.htr-card__link:hover { border-color: color-mix(in srgb, var(--hi) 60%, var(--line)); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 30px color-mix(in srgb, var(--htr-brand-2) 18%, transparent); }
.htr-card__icon, .htr-hubrow__icon { color: var(--hi); background: color-mix(in srgb, var(--htr-brand-2) 14%, transparent); border: 1px solid color-mix(in srgb, var(--hi) 30%, transparent); }
.htr-card__title { font-family: var(--font-head); }
.htr-card__more { color: var(--hi); font-family: var(--font-mono); font-size: .9rem; }
.htr-card__meta { font-family: var(--font-mono); color: var(--hi); text-transform: none; letter-spacing: 0; }

.htr-step__n { color: var(--hi); font-size: 1.6rem; text-shadow: 0 0 18px color-mix(in srgb, var(--hi) 60%, transparent); }
.htr-section--process .htr-steps { position: relative; }

.htr-checks .htr-icon { color: #4ade80; }
.htr-faq__q:hover .htr-faq__qt { color: var(--hi); }
.htr-faq__icon { color: var(--hi); }
.htr-faq__item[open] { border-color: color-mix(in srgb, var(--hi) 45%, var(--line)); }
.htr-faq__a { color: var(--muted); }
.htr-faq__a a { color: var(--hi); }
.htr-toc a { color: var(--muted); font-family: var(--font-mono); font-size: .92rem; }
.htr-toc a:hover { color: var(--hi); }

.htr-guide__step .htr-step__n { font-size: 1rem; color: var(--on-primary); background: var(--hi); text-shadow: none; }
.htr-callout--warn { border-color: #7a5a12; background: linear-gradient(180deg, rgba(255, 209, 102, .09), rgba(255, 209, 102, .03)); }
.htr-callout--warn > .htr-icon { color: #ffd166; }
.htr-callout--bring { border-color: color-mix(in srgb, var(--hi) 45%, var(--line)); }

.htr-shoplist .htr-icon { color: var(--hi); }
.htr-product__img--none { background: var(--surface-2); color: var(--muted); }
.htr-product__price { color: var(--hi); }
.htr-facts dt { color: var(--hi); font-family: var(--font-mono); letter-spacing: .02em; text-transform: none; }

/* Alternating band */
.htr-section--process, .htr-section--faq { background: linear-gradient(180deg, transparent, rgba(3, 28, 77, .55) 15%, rgba(3, 28, 77, .55) 85%, transparent); padding-bottom: var(--section); }

/* Forms */
.htr-form input[type="text"], .htr-form input[type="email"], .htr-form input[type="tel"], .htr-form select, .htr-form textarea { background: #00081e; border-color: var(--line); color: var(--text); }
.htr-form .wpcf7-not-valid-tip { color: #ff9e95; }

/* CTA */
.htr-cta { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: radial-gradient(700px 300px at 15% 50%, color-mix(in srgb, var(--htr-brand) 55%, transparent), transparent), radial-gradient(600px 300px at 90% 50%, color-mix(in srgb, var(--htr-brand-2) 30%, transparent), transparent), #00081e; }
.htr-cta__text p { color: var(--muted); }
.htr-btn--light { color: var(--text); border-color: var(--line); }

/* Footer */
.htr-footer { background: #00081e; color: var(--muted); border-top: 1px solid var(--line); }
.htr-footer__h { font-family: var(--font-mono); color: var(--text); letter-spacing: .04em; text-transform: none; }
.htr-footer__h::before { content: "> "; content: "> " / ""; color: var(--hi); }
.htr-footer__legal { border-top: 1px solid var(--line); }
.htr-footer a:not(.htr-callbar):hover { color: var(--hi); }

/* Temporary notice */
.htr-notice { background: var(--hi); color: var(--htr-ink); }
.htr-notice__in { font-family: var(--font-mono); font-size: .95rem; }
.htr-notice :focus-visible { outline-color: var(--htr-ink); }
