/* ==========================================================
   Electrical contractor base - layout follows tjpelectrical.co.uk
   Colour tokens live in theme.css (written by build.py from THEMES).
   Do not hard-code brand colours in this file.
   ========================================================== */
:root {
  --font-head: "Montserrat", Arial, sans-serif;
  --font-body: "Source Sans 3", Arial, sans-serif;
  --gutter: 16px;
  --max: 1110px;
  --peak: 18vw;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-head); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--page); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.15; letter-spacing: .03em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- button ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 15px; font-weight: 500; text-transform: uppercase; text-decoration: none; padding: 15px 36px; border: 0; border-radius: 3px; background: var(--cta); color: var(--cta-ink); cursor: pointer; transition: filter .2s, transform .2s; }
.btn:hover { filter: brightness(.93); transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn--brand { background: var(--brand); color: #fff; padding: 18px 44px; font-size: 17px; letter-spacing: .06em; }

/* ---------- sample strip ---------- */
.sample-strip { background: var(--strip-bg); color: var(--strip-ink); text-align: center; font-size: 12px; font-weight: 600; padding: 6px 12px; }

/* ---------- header ---------- */
.stage { position: relative; }
.header { background: var(--black); color: #fff; position: relative; z-index: 30; }
.header--overlay { position: absolute; top: 0; left: 0; right: 0; background: transparent; }
.header .wrap { display: flex; align-items: flex-start; gap: 28px; padding-top: 22px; padding-bottom: 14px; }
.logo { display: block; flex: none; color: #fff; margin-top: 2px; text-decoration: none; }
.brandmark { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brandmark svg { width: 48px; height: 48px; flex: none; color: var(--accent); animation: mark-in .7s cubic-bezier(.2, .9, .3, 1.2) both, mark-live 6s ease-in-out 2s infinite; }
.brandmark__name { font-family: var(--font-head); font-size: 15px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; line-height: 1.05; }
.brandmark__name b { display: block; font-size: 27px; font-weight: 800; letter-spacing: .06em; }
.brandmark--small { gap: 9px; }
.brandmark--small svg { width: 36px; height: 36px; animation: none; }
.brandmark--small .brandmark__name { font-size: 11px; }
.brandmark--small .brandmark__name b { font-size: 20px; }
@keyframes mark-in { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes mark-live { 0%, 88%, 100% { filter: none; transform: none; } 92% { filter: brightness(1.35); transform: scale(1.06); } 96% { filter: none; transform: scale(.98); } }
.nav { display: flex; align-items: flex-start; flex: 1; margin-top: 6px; }
.nav__item { position: relative; }
.nav__item > a { display: flex; align-items: center; gap: 7px; padding: 10px; font-size: 16px; font-weight: 400; letter-spacing: .2px; text-transform: uppercase; text-decoration: none; color: #fff; white-space: nowrap; }
.nav__item > a[aria-current="page"], .nav__item > a:hover { background: var(--brand-bright); }
.caret { width: 0; height: 0; border: 5px solid transparent; border-top-color: currentColor; margin-top: 5px; }
.sub { position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--black); padding: 6px 0; display: none; z-index: 40; }
.nav__item:hover .sub, .nav__item:focus-within .sub { display: block; }
.sub a { display: block; padding: 9px 16px; font-size: 14px; text-transform: uppercase; text-decoration: none; color: #fff; }
.sub a:hover { background: var(--brand-bright); }
.contact-mini { flex: none; font-family: var(--font-body); font-size: 16px; text-align: right; line-height: 1.2; }
.contact-mini a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #fff; text-decoration: none; padding: 6px 0 14px; }
.contact-mini svg { width: 16px; height: 16px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; padding: 6px 4px; }

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 800px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; background: var(--black); padding: 150px var(--gutter) 90px; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--hero-tint), var(--hero-tint)), url('/img/hero.webp') center / cover no-repeat; transform-origin: center; animation: heroZoomOut 12s ease-out both; will-change: transform; }
@keyframes heroZoomOut { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(30px, 4.2vw, 60px); font-weight: 700; line-height: 1; letter-spacing: 1.8px; text-transform: uppercase; max-width: 1000px; margin: 0 auto; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.hero__sub { font-size: clamp(17px, 2.8vw, 40px); font-weight: 300; line-height: 1.1; letter-spacing: 1.2px; text-transform: uppercase; margin: 20px 0 0; }

/* ---------- two photo tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 30px; }
.tile { position: relative; display: block; height: 300px; overflow: hidden; color: #fff; text-decoration: none; background: var(--black) center / cover no-repeat; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, .05) 60%); transition: background .3s; }
.tile::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255, 255, 255, .85); pointer-events: none; }
.tile__text { position: absolute; left: 22px; right: 22px; bottom: 22px; }
.tile__label { display: block; font-size: 30px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; line-height: 1; }
.tile__more { display: block; font-size: 18px; font-weight: 500; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .3s, opacity .3s, margin .3s; }
.tile:hover .tile__more, .tile:focus-visible .tile__more { max-height: 30px; opacity: 1; margin-top: 6px; }
.tile:hover::before { background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .25)); }

/* ---------- trust columns ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; padding: 70px 0 60px; }
.trust svg { width: 36px; height: 36px; color: #555; margin: 0 auto 26px; display: block; }
.trust h2 { font-size: 24px; font-weight: 400; letter-spacing: 1.2px; text-transform: uppercase; color: #555; margin-bottom: 14px; }
.trust p { font-family: var(--font-body); font-size: 14px; line-height: 1.7; color: var(--text); max-width: 300px; margin: 0 auto; }

/* ---------- the peak (pointed colour band) ---------- */
.peak-space { padding-bottom: var(--peak); }
.band { position: relative; display: flow-root; background: var(--brand); color: #fff; }
.band--peak::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--peak); background: var(--brand); clip-path: polygon(50% 0, 100% 100%, 0 100%); z-index: 2; pointer-events: none; }
.band__inner { position: relative; z-index: 3; text-align: center; max-width: 800px; margin: 0 auto; padding: 0 var(--gutter) 60px; }
.band--peak .band__inner { margin-top: calc(var(--peak) * -0.55); }
.band__eyebrow { font-size: 16px; font-weight: 300; letter-spacing: 1.3px; text-transform: uppercase; max-width: 300px; margin: 0 auto 24px; line-height: 1.5; }
.band h1, .band h2.band__title { font-size: clamp(26px, 2.9vw, 41px); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; line-height: 1.2; margin-bottom: 30px; }
.band p { font-size: 16px; font-weight: 300; letter-spacing: 1.2px; max-width: 760px; margin-left: auto; margin-right: auto; }
.band .btn { margin-top: 26px; }
/* inner pages: narrow left-aligned column inside the peak */
.band--page .band__inner { text-align: left; max-width: 512px; }
.band--page .band__kicker { font-size: 28px; font-weight: 400; text-transform: uppercase; line-height: 1.1; }
.band--page h1 { margin-bottom: 26px; }
.band--page p { font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1.6; }

/* ---------- sectors (inside the band) ---------- */
.sectors-head { text-align: center; font-size: clamp(22px, 2.3vw, 32px); font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #ededed; padding: 30px var(--gutter) 60px; }
.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) 60px; }
.sector { display: block; color: #fff; text-decoration: none; }
.sector__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--black); }
.sector__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.sector:hover img { transform: scale(1.06); }
.sector span { display: block; font-size: 23px; font-weight: 400; letter-spacing: 1.2px; text-transform: uppercase; margin-top: 20px; }

/* ---------- services icon list ---------- */
.services { padding: 60px 0 40px; }
.services h2 { text-align: center; font-size: clamp(22px, 2.3vw, 32px); font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: #000; margin-bottom: 60px; }
.icon-list { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: 60px; }
.icon-list li { display: flex; align-items: center; gap: 15px; min-height: 76px; padding: 10px 0; margin-bottom: 30px; border-bottom: 2px solid var(--brand-bright); }
.icon-list img { width: 56px; height: 56px; flex: none; }
.icon-list span { font-size: 17.6px; letter-spacing: 1.2px; text-transform: uppercase; color: #000; line-height: 1.4; }

/* ---------- selected clients ---------- */
.clients { padding: 0 0 50px; }
.clients hr { border: 0; border-top: 2px solid var(--brand-bright); margin: 0 0 50px; }
.clients h2 { text-align: center; font-size: clamp(26px, 3.7vw, 52px); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: #707070; margin-bottom: 50px; }
.clients p { text-align: center; font-size: 15px; max-width: 1000px; margin: 0 auto 50px; }
.logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; align-items: center; }
.logos span { display: flex; align-items: center; justify-content: center; height: 82px; border: 1px dashed #b9b9b9; color: #8a8a8a; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- inner page hero ---------- */
.page-hero { position: relative; min-height: clamp(380px, 51vw, 735px); background: var(--black) center / cover no-repeat; display: flex; align-items: center; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-tint); }
.caption { position: relative; margin-left: clamp(16px, 4.4vw, 64px); margin-bottom: 8vw; max-width: 500px; background: rgba(40, 40, 40, .72); color: #fff; padding: 14px 28px 16px; }
.caption h2 { font-size: clamp(24px, 2.7vw, 39px); font-weight: 400; text-transform: uppercase; line-height: 1; letter-spacing: .02em; }
.caption p { font-size: clamp(14px, 1.5vw, 22px); font-weight: 300; text-transform: uppercase; margin: 10px 0 0; line-height: 1.4; }

/* ---------- dark content sections ---------- */
.dark { background: var(--dark); color: #e6e6e6; }
.dark h2 { color: #fff; font-size: clamp(22px, 2.5vw, 35px); font-weight: 400; letter-spacing: .03em; text-align: center; }
.dark p, .dark li { font-size: 15px; line-height: 1.9; }
.dark a.hi { color: var(--link-on-dark); }
.text-block { max-width: 930px; margin: 0 auto; padding: 70px var(--gutter); }
.text-block h2 { margin-bottom: 36px; }
.text-block ul { list-style: disc; padding-left: 20px; margin-top: 14px; }
.faq h3 { font-size: 18px; font-weight: 500; color: #fff; margin: 34px 0 12px; letter-spacing: .02em; }

.split { display: grid; grid-template-columns: 1fr 1fr; }
.split__media { background: var(--black) center / cover no-repeat; min-height: 440px; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__text { padding: 60px clamp(16px, 4vw, 60px); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.split__text h2 { margin-bottom: 26px; }
.split__text .btn { margin-top: 24px; }
.split--flip .split__media { order: 2; }

/* why / options panel */
.panel { padding: 80px clamp(16px, 5vw, 100px); text-align: center; }
.panel--black { background: var(--black); color: #e6e6e6; }
.panel--black h2 { color: #fff; font-size: clamp(22px, 2.2vw, 32px); font-weight: 400; text-transform: uppercase; margin-bottom: 40px; }
.panel--black p { font-size: 16px; line-height: 2.1; max-width: 520px; margin-left: auto; margin-right: auto; }
.panel--light { background: #fff; color: var(--text); }
.panel--light h2 { color: var(--brand-bright); font-size: clamp(22px, 2.2vw, 32px); font-weight: 400; text-transform: uppercase; margin-bottom: 26px; }
.panel--brand { background: var(--brand); color: #fff; }
.panel--brand h2 { color: #fff; font-size: clamp(22px, 2.2vw, 32px); font-weight: 400; text-transform: uppercase; margin-bottom: 26px; }
.chev { display: inline-block; text-align: left; }
.chev li { position: relative; padding: 10px 0 10px 40px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.chev li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 9px; height: 9px; border-right: 3px solid var(--brand-bright); border-top: 3px solid var(--brand-bright); transform: rotate(45deg); }
.panel--brand .chev li::before { border-color: #fff; }
.panel p.note { font-size: 15px; line-height: 2.2; max-width: 560px; margin: 26px auto 0; }

/* ---------- contact ---------- */
.page-title { text-align: center; font-size: clamp(28px, 3.3vw, 46px); font-weight: 400; text-transform: uppercase; color: #444; padding: 40px var(--gutter) 34px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.details { background: #000; color: #fff; padding: 34px 34px 60px; min-height: 530px; }
.details h2 { text-align: center; font-size: 31px; font-weight: 600; text-transform: uppercase; margin-bottom: 30px; }
.details li { display: flex; align-items: center; gap: 16px; font-size: 17px; letter-spacing: .04em; margin-bottom: 38px; }
.details svg { width: 40px; height: 40px; flex: none; }
.details a { text-decoration: none; }
.touch { text-align: center; padding: 34px 20px 0; }
.touch h2 { font-size: 37px; font-weight: 600; text-transform: uppercase; color: #555; margin-bottom: 24px; }
.touch p { font-size: 19px; line-height: 1.6; text-align: left; margin-bottom: 26px; }
.location { text-align: center; padding: 40px 0 60px; }
.location p { font-size: 15px; max-width: 1110px; margin: 16px auto 30px; }
.map { height: 420px; border: 1px dashed #b9b9b9; display: flex; align-items: center; justify-content: center; color: #8a8a8a; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin: 0 auto 60px; text-align: left; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; font: 16px var(--font-body); padding: 12px 14px; border: 1px solid #bbb; border-radius: 0; background: #fff; color: #222; }
.form textarea { min-height: 150px; resize: vertical; }

/* ---------- legal ---------- */
.legal { max-width: 800px; margin: 0 auto; padding: 10px var(--gutter) 70px; font-family: var(--font-body); font-size: 17px; }

/* ---------- footer ---------- */
.footer { background: var(--black); color: #eee; font-family: var(--font-body); padding: 26px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.footer h2 { display: flex; align-items: center; gap: 12px; font-family: var(--font-body); font-size: 16px; font-weight: 400; text-transform: uppercase; letter-spacing: 0; color: #fff; margin-bottom: 14px; }
.footer h2::after { content: ""; flex: 1; border-top: 1px solid #777; }
.footer__about { font-size: 14px; line-height: 24px; }
.footer__about .brandmark { float: left; margin: 6px 16px 6px 0; }
.footer__links a { display: block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; padding: 7px 4px; border-bottom: 1px solid #555; }
.footer__links a:hover { color: var(--link-on-dark); }
.footer__base { text-align: center; font-size: 11px; padding: 14px 0; margin-top: 26px; background: rgba(255, 255, 255, .04); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .contact-mini { display: none; }
  .icon-list { column-gap: 30px; }
}
@media (max-width: 900px) {
  .header .wrap { align-items: center; padding-top: 12px; padding-bottom: 12px; }
  .brandmark svg { width: 40px; height: 40px; }
  .brandmark__name b { font-size: 22px; }
  .brandmark__name { font-size: 12px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--black); padding: 8px var(--gutter) 16px; margin: 0; }
  .nav.is-open { display: flex; }
  .nav__item > a { padding: 12px 8px; }
  .sub { position: static; display: block; padding: 0 0 6px 16px; background: none; }
  .nav-toggle { display: block; }
  .hero { min-height: 560px; padding-top: 120px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { height: 230px; }
  .tile__more { max-height: 30px; opacity: 1; margin-top: 6px; }
  .trust { grid-template-columns: 1fr; gap: 44px; padding: 50px 0 40px; }
  .trust.peak-space { padding-bottom: calc(var(--peak) + 28px); }
  .band--peak .band__inner { margin-top: 0; padding-top: 10px; }
  .sectors { grid-template-columns: 1fr 1fr; }
  .icon-list { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(10, auto); }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .split, .contact-grid, .footer__grid { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media { min-height: 260px; }
  .caption { margin-bottom: 14vw; margin-right: 16px; }
  .details { min-height: 0; padding-bottom: 20px; }
  .panel { padding: 56px var(--gutter); }
}
@media (max-width: 560px) {
  .icon-list { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .icon-list li { margin-bottom: 14px; }
  .sectors { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .tile__label { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
