:root{ –bit-header-h: 0px; }
/* =========================
WORDPRESS WIDTH FIXES
========================= */
.wp-site-blocks,
.wp-block-post-content,
.entry-content,
.is-layout-constrained,
.wp-container-core-group-is-layout-constrained,
.wp-block-group.is-layout-constrained{
max-width: none !important;
width: 100% !important;
}
.wp-site-blocks{ padding: 0 !important; }
main, .wp-block-post-content{ margin-top: 0 !important; }
/* =========================
GLOBAL SITE BACKGROUND
========================= */
html, body{ min-height: 100%; }
body{
margin: 0;
font-family: ‘Inter’, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
background:
radial-gradient(1200px 800px at 20% 10%, rgba(255,255,255,.04), rgba(0,0,0,0) 60%),
linear-gradient(180deg, #0b0f14, #06080b),
url(“https://brownersitservices.co.uk/wp-content/uploads/2026/08/a422b-background.png”);
background-repeat: no-repeat;
background-size: cover;
background-position: center top;
background-attachment: fixed;
color: rgba(255,255,255,.88);
}
@media (hover: none) and (pointer: coarse){
body{ background-attachment: scroll; background-position: center top; }
}
/* =========================
PAGE SHELL
========================= */
.bit-page{
min-height: 100vh;
display: flex;
flex-direction: column;
}
.bit-content{
flex: 1 0 auto;
width: min(100% – 32px, 1120px);
margin: 0 auto;
padding: 26px 0 34px;
padding-top: calc(var(–bit-header-h) + 18px);
}
.bit-content h1, .bit-content h2, .bit-content h3{ color: rgba(255,255,255,.92); }
.bit-content p{ color: rgba(255,255,255,.78); line-height: 1.6; }
/* =========================
HEADER (floating overlay)
========================= */
.bit-header-wrap{
position: fixed;
top: 0; left: 0; right: 0;
z-index: 99999;
transform: translateY(-110%);
opacity: 0;
pointer-events: none;
transition:
transform 0.55s cubic-bezier(.22,.61,.36,1),
opacity 0.55s cubic-bezier(.22,.61,.36,1);
will-change: transform, opacity;
}
.bit-header-wrap.is-visible{
transform: translateY(0);
opacity: 1;
pointer-events: auto;
}
.bit-header{
position: relative !important;
border-radius: 0 0 22px 22px !important;
overflow: hidden !important;
box-shadow: 0 18px 45px rgba(0,0,0,.45) !important;
margin: 0 !important;
}
.bit-header::before{
content:”” !important;
position:absolute !important;
inset:0 !important;
z-index:0 !important;
background: url(“https://brownersitservices.co.uk/wp-content/uploads/2026/08/a422b-background.png”) center/cover no-repeat !important;
filter: contrast(1.7) brightness(1.15) saturate(1.15) !important;
}
.bit-header::after{
content:”” !important;
position:absolute !important;
inset:0 !important;
z-index:1 !important;
background:
radial-gradient(1100px 700px at 20% 15%, rgba(255,255,255,.06), rgba(255,255,255,0) 60%),
linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.55)) !important;
}
.bit-header-inner{
position: relative !important;
z-index: 2 !important;
max-width: 1120px;
margin: 0 auto;
padding: 18px 22px;
display: flex;
align-items: center;
gap: 16px;
}
.bit-header-logo{
height: 70px;
width: auto;
flex-shrink: 0;
display:block;
}
.bit-header-nav{
margin-left: auto;
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.bit-header-nav a{
color: rgba(255,255,255,.94) !important;
padding: 10px 14px;
border-radius: 999px;
font-size: 13px;
font-weight: 600;
background: rgba(0,0,0,.30);
border: 1px solid rgba(255,255,255,.18);
text-decoration: none !important;
transition: all .15s ease;
display:inline-block;
white-space: nowrap;
}
.bit-header-nav a:hover{
background: linear-gradient(135deg, #19f3d1, #1cc8ff) !important;
color: #0b1220 !important;
border-color: rgba(25,243,209,.95) !important;
box-shadow:
0 0 0 1px rgba(25,243,209,.6),
0 8px 20px rgba(25,243,209,.35);
transform: translateY(-1px);
}
.bit-burger{
margin-left: auto;
display: none;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
border-radius: 999px;
background: rgba(0,0,0,.30);
border: 1px solid rgba(255,255,255,.18);
cursor: pointer;
transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
color: rgba(255,255,255,.94);
}
.bit-burger:hover{ box-shadow: 0 8px 20px rgba(25,243,209,.20); transform: translateY(-1px); }
.bit-burger:focus-visible{ outline: 3px solid rgba(25,243,209,.55); outline-offset: 2px; }
.bit-burger svg{ width: 20px; height: 20px; display:block; }
.bit-mobile-menu{
display: none;
position: relative;
z-index: 2;
padding: 0 22px 18px;
}
.bit-mobile-panel{
background: rgba(0,0,0,.34);
border: 1px solid rgba(255,255,255,.14);
border-radius: 18px;
overflow: hidden;
transform: translateY(-8px);
opacity: 0;
max-height: 0;
transition: max-height .35s cubic-bezier(.22,.61,.36,1), opacity .22s ease, transform .22s ease;
}
.bit-header-wrap.menu-open .bit-mobile-panel{
transform: translateY(0);
opacity: 1;
max-height: 520px;
}
.bit-mobile-panel a{
display: block;
padding: 14px 14px;
color: rgba(255,255,255,.94) !important;
text-decoration: none !important;
border-top: 1px solid rgba(255,255,255,.10);
font-weight: 650;
font-size: 14px;
}
.bit-mobile-panel a:first-child{ border-top: none; }
.bit-mobile-panel a:hover{
background: linear-gradient(135deg, rgba(25,243,209,.22), rgba(28,200,255,.18)) !important;
}
@media (max-width: 900px){
.bit-header-inner{ padding: 14px 16px; }
.bit-header-logo{ height: 56px; }
.bit-header-nav{ display: none; }
.bit-burger{ display: inline-flex; }
.bit-mobile-menu{ display: block; padding: 0 16px 16px; }
}
.bit-top-reveal{
position: fixed;
top: 0; left: 0; right: 0;
height: 14px;
z-index: 100000;
background: transparent;
}
/* =========================
CONTENT
========================= */
.bit-subpage{ display: grid; gap: 14px; }
.bit-panel{
background: rgba(0,0,0,.22);
border: 1px solid rgba(255,255,255,.14);
border-radius: 20px;
padding: 18px;
box-shadow: 0 22px 55px rgba(0,0,0,.22);
backdrop-filter: blur(6px);
}
.bit-hero{
position: relative;
overflow: hidden;
border: 1px solid rgba(255,255,255,.18);
}
.bit-hero::before{
content:””;
position:absolute;
inset:0;
background:
radial-gradient(900px 520px at 15% 10%, rgba(25,243,209,.18), rgba(0,0,0,0) 60%),
radial-gradient(700px 420px at 85% 0%, rgba(28,200,255,.12), rgba(0,0,0,0) 55%);
pointer-events:none;
}
.bit-hero > *{ position: relative; }
.bit-kicker{
display:inline-flex;
align-items:center;
gap: 10px;
padding: 7px 11px;
border-radius: 999px;
border: 1px solid rgba(255,255,255,.18);
background: rgba(0,0,0,.18);
color: rgba(255,255,255,.90);
font-weight: 650;
font-size: 12.5px;
width: fit-content;
}
.bit-dot{
width: 8px; height: 8px;
border-radius: 999px;
background: linear-gradient(135deg, #19f3d1, #1cc8ff);
box-shadow: 0 0 0 3px rgba(25,243,209,.16);
}
.bit-hero h1{
margin: 12px 0 8px;
font-size: clamp(26px, 3.2vw, 40px);
line-height: 1.08;
letter-spacing: -0.02em;
color: rgba(255,255,255,.96);
}
.bit-hero p{ margin: 0; max-width: 78ch; }
.bit-cta-row{
display:flex;
gap: 10px;
flex-wrap: wrap;
margin-top: 12px;
}
.bit-btn{
display:inline-flex;
align-items:center;
justify-content:center;
padding: 12px 14px;
border-radius: 999px;
font-weight: 800;
font-size: 13.5px;
text-decoration: none !important;
border: 1px solid rgba(255,255,255,.20);
background: rgba(255,255,255,.06);
color: rgba(255,255,255,.96) !important;
transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
white-space: nowrap;
}
.bit-btn:hover{
background: linear-gradient(135deg, #19f3d1, #1cc8ff) !important;
color: #071018 !important;
border-color: rgba(25,243,209,.95) !important;
box-shadow: 0 0 0 1px rgba(25,243,209,.55), 0 14px 30px rgba(25,243,209,.18);
transform: translateY(-1px);
}
/* Tier grid (extra gap helps too) */
.bit-tiers{
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px; /* increased */
align-items: stretch;
}
@media (max-width: 1020px){
.bit-tiers{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px){
.bit-tiers{ grid-template-columns: 1fr; }
}
.tier{
position: relative;
border-radius: 22px;
padding: 18px;
background: rgba(0,0,0,.22);
border: 1px solid rgba(255,255,255,.16);
box-shadow: 0 18px 45px rgba(0,0,0,.22);
backdrop-filter: blur(7px);
overflow: hidden;
display: grid;
gap: 12px;
/* overlap fix */
isolation: isolate; /* keeps pseudo layers inside card */
z-index: 0; /* base stacking */
transform: none !important; /* stop any inherited transforms */
transition: box-shadow .15s ease, border-color .15s ease;
}
.tier::before{
content:””;
position:absolute;
inset:-2px;
opacity: .65;
background:
radial-gradient(500px 260px at 20% 0%, rgba(255,255,255,.08), rgba(0,0,0,0) 55%),
linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,0));
pointer-events:none;
z-index: 0;
}
.tier::after{
content:””;
position:absolute;
inset: -2px;
pointer-events:none;
opacity: .9;
z-index: 0;
background:
radial-gradient(800px 320px at 15% 0%, var(–glow), rgba(0,0,0,0) 55%),
linear-gradient(135deg, rgba(0,0,0,0), rgba(0,0,0,0));
}
.tier > *{ position: relative; z-index: 1; }
.tier:hover{
z-index: 3; /* bring above neighbours without physically moving */
border-color: rgba(255,255,255,.28);
box-shadow: 0 26px 70px rgba(0,0,0,.32);
}
.tier-top{
display:flex;
align-items:flex-start;
justify-content: space-between;
gap: 10px;
}
.tier-name{
font-size: 14px;
letter-spacing: .08em;
text-transform: uppercase;
font-weight: 800;
margin: 0;
}
.tier-price{
font-size: 28px;
font-weight: 900;
margin: 2px 0 0;
color: rgba(255,255,255,.96);
line-height: 1;
}
.tier-price small{
font-size: 13px;
font-weight: 700;
opacity: .85;
}
.tier-desc{
margin: -4px 0 0;
color: rgba(255,255,255,.78);
line-height: 1.55;
}
.tier-badge{
display:inline-flex;
align-items:center;
gap: 8px;
padding: 8px 10px;
border-radius: 999px;
font-size: 12.5px;
font-weight: 850;
border: 1px solid rgba(255,255,255,.16);
background: rgba(0,0,0,.24);
color: rgba(255,255,255,.92);
white-space: nowrap;
}
.tier-badge .spark{
width: 8px; height: 8px;
border-radius: 999px;
background: linear-gradient(135deg, #19f3d1, #1cc8ff);
box-shadow: 0 0 0 3px rgba(25,243,209,.15);
}
.tier-section-title{
margin: 4px 0 0;
font-size: 12px;
letter-spacing: .08em;
text-transform: uppercase;
color: rgba(255,255,255,.72);
}
.tier-list{
margin: 0;
padding: 0;
list-style: none;
display: grid;
gap: 8px;
}
.tier-list li{
background: rgba(255,255,255,.04);
border: 1px solid rgba(255,255,255,.10);
border-radius: 14px;
padding: 10px 10px;
color: rgba(255,255,255,.82);
line-height: 1.45;
}
.tier-list .muted{ opacity: .78; }
.tier-meta{
display: grid;
gap: 8px;
margin-top: 2px;
}
.tier-meta .meta-row{
display:flex;
align-items:center;
justify-content: space-between;
gap: 10px;
padding: 10px 10px;
border-radius: 14px;
border: 1px solid rgba(255,255,255,.12);
background: rgba(0,0,0,.18);
color: rgba(255,255,255,.82);
font-weight: 650;
font-size: 13px;
}
.tier-meta .meta-row span{ opacity:.85; font-weight: 700; }
.tier-meta .meta-row b{ color: rgba(255,255,255,.94); }
.tier-footer{
margin-top: 2px;
display:flex;
gap: 10px;
flex-wrap: wrap;
}
.tier-footer .bit-btn{
padding: 11px 12px;
font-size: 13px;
}
/* Tier colour themes */
.tier–lite{ –edge: rgba(255,255,255,.22); –glow: rgba(255,255,255,.08); –accent1:#9ad7ff; –accent2:#19f3d1; }
.tier–bronze{ –edge: rgba(205,127,50,.35); –glow: rgba(205,127,50,.16); –accent1:#f2b96a; –accent2:#c97b2b; }
.tier–silver{ –edge: rgba(192,192,192,.38); –glow: rgba(192,192,192,.16); –accent1:#e7e7e7; –accent2:#bfbfbf; }
.tier–gold{ –edge: rgba(255,215,0,.38); –glow: rgba(255,215,0,.16); –accent1:#ffe27a; –accent2:#ffcc33; }
.tier–platinum{ –edge: rgba(229,228,226,.40); –glow: rgba(229,228,226,.16); –accent1:#f2f2f2; –accent2:#cfd3d9; }
.tier{
border-color: var(–edge);
box-shadow:
0 18px 45px rgba(0,0,0,.22),
0 0 0 1px rgba(255,255,255,.05) inset;
}
.tier .tier-name{
background: linear-gradient(135deg, var(–accent1), var(–accent2));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.tier .tier-badge .spark{
background: linear-gradient(135deg, var(–accent1), var(–accent2));
box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
/* Recommended tier (Silver) extra pop WITHOUT moving it */
.tier.is-recommended{
z-index: 1; /* sits slightly above by default */
border-color: rgba(25,243,209,.55);
box-shadow:
0 26px 70px rgba(25,243,209,.10),
0 18px 45px rgba(0,0,0,.22);
}
.tier.is-recommended .tier-badge{
border-color: rgba(25,243,209,.55);
background: linear-gradient(135deg, rgba(25,243,209,.22), rgba(28,200,255,.16));
}
/* Add-ons dropdown */
details.bit-addons{
border-radius: 20px;
overflow: hidden;
border: 1px solid rgba(255,255,255,.16);
background: rgba(0,0,0,.18);
box-shadow: 0 18px 45px rgba(0,0,0,.20);
}
details.bit-addons[open]{
border-color: rgba(25,243,209,.35);
box-shadow: 0 22px 55px rgba(25,243,209,.10), 0 18px 45px rgba(0,0,0,.20);
}
.bit-addons summary{
cursor: pointer;
list-style: none;
padding: 16px 16px;
display:flex;
align-items:center;
justify-content: space-between;
gap: 10px;
font-weight: 900;
color: rgba(255,255,255,.94);
background:
radial-gradient(700px 240px at 15% 0%, rgba(25,243,209,.14), rgba(0,0,0,0) 55%),
linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,0));
}
.bit-addons summary::-webkit-details-marker{ display:none; }
.bit-addons summary .hint{
font-weight: 700;
font-size: 12.5px;
opacity: .75;
}
.bit-addons summary .chev{
width: 34px; height: 34px;
border-radius: 999px;
display:grid;
place-items:center;
border: 1px solid rgba(255,255,255,.16);
background: rgba(0,0,0,.20);
flex-shrink: 0;
transition: transform .15s ease;
}
details.bit-addons[open] summary .chev{ transform: rotate(180deg); }
.bit-addons .body{
padding: 14px 16px 16px;
display:grid;
gap: 12px;
}
.addon-grid{
display:grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
}
@media (max-width: 980px){
.addon-grid{ grid-template-columns: 1fr; }
}
.addon{
border-radius: 18px;
padding: 14px;
border: 1px solid rgba(255,255,255,.12);
background: rgba(0,0,0,.18);
box-shadow: 0 14px 34px rgba(0,0,0,.18);
}
.addon h3{
margin: 0 0 6px;
font-size: 14px;
font-weight: 900;
color: rgba(255,255,255,.94);
}
.addon .price{
font-weight: 900;
font-size: 18px;
margin: 0 0 8px;
color: rgba(255,255,255,.92);
}
.addon ul{
margin: 0;
padding-left: 18px;
color: rgba(255,255,255,.78);
line-height: 1.6;
}
/* =========================
FOOTER
========================= */
.bit-footer{
–muted: rgba(255,255,255,.70);
position: relative !important;
border-radius: 22px 22px 0 0 !important;
overflow: hidden !important;
box-shadow: 0 18px 45px rgba(0,0,0,.35) !important;
flex-shrink: 0;
}
.bit-footer::before{
content:”” !important;
position:absolute !important;
inset:0 !important;
z-index:0 !important;
background: url(“https://brownersitservices.co.uk/wp-content/uploads/2026/08/a422b-background.png”) center/cover no-repeat !important;
filter: contrast(1.55) brightness(1.05) saturate(1.1) !important;
}
.bit-footer::after{
content:”” !important;
position:absolute !important;
inset:0 !important;
z-index:1 !important;
background:
radial-gradient(1200px 700px at 15% 10%, rgba(255,255,255,.06), rgba(255,255,255,0) 60%),
linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.78)) !important;
}
.bit-footer-inner{
position: relative !important;
z-index: 2 !important;
max-width: 1120px;
margin: 0 auto;
padding: 34px 22px 18px;
display: grid;
grid-template-columns: 1.2fr .9fr .9fr;
gap: 18px;
}
.bit-footer h3{
margin: 0 0 10px;
font-size: 13px;
letter-spacing: .08em;
text-transform: uppercase;
color: rgba(255,255,255,.82);
}
.bit-footer p, .bit-footer li{
margin: 0;
color: rgba(255,255,255,.70);
font-size: 13.5px;
line-height: 1.55;
}
.bit-footer .panel{
background: rgba(0,0,0,.28);
border: 1px solid rgba(255,255,255,.14);
border-radius: 18px;
padding: 16px 16px 14px;
}
.bit-footer .brand-row{
display:flex;
align-items:center;
gap: 12px;
margin-bottom: 6px;
}
.bit-footer .brand-logo{ height: 44px; width: auto; display:block; }
.bit-footer a{ color: rgba(255,255,255,.90); text-decoration: none !important; }
.bit-footer ul{
list-style: none;
padding: 0;
margin: 0;
display:grid;
gap: 8px;
}
.bit-footer .link{
display:inline-flex;
align-items:center;
gap: 10px;
padding: 10px 12px;
border-radius: 999px;
border: 1px solid rgba(255,255,255,.14);
background: rgba(0,0,0,.22);
transition: all .15s ease;
}
.bit-footer .link:hover{
background: linear-gradient(135deg, #19f3d1, #1cc8ff) !important;
color: #0b1220 !important;
border-color: rgba(25,243,209,.95) !important;
box-shadow:
0 0 0 1px rgba(25,243,209,.55),
0 8px 20px rgba(25,243,209,.30);
transform: translateY(-1px);
}
.bit-footer .small{ color: rgba(255,255,255,.62); font-size: 12.5px; }
.bit-footer-bottom{
position: relative;
z-index: 2;
max-width: 1120px;
margin: 0 auto;
padding: 0 22px 18px;
display:flex;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
border-top: 1px solid rgba(255,255,255,.10);
}
.bit-footer-bottom .small{ padding-top: 12px; }
@media (max-width: 980px){
.bit-footer-inner{ grid-template-columns: 1fr; padding: 26px 16px 12px; }
.bit-footer-bottom{ padding: 0 16px 16px; }
}
Home IT Support Plans
Simple monthly protection & support for home users
All plans are per household, per primary device. Cancel or upgrade anytime.
Monthly payments with an annual commitment.
Choose your plan
Plans include managed protection and optional support time, with labour discounts on higher tiers.
For confident users who just want protection.
Includes
- Managed antivirus (Bitdefender)
- Automatic threat monitoring & alerts
- Silent background protection
- Monthly health status check (automated)
Not included
- No support time
- No remote assistance
For light users who occasionally need help.
Includes
- Everything in Lite
- Up to 30 minutes remote support / month
- Response within 24 business hours (Mon–Fri)
- Device diagnostics
For regular users who want faster help and better value.
Includes
- Everything in Bronze
- Up to 1 hour remote support / month
- Response within 12 business hours
- Annual PC or laptop service
- Free initial diagnostics (1 per device per year)
For households that want priority access and broader coverage.
Includes
- Everything in Silver
- Up to 2 hours remote support / month
- Priority response
- Evening & weekend emergency support*
- Business-grade managed antivirus
- Annual IT health check
- Free initial diagnostics
- Basic mobile device support
For power users and families who want full coverage and peace of mind.
Includes
- Everything in Gold
- Unlimited remote support
- Priority response
- Business-grade managed antivirus
- Unlimited cloud backup
- Encrypted password manager
- Quarterly full system health checks
- Advanced browser & PC clean-ups
- Free Priority diagnostics
- Full mobile device support
* Emergency support subject to availability.
Optional Add-Ons Click to expand
Password Management
£6.99 / month per user
- Encrypted password vault
- Cross-device sync
- Breach monitoring alerts
Cloud Backup (Unlimited)
£13.99 / month
- Automatic daily backups
- Ransomware-safe storage
- File & folder recovery
Mobile Device Protection
£5.99 / month
- Antivirus for Android / iOS
- Theft & privacy protection
(function () {
// Footer year
var yearEl = document.getElementById(‘bitFooterYear’);
if (yearEl) yearEl.textContent = new Date().getFullYear();
const wrap = document.getElementById(‘bitHeaderWrap’);
const header = document.getElementById(‘bitHeader’);
const revealZone = document.querySelector(‘.bit-top-reveal’);
if (!wrap || !header) return;
const showHeader = () => wrap.classList.add(‘is-visible’);
const hideHeader = () => {
if (wrap.classList.contains(‘menu-open’)) return;
wrap.classList.remove(‘is-visible’);
};
const setHeaderHeight = () => {
const h = header.getBoundingClientRect().height || 0;
document.documentElement.style.setProperty(‘–bit-header-h’, h + ‘px’);
};
const settleMeasure = () => {
setHeaderHeight();
requestAnimationFrame(setHeaderHeight);
setTimeout(setHeaderHeight, 120);
setTimeout(setHeaderHeight, 600);
};
settleMeasure();
window.addEventListener(‘load’, settleMeasure);
window.addEventListener(‘resize’, settleMeasure);
const SHOW_AT_TOP_Y = 10;
const START_RULES_Y = 80;
if ((window.scrollY || 0) {
const y = window.scrollY || 0;
if (y <= SHOW_AT_TOP_Y) { showHeader(); lastY = y; return; }
if (y < START_RULES_Y) { showHeader(); lastY = y; return; }
const goingUp = y lastY;
if (goingDown) hideHeader();
if (goingUp) showHeader();
lastY = y;
};
window.addEventListener(‘scroll’, () => {
if (!ticking) {
requestAnimationFrame(() => {
onScroll();
ticking = false;
});
ticking = true;
}
}, { passive: true });
if (revealZone) revealZone.addEventListener(‘mouseenter’, showHeader);
header.addEventListener(‘mouseenter’, showHeader);
const burger = document.getElementById(‘bitBurger’);
const mobilePanel = document.getElementById(‘bitMobilePanel’);
const closeMenu = () => {
wrap.classList.remove(‘menu-open’);
if (burger) {
burger.setAttribute(‘aria-expanded’, ‘false’);
burger.setAttribute(‘aria-label’, ‘Open menu’);
}
setTimeout(setHeaderHeight, 50);
setTimeout(setHeaderHeight, 250);
};
const openMenu = () => {
wrap.classList.add(‘menu-open’);
showHeader();
if (burger) {
burger.setAttribute(‘aria-expanded’, ‘true’);
burger.setAttribute(‘aria-label’, ‘Close menu’);
}
setTimeout(setHeaderHeight, 50);
setTimeout(setHeaderHeight, 250);
};
const toggleMenu = () => {
const isOpen = wrap.classList.contains(‘menu-open’);
if (isOpen) closeMenu(); else openMenu();
};
if (burger) {
burger.addEventListener(‘click’, (e) => {
e.stopPropagation();
showHeader();
toggleMenu();
});
}
document.addEventListener(‘click’, (e) => {
if (!wrap.classList.contains(‘menu-open’)) return;
if (wrap.contains(e.target)) return;
closeMenu();
});
if (mobilePanel) {
mobilePanel.addEventListener(‘click’, (e) => {
const a = e.target.closest(‘a’);
if (a) closeMenu();
});
}
document.addEventListener(‘keydown’, (e) => {
if (e.key === ‘Escape’) closeMenu();
});
window.addEventListener(‘resize’, () => {
if (window.innerWidth > 900) closeMenu();
});
})();