/* ============================================================
   EGMA Construction - stylesheet
   Theme: dark, industrial. Accent (action) = yellow. Brand = royal blue.
   Radius scale: sharp (2px). One accent locked across the page.
   ============================================================ */

:root {
  --bg: #0b0b0d;
  --surface: #131418;
  --surface-2: #1b1c22;
  --line: #2a2b33;

  --text: #f4f4f5;
  --muted: #a2a3ad;
  --muted-2: #74757f;

  --blue: #2e33a8;        /* brand blue (EGMA) */
  --blue-bright: #4046d8; /* used sparingly for detail */
  --yellow: #f7c600;      /* brand yellow - primary action accent */
  --yellow-deep: #d9ab00;
  --cream: #ede6d6;

  --radius: 2px;
  --wrap: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* neutral button baseline: every .foo class below still sets its own
   background/border/padding explicitly, this only stops UA defaults
   (incl. the disabled state) from leaking a white/black flash through
   button-role elements that rely on a child element for their visuals */
button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled { cursor: default; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 15px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--yellow);
  color: #17140a;
  border-color: var(--yellow);
}
.btn-primary:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark { display: inline-flex; }
.logo-word {
  font-weight: 900;
  font-size: 1.24rem;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
/* wordmark fonts matched to the EGMA logo: Montserrat + Nunito */
.logo-word b {
  font-family: "Montserrat", var(--font-display), sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--blue-bright);
}
.logo-word i {
  font-family: "Nunito", var(--font-body), sans-serif;
  font-style: normal;
  color: var(--yellow);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta {
  color: #17140a;
  background: var(--yellow);
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
}
.nav-links .nav-cta:hover { background: var(--yellow-deep); color: #17140a; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-block: 40px 32px;
}
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-2);
  margin: 0 0 22px;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 4.3rem);
  font-weight: 900;
  margin-bottom: 22px;
}
.hero .lead {
  font-size: 1.14rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 34px;
}
.hero-list {
  list-style: none;
  margin: 0 0 34px;
  padding: 0;
  display: grid;
  gap: 11px;
  max-width: 42ch;
}
.hero-list li {
  position: relative;
  padding-left: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}
.hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  background: var(--yellow);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-media {
  position: relative;
  aspect-ratio: 5 / 6;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* brand tint so placeholder photos read as one intentional system */
.hero-media-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, color-mix(in srgb, var(--blue) 55%, transparent), transparent 55%),
              linear-gradient(0deg, rgba(11,11,13,0.55), transparent 45%);
  mix-blend-mode: multiply;
}

.servicestrip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding-block: 26px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.servicestrip span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  position: relative;
  padding-left: 20px;
}
.servicestrip span::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 9px; height: 9px;
  transform: translateY(-50%);
  background: var(--yellow);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; max-width: 52ch; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: none;
}
.section-head-row h2 { margin-bottom: 16px; }

/* ---------- Services groups ---------- */
.svc-groups {
  display: grid;
  gap: 44px;
}
.svc-group-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted-2);
  margin: 0 0 18px;
}

