:root {
  /* SES Utilities colours. Layout and components come from the group design system
     (hargreaves-group/design-system); only these change. */
  --charcoal: #494f58;     /* group charcoal: headings, menu text, dark bands */
  --brand: #d20006;        /* SES red, sampled from the SES Utilities logo: card edges, ticks, underlines */
  --brand-dark: #c00d17;   /* text-safe red: links and buttons (6.3:1 on white, white text 6.3:1) */
  --brand-deep: #8e0b12;   /* deep red: the dark end of the home banner gradient (white text 9.5:1) */
  --brand-light: #ffc7c4;  /* light red: buttons and focus rings on dark grounds (charcoal text 5.6:1) */
  --bg: #ffffff;
  --soft: #f3f6f8;
  --text: #1d2a33;
  --muted: #5b6b77;
  --radius: 10px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  background: #fefefe; /* same as the logo's own background, so no box shows */
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #e1e8ee;
  box-shadow: 0 2px 8px rgba(11, 37, 69, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px; /* keep the container's side padding so the header lines up with the page */
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 64px; width: auto; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--charcoal); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
nav a:hover, nav a.active { color: var(--brand-dark); border-bottom: 2px solid var(--brand); padding-bottom: 2px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--brand-deep) 100%);
  color: #fff;
  padding: 80px 0;
}
.hero .btn { background: var(--brand-light); color: var(--charcoal); }
.hero .btn.secondary { background: transparent; color: #fff; }
.hero-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero-split img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); }
@media (max-width: 760px) { .hero-split { grid-template-columns: 1fr; gap: 28px; } }

/* Two-column text and image layout (Thermal Imaging page) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split img { width: auto; height: auto; max-width: 100%; margin: 0 auto; border-radius: var(--radius); }
.split p { margin-top: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.hero h1 { font-size: 2.4rem; margin: 0 0 12px; line-height: 1.2; }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 0 0 24px; color: #e3eef4; }
.btn {
  display: inline-block;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  margin-right: 10px;
  margin-bottom: 10px;
}
.btn.secondary { background: transparent; color: #fff; border: 2px solid #fff; }

/* Sections */
section { padding: 40px 0; }
section.alt { background: var(--soft); }
h2 { color: var(--charcoal); font-size: 1.8rem; margin: 0 0 16px; }
h3 { color: var(--charcoal); margin: 0 0 8px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 720px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 10px rgba(11, 37, 69, 0.08);
  border-top: 4px solid var(--brand);
}
.card a.more { font-weight: 600; text-decoration: none; }

/* Draft notes for content still to come. Hidden on the live site; delete this
   line (display: none) to show them again while editing. */
.placeholder {
  display: none;
  background: #fff8e6;
  border: 1px dashed var(--brand-light);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #6b4a00;
  font-size: 0.92rem;
}

ul.checks { padding-left: 0; list-style: none; }
ul.checks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
ul.checks li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

/* Contact */
.contact-box { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
@media (max-width: 760px) { .contact-box { grid-template-columns: 1fr; } }
form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.95rem; }
form input, form textarea, form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8d3db;
  border-radius: 6px;
  font: inherit;
  margin-bottom: 14px;
  background: #fff;
  color: var(--text);
}
form textarea { min-height: 120px; resize: vertical; }
form input:focus, form textarea:focus, form select:focus {
  outline: 3px solid var(--brand-light);
  outline-offset: 1px;
  border-color: var(--brand-dark);
}
form .req { color: #b3261e; }
form .optional { font-weight: 400; color: var(--muted); }
form button[disabled] { opacity: 0.7; cursor: progress; }
.form-note { font-size: 0.88rem; color: var(--muted); margin: 0 0 14px; }
/* Spam trap field: kept out of sight and out of the tab order */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 600;
}
.form-status.success { background: #e6f4ea; color: #1e5631; border: 1px solid #a8d5b5; }
.form-status.error { background: #fdecea; color: #8a1c14; border: 1px solid #f1b0aa; }

/* Page hero (inner pages) */
.page-hero { background: var(--soft); padding: 40px 0 28px; border-bottom: 1px solid #e1e8ee; }
.page-hero h1 { color: var(--charcoal); font-size: 2.1rem; margin: 0 0 8px; }

footer.site {
  background: var(--charcoal);
  color: #c9d7e0;
  padding: 32px 0;
  font-size: 0.92rem;
}
footer.site { padding: 44px 0 20px; background: #363b43; } /* a shade darker than the CTA band above it */
footer.site a { color: #fff; }
footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
footer h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 6px; }
footer .footer-copy {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
}
/* "A Hargreaves Utility Group company" with the group's emblem */
footer.site .group-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #dfe7ec;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-decoration: none;
}
footer .group-link img { width: 44px; height: 44px; border-radius: 8px; }
footer .group-link:hover span, footer .group-link:focus-visible span { text-decoration: underline; }
@media (max-width: 760px) { footer .footer-grid { grid-template-columns: 1fr; } }

/* Accreditation logos: white tiles so the logos' own white backgrounds blend in */
footer .footer-accreditations { margin-top: 28px; }
footer .logo-row { display: flex; flex-wrap: wrap; gap: 12px; }
footer .logo-row li {
  margin: 0;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
}
footer .logo-row img { height: 52px; width: auto; }
@media (max-width: 760px) {
  footer .logo-row { gap: 8px; }
  footer .logo-row li { padding: 5px 6px; }
  footer .logo-row img { height: 40px; }
}

/* Call-to-action band */
.cta-band { background: var(--charcoal); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: #dfe7ec; margin: 0 auto 24px; }
.cta-band .btn { background: var(--brand-light); color: var(--charcoal); }
.cta-band .btn.secondary { background: transparent; color: #fff; }

/* Photo rows: show photos at their natural size so they stay sharp */
.photo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  margin: 28px 0;
}
.photo-row img {
  width: auto;
  height: auto;
  max-width: 100%;
  border-radius: var(--radius);
}
/* Photos shown at a fixed 250px height so a row of four fits on one line.
   The large source photos are stored at 2x so they stay sharp. */
.photo-row img.fit { height: 250px; width: auto; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  section { padding: 28px 0; }

}

/* Hamburger button: hidden on desktop, shown on phones (see below) */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin: -10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 4px; }

/* Phones and tablets (up to 1100px: the logo and seven-item menu need about 1070px): compact header, menu pops down from the hamburger.
   Rules are scoped to html.js so the plain link list still shows without JavaScript. */
@media (max-width: 1100px) {
  .header-inner { padding: 8px 20px; }
  .brand img { height: 44px; }
  html.js .header-inner { flex-wrap: nowrap; }
  html.js .nav-toggle { display: block; }
  html.js nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fefefe;
    border-bottom: 1px solid #e1e8ee;
    box-shadow: 0 12px 24px rgba(11, 37, 69, 0.18);
    padding: 6px 20px 14px;
  }
  html.js nav.open { display: block; }
  html.js nav ul { flex-direction: column; gap: 0; }
  html.js nav li + li { border-top: 1px solid #e8eef2; }
  html.js nav a { display: block; padding: 14px 4px; font-size: 1rem; }
  html.js nav a:hover,
  html.js nav a.active {
    border-bottom: 0;
    padding-bottom: 14px;
    padding-left: 12px;
    color: var(--brand-dark);
    box-shadow: inset 3px 0 0 var(--brand);
  }
}
