/* Electritects - Electrical pillar (electrical/index.html)
   Colours come from the --el-* tokens every theme in ../themes.css defines.
   Layout is mobile first; wider screens add columns. */

:root {
  --el-bg: #ffffff;
  --el-bg-secondary: #f8fafc;
  --el-card: #ffffff;
  --el-card-subtle: #f8fafc;
  --el-border: #e2e8f0;
  --el-accent: #bf1e2d;
  --el-accent-hover: #d92536;
  --el-text-main: #0f172a;
  --el-text-secondary: #334155;
  --el-text-muted: #64748b;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--el-bg);
  color: var(--el-text-main);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--el-accent); }
a:hover { color: var(--el-accent-hover); }

:focus-visible { outline: 2px solid var(--el-accent); outline-offset: 2px; }

/* ---------- Pillar bar (shared look with the other pillars) ---------- */
.top-nav {
  position: relative;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  background: rgba(7, 9, 14, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #ffffff 40%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pillar-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 4px;
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  white-space: nowrap;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; }
.nav-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-btn:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.1); }

/* ---------- Section bar ---------- */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px;
  background: var(--el-card);
  border-bottom: 1px solid var(--el-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.section-logo img { height: 40px; width: auto; }
html[data-theme-mode="dark"] .section-logo img { filter: brightness(0) invert(1); opacity: 0.92; }
.section-links { display: flex; align-items: center; gap: 4px; }
.section-links a {
  color: var(--el-text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.section-links a:hover, .section-links a.is-current { color: var(--el-accent); background: var(--el-card-subtle); }
.theme-btn {
  font-size: 1.1rem;
  line-height: 1;
  padding: 7px 9px;
  margin-left: 6px;
  border-radius: 6px;
  border: 1px solid var(--el-border);
  background: var(--el-card-subtle);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(420px, 72vh, 720px);
  display: flex;
  align-items: flex-end;
  color: #ffffff;
  overflow: hidden;
  background: #0b0f19;
}
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slides img.is-active { opacity: 1; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.72) 100%);
}
.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 28px;
}
.hero-kicker {
  margin: 0 0 6px;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #ffffff;
}
.hero-kicker span { color: #f87171; }
.hero h1 {
  margin: 0;
  max-width: 16em;
  font-size: clamp(1.9rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  font-weight: 700;
  color: #ffffff !important;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}
.hero-sub { margin: 14px 0 22px; font-size: clamp(1rem, 2vw, 1.2rem); color: #e2e8f0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--el-accent); color: var(--text-btn-primary, #ffffff); }
.btn-primary:hover { background: var(--el-accent-hover); color: var(--text-btn-primary, #ffffff); }
.btn-ghost { color: #ffffff; border-color: rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { color: #ffffff; background: rgba(255, 255, 255, 0.12); }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section:nth-of-type(even) { background: var(--el-bg-secondary); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section-title {
  margin: 0 0 20px;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.15;
}
.section-title span { font-weight: 700; color: var(--el-accent); }
.lead { max-width: 60em; font-size: 1.08rem; color: var(--el-text-secondary); }
.lead p { margin: 0 0 12px; }
.sub-title { margin: 48px 0 18px; font-size: 1.25rem; font-weight: 600; }

.card, .sector, .service, .project, .partner {
  background: var(--el-card);
  border: 1px solid var(--el-border);
  border-radius: var(--radius);
}

/* About - sectors */
.sectors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 16px; margin-top: 28px; }
.sector { padding: 20px; }
.sector img { width: 64px; height: 64px; border-radius: 8px; margin-bottom: 12px; }
.sector h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--el-accent) !important; text-transform: uppercase; letter-spacing: 0.06em; }
.sector ul, .service ul { margin: 0; padding-left: 1.1em; color: var(--el-text-secondary); }
.sector li, .service li { margin: 3px 0; }
.service li::marker, .sector li::marker { color: var(--el-accent); }

/* Photo bands between sections */
.banner {
  height: clamp(160px, 28vw, 320px);
  background: var(--banner) center / cover no-repeat;
}

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.project { padding: 14px; display: flex; flex-direction: column; }
.project-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.project-shots .shot img { aspect-ratio: 1 / 1; object-fit: cover; }
.project h3 { margin: 14px 0 4px; font-size: 1.1rem; }
.project a { font-weight: 600; text-decoration: none; margin-top: auto; }

.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.partner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  color: var(--el-text-secondary);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.partner:hover { border-color: var(--el-accent); transform: translateY(-2px); color: var(--el-text-secondary); }
.partner img { width: 96px; height: 64px; object-fit: contain; background: #ffffff; border-radius: 6px; padding: 4px; flex-shrink: 0; }
.partner strong { display: block; color: var(--el-text-main); }

/* Services: cards flow down columns so tall and short cards pack together */
.services { columns: 300px 3; column-gap: 16px; margin-top: 20px; }
.service { padding: 22px; margin-bottom: 16px; break-inside: avoid; border-top: 3px solid var(--el-accent); }
.service h3 { margin: 0 0 10px; font-size: 1.12rem; }
.services.two { columns: 340px 2; }

/* Galleries */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 46%), 1fr)); gap: 10px; }
.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--el-card-subtle);
  cursor: zoom-in;
}
.grid .shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.3s; }
.shot:hover img { transform: scale(1.04); }
.shot span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
}

