:root{
  --bg: #f2f3f6;          /* Light gray background */
  --text: #0f172a;
  --muted: #475569;
  --primary: #1f4ed8;
  --panel: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 8px 30px rgba(2,6,23,.08);

  /* Background image tuning */
  --bg-img-opacity: 0.10;  /* 0.08–0.16 usually works well */
  --bg-img-blur: 8px;      /* 6–10px for “slightly blurred” */
  --bg-img-position: right top; /* aligns the graphic to top-right */
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  position: relative; /* enables ::before background layer */
}

/* Subtle blurred background image layer (behind all content) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("assets/bg.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--bg-img-position);
  filter: blur(var(--bg-img-blur));
  opacity: var(--bg-img-opacity);
  transform: scale(1.03); /* avoids visible edges from blur */
  will-change: transform, filter;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1200px, 92%); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px;
  padding: 12px 16px;
  background: rgba(242,243,246,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.logo img { height: 34px; }
.main-nav { display: flex; gap: 18px; justify-self: center; }
.main-nav a { padding: 6px 8px; border-radius: 8px; }
.main-nav a:hover { background: rgba(0,0,0,0.05); }
.header-right { display: inline-flex; gap: 8px; align-items: center; justify-self: end; }
.nav-toggle {
  display: none; /* shown on small screens */
  background: transparent; border: none; padding: 0; border-radius: 6px;
  cursor: pointer; width: 36px; height: 36px; position: relative;
}
.nav-toggle:focus { outline: none; }
.nav-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(31,78,216,0.18); }
.nav-toggle .bar {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px; background: var(--text); border-radius: 3px;
  transition: transform 200ms cubic-bezier(.2,.9,.3,1), opacity 160ms ease, top 200ms cubic-bezier(.2,.9,.3,1);
  transform-origin: center;
}
.nav-toggle .bar:nth-child(1) { top: calc(50% - 8px); }
.nav-toggle .bar:nth-child(2) { top: 50%; transform: translate(-50%,-50%); }
.nav-toggle .bar:nth-child(3) { top: calc(50% + 8px); }

/* When the toggle has the .open class, morph into an X centered at the middle */
.nav-toggle.open .bar:nth-child(1) {
  top: 50%; transform: translate(-50%,-50%) rotate(45deg);
}
.nav-toggle.open .bar:nth-child(2) {
  opacity: 0; transform: translate(-50%,-50%) scaleX(0.1);
}
.nav-toggle.open .bar:nth-child(3) {
  top: 50%; transform: translate(-50%,-50%) rotate(-45deg);
}
.lang-switch { display: flex; gap: 8px; justify-self: end; }
.lang-btn {
  border: 1px solid var(--border); background: #fff; padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Hero */
.hero { width: 100%; }
.hero-slide { position: relative; width: 100%; aspect-ratio: 16/7; background: #000; overflow: hidden; }
#hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
  position: absolute; inset: auto 24px 24px 24px;
  background: rgba(15,23,42,0.5); color: #fff;
  padding: 10px 14px; border-radius: 10px; font-size: clamp(16px, 2vw, 20px);
}

/* Sections */
.section { padding: 48px 16px; }
.section-tight { padding: 28px 16px; }
.section-muted { background: #f6f7fa; border-block: 1px solid var(--border); }
.section-header { width: min(1200px, 92%); margin: 0 auto 14px; }
.section-title { margin: 0; font-size: 22px; letter-spacing: -0.01em; }

/* Grids */
.image-grid {
  --min: 270px;
  width: min(1200px, 92%);
  margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  gap: 14px; list-style: none; padding: 0;
}
.image-grid-3 { --min: 320px; }

.tile {
  position: relative; overflow: hidden; border-radius: 16px;
  aspect-ratio: 16/10; background: #000;
  box-shadow: var(--shadow);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .25s ease; }
.tile:hover img { transform: scale(1.06); }
.tile .label {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(15,23,42,0.55); color: #fff;
  padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 14px;
}

/* Brands */
.brands-grid {
  width: min(1200px, 92%); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; list-style: none; padding: 0;
}

/* Align the residential stats text with the client/brand grids */
#residential-stats {
  width: min(1200px, 92%);
  margin: 12px auto 0;
  color: var(--muted);
}
.brand {
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border); height: 84px;
  border-radius: 14px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.brand:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2,6,23,.12); }
.brand img { max-width: 120px; max-height: 50px; object-fit: contain; filter: grayscale(1); opacity: .9; }

/* CTA / Contact */
.cta { padding: 40px 16px; }
.cta-inner {
  width: min(900px, 92%); margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 18px; box-shadow: var(--shadow);
}
.cta h3 { margin: 0; font-size: 20px; }
.btn { display: inline-block; padding: 10px 14px; border-radius: 10px; }
.btn-primary { background: var(--primary); color: #fff; }

.contact-grid {
  width: min(900px, 92%); margin: 0 auto;
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
}
.contact-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border);
  padding: 12px 14px; border-radius: 14px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2,6,23,.12); }
.contact-card .icon { color: var(--primary); flex: 0 0 auto; }
.contact-text { display: grid; line-height: 1.25; }
.contact-text .label { font-weight: 600; font-size: 13px; color: var(--muted); }
.contact-text .value { font-size: 15px; }

/* Footer */
.site-footer {
  padding: 20px 16px; text-align: center; color: var(--muted);
  border-top: 1px solid var(--border); background: #f6f7fa;
}

/* Floating call button (mobile only) */
.fab-call {
  position: fixed; right: 14px; bottom: 14px; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; box-shadow: 0 14px 34px rgba(2,6,23,.22);
}
@media (max-width: 760px) {
  .hero-slide { aspect-ratio: 16/10; }
  .cta-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .fab-call { display: inline-flex; }

  /* Mobile nav: hide horizontal nav and show toggle */
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Compact right-aligned panel anchored near the language switch */
  .main-nav.open {
    display: flex; flex-direction: column; position: absolute; top: calc(100% + 8px);
    right: 12px; left: auto; width: min(320px, 86%);
    background: var(--panel); padding: 12px 18px; gap: 8px; border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 10px 30px rgba(2,6,23,.12);
    z-index: 120;
    text-align: center;
  }
  .main-nav.open a { padding: 12px 10px; border-radius: 8px; display: block; }
  /* tighten header grid for small widths so toggle + lang switch align nicely */
  .site-header { grid-template-columns: auto auto auto; }
}