/* CJG Electrical Services Ltd — precision-mono design direction */

:root {
  --yellow: #d4e017;
  --yellow-ink: #3a3c05;
  --slate: #8a97a3;
  --slate-dark: #5b6670;
  --ink: #14171a;
  --paper: #f7f7f4;
  --paper-alt: #eeefe9;
  --line: rgba(20, 23, 26, 0.16);
  --banner-h: 34px;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --sans: "IBM Plex Sans", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  padding-top: var(--banner-h);
}

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

a { color: var(--ink); }
a:focus, button:focus, input:focus, textarea:focus {
  outline: 3px solid var(--slate-dark);
  outline-offset: 2px;
}

.mono { font-family: var(--mono); }

/* ---------- Proposal banner (system-level, not part of site design) ---------- */
.proposal-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--banner-h);
  background: #101214;
  color: #f2f2f0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10000;
  padding: 0 8px;
}

/* ---------- Watermark (light, sparse, fixed) ---------- */
.watermark {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  overflow: hidden;
}
.watermark span {
  position: absolute;
  left: -10%;
  width: 120%;
  text-align: center;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 6.5rem;
  color: #3a3c05;
  opacity: 0.06;
  transform: rotate(-30deg);
  white-space: nowrap;
}
.watermark span.wm-1 { top: 12%; }
.watermark span.wm-2 { top: 46%; }
.watermark span.wm-3 { top: 80%; }

/* ---------- Grid-visible layout shell ---------- */
.sheet {
  max-width: 1180px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  position: relative;
}

.grid-row {
  border-top: 1px solid var(--line);
}
.grid-row:last-child { border-bottom: 1px solid var(--line); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img {
  height: 44px;
  width: auto;
}
.brand-text {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}
.brand-text strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav {
  display: flex;
  gap: 4px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.main-nav a {
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid transparent;
  color: var(--ink);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--paper-alt);
}
.main-nav a[aria-current="page"] {
  border-bottom: 2px solid var(--yellow);
}

.nav-toggle {
  display: none;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 8px 10px;
  cursor: pointer;
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  white-space: nowrap;
}
.header-call:hover { background: #c3ce14; }
.header-call .call-label {
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--yellow-ink);
  opacity: 0.8;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.hero-media {
  position: relative;
  width: 100%;
  height: clamp(320px, 52vw, 560px);
  overflow: hidden;
  background: var(--slate);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-caption {
  position: relative;
  margin: -84px 20px 0 20px;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 22px 24px;
  max-width: 620px;
  z-index: 2;
}
.hero-caption .tag {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-dark);
  display: block;
  margin-bottom: 8px;
}
.hero-caption h1 {
  margin: 0 0 10px 0;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.2;
}
.hero-caption p {
  margin: 0 0 14px 0;
}
.hero-caption .cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Page sections ---------- */
.section {
  padding: 48px 20px;
}
.section-label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.section-label::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.section h2 {
  margin: 0 0 18px 0;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}
.section > p.lead {
  max-width: 68ch;
}

/* ---------- Service grid (data-sheet cards) ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 20px;
  background: var(--paper);
}
.service-card .idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--slate-dark);
  display: block;
  margin-bottom: 10px;
}
.service-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
}
.service-card p {
  margin: 0;
  font-size: 0.96rem;
}

/* ---------- Fact panel ---------- */
.fact-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.fact-panel dl {
  margin: 0;
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}
.fact-panel dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-dark);
}
.fact-panel dd {
  margin: 6px 0 0 0;
  font-family: var(--mono);
  font-size: 15px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  text-decoration: none;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
}
.btn:hover { background: var(--paper-alt); }
.btn-primary {
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 700;
}
.btn-primary:hover { background: #c3ce14; }

/* ---------- Image band (graphics) ---------- */
.graphic-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--line);
}
.graphic-band figure {
  margin: 0;
  padding: 26px;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-alt);
}
.graphic-band img {
  max-height: 90px;
  width: auto;
}

/* ---------- Contact / form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
  .contact-grid > div:first-child {
    border-right: 1px solid var(--line);
  }
}
.contact-grid > div {
  padding: 30px 24px;
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .error {
  display: none;
  color: #7a1f1f;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 6px;
}
.field.invalid input,
.field.invalid textarea {
  border-color: #7a1f1f;
}
.field.invalid .error { display: block; }

.form-status {
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  margin-top: 16px;
  display: none;
}
.form-status.visible { display: block; }
.form-status.success {
  background: var(--paper-alt);
  border-color: #2c5f2d;
  color: #2c5f2d;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--ink);
  padding: 30px 20px 26px 20px;
  font-size: 14px;
  background: var(--paper-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px 0;
  color: var(--slate-dark);
}
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-legal {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--slate-dark);
}
.footer-legal .proposal-note {
  margin-top: 6px;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 10px;
  }
  .main-nav.open { display: flex; }
  .header-right { flex: 1 1 auto; justify-content: space-between; }
  .hero-caption { margin-top: -60px; }
}

@media (max-width: 480px) {
  .watermark span { font-size: 3.6rem; }
}