/* Contact */
.contact { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact-email { font-weight: 600; }
.form-card { padding: 24px; border: 2px solid var(--el-accent); box-shadow: var(--shadow); }
.form-card h3 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--el-accent) !important;
  border-bottom: 2px solid var(--el-border);
}
#inquiry-form { display: flex; flex-direction: column; }
#inquiry-form label { font-size: 0.8rem; font-weight: 600; color: var(--el-text-secondary); margin: 10px 0 4px; }
#inquiry-form input, #inquiry-form textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  color: var(--el-text-main);
  background: var(--input-bg, var(--el-bg-secondary));
  border: 1px solid var(--input-border, var(--el-border));
  border-radius: 6px;
}
#inquiry-form textarea { resize: vertical; }
#inquiry-form input:focus, #inquiry-form textarea:focus { outline: none; border-color: var(--el-accent); box-shadow: 0 0 0 3px var(--el-border-glow, rgba(191, 30, 45, 0.25)); }
#inquiry-form [aria-invalid="true"] { border-color: #dc2626; }
#inquiry-form .btn { margin-top: 12px; }
.form-status { min-height: 1.2em; margin: 10px 0 0; font-size: 0.85rem; font-weight: 600; color: #dc2626; }
.form-status.is-ok { color: #16a34a; }
.form-note { margin: 8px 0 0; font-size: 0.78rem; color: var(--el-text-muted); }

.brochure {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--el-text-muted);
  font-size: 0.8rem;
  background: var(--el-card-subtle);
  border: 1px solid var(--el-border);
  border-radius: 8px;
}
.brochure img { flex-shrink: 0; }
.brochure strong { display: block; font-size: 0.88rem; color: var(--el-accent); }
.brochure-badge {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-btn-primary, #ffffff);
  background: var(--el-accent);
}

.site-footer {
  padding: 26px 16px;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  background: #07090e;
}
.site-footer p { margin: 0; }

/* ---------- Photo viewer ---------- */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.92);
  color: #ffffff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox figure { margin: 0; max-width: calc(100vw - 120px); text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 110px); margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { margin-top: 12px; font-size: 0.95rem; color: #e2e8f0; }
.lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.25); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Tablet ---------- */
@media (max-width: 1023.98px) {
  .top-nav { padding: 10px 16px; }
  .section-nav { padding: 8px 16px; }
  .section-links a { padding: 8px 7px; font-size: 0.76rem; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  html { scroll-padding-top: 96px; }
  .top-nav { flex-direction: column; align-items: stretch; gap: 8px; }
  .brand-link { justify-content: center; flex-wrap: wrap; gap: 6px 10px; }
  .brand-logo { font-size: 1.05rem; }
  .nav-links { justify-content: center; gap: 6px; }
  .nav-btn { font-size: 0.72rem; padding: 6px 8px; }
  .section-nav { flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px 10px; }
  .section-logo img { height: 30px; }
  .section-links { flex-wrap: wrap; justify-content: center; gap: 2px; }
  .section-links a { padding: 6px 7px; font-size: 0.7rem; letter-spacing: 0.04em; }
  .wrap { padding: 0 16px; }
  .hero-text { padding: 32px 16px; }
  .lightbox figure { max-width: 100vw; padding: 0 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lightbox img { max-height: calc(100dvh - 150px); }
  .brochure { flex-wrap: wrap; }
  .brochure-badge { margin-left: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slides img, .shot img, .btn, .partner { transition: none; }
}
