/**
 * HomeGuard Core — "tech" effects. Pairs with hg-effects.js (which adds .hg-fx to <html>).
 */

/* ---- Tech grid on light page heads ---- */
.hg-sv-hero, .hg-pfs-head, .hg-svc-hero > .section-bg {
	background-image:
		linear-gradient(rgba(52, 0, 117, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(52, 0, 117, 0.045) 1px, transparent 1px);
	background-size: 44px 44px;
	background-position: -1px -1px;
}

/* ---- CCTV HUD ---- */
.has-hud { position: relative; }
.hg-hud { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; color: #fff; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
.hg-hud.is-hero {
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
		radial-gradient(ellipse at center, transparent 55%, rgba(20, 0, 50, 0.35) 100%);
	background-size: 56px 56px, 56px 56px, 100% 100%;
}
.hg-hero.has-hud > .section-content { position: relative; z-index: 2; }
.hg-hud__c { position: absolute; width: 26px; height: 26px; border: 2px solid rgba(255, 255, 255, 0.75); }
.hg-hud__c.is-tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.hg-hud__c.is-tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.hg-hud__c.is-bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.hg-hud__c.is-br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }
.hg-hud__rec, .hg-hud__cam, .hg-hud__time { position: absolute; font-size: 11px; font-weight: 600; line-height: 14px; letter-spacing: .12em; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); white-space: nowrap; }
.hg-hud__rec { top: 24px; left: 52px; display: flex; align-items: center; gap: 6px; }
.hg-hud__rec b { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; animation: hgBlink 1.2s steps(1) infinite; }
.hg-hud__cam { top: 42px; left: 52px; opacity: .8; letter-spacing: .08em; }
.hg-hud__time { top: 24px; right: 52px; opacity: .9; letter-spacing: .06em; }
.hg-hud.is-hero .hg-hud__time { top: auto; bottom: 24px; }
.hg-hud__scan { position: absolute; left: 0; right: 0; top: -30%; height: 30%; background: linear-gradient(to bottom, rgba(172, 248, 71, 0), rgba(172, 248, 71, 0.10) 85%, rgba(172, 248, 71, 0.45) 100%); animation: hgScan 6s linear infinite; }
.hg-hud.is-hero .hg-hud__scan { animation-duration: 8s; background: linear-gradient(to bottom, rgba(172, 248, 71, 0), rgba(172, 248, 71, 0.06) 85%, rgba(172, 248, 71, 0.30) 100%); }
.hg-pfs-figure:has(.hg-pf-mock) .hg-hud__time { display: none; }
.hg-sv-hero__media figcaption, .hg-pf-mock { z-index: 2; }
@keyframes hgBlink { 50% { opacity: 0; } }
@keyframes hgScan { to { top: 100%; } }

/* ---- Icon panel (services without a photo): radar ping + grid ---- */
.hg-sv-hero__panel::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: linear-gradient(135deg, #000, transparent 75%); mask-image: linear-gradient(135deg, #000, transparent 75%); }
.hg-sv-hero__icon { position: relative; }
.hg-sv-hero__icon::before, .hg-sv-hero__icon::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--hg-accent); opacity: 0; animation: hgPing 2.8s cubic-bezier(.2, .6, .3, 1) infinite; }
.hg-sv-hero__icon::after { animation-delay: 1.4s; }
@keyframes hgPing { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }

/* ---- Scroll reveal ---- */
.hg-fx .hg-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.hg-fx .hg-reveal.is-in { opacity: 1; transform: none; }

/* ---- Pointer glow + tilt (JS adds .hg-glow on first hover) ---- */
.hg-glow { position: relative; transition: transform .18s ease-out, box-shadow .25s ease, border-color .25s ease; }
.hg-glow::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; background: radial-gradient(260px circle at var(--hg-mx, 50%) var(--hg-my, 50%), rgba(124, 75, 226, 0.16), transparent 65%); opacity: 0; transition: opacity .25s ease; }
.hg-glow:hover::after { opacity: 1; }
.hg-glow:hover { border-color: rgba(124, 75, 226, 0.45); box-shadow: 0 0 0 1px rgba(124, 75, 226, 0.22), 0 18px 40px -18px rgba(52, 0, 117, 0.4); }

/* ---- Brand marquee ---- */
.hg-band-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.hg-band-head .hg-label { margin: 0; }
.hg-mq { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.hg-mq__track { display: flex; width: max-content; animation: hgMarquee 50s linear infinite; }
.hg-mq:hover .hg-mq__track { animation-play-state: paused; }
.hg-mq__list { display: flex; gap: 12px; padding-right: 12px; }
.hg-mq__item { display: flex; align-items: center; justify-content: center; min-width: 150px; height: 64px; padding: 0 24px; border: 1px solid #e7e8ea; border-radius: 12px; background: #fff; color: #4a4452; font-size: 17px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; transition: color .2s, border-color .2s; }
.hg-mq__item:hover { color: var(--hg-primary); }
.hg-mq__item img { width: auto; max-height: 34px; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.hg-mq__item:hover img { filter: none; opacity: 1; }
@keyframes hgMarquee { to { transform: translateX(-50%); } }

/* ---- Small screens ---- */
@media (max-width: 549px) {
	.hg-hud__c { width: 18px; height: 18px; }
	.hg-hud__c.is-tl, .hg-hud__c.is-tr { top: 10px; }
	.hg-hud__c.is-bl, .hg-hud__c.is-br { bottom: 10px; }
	.hg-hud__c.is-tl, .hg-hud__c.is-bl { left: 10px; }
	.hg-hud__c.is-tr, .hg-hud__c.is-br { right: 10px; }
	.hg-hud__rec { top: 16px; left: 36px; }
	.hg-hud__cam, .hg-hud.is-frame .hg-hud__time { display: none; }
	.hg-hud.is-hero .hg-hud__time { right: 36px; bottom: 16px; font-size: 10px; }
	.hg-mq__item { min-width: 120px; height: 54px; padding: 0 18px; font-size: 15px; }
}

/* ---- Reduced motion: keep the look, drop the movement ---- */
@media (prefers-reduced-motion: reduce) {
	.hg-hud__scan, .hg-sv-hero__icon::before, .hg-sv-hero__icon::after { display: none; }
	.hg-hud__rec b { animation: none; }
	.hg-mq__track { flex-wrap: wrap; width: auto; animation: none; }
	.hg-mq__list { flex-wrap: wrap; }
	.hg-mq__list[aria-hidden="true"] { display: none; }
	.hg-mq { -webkit-mask-image: none; mask-image: none; }
}
