:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --ink: #333333;
  --ink-strong: #20303c;
  --muted: #777777;
  --line: #e6e6e6;
  --link: #0057e1;
  --max: 1280px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* HEADER */
.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  text-align: center;
  padding: 2.4rem 1.5rem 0.8rem;
}

.brand h1 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.brand h1 a { color: inherit; }

.brand .subtitle {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--muted);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

/* NAV */
.nav-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

nav.primary {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
}

nav.primary a {
  color: var(--ink);
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
  font-weight: 400;
}

nav.primary a:hover { border-color: var(--ink); }
nav.primary a.active { border-color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0.6rem auto;
  font-family: inherit;
}

/* PAGE LAYOUT */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.page-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4rem);
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

.page-intro {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* HOME HERO */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h2 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1.6rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.85;
}

/* COLLECTIONS GRID — home, staggered like original Wix */
.collections {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  margin-top: 4rem;
  align-items: start;
}

.collection-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.collection-card .img-wrap {
  width: 100%;
  aspect-ratio: 1 / 2;
  overflow: hidden;
  background: #fff;
}

.collection-card:nth-child(2) .img-wrap,
.collection-card:nth-child(4) .img-wrap {
  aspect-ratio: 1 / 2.25;
}

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

.collection-card:hover img { transform: scale(1.04); }

.collection-card .label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink);
  margin-top: 1.2rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: #fff;
}


/* MASONRY GALLERY (CSS columns) — рачупен layout */
.gallery {
  column-count: 4;
  column-gap: 14px;
}

.gallery .item {
  break-inside: avoid;
  margin: 0 0 14px;
  background: #ffffff;
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
}

.gallery .item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

.gallery .item:hover img { transform: scale(1.03); opacity: 0.92; }

.status-available { color: #2c7a3d; }
.status-sold { color: #a13a3a; }
.status-owned { color: #6a6a6a; }

/* CONTACT */
.contact-card {
  max-width: 620px;
  margin: 2rem auto 0;
  background: #fff;
  border: 1px solid var(--line);
  padding: 3rem 2rem;
  text-align: center;
}

.contact-card .lede {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: var(--ink);
}

.phone-link {
  display: inline-block;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  color: var(--link);
  border-bottom: 2px solid var(--link);
  padding: 0.3rem 0;
  font-weight: 400;
  transition: color 0.2s, border-color 0.2s;
}

.phone-link:hover { color: var(--ink); border-color: var(--ink); }

.socials {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

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

.socials a:hover { background: var(--ink); color: #fff; }
.socials svg { width: 18px; height: 18px; }

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

.site-footer .footer-socials {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.site-footer .footer-socials a { color: var(--muted); }
.site-footer .footer-socials a:hover { color: var(--ink); }

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: none;
  z-index: 1000;
}

.lightbox.open { display: grid; grid-template-columns: 1fr 320px; }

.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 4.5rem;
  min-height: 100vh;
}

.lb-stage img {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  object-fit: contain;
  display: block;
}

.lb-info {
  padding: 5rem 2.5rem 2.5rem 1.5rem;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: 100vh;
}

.lb-info .lb-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  white-space: pre-line;
  line-height: 1.45;
}

.lb-info .lb-desc {
  font-size: 0.95rem;
  color: var(--ink);
  white-space: pre-line;
  line-height: 1.6;
}

.lb-info .lb-status {
  display: none;
  align-self: flex-start;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border: 1px solid currentColor;
  font-weight: 500;
  margin-top: 0.4rem;
}

.lb-info .lb-status.show { display: inline-block; }

.lb-info .lb-empty {
  display: none;
  color: var(--muted);
  font-style: italic;
}

.lb-info.is-empty .lb-empty { display: block; }
.lb-info.is-empty .lb-title,
.lb-info.is-empty .lb-desc { display: none; }

.lb-btn {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  z-index: 10;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: inherit;
  padding: 0;
}

.lb-btn:hover { background: var(--ink); color: #ffffff; border-color: var(--ink); }

.lb-close {
  top: 1.2rem;
  right: 1.2rem;
  font-size: 1.5rem;
  line-height: 1;
}

.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.7rem;
  line-height: 1;
}

.lb-prev { left: 1.2rem; }
.lb-next { right: calc(320px + 1.2rem); }

.lb-counter {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .gallery { column-count: 3; }
  .collections { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .lightbox.open { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb-stage { padding: 3rem 1rem 1rem; min-height: 0; }
  .lb-stage img { max-height: 55vh; }
  .lb-info { border-left: none; border-top: 1px solid var(--line); padding: 1.2rem 1.2rem 2rem; max-height: 45vh; }
  .lb-next { right: 1.2rem; }
  .lb-prev, .lb-next { top: 35%; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  nav.primary {
    display: none;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 0.5rem 1rem 1rem;
    gap: 0;
  }

  nav.primary.open { display: flex; }
  nav.primary a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  nav.primary a:last-child { border-bottom: none; }

  main { padding: 2rem 1rem 4rem; }

  .gallery { column-count: 2; column-gap: 8px; }
  .gallery .item { margin-bottom: 8px; }
}

@media (max-width: 460px) {
  .collections { grid-template-columns: 1fr; }
  .gallery { column-count: 2; }
}
