/* ===========================================================
   HSAV Security — shared stylesheet
   Each page carries its own single bright accent colour,
   set via body[data-theme] — no colour repeats page-to-page.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root{
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --line: rgba(20,20,20,0.09);
  --text: #333333;
  --text-muted: #6b6b6b;

  /* fallback accent (overridden per-page below) */
  --page-accent: #0090c9;
  --page-accent-soft: rgba(0,144,201,0.12);
  --page-accent-wash: #eef8fd;

  --radius: 6px;
  --maxw: 1160px;
  --font-head: 'Space Grotesk', 'Tahoma', sans-serif;
  --font-body: 'Inter', Arial, Tahoma, sans-serif;
}

/* ---------- per-page accent colours (each page gets a colour used nowhere else) ---------- */
body[data-theme="blue"]     { --page-accent: #0090c9; --page-accent-soft: rgba(0,144,201,0.12); --page-accent-wash: #eaf7fd; }   /* Home */
body[data-theme="pink"]     { --page-accent: #ea1785; --page-accent-soft: rgba(234,23,133,0.12); --page-accent-wash: #fdeef6; }   /* CCTV Installation */
body[data-theme="amber"]    { --page-accent: #d98c00; --page-accent-soft: rgba(217,140,0,0.14);  --page-accent-wash: #fdf3e2; }   /* CCTV Repairs */
body[data-theme="green"]    { --page-accent: #0aa62c; --page-accent-soft: rgba(10,166,44,0.13);  --page-accent-wash: #eafaee; }   /* Intercom Systems */
body[data-theme="purple"]   { --page-accent: #8b2fd6; --page-accent-soft: rgba(139,47,214,0.13); --page-accent-wash: #f5ecfd; }   /* Areas We Cover */
body[data-theme="orange"]   { --page-accent: #e8560c; --page-accent-soft: rgba(232,86,12,0.13);  --page-accent-wash: #fdece2; }   /* Blog */
body[data-theme="teal"]     { --page-accent: #00a99a; --page-accent-soft: rgba(0,169,154,0.13);  --page-accent-wash: #e3f8f6; }   /* Contact */

*{ box-sizing: border-box; margin:0; padding:0; }

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; display:block; }

a{ color: var(--page-accent); text-decoration:none; }

h1,h2,h3,h4{
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #1c1c1c;
  text-transform: uppercase;
}

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--page-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior:auto !important; }
}

/* ---------- top bar ---------- */
.topbar{
  background-color: #08080a;
  background-image: url('images/carbon-fibre-tile.png');
  background-repeat: repeat;
  color: #fff;
  font-size: 0.85rem;
}
.topbar .wrap.topbar-inner{
  display:flex; justify-content:space-between; align-items:center;
  padding-top:8px; padding-bottom:8px;
  flex-wrap:wrap; gap:14px;
}
.topbar-brand{ display:flex; align-items:center; }
.topbar-logo{
  height: 90px;
  width: auto;
  display:block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* rotating areas ticker */
.ticker{
  flex: 1 1 auto;
  display:flex; align-items:center; justify-content:center; gap:10px;
  min-width: 0;
  padding: 0 20px;
}
.ticker-label{
  font-size: 0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.1em;
  color: rgba(255,255,255,0.5); white-space:nowrap; flex-shrink:0;
}
.ticker-stage{
  position: relative;
  height: 1.3em;
  width: 190px;
  overflow: hidden;
}
.ticker-item{
  position: absolute;
  inset: 0;
  display:flex; align-items:center; justify-content:center;
  font-size: 0.85rem; font-weight:700; color: #fff; white-space:nowrap;
  opacity: 0;
  animation: tickerCycle 36s linear infinite;
}
.ticker-item:nth-child(1){ animation-delay: 0s; }
.ticker-item:nth-child(2){ animation-delay: 3s; }
.ticker-item:nth-child(3){ animation-delay: 6s; }
.ticker-item:nth-child(4){ animation-delay: 9s; }
.ticker-item:nth-child(5){ animation-delay: 12s; }
.ticker-item:nth-child(6){ animation-delay: 15s; }
.ticker-item:nth-child(7){ animation-delay: 18s; }
.ticker-item:nth-child(8){ animation-delay: 21s; }
.ticker-item:nth-child(9){ animation-delay: 24s; }
.ticker-item:nth-child(10){ animation-delay: 27s; }
.ticker-item:nth-child(11){ animation-delay: 30s; }
.ticker-item:nth-child(12){ animation-delay: 33s; }

@keyframes tickerCycle{
  0%      { opacity: 0; transform: translateY(6px); }
  2%      { opacity: 1; transform: translateY(0); }
  7%      { opacity: 1; transform: translateY(0); }
  9%      { opacity: 0; transform: translateY(-6px); }
  100%    { opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
  .ticker-item{ animation: none; opacity: 0; }
  .ticker-item:first-child{ opacity: 1; }
}

@media (max-width: 860px){
  .ticker{ display:none; }
}
.topbar .call-cta{
  display:inline-flex; align-items:center; gap:8px;
  background: #0090c9;
  color: #fff;
  font-weight:700;
  font-size: 1.05rem;
  padding: 10px 20px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: filter .15s ease, transform .15s ease;
}
.topbar .call-cta:hover{ filter: brightness(0.92); transform: translateY(-1px); }
.topbar .hours-label{
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

@media (max-width: 640px){
  .topbar .hours-label{ display:none; }
}

/* ---------- header / nav ---------- */
header.site{
  position: sticky; top:0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:center;
  padding: 12px 0;
}
nav.links{ display:flex; gap: 6px; align-items:center; flex-wrap: wrap; justify-content:center; }
nav.links a{
  font-size: 0.82rem; color: var(--page-accent); font-weight:700;
  padding: 8px 14px; border-radius: 999px; text-transform: uppercase;
  border: 1px solid var(--page-accent-soft);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
nav.links a:hover{ background: var(--page-accent-soft); }
nav.links a.active{ background: var(--page-accent); color:#fff; transform: translateY(-1px); }
.nav-cta{
  background: var(--page-accent); color: #fff; font-weight:700; font-size:0.85rem;
  padding: 10px 18px; border-radius: 999px;
  transition: filter .15s ease;
  text-transform: uppercase;
}
.nav-cta:hover{ filter: brightness(0.9); }
.nav-toggle{ display:none; }

@media (max-width: 860px){
  nav.links{ display:none; }
  .nav-cta{ padding: 8px 14px; font-size:0.78rem; }
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 13px 26px; border-radius: 999px;
  font-weight:700; font-size:0.9rem; cursor:pointer; border:none;
  transition: transform .12s ease, filter .15s ease, border-color .15s ease;
  text-transform: uppercase;
}
.btn-primary{ background: var(--page-accent); color:#fff; }
.btn-primary:hover{ filter: brightness(0.92); transform: translateY(-1px); }
.btn-ghost{ background: transparent; border:2px solid var(--page-accent); color: var(--page-accent); }
.btn-ghost:hover{ background: var(--page-accent); color:#fff; }

/* ---------- hero ---------- */
.hero{
  padding: 64px 0 56px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.hero .grid{
  display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items:center;
}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  color: var(--page-accent); font-size:0.78rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.14em; margin-bottom:18px;
}
.eyebrow::before{ content:""; width:16px; height:3px; background: var(--page-accent); border-radius: 2px; }
.hero h1{ font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom:20px; color: #1c1c1c; }
.hero p.lead{ color: var(--text-muted); font-size:1.08rem; max-width: 46ch; margin-bottom: 30px; }
.hero .actions{ display:flex; gap:14px; flex-wrap:wrap; }

.hero-photo{
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  border: 5px solid #fff;
  outline: 3px solid var(--page-accent);
}
.hero-photo img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 78% 45%;
  display:block;
}

@media (max-width: 900px){
  .hero-photo img{ aspect-ratio: 16/10; }
}

@media (max-width: 900px){
  .hero .grid{ grid-template-columns: 1fr; }
}

/* ---------- radar / coverage signature ---------- */
.radar-wrap{
  position:relative; aspect-ratio: 1/1; max-width: 440px; margin: 0 auto;
}
.radar-ring{
  position:absolute; border:1px solid var(--line); border-radius:50%;
  top:50%; left:50%; transform:translate(-50%,-50%);
}
.radar-ring.r1{ width:100%; height:100%; }
.radar-ring.r2{ width:72%; height:72%; }
.radar-ring.r3{ width:44%; height:44%; }
.radar-core{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:66px; height:66px; border-radius:50%;
  background: #fff; border: 2px solid var(--page-accent);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-head); font-weight:700; font-size:0.66rem;
  color: var(--page-accent); text-align:center; z-index:3;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.radar-sweep{
  position:absolute; top:50%; left:50%; width:50%; height:2px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--page-accent) 0%, transparent 100%);
  animation: sweep 6s linear infinite;
  opacity:0.85;
}
@keyframes sweep{ to{ transform: rotate(360deg); } }
.radar-node{
  position:absolute; transform:translate(-50%,-50%);
  display:flex; flex-direction:column; align-items:center; gap:6px; z-index:4;
}
.radar-node .dot{
  width:10px; height:10px; border-radius:50%;
  background: var(--page-accent);
  box-shadow: 0 0 0 4px var(--page-accent-soft);
}
.radar-node .label{
  font-size:0.68rem; color: var(--text); font-weight: 600; white-space:nowrap;
  background: rgba(255,255,255,0.92); padding:2px 8px; border-radius:999px;
  border: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce){ .radar-sweep{ animation:none; } }

/* ---------- sections ---------- */
section{ padding: 64px 0; }
.section-alt{ background: var(--bg-alt); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.section-head{ max-width: 640px; margin-bottom: 42px; }
.section-head h2{ font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom:14px; }
.section-head p{ color: var(--text-muted); font-size:1.02rem; }

/* card grids */
.grid-3{ display:grid; grid-template-columns: repeat(3,1fr); gap:24px; }
.grid-2{ display:grid; grid-template-columns: repeat(2,1fr); gap:24px; }
@media (max-width: 860px){ .grid-3, .grid-2{ grid-template-columns: 1fr; } }

.card{
  background: #fff; border:1px solid var(--line); border-radius: var(--radius);
  padding: 28px; border-top: 4px solid var(--page-accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.card .num{
  font-family: var(--font-head); font-weight:700; color: var(--page-accent);
  font-size:0.85rem; margin-bottom:14px; display:block;
}
.card h3{ font-size:1.1rem; margin-bottom:10px; }
.card p{ color: var(--text-muted); font-size:0.95rem; }

/* town chips */
.towns{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 8px; }
.town-chip{
  border:1px solid var(--page-accent-soft); background: var(--page-accent-wash);
  color: var(--text); font-size:0.86rem; padding: 9px 16px; font-weight:600;
  border-radius: 999px;
}
.town-chip strong{ color: #1c1c1c; font-weight:700; }

/* process steps */
.steps{ display:flex; flex-direction:column; gap:0; }
.step{
  display:grid; grid-template-columns: 70px 1fr; gap:20px;
  padding: 26px 0; border-top:1px solid var(--line);
}
.step:last-child{ border-bottom:1px solid var(--line); }
.step .idx{ font-family: var(--font-head); font-size:1.6rem; color: var(--page-accent); font-weight:700; }
.step h4{ font-size:1.05rem; margin-bottom:6px; text-transform: none; }
.step p{ color: var(--text-muted); font-size:0.94rem; max-width:60ch; }

/* CTA band */
.cta-band{
  background: var(--page-accent-wash);
  border: 1px solid var(--page-accent-soft); border-radius: 10px;
  padding: 44px; display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap;
}
.cta-band h3{ font-size:1.4rem; margin-bottom:6px; color: #1c1c1c; }
.cta-band p{ color: var(--text-muted); }

/* quote / testimonial-style block */
.pull{
  border-left: 4px solid var(--page-accent);
  padding: 4px 0 4px 22px; color: var(--text); font-size:1.02rem; font-style:italic;
  margin: 30px 0;
}

/* blog cards */
.blog-card{
  background: #fff; border:1px solid var(--line); border-radius: var(--radius);
  overflow:hidden; display:flex; flex-direction:column; border-top: 4px solid var(--page-accent);
}
.blog-card .tag{
  color: var(--page-accent); font-size:0.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:0.1em; padding: 20px 24px 0;
}
.blog-card h3{ padding: 8px 24px 0; font-size:1.1rem; text-transform:none; }
.blog-card p{ padding: 10px 24px 22px; color: var(--text-muted); font-size:0.93rem; flex-grow:1; }
.blog-card .meta{
  padding: 14px 24px; border-top:1px solid var(--line);
  font-size:0.8rem; color: var(--text-muted); display:flex; justify-content:space-between;
}

/* faq */
.faq-item{ border-top:1px solid var(--line); padding: 22px 0; }
.faq-item:last-child{ border-bottom:1px solid var(--line); }
.faq-item h4{ font-size:1.02rem; margin-bottom:8px; color: var(--page-accent); text-transform:none; }
.faq-item p{ color: var(--text-muted); font-size:0.94rem; }

/* contact page */
.contact-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:48px; }
@media (max-width: 860px){ .contact-grid{ grid-template-columns:1fr; } }
.info-row{ display:flex; gap:14px; padding: 16px 0; border-top:1px solid var(--line); }
.info-row:last-child{ border-bottom:1px solid var(--line); }
.info-row .ic{
  width:36px; height:36px; border-radius:50%; border:2px solid var(--page-accent);
  color: var(--page-accent); display:flex; align-items:center; justify-content:center;
  flex-shrink:0; font-size:0.9rem;
}
.info-row h4{ font-size:0.95rem; margin-bottom:2px; text-transform:none; }
.info-row p, .info-row a{ color: var(--text-muted); font-size:0.92rem; }

form.contact-form{ display:flex; flex-direction:column; gap:16px; }
.field label{ display:block; font-size:0.85rem; color: var(--text-muted); margin-bottom:6px; }
.field input, .field textarea, .field select{
  width:100%; background: #fff; border:1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: var(--radius); font-family: var(--font-body); font-size:0.95rem;
}
.field textarea{ min-height: 120px; resize:vertical; }
.field input:focus, .field textarea:focus, .field select:focus{ border-color: var(--page-accent); }
.form-note{ font-size:0.8rem; color: var(--text-muted); }

/* footer */
footer.site{
  background-color: #08080a;
  background-image: url('images/carbon-fibre-tile.png');
  background-repeat: repeat;
  color: #d8d8d8;
  padding: 52px 0 26px;
  border-top: 4px solid var(--page-accent);
}
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap:36px; margin-bottom:40px; }
@media (max-width: 860px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
.footer-grid h5{
  font-size:0.78rem; text-transform:uppercase; letter-spacing:0.1em; color: var(--page-accent);
  margin-bottom:16px; font-family: var(--font-head); filter: brightness(1.3) saturate(1.1);
}
.footer-grid ul{ list-style:none; display:flex; flex-direction:column; gap:10px; }
.footer-grid a, .footer-grid p{ color: #bdbdbd; font-size:0.9rem; }
.footer-grid a:hover{ color: #fff; }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,0.12); padding-top:22px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  font-size:0.82rem; color: #9a9a9a;
}

/* utility */
.center{ text-align:center; }
.mt-40{ margin-top:40px; }
