/* R & C S ELECTRICAL LTD — proposal site
   Design direction: precision-mono
   Navy #1a2744 (primary) / Gold #c9a24b (accent) / Green #25d366 (call-to-action)
   on a light neutral base. Monospace labels + numbers, neutral sans prose. */

:root {
  --navy: #1a2744;
  --navy-soft: #24365c;
  --gold: #c9a24b;
  --gold-ink: #7a5e1a; /* darkened gold for text on light backgrounds, keeps AA contrast */
  --green: #0d6e34; /* darkened from brand #25d366 so white text passes WCAG AA */
  --paper: #f6f5f1;
  --paper-line: #e4e1d8;
  --ink: #191919;
  --ink-soft: #43485a;
  --line: rgba(26, 39, 68, 0.14);
  --banner-h: 40px;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Proposal banner (fixed, unremovable by ordinary use) ---------- */
.proposal-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--banner-h);
  background: #0b0b0b;
  color: #f2f2f2;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0 10px;
  border-bottom: 1px solid #333;
}

/* ---------- Watermark (sparse, light, fixed, non-blocking) ---------- */
.watermark {
  position: fixed;
  inset: 0;
  z-index: 4500;
  overflow: hidden;
  pointer-events: none;
}
.watermark span {
  position: absolute;
  left: -20%;
  width: 140%;
  text-align: center;
  transform: rotate(-30deg);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 6rem;
  color: #808080;
  opacity: 0.06;
  white-space: nowrap;
  user-select: none;
}
.watermark span:nth-child(1) { top: 6%; }
.watermark span:nth-child(2) { top: 38%; }
.watermark span:nth-child(3) { top: 70%; }
.watermark span:nth-child(4) { top: 100%; }

/* ---------- Site header ---------- */
.topbar {
  background: var(--navy);
  color: #cfd6e4;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a {
  color: #fff;
  text-decoration: none;
}
.topbar a:hover { color: var(--gold); }
.topbar .call-link {
  font-weight: 700;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img {
  height: 48px;
  width: auto;
}
.brand-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--navy);
  line-height: 1.3;
}
.brand-text strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.02em;
}

nav.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}
nav.primary-nav a {
  display: inline-block;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  text-decoration: none;
  border: 1px solid #0a5628;
  white-space: nowrap;
}
.call-btn:hover { background: #0a5628; }
.call-btn.navy-btn { background: var(--navy); border-color: var(--navy); }
.call-btn.navy-btn:hover { background: var(--navy-soft); }
.cta-band a.plain-link { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--navy);
  overflow: hidden;
}
.hero-media {
  position: relative;
  min-height: 340px;
}
.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  opacity: 0.75;
}
.hero-caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  right: 24px;
  max-width: 560px;
  background: rgba(15, 22, 41, 0.88);
  border: 1px solid var(--gold);
  padding: 20px 22px;
  color: #f4f1ea;
}
.hero-caption .tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-caption h1,
.hero-caption h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.25;
  color: #ffffff;
}
.hero-caption p {
  margin: 0 0 14px;
  color: #dfe3ec;
  font-size: 15px;
}
.hero-caption .call-btn { margin-top: 4px; }

/* ---------- Section scaffolding: grid-visible / data-sheet feel ---------- */
main {
  background-image: repeating-linear-gradient(
    to right,
    var(--paper-line) 0,
    var(--paper-line) 1px,
    transparent 1px,
    transparent 90px
  );
}
section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
section:last-of-type { border-bottom: none; }

.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
}
.section-tag .num {
  color: var(--gold-ink);
  font-weight: 700;
}
.section-tag.light-tag { color: #cfd6e4; }
.section-tag.light-tag .num { color: var(--gold); }
h1, h2, h3 {
  font-family: var(--font-sans);
  color: var(--navy);
  line-height: 1.25;
}
h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  margin: 0 0 20px;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 10px;
}
h3 { font-size: 18px; margin: 0 0 8px; }
p { color: var(--ink-soft); margin: 0 0 14px; max-width: 68ch; }

.lede {
  font-size: 18px;
  color: var(--ink);
  max-width: 62ch;
}

/* spec / data-sheet list */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: #fff;
}
.specs dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding: 16px 18px 4px;
}
.specs dd {
  margin: 0;
  padding: 0 18px 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--navy);
  border-right: 1px solid var(--line);
}
.specs > div:last-child dd { border-right: none; }
.specs > div {
  border-right: 1px solid var(--line);
}
.specs > div:last-child { border-right: none; }

/* service grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: #fff;
  display: flex;
  flex-direction: column;
}
.service-card figure {
  margin: 0;
  position: relative;
}
.service-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}
.service-card figcaption {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 3px 8px;
}
.service-card .body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card h3 { color: var(--navy); }
.service-card p { font-size: 14px; margin-bottom: 0; }

/* list of service names (home teaser) */
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
}
.service-tags li {
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 6px 12px;
  background: #fff;
}

/* reviews */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.review {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 18px 20px;
}
.review p {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--ink);
}
.review .who {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-soft);
}
.review-source {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* CTA band */
.cta-band {
  background: var(--navy);
  color: #f2f1ec;
}
.cta-band h2 { color: #fff; border-bottom-color: var(--gold); }
.cta-band p { color: #d9dde6; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}
@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid #9aa2b5;
  background: #fff;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
}
.field input:invalid[data-touched="true"],
.field textarea:invalid[data-touched="true"] {
  border-color: #b3261e;
}
.field .error {
  color: #b3261e;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 6px;
  min-height: 14px;
  display: block;
}
.form-status {
  border: 1px solid var(--green);
  background: #eafaf0;
  color: #0d3d20;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 18px;
  display: none;
}
.form-status.visible { display: block; }
.form-status.is-error {
  border-color: #b3261e;
  background: #fbeceb;
  color: #6e1912;
}

button.submit {
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 12px 22px;
  cursor: pointer;
}
button.submit:hover { background: var(--navy-soft); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy);
  color: #c7cddb;
  font-size: 14px;
}
footer.site-footer .wrap {
  padding: 36px 24px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
footer.site-footer h3 {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
footer.site-footer a { color: #d9dde6; }
footer.site-footer a:hover { color: var(--gold); }
footer.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
footer.site-footer li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 16px 24px;
  font-size: 12px;
  color: #9aa2b5;
  text-align: center;
}
.footer-bottom .proposal-note {
  display: block;
  margin-top: 6px;
  color: #cfa95f;
  font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero-media { min-height: 260px; }
  .hero-media img { min-height: 260px; }
  .hero-caption { position: static; margin-top: -4px; background: var(--navy); border: none; border-top: 3px solid var(--gold); }
  section { padding: 40px 0; }
  .watermark span { font-size: 3.4rem; }
}
