/* Placeholder neutral theme -- swap these variables (and assets/logo.png) once
   new enggrp.com branding is ready. Nothing else in this file or main.js
   should need to change. */
:root {
  --accent: #2f5d8a;
  --accent-dark: #24466b;
  --accent-contrast: #ffffff;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f2f4f7;
  --border: #dde1e6;
  --text: #1c2024;
  --text-muted: #5b6270;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #6ea3d8;
    --accent-dark: #8fbbe6;
    --accent-contrast: #0d1520;
    --bg: #14171c;
    --surface: #1a1d22;
    --surface-alt: #20242a;
    --border: #33383f;
    --text: #e7e9ec;
    --text-muted: #a0a6b0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }
.hidden { display: none !important; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; }
section.alt { background: var(--surface-alt); }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: clamp(26px, 4vw, 34px); }
.lede { color: var(--text-muted); font-size: 18px; max-width: 640px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); }
.brand img { height: 40px; width: auto; }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
}
.site-nav a:hover { background: var(--surface-alt); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.15s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
  }
  .site-nav.open { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 72px;
  background: linear-gradient(180deg, var(--surface-alt), var(--bg));
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--surface-alt); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-dark); }

/* ---------- Services (About) ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.service-card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.service-card p { color: var(--text-muted); margin: 8px 0 0; }

/* ---------- Products ---------- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  display: block;
  width: 100%;
}
.product-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-alt); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 16px 18px 20px; }
.product-card h3 { font-size: 17px; margin-bottom: 4px; }
.product-card p { color: var(--text-muted); font-size: 14px; margin: 0; }
.badge-new {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.gallery-grid button {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: var(--surface-alt);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.gallery-grid button:hover img { transform: scale(1.04); }

/* ---------- Partners ---------- */

.partners-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  margin-top: 28px;
}
.partners-row img { height: 56px; width: auto; filter: grayscale(1); opacity: 0.75; transition: opacity 0.15s, filter 0.15s; }
.partners-row a:hover img { filter: none; opacity: 1; }

/* ---------- Contact ---------- */

.contact-card {
  display: flex;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 560px;
  margin-top: 28px;
}
.contact-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.contact-card h3 { margin-bottom: 4px; }
.contact-card a { font-weight: 600; }

/* ---------- Modal ---------- */

dialog.lightbox {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 720px;
  width: calc(100% - 40px);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog.lightbox::backdrop { background: rgba(10, 12, 15, 0.6); }
dialog.lightbox .modal-body { padding: 24px; max-height: 82vh; overflow-y: auto; }
dialog.lightbox img { border-radius: 8px; margin-bottom: 16px; width: 100%; object-fit: cover; max-height: 360px; }
dialog.lightbox .modal-close {
  position: absolute;
  top: 12px; right: 12px;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
dialog.lightbox ul { padding-left: 20px; color: var(--text-muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  section { padding: 48px 0; }
  .contact-card { flex-direction: column; text-align: center; }
}
