:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --fg: #221d17;
  --muted: #6f6557;
  --accent: #9c6b3f;
  --accent-dark: #7c5230;
  --line: #e8e1d6;
  --maxw: 1140px;
  --readw: 44rem;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(34, 29, 23, 0.04), 0 8px 24px rgba(34, 29, 23, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--fg); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.4rem; padding-bottom: 1.4rem;
}
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }
.brand:hover { color: var(--accent-dark); }
.nav { display: flex; gap: 1.75rem; }
.nav a {
  font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); padding-bottom: 2px; border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--fg); border-bottom-color: var(--accent); }

main.container { padding-top: 3.5rem; padding-bottom: 4rem; }

/* ---- Hero ---- */
.hero { text-align: center; padding: 3rem 0 4rem; max-width: 50rem; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin: 0 0 1rem; letter-spacing: -0.02em; }
.hero-sub { font-size: clamp(1.15rem, 2.5vw, 1.5rem); color: var(--muted); margin: 0 0 1.75rem; font-family: var(--serif); font-weight: 400; }
.hero-body { max-width: 38rem; margin: 0 auto 1.75rem; color: var(--muted); }

.hero--image {
  position: relative; max-width: none; margin: -3.5rem -1.5rem 0; padding: 0;
  min-height: 62vh; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
  text-align: center; color: #fff;
}
.hero--image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,15,10,0.35), rgba(20,15,10,0.55)); }
.hero-overlay { position: relative; z-index: 1; padding: 2rem 1.5rem; max-width: 46rem; }
.hero--image h1 { color: #fff; }
.hero--image .hero-sub { color: rgba(255,255,255,0.92); }

.button {
  display: inline-block; background: var(--accent); color: #fff;
  font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
  padding: 0.75rem 1.75rem; border-radius: var(--radius);
  letter-spacing: 0.01em; transition: background .2s ease, transform .2s ease;
}
.button:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }

/* ---- Section headings ---- */
.section-head { text-align: center; margin: 1rem 0 2rem; }
.section-head h2 { font-size: 2rem; margin: 0; }
.overline { display: block; font-family: var(--sans); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 0.6rem; }

/* ---- Project grid ---- */
.featured { margin-top: 4rem; }
.project-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem; margin-top: 1.5rem;
}
.project-card { color: var(--fg); display: block; }
.project-card:hover { color: var(--fg); }
.project-card-img {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
  background: var(--line); box-shadow: var(--shadow);
}
.project-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.project-card:hover .project-card-img img { transform: scale(1.05); }
.project-card h3 { margin: 1rem 0 0.25rem; font-size: 1.3rem; }
.project-card p { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.55; }

/* ---- Pages ---- */
.page { max-width: var(--readw); margin: 0 auto; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin: 0 0 1.5rem; letter-spacing: -0.02em; }
.page-body { font-size: 1.08rem; }
.page-body p { margin: 0 0 1.2rem; }
.page-body h2 { font-size: 1.6rem; margin: 2rem 0 0.8rem; }

.project { max-width: var(--maxw); margin: 0 auto; }
.project h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 0.75rem; letter-spacing: -0.02em; }
.project .lead { font-size: 1.3rem; color: var(--muted); font-family: var(--serif); max-width: 42rem; margin: 0 0 1.5rem; }
.project .page-body { max-width: var(--readw); }
.back-link { display: inline-block; margin-bottom: 1.25rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.back-link:hover { color: var(--accent); }

.contact-list { list-style: none; padding: 0; font-size: 1.08rem; }
.contact-list li { margin: 0.4rem 0; }

/* ---- Gallery ---- */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem; margin: 1.75rem 0 2.5rem;
}
.gallery-item {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
  background: var(--line); cursor: zoom-in; box-shadow: var(--shadow);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); margin-top: 2rem; }
.footer-inner { padding: 2.5rem 0; text-align: center; font-size: 0.92rem; }
.footer-inner p { margin: 0.3rem 0; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }
.copyright { font-size: 0.82rem; opacity: 0.8; margin-top: 0.6rem; }

/* ---- Lightbox ---- */
.lb-overlay {
  position: fixed; inset: 0; background: rgba(18,13,9,0.94);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.lb-overlay.open { display: flex; }
.lb-overlay img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 2px; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; font-size: 3rem; cursor: pointer;
  padding: 0 1.5rem; opacity: 0.75; transition: opacity .2s ease;
}
.lb-btn:hover { opacity: 1; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-close { position: absolute; top: 1rem; right: 1.5rem; transform: none; font-size: 2.5rem; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .header-inner { flex-direction: column; gap: 0.9rem; align-items: flex-start; }
  .nav { gap: 1.25rem; flex-wrap: wrap; }
  main.container { padding-top: 2.5rem; }
  .hero { padding: 1.5rem 0 2.5rem; }
  .hero--image { min-height: 50vh; }
  .project-grid, .gallery { gap: 1.25rem; }
}
