/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #111;
}

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

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

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.nav-link:hover {
  opacity: 0.6;
}

/* Masonry — Homepage */
.masonry {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2.5rem;
}

.masonry-tile {
  flex: 1 1 calc((100% - 20px) / 3);
  position: relative;
  overflow: hidden;
}

.masonry-tile img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.masonry-tile:hover img {
  transform: scale(1.02);
}

.masonry-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(50, 50, 50, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.masonry-tile:hover .masonry-overlay {
  opacity: 1;
}

.masonry-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.masonry-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-top: 0.3rem;
}

/* Gallery */
.gallery-title {
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  letter-spacing: 0.03em;
}

.gallery-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Photo Row */
.photo-row {
  display: flex;
  gap: 10px;
}

.photo-row--padded {
  padding: 0 2.5rem;
}

.photo-row--full {
  padding: 0;
}

.photo-row--text {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2.5rem;
  box-sizing: content-box;
}

.photo-row-item {
  flex-shrink: 1;
  flex-basis: 0;
  min-width: 0;
  overflow: hidden;
}

.photo-row-item img {
  width: 100%;
  height: auto;
}

/* Text Section */
.text-section {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2.5rem;
  line-height: 1.7;
  font-size: 1rem;
}

.text-section p {
  margin-bottom: 0.5rem;
}

.text-section p:last-child {
  margin-bottom: 0;
}

.text-section--center {
  text-align: center;
}

.text-section--left {
  text-align: left;
}

.text-section--right {
  text-align: right;
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 2.5rem;
  font-size: 0.8rem;
  color: #999;
  border-top: 1px solid #eee;
}

.footer-ig {
  display: flex;
  color: #999;
  transition: color 0.2s ease;
}

.footer-ig:hover {
  color: #111;
}

/* Contact Form */
.contact-form-wrap {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.contact-input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ddd;
  border-radius: 2px;
  background: #fff;
  color: #111;
  transition: border-color 0.2s ease;
}

.contact-input:focus {
  outline: none;
  border-color: #111;
}

.contact-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 1.5rem;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  align-self: flex-start;
}

.contact-btn:hover {
  background: #fff;
  color: #111;
}

.contact-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-status {
  font-size: 0.85rem;
  min-height: 1.2em;
}

.contact-status--ok {
  color: #2a7d2a;
}

.contact-status--err {
  color: #c33;
}

/* Spacer Row */
.gallery-spacer--sm { height: 1.5rem; }
.gallery-spacer--md { height: 4rem; }
.gallery-spacer--lg { height: 8rem; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.93);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #111;
  opacity: 0.4;
  padding: 0.25rem 0.5rem;
}

.lightbox-close:hover {
  opacity: 0.9;
}

.photo-row-item img {
  cursor: pointer;
}

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

  .masonry-tile {
    flex-basis: calc((100% - 10px) / 2);
  }

  .photo-row--padded,
  .photo-row--text {
    padding: 0 1.25rem;
  }

  .nav {
    padding: 0.9375rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .masonry {
    padding: 0.625rem;
  }

  .masonry-tile {
    flex-basis: 100%;
  }

  .photo-row--padded,
  .photo-row--text {
    padding: 0 0.625rem;
  }
}