/* ---------- Services grid ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.svc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.section-alt .svc { background: var(--surface-2); }
.svc:hover { border-color: var(--muted-2); border-top-color: var(--yellow); transform: translateY(-3px); }
.svc h4 { font-size: 1.24rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.svc p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.svc-cta { background: var(--yellow); border-color: var(--yellow); border-top-color: var(--yellow-deep); }
.svc-cta h4 { color: #17140a; }
.svc-cta p { color: #4a3f12; }
.svc-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: #17140a;
  border-bottom: 2px solid #17140a;
  padding-bottom: 2px;
}
.svc-cta:hover { transform: translateY(-3px); border-color: var(--yellow-deep); }

/* ---------- Diensten (bento: 1 feature + 3) ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.section-alt .service { background: var(--surface-2); }
.service:hover { border-color: var(--muted-2); transform: translateY(-3px); }
.service-index {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--yellow);
  letter-spacing: 0.05em;
}
.service h3 { font-size: 1.4rem; margin: 14px 0 10px; }
.service p { color: var(--muted); margin: 0; font-size: 0.98rem; }

.service-feature {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.service-feature .service-media { min-height: 320px; }
.service-feature .service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-feature .service-body { padding: 40px; align-self: center; }
.service-feature h3 { font-size: 1.9rem; }
.service-feature p { font-size: 1.05rem; max-width: 42ch; }

/* ---------- Waarom ---------- */
.waarom-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.waarom-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 6 / 7;
}
.waarom-media img { width: 100%; height: 100%; object-fit: cover; }
.waarom-copy h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 34px; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; }
.reasons li { border-top: 2px solid var(--yellow); padding-top: 16px; }
.reasons h3 { font-size: 1.18rem; margin-bottom: 8px; }
.reasons p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* ---------- Projecten gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  gap: 20px;
}
.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: linear-gradient(0deg, rgba(11,11,13,0.9), transparent);
}
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* ---------- Werkwijze steps ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.steps li {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.step-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.1rem;
  color: var(--blue-bright);
  display: block;
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.16rem; margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.contact-info h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; }
.contact-lead { color: var(--muted); font-size: 1.08rem; margin: 0 0 32px; max-width: 42ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 34px;
  display: grid;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-list li { display: grid; gap: 5px; border-top: 1px solid var(--line); padding-top: 20px; }
.contact-list li:first-child { border-top: 0; padding-top: 0; }
.ci-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted-2);
}
.contact-list a, .contact-list span:not(.ci-label) { font-size: 1.15rem; font-weight: 600; }
.contact-list a:hover { color: var(--yellow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-top: 56px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.logo-footer .logo-word { font-size: 1.35rem; }
.footer-tag { color: var(--muted); margin: 16px 0 0; max-width: 34ch; }
.footer-nav { display: grid; gap: 12px; align-content: start; }
.footer-nav a { color: var(--muted); font-weight: 600; }
.footer-nav a:hover { color: var(--text); }
.footer-contact { display: grid; gap: 8px; align-content: start; color: var(--muted); }
.footer-contact a { font-weight: 700; color: var(--text); }
.footer-contact a:hover { color: var(--yellow); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.86rem;
}

/* ---------- Scroll reveal ----------
   Visible by default so content never depends on JS to appear (if main.js
   is blocked, errors, or hasn't run yet, .reveal elements just show as-is).
   Only opts into the hidden-then-reveal animation once the early inline
   script in <head> has confirmed JS actually ran by tagging <html class="js">. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service, .gallery-item img { transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .waarom-grid { grid-template-columns: 1fr; gap: 40px; }
  .waarom-media { aspect-ratio: 16 / 10; max-height: 420px; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 24px;
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), visibility 0s linear 0.35s;
    z-index: 40;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links .nav-cta { text-align: center; margin-top: 14px; border-bottom: 0; }
  .nav-toggle { display: flex; }

  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; }
  .hero-media { aspect-ratio: 16 / 11; order: -1; }

  .services { grid-template-columns: 1fr 1fr; }
  .service-feature { grid-column: span 2; grid-template-columns: 1fr; }
  .service-feature .service-media { min-height: 240px; }
  .service-feature .service-body { padding: 30px; }

  .reasons { grid-template-columns: 1fr; gap: 24px; }

  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; }
  .g-wide { grid-column: span 2; }
  .g-tall { grid-row: span 1; }

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

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .hero h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .services { grid-template-columns: 1fr; }
  .service-feature { grid-column: span 1; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .g-wide { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .servicestrip { gap: 10px 24px; }
}

/* ============================================================
   PROJECTS PAGE (projecten.html)
   Aligned flat-card grid adapted from DESIGN.md (s-nrenovatie.be):
   uniform fixed-height image band + bordered info bar, one accent.
   ============================================================ */

/* ---------- Page hero ---------- */
.page-hero {
  padding-top: 56px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.page-hero .wrap { padding-block: 40px 44px; }
.crumbs {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  margin: 0 0 20px;
}
.crumbs a { color: var(--muted); transition: color 0.2s var(--ease); }
.crumbs a:hover { color: var(--yellow); }
.crumbs span { margin: 0 8px; color: var(--muted-2); }
.page-hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 900;
  margin-bottom: 18px;
}
.page-hero .lead {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 62ch;
  margin: 0;
}

/* ---------- Filters ---------- */
.projects.section { padding-top: clamp(40px, 6vw, 64px); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--muted-2); }
.filter-btn.is-active {
  color: #17140a;
  background: var(--yellow);
  border-color: var(--yellow);
}

/* ---------- Aligned project cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.project-card:hover { border-color: var(--muted-2); transform: translateY(-3px); }
.project-card[hidden] { display: none; }

/* uniform, fixed-height image band - keeps the grid level with mismatched photos */
.project-media {
  display: block;
  width: 100%;
  height: 236px;
  padding: 0;
  border: 0;
  background: var(--surface-2);
  cursor: pointer;
  overflow: hidden;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.05); }
