:root {
  --bg: #f6f3ee;
  --ink: #211f1c;
  --ink-soft: #4a463f;
  --ink-faint: #6f6a5f;
  --accent: #9a4a34;
  --accent-hover: #7a3a29;
  --rule: rgba(42, 39, 35, 0.1);
  --max: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 74, 52, 0.35);
}
a:hover {
  color: var(--accent-hover);
  border-bottom-color: rgba(122, 58, 41, 0.6);
}

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 243, 238, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.nav-row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
}
.wordmark img { height: 38px; width: auto; display: block; }
.site-nav { display: flex; gap: 28px; font-size: 0.92rem; }
.site-nav a { border-bottom: none; }
.site-nav a:hover { color: var(--accent-hover); }
.site-nav a.current { color: var(--ink); font-weight: 600; }

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 32px;
}
.section.ruled { border-top: 1px solid var(--rule); }
.section.hero { padding: 120px 32px 96px; position: relative; overflow: hidden; }

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

.hero-watermark {
  position: absolute;
  right: -40px;
  top: 0;
  width: 560px;
  max-width: 75%;
  height: auto;
  opacity: 0.07;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 640px; }
.hero-inner h1 { font-size: 2.9rem; line-height: 1.18; margin: 18px 0 22px; color: #211f1c; }
.hero-inner p { font-size: 1.1rem; line-height: 1.6; color: var(--ink-soft); max-width: 34ch; margin: 0; }

/* Capabilities grid */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}
.cap-grid h3 { font-size: 1.2rem; margin: 0 0 12px; }
.cap-grid p { font-size: 0.96rem; line-height: 1.65; color: #5a564d; margin: 0; }

/* Building sections */
.building-section {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.building-section:first-of-type { margin-top: 56px; }
.building-title {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.building-meta {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin: 0 0 18px;
}

/* Photo grid */
.filmstrip-caption {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-faint);
  margin: 0 0 16px;
  max-width: 60ch;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 112px);
  justify-content: start;
  gap: 8px;
}
.photo-grid button {
  display: block;
  width: 112px;
  height: 112px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.photo-grid button:hover img,
.photo-grid button:focus-visible img {
  transform: scale(1.045);
}
.photo-grid button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.photo-grid-placeholder-tile {
  width: 112px;
  height: 112px;
  border-radius: 2px;
  border: 1px dashed var(--rule);
  background: repeating-linear-gradient(
    45deg,
    rgba(42, 39, 35, 0.05),
    rgba(42, 39, 35, 0.05) 8px,
    rgba(42, 39, 35, 0.015) 8px,
    rgba(42, 39, 35, 0.015) 16px
  );
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(23, 21, 18, 0.94);
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox-stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(246,243,238,0.12);
  color: #f6f3ee;
  border: 1px solid rgba(246,243,238,0.28);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(246,243,238,0.24); }
.lightbox-close {
  top: -8px;
  right: 0;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
}
.lightbox-prev { left: -8px; }
.lightbox-next { right: -8px; }
.lightbox-meta {
  color: rgba(246,243,238,0.7);
  font-size: 0.85rem;
  margin: 14px 0 4px;
  text-align: center;
}
.lightbox-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding: 4px 4px 8px;
  -webkit-overflow-scrolling: touch;
}
.lightbox-thumbs img {
  height: 56px;
  width: 74px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  flex: 0 0 auto;
}
.lightbox-thumbs img:hover { opacity: 0.8; }
.lightbox-thumbs img.is-active { opacity: 1; outline: 2px solid var(--accent); outline-offset: -2px; }

/* Contact */
.contact-block { font-size: 0.98rem; line-height: 1.8; color: var(--ink); }
.contact-block .addr { margin-top: 0; }

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 32px;
  border-top: 1px solid rgba(42, 39, 35, 0.12);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-faint);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-row .tag { letter-spacing: 0.06em; }

@media (max-width: 640px) {
  .site-nav { gap: 16px; }
  .hero-inner h1 { font-size: 2.1rem !important; }
  .hero-inner p { font-size: 1rem !important; }
  .cap-grid { grid-template-columns: 1fr !important; }
  .section { padding: 56px 24px !important; }
  .section.hero { padding: 96px 24px 64px !important; }
  .photo-grid { grid-template-columns: repeat(auto-fill, 92px) !important; }
  .photo-grid button { width: 92px !important; height: 92px !important; }
  .photo-grid-placeholder-tile { width: 92px !important; height: 92px !important; }
  .building-section { margin-top: 48px !important; padding-top: 32px !important; }
  .footer-row { flex-direction: column; align-items: flex-start !important; }
  .lightbox { padding: 16px !important; }
  .lightbox-prev, .lightbox-next { width: 38px !important; height: 38px !important; font-size: 1.15rem !important; }
  .lightbox-prev { left: 0 !important; }
  .lightbox-next { right: 0 !important; }
  .lightbox-close { top: 0 !important; right: 0 !important; width: 34px !important; height: 34px !important; }
  .lightbox-thumbs img { height: 42px !important; width: 56px !important; }
}
