/* INFINELEC LIMITED — precision-mono design direction */

:root {
  --gold: #c08a2d;
  --charcoal: #2b2b2b;
  --grey: #c9c9c9;
  --bg: #faf9f6;
  --bg-panel: #ffffff;
  --text: #2b2b2b;
  --banner-height: 40px;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-sans: 'IBM Plex Sans', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--banner-height);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

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

a { color: var(--charcoal); }

/* ---------- Proposal banner ---------- */
.proposal-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--banner-height);
  background: #111111;
  color: #f2f2f2;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0 10px;
}

/* ---------- Preview watermark ---------- */
.preview-watermark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9000;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  mix-blend-mode: difference;
}

.preview-watermark span {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 7vw;
  color: #888888;
  opacity: 0.07;
  transform: rotate(-30deg);
  white-space: nowrap;
  letter-spacing: 0.08em;
}

/* ---------- Grid-visible layout helpers ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  margin-bottom: 10px;
}

.datasheet {
  border-top: 1px solid var(--grey);
  border-bottom: 1px solid var(--grey);
}

/* ---------- Site header ---------- */
.site-header {
  background: var(--charcoal);
  color: #f5f5f5;
  border-bottom: 3px solid var(--gold);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 34px;
  width: auto;
}

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

.main-nav {
  display: flex;
  gap: 22px;
}

.main-nav a {
  color: #f5f5f5;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--gold);
}

.phone-link {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--charcoal);
  background: var(--gold);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 2px;
  white-space: nowrap;
}

.phone-link:hover { background: #a97522; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--grey);
  color: #f5f5f5;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--grey);
}

.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 560px;
  overflow: hidden;
  background: var(--charcoal);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-caption {
  background: var(--bg-panel);
  border-top: 1px solid var(--grey);
}

.hero-caption .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.hero-caption h1 {
  margin: 0 0 8px 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.hero-caption .tagline {
  font-size: 17px;
  color: var(--charcoal);
}

.hero-specs {
  font-family: var(--font-mono);
  font-size: 13px;
  border-left: 1px solid var(--grey);
  padding-left: 24px;
}

.hero-specs dt {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 12px;
}

.hero-specs dt:first-child { margin-top: 0; }

.hero-specs dd {
  margin: 2px 0 0 0;
  color: var(--text);
}

/* ---------- Sections ---------- */
section {
  padding: 56px 0;
  border-bottom: 1px solid var(--grey);
}

section:last-of-type { border-bottom: none; }

section h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 20px 0;
}

.section-intro {
  max-width: 68ch;
}

/* ---------- Service grid ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--grey);
  border: 1px solid var(--grey);
  margin-top: 28px;
}

.service-card {
  background: var(--bg-panel);
  padding: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}

.service-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--charcoal);
}

.service-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card .body {
  padding: 20px 22px 24px;
}

.service-card .index {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.service-card h3 {
  margin: 8px 0 8px 0;
  font-size: 19px;
}

.service-card p {
  margin: 0;
  font-size: 15px;
}

/* ---------- Service sections (services page) ---------- */
.service-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.service-section .thumb {
  border: 1px solid var(--grey);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--charcoal);
}

.service-section .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-section:nth-of-type(even) .thumb {
  order: 2;
}

/* ---------- Spec list (contact / about) ---------- */
.spec-list {
  font-family: var(--font-mono);
  font-size: 14px;
  border-top: 1px solid var(--grey);
  margin-top: 22px;
}

.spec-list .row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--grey);
}

.spec-list .row dt {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.spec-list .row dd {
  margin: 0;
}

.spec-list a { text-decoration: none; }
.spec-list a:hover { text-decoration: underline; }

/* ---------- Contact form ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
}

form.enquiry {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--charcoal);
}

.field input,
.field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--grey);
  border-radius: 2px;
  background: var(--bg-panel);
  color: var(--text);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.field textarea { resize: vertical; min-height: 120px; }

.field .error {
  font-size: 13px;
  color: #9a2020;
  min-height: 16px;
}

.field.has-error input,
.field.has-error textarea {
  border-color: #9a2020;
}

button.submit {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gold);
  color: var(--charcoal);
  border: none;
  padding: 13px 20px;
  border-radius: 2px;
  cursor: pointer;
  width: fit-content;
}

button.submit:hover { background: #a97522; }

.form-status {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid var(--grey);
  display: none;
}

.form-status.visible { display: block; }

.form-status.success {
  border-color: var(--gold);
  color: var(--charcoal);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--charcoal);
  color: #f5f5f5;
}

.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.cta-band h2 { color: #f5f5f5; margin: 0; }

.cta-band .phone-link {
  font-size: 18px;
  padding: 12px 20px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--grey);
  padding: 40px 0 28px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0 0 10px 0;
}

.footer-grid a {
  color: var(--text);
  text-decoration: none;
}

.footer-grid a:hover { text-decoration: underline; }

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proposal-note {
  border-top: 1px solid var(--grey);
  padding-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #555555;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--charcoal);
    flex-direction: column;
    padding: 14px 24px 20px;
    gap: 14px;
    border-top: 1px solid var(--grey);
  }

  .main-nav.open { display: flex; }

  .nav-toggle { display: block; }

  .site-header .wrap { position: relative; }

  .hero-caption .wrap,
  .service-section,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-specs {
    border-left: none;
    border-top: 1px solid var(--grey);
    padding-left: 0;
    padding-top: 16px;
  }

  .service-grid { grid-template-columns: 1fr; }

  .service-section .thumb { order: -1 !important; }

  .footer-grid { grid-template-columns: 1fr; }

  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
}