.project-media:focus-visible { outline: 2px solid var(--yellow); outline-offset: -3px; }

/* fixed-height info bar: title/location left, action right, vertically centered */
.project-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}
.project-meta { display: grid; gap: 2px; min-width: 0; }
.project-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.2;
}
.project-loc { font-size: 0.86rem; color: var(--muted-2); }
.project-btn {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.project-btn:hover { border-color: var(--yellow); color: var(--yellow); }

.no-results { color: var(--muted); font-size: 1.05rem; margin: 8px 0 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(48px, 7vw, 80px); }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-inner h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 10px; }
.cta-inner p { color: var(--muted); margin: 0; max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(6, 6, 8, 0.92);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lightbox-figure figcaption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lightbox-close:hover { border-color: var(--yellow); color: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
  .project-card, .project-media img, .filter-btn, .project-btn { transition: none; }
  .lightbox { backdrop-filter: none; }
}

@media (max-width: 860px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-media { height: 210px; }
  .filters { gap: 8px; }
  .filter-btn { font-size: 0.85rem; padding: 9px 14px; }
  .lightbox { padding: 16px; }
}

/* ============================================================
   PROJECTS: service tiles (L1), service overlay (L2), gallery lightbox (L3)
   ============================================================ */

/* ---------- Level 1: service tiles ---------- */
.service-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.service-tile {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.service-tile:hover { border-color: var(--muted-2); transform: translateY(-3px); }
.service-tile:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.service-tile-media { display: block; height: 178px; background: var(--surface-2); overflow: hidden; }
.service-tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.service-tile:hover .service-tile-media img { transform: scale(1.05); }

/* mosaic: several real project thumbnails visible on entering the page,
   not only after clicking into a trade. Gaps read as thin mullions. */
.service-tile-media-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 2px;
}
.service-tile-media-mosaic img { transform: none !important; }
.service-tile:hover .service-tile-media-mosaic img { transform: none; }
.service-tile-media-mosaic:hover img { filter: brightness(1.06); }
.service-tile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}
.service-tile-meta { display: grid; gap: 2px; min-width: 0; }
.service-tile-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--text); }
.service-tile-count { font-size: 0.85rem; color: var(--muted-2); }
.service-tile-arrow { color: var(--yellow); flex-shrink: 0; display: inline-flex; transition: transform 0.2s var(--ease); }
.service-tile:hover .service-tile-arrow { transform: translateX(3px); }

/* ---------- Level 2: service overlay ---------- */
.service-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  overflow-y: auto;
}
.service-modal[hidden] { display: none; }
.service-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.service-modal-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.modal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 0;
}
.modal-back:hover { color: var(--text); }
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.modal-close:hover { border-color: var(--yellow); color: var(--yellow); }
.service-modal-body { padding-block: clamp(32px, 5vw, 56px); }
.service-modal-title { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 8px; }
.service-modal-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  margin: 0 0 36px;
}

/* photo-count badge on a project cover */
.project-media { position: relative; }
.project-card-soon .project-media { cursor: default; }
.photo-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(11, 11, 13, 0.82);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: var(--radius);
  pointer-events: none;
}

/* ---------- Level 3: gallery lightbox nav ---------- */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lightbox-nav:hover { border-color: var(--yellow); color: var(--yellow); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-figure figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.lightbox-count { font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; color: var(--muted-2); }

@media (prefers-reduced-motion: reduce) {
  .service-tile, .service-tile-media img, .service-tile-arrow, .modal-close, .lightbox-nav { transition: none; }
  .service-modal { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}
