:root {
  --bg: #0d0d0e;
  --bg-alt: #151517;
  --text: #ededec;
  --text-dim: #9a9a9d;
  --accent: #c9a24b;
  --border: #232326;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */
.site-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}

.brand-link { text-decoration: none; }

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--text);
}

.tagline {
  color: var(--text-dim);
  margin: 6px 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Grid homepage */
main.wrap { padding-top: 48px; padding-bottom: 80px; }

.empty { color: var(--text-dim); text-align: center; padding: 80px 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card-media {
  aspect-ratio: 4 / 3;
  background: #000;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover .card-media img { transform: scale(1.06); }

.card-info { padding: 18px 20px 22px; }

.card-info h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0 0 8px;
}

.meta-line {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.meta-line span:not(:last-child)::after { content: " \00b7 "; }

/* Chantier detail page */
.back {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 24px;
}
.back:hover { color: var(--accent); }

.chantier-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 2.6rem;
  margin: 0 0 24px;
}

.chantier-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0 0 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.chantier-meta > div { min-width: 120px; }

.chantier-meta dt {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.chantier-meta dd { margin: 0; font-size: 1.05rem; }

.chantier-notes {
  color: var(--text-dim);
  max-width: 70ch;
  margin-bottom: 40px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px;
}

.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #000;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.92;
}

.gallery-item:hover img {
  transform: scale(1.04);
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 6, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .chantier-title { font-size: 2rem; }
  .brand { font-size: 1.9rem; }
}
