:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #666666;
  --line: #e8e8e8;
  --accent: #111111;
  --max: 1400px;
  --gap: 1.25rem;
  --nav-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav.transparent {
  background: transparent;
  border-bottom-color: transparent;
  color: #fff;
}

.nav-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav-brand small {
  display: block;
  font-family: -apple-system, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav.transparent .nav-brand small { color: rgba(255,255,255,0.8); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.nav-links a {
  position: relative;
  padding: 0.25rem 0;
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 0.6; }

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px; height: 28px;
  color: inherit;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.4) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 0 2rem;
}

.hero-content h1 {
  font-family: Georgia, serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
}

.hero-content .tagline {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  opacity: 0.9;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.7;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Page sections ---------- */
.page {
  padding-top: var(--nav-h);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-narrow {
  max-width: 800px;
}

.section-title {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}

.section-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--fg);
  max-width: 620px;
}

/* ---------- Gallery grid ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
  background: #f4f4f4;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.3s;
  opacity: 0;
}

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

.gallery-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 4px;
}

.gallery-empty code {
  background: #f4f4f4;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ---------- About layout ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about-text p { margin-bottom: 1rem; }

.clients {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}

.clients-grid img {
  max-height: 60px;
  width: auto;
  margin: 0 auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: opacity 0.2s, filter 0.2s;
}

.clients-grid img:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-info { font-size: 1.1rem; }
.contact-info dt {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd a:hover { opacity: 0.6; }

.contact-img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

.socials {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.socials a:hover { background: var(--fg); color: #fff; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 1rem;
  font-size: 1.5rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav { padding: 0 1.25rem; }

  .nav-toggle { display: flex; align-items: center; justify-content: center; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1.5rem 2rem 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    color: var(--fg);
  }

  .nav-links.open { transform: translateY(0); }

  .section { padding: 3rem 1.25rem; }

  .about-grid,
  .contact { grid-template-columns: 1fr; gap: 2rem; }

  .gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem; }
}
