/* KLS Electrical — preview site
   Layout/type rhythm inspired by Vertice Projects (not their brand assets).
   Colour taken from the new KLS logo. */
:root {
  --bg: #070707;
  --bg-elevated: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --line: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --text-muted: #b8b8b8;
  --text-soft: #8e8e8e;
  --accent: #E5FC08;
  --accent-ink: #0a0a00;
  --accent-dim: rgba(229, 252, 8, 0.14);
  --font-display: "Poppins", Helvetica, Arial, sans-serif;
  --font-body: "Montserrat", Helvetica, Arial, sans-serif;
  --header-h: 5.5rem;
  --topbar-h: 2.5rem;
  --max: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0 0 0.6em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
address { font-style: normal; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 1rem;
  z-index: 1000;
}
.skip:focus { left: 1rem; top: 1rem; }

/* Top bar */
.topbar {
  background: #000;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 500;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  justify-content: flex-end;
  align-items: center;
}
.topbar a { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text); }
.topbar a:hover { color: var(--accent); }
.topbar svg { width: 14px; height: 14px; fill: currentColor; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 7, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(7, 7, 7, 0.94);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem var(--pad);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 58px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  padding: 0.25rem 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a:hover::after, .nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
}
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9rem 1.55rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: #f2ff4a; border-color: #f2ff4a; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,0.35);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.85);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  background: #fff;
  color: #070707;
  border-color: #fff;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--topbar-h) - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000 url("assets/hero.jpg") center 55% / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.48) 0%, rgba(0,0,0,0.58) 42%, rgba(0,0,0,0.62) 70%, rgba(7,7,7,0.92) 100%);
  z-index: -1;
}
.hero-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) var(--pad) 5.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero h1 {
  font-weight: 300;
  font-size: clamp(2.35rem, 7.2vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: #fff;
}
.hero .lede {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
  color: #fff;
  max-width: 38rem;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.hero-scroll svg { width: 2rem; height: 2rem; }
.hero-scroll:hover { color: #f2ff4a; }
@keyframes hero-scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(0.45rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll { animation: hero-scroll-bounce 1.8s ease-in-out infinite; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section-head { max-width: 40rem; margin-bottom: 2.75rem; }
.section h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.section-kicker {
  color: var(--text-muted);
  font-size: 1.05rem;
}
.bg-elevated { background: var(--bg-elevated); }

/* Highlight cards */
.highlights { position: relative; z-index: 2; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 2rem 1.6rem 1.8rem;
  box-shadow: var(--shadow);
  height: 100%;
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }
.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.1rem;
  color: var(--accent);
}
.card-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.about-copy p { color: var(--text-muted); }
.about-photo {
  position: relative;
}
.about-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4/3;
  border: 1px solid var(--line);
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.niceic-badge { height: 52px; width: auto; background: #000; }

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 2rem 1.7rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.service-card:hover { border-color: rgba(229, 252, 8, 0.45); background: var(--bg-card-hover); }
.service-card h3 { font-size: 1.25rem; }
.service-card p { color: var(--text-muted); margin: 0; }
.service-card.is-placeholder {
  border-style: dashed;
  background: transparent;
}
.placeholder-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.8rem;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.project-card {
  min-height: 260px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.project-card.is-placeholder {
  background:
    linear-gradient(180deg, rgba(22,22,22,0.2), rgba(22,22,22,0.95)),
    repeating-linear-gradient(-45deg, #141414 0 12px, #101010 12px 24px);
  border: 1px dashed rgba(229, 252, 8, 0.35);
  justify-content: flex-end;
  padding: 1.5rem;
}
.project-card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.project-card p { color: var(--text-muted); margin: 0; font-size: 0.92rem; }
.project-open {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  width: 100%;
  height: 100%;
}
.project-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.project-photo {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
}
.project-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-open:hover .project-photo img { transform: scale(1.04); }
.project-card-body { padding: 1.25rem 1.3rem 1.4rem; }
.project-loc {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem !important;
}
.project-cta {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.lightbox.is-open { display: flex; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}
.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  background: #0c0c0c;
  border: 1px solid var(--line);
  padding: 1rem 1rem 1.25rem;
}
.lightbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.lightbox-kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.25rem;
}
.lightbox-toolbar h3 { font-size: 1.2rem; margin: 0; }
.lightbox-close, .lightbox-nav {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.lightbox-close:hover, .lightbox-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-stage {
  position: relative;
  background: #000;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: min(64vh, 720px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-caption {
  margin: 0.85rem 0 0.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.lightbox-caption strong { color: var(--text); font-family: var(--font-display); font-weight: 700; }
.lightbox-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.lightbox-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  background: #000;
  cursor: pointer;
  width: 72px;
  height: 54px;
  overflow: hidden;
}
.lightbox-thumbs button[aria-current="true"] { border-color: var(--accent); }
.lightbox-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.lightbox-open { overflow: hidden; }

/* Values */
.values-intro { max-width: 40rem; margin-bottom: 2.5rem; }
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1.75rem;
}
.value-item { border-top: 2px solid var(--accent); padding-top: 1.2rem; }
.value-item h3 { font-size: 1.1rem; }
.value-item p { color: var(--text-muted); margin: 0; font-size: 0.92rem; }

/* CTA band */
.cta-band {
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) var(--pad);
}
.cta-band h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); max-width: 22ch; margin: 0 auto 0.7rem; }
.cta-band p { margin: 0 auto 1.6rem; max-width: 36rem; }
.cta-band .btn-primary {
  background: var(--accent-ink);
  color: var(--accent);
  border-color: var(--accent-ink);
}
.cta-band .btn-primary:hover { background: #222; border-color: #222; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.contact-list li { margin: 0 0 1rem; }
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--accent); }
.contact-list span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.form {
  display: grid;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 1.6rem;
}
.form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
}
.form input, .form textarea, .form select {
  background: #0c0c0c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.form textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .note { color: var(--text-soft); font-size: 0.8rem; margin: 0; font-weight: 400; }
.form-success {
  display: none;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
}
.form-success.is-visible { display: block; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 1.5rem;
  background: #000;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}
.site-footer .logo img { height: 52px; margin-bottom: 1rem; }
.site-footer h3 { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 0.45rem; }
.site-footer a:hover { color: var(--accent); }
.footer-meta {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding: 1.2rem var(--pad) 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--text-soft);
  font-size: 0.82rem;
}

/* Mobile */
@media (max-width: 900px) {
  .logo img { height: 46px; }
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: rgba(7,7,7,0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem var(--pad) 1.4rem;
    gap: 0.85rem;
  }
  .nav.is-open { display: flex; }
  .card-grid, .project-grid, .value-grid { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .hero { min-height: calc(100svh - var(--topbar-h) - var(--header-h)); background-position: center 62%; }
}
@media (max-width: 640px) {
  .topbar-inner { justify-content: center; }
  .card-grid, .project-grid, .value-grid, .form-row { grid-template-columns: 1fr; }
  .header-inner { min-height: 4.4rem; }
  :root { --header-h: 4.4rem; }
}

/* Project cards as links */
a.project-open { text-decoration: none; color: inherit; }

/* Project pages */
.project-page {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(4rem, 8vw, 6rem);
}
.project-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}
.project-back:hover { color: #fff; }
.project-page-intro { max-width: 44rem; margin-bottom: 2.5rem; }
.project-page-intro h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.85rem;
}
.project-page-intro .lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.6rem;
}
.project-page-intro .lede p { margin: 0 0 0.85em; }
.project-page-intro .lede p:last-child { margin-bottom: 0; }
.gallery-block { margin-top: 2.25rem; }
.gallery-block h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.gallery-open {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  background: #000;
  cursor: pointer;
  aspect-ratio: 4/3;
  overflow: hidden;
  width: 100%;
}
.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-open:hover img { transform: scale(1.04); }
.gallery-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
