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

:root {
  --black: #0a0a0a;
  --white: #f5f4f0;
  --mid: #888;
  --border: #d0cfc9;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', Helvetica, sans-serif;
}

html {
       scroll-behavior: smooth;
       overflow-x: hidden;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 48px;
  background: rgba(245,244,240,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
nav.scrolled { border-color: var(--border); }

.nav-logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--black);
}
.logo-text {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
}
.nav-links {
  display: flex; gap: 36px; list-style: none;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  transition: color .2s;
  font-weight: 400;
}
.nav-links a:hover { color: var(--black); }

/* ── HERO ── */
#hero {
  height: auto;
  padding: 120px 48px 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: var(--white);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 900px;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp .8s .2s forwards;
}
h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(52px, 8vw, 110px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeUp .9s .4s forwards;
}
h1 em { font-style: italic; font-weight: 300; }

.hero-desc {
  margin-top: 40px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mid);
  max-width: 420px;
  opacity: 0;
  animation: fadeUp .8s .6s forwards;
}
.hero-scroll {
  position: absolute;
  right: 48px; bottom: 48px;
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  display: flex; align-items: center; gap: 12px;
  opacity: 0;
  animation: fadeUp .8s .9s forwards;
  display: none;
}
.hero-scroll::before {
  content: '';
  display: block;
  width: 1px; height: 48px;
  background: var(--border);
}

/* ── SECTIONS ── */
section { padding: 120px 48px; }

.section-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 64px;
  display: flex; align-items: center; gap: 20px;
}
.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
  display: block;
}

/* ── GRID ── */
#work { background: var(--white); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.grid-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #1a1a1a;
  cursor: pointer;
}
.grid-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.25,.46,.45,.94);
  filter: grayscale(20%) brightness(0.75);
}
.grid-item:hover img {
  transform: scale(1.05);
  filter: grayscale(0%) brightness(0.55);
}
.grid-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 24px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  pointer-events: none;
}
.grid-overlay h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  color: #fff;
  margin-bottom: 8px;
}
.overlay-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.overlay-bottom span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.photo-count {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 9px !important;
  letter-spacing: 0.12em !important;
  color: rgba(255,255,255,0.8) !important;
}

/* ── CONTACT ── */
#contact {
  background: var(--black);
  color: var(--white);
  min-height: 60vh;
  display: flex; flex-direction: column;
  justify-content: center;
}
#contact .section-label { color: rgba(245,244,240,0.35); }
#contact .section-label::after { background: rgba(245,244,240,0.12); }

.contact-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 60px;
  flex-wrap: wrap;
}
.contact-headline {
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 300;
  line-height: 1.5;
}
.contact-headline em { font-style: italic; }

.contact-links {
  display: flex; flex-direction: column; gap: 20px;
  min-width: 260px;
}
.contact-row {
  display: flex; flex-direction: column; gap: 4px;
  border-bottom: 1px solid rgba(245,244,240,0.1);
  padding-bottom: 20px;
}
.contact-row:last-child { border-bottom: none; padding-bottom: 0; }
.contact-type {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.35);
}
.contact-value {
  font-size: 15px;
  color: var(--white);
  text-decoration: none;
  transition: opacity .2s;
  font-weight: 300;
}
.contact-value:hover { opacity: 0.5; }

/* ── FOOTER ── */
footer {
  background: var(--black);
  border-top: 1px solid rgba(245,244,240,0.08);
  padding: 28px 48px;
  display: flex; justify-content: space-between; align-items: center;
}
footer span {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.6);
}

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#lightbox.active { display: flex; }

#lightbox-overlay {
  position: absolute; inset: 0;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(10px);
}
#lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  width: 88vw;
  max-width: 1200px;
  max-height: 85vh;
  border: 1px solid rgba(245,244,240,0.08);
}

/* მარცხენა sidebar */
#lightbox-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: rgba(245,244,240,0.04);
  border-right: 1px solid rgba(245,244,240,0.08);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
}
#lightbox-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 300;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}
#lightbox-location {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.35);
  margin-bottom: 24px;
}
#lightbox-divider {
  width: 32px;
  height: 1px;
  background: rgba(245,244,240,0.2);
  margin-bottom: 24px;
}
#lightbox-description {
  font-size: 13px;
  line-height: 1.9;
  color: rgba(245,244,240,0.55);
  font-weight: 300;
  flex: 1;
}
#lightbox-counter {
  margin-top: 32px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.25);
}

/* მარჯვენა ფოტო */
#lightbox-photo-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  overflow: hidden;
}
#lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: rgba(245,244,240,0.5);
  font-size: 18px;
  cursor: pointer;
  transition: color .2s;
  z-index: 2;
  line-height: 1;
}
#lightbox-close:hover { color: var(--white); }

#lightbox-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
#lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  transition: opacity .25s;
}
#lightbox-img.fade { opacity: 0; }

#lb-prev, #lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(245,244,240,0.06);
  border: 1px solid rgba(245,244,240,0.12);
  color: rgba(245,244,240,0.7);
  font-size: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, color .2s;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
#lb-prev { left: 16px; }
#lb-next { right: 16px; }
#lb-prev:hover, #lb-next:hover {
  background: rgba(245,244,240,0.18);
  color: var(--white);
}
#lb-prev:disabled, #lb-next:disabled {
  opacity: 0.15;
  pointer-events: none;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s cubic-bezier(.25,.46,.45,.94), transform .8s cubic-bezier(.25,.46,.45,.94);
}
.reveal.visible { opacity: 1; transform: none; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  #lightbox-content {
    flex-direction: column;
    width: 95vw;
    max-height: 92vh;
    overflow-y: auto;
  }

  /* sidebar პირველი — ზემოთ */
  #lightbox-sidebar {
    order: 1;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(245,244,240,0.08);
    padding: 24px;
  }

  /* ფოტო მეორე — ქვემოთ */
  #lightbox-photo-wrap {
    order: 2;
    min-height: 50vw;
  }

  /* აღწერა ჩანს */
  #lightbox-description {
    display: block;
  }

  #lightbox-counter { margin-top: 16px; }
}
@media (max-width: 768px) {
  /* NAV — ლოგო + ლინკები ვერტიკალურად */
  nav {
    padding: 16px 24px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .nav-links {
    display: flex;  /* ← აღარ იმალება */
    gap: 24px;
  }

  /* horizontal scroll fix */
  body { overflow-x: hidden; }
  section { padding: 80px 24px; }
  #hero { padding: 140px 24px 48px; } /* ← მეტი padding-top — nav გაიზარდა */
  .hero-scroll { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  #contact { padding: 80px 24px; }
  footer { padding: 24px; flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .contact-headline { font-size: 36px; }
}