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

:root {
  --font: 'Cormorant Garamond', Georgia, serif;
  --bg: #f8f7f4;
  --dark: #1a1a18;
  --text: #2C2C2A;
  --muted: #888780;
  --rule: #c8c7c2;
  --gap: 6px;
}

html, body { background: var(--bg); font-family: var(--font); color: var(--text); }

/* ── LANDING ── */
#landing {
  position: relative; width: 100%; height: 100vh;
  cursor: pointer; overflow: hidden;
}
#hero-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;
  display: block; transition: transform 0.6s ease;
}
#landing:hover #hero-img { transform: scale(1.015); }
#landing-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.22);
  transition: background 0.3s ease;
}
#landing:hover #landing-overlay { background: rgba(0,0,0,0.32); }

#site-title {
  display: flex; align-items: baseline; gap: 0;
  font-weight: 300; color: #fff;
  letter-spacing: 0.04em; line-height: 1;
}
.title-en { font-size: clamp(36px, 6vw, 64px); letter-spacing: 0.16em; text-transform: uppercase; }
.title-sep { font-size: clamp(36px, 6vw, 64px); margin: 0 10px; opacity: 0.6; }
.title-ur  { font-size: clamp(30px, 5vw, 54px); direction: rtl; font-weight: 400; padding-bottom: 2px; }

#landing-hint {
  margin-top: 16px; font-size: 11px;
  letter-spacing: 0.28em; color: rgba(255,255,255,0.45);
  text-transform: uppercase; font-weight: 300;
}

/* ── GRID PAGE ── */
#grid-page { display: none; min-height: 100vh; background: var(--bg); }

#grid-header {
  padding: 32px 28px 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative;
}
#grid-back {
  position: absolute; left: 28px; top: 38px;
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; border: none; background: none;
  font-family: var(--font); transition: color 0.2s;
}
#grid-back:hover { color: var(--text); }

#grid-title-wrap {
  display: flex; align-items: baseline;
  font-weight: 300; color: var(--text); line-height: 1;
}
.gt-en { font-size: 32px; letter-spacing: 0.16em; text-transform: uppercase; }
.gt-sep { font-size: 32px; margin: 0 8px; opacity: 0.4; }
.gt-ur  { font-size: 28px; direction: rtl; font-weight: 400; padding-bottom: 1px; }


/* ── PHOTO GRID ── */
#photo-grid {
  padding: 20px 20px 48px;
  display: flex; flex-direction: column; gap: var(--gap);
}
.p-row { display: flex; gap: var(--gap); align-items: flex-start; }
.photo-cell {
  position: relative; overflow: hidden;
  cursor: pointer; flex-shrink: 0;
  background: #e8e7e4;
}
.photo-cell img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;
  display: block; transition: filter 0.4s ease;
}
.photo-cell:hover img { filter: brightness(0.78); }

.overlay-dim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
  display: flex; align-items: flex-end;
  padding: 12px 14px; pointer-events: none;
}
.photo-cell:hover .overlay-dim { background: rgba(0,0,0,0.35); }
.loc-text {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; opacity: 0;
  transition: opacity 0.25s ease 0.05s;
  font-weight: 300; line-height: 1.6;
}
.photo-cell:hover .loc-text { opacity: 1; }

/* ── LIGHTBOX ── */
#lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,10,0.75); z-index: 200;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 24px 28px;
}
#lightbox.open { display: flex; }

#lb-title-wrap {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: baseline;
  font-weight: 300; opacity: 0.25; white-space: nowrap;
}
.lbt-en { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; }
.lbt-sep { font-size: 13px; margin: 0 6px; color: #fff; }
.lbt-ur  { font-size: 12px; direction: rtl; color: #fff; }

#lb-close {
  position: absolute; top: 14px; right: 20px;
  background: none; border: none; color: rgba(255,255,255,0.35);
  font-size: 28px; cursor: pointer; line-height: 1;
  font-family: var(--font); transition: color 0.2s;
}
#lb-close:hover { color: #fff; }

#lb-img-wrap { cursor: pointer;
  flex: 1; display: flex; align-items: center;
  justify-content: center; width: 100%; min-height: 0;
}
#lb-img {
  max-width: 90%; max-height: calc(100vh - 180px);
  object-fit: contain; display: block;
}

#lb-meta { margin-top: 20px; text-align: center; }
#lb-location {
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); margin-bottom: 8px; font-weight: 300;
}
#lb-caption {
  font-size: 17px; font-weight: 300; font-style: italic;
  color: rgba(255,255,255,0.75); max-width: 480px; line-height: 1.7;
}

#lb-nav { display: flex; gap: 20px; margin-top: 20px; }
.lb-arr {
  background: none; border: 0.5px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.4); font-size: 15px; cursor: pointer;
  padding: 7px 22px; border-radius: 2px;
  font-family: var(--font); letter-spacing: 0.1em;
  transition: all 0.2s;
}
.lb-arr:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

@media (max-width: 600px) {
  #grid-back {
    position: static;
    display: block;
    margin: 0 0 12px 0;
    align-self: flex-start;
    padding-left: 4px;
  }
  #grid-header {
    align-items: flex-start;
    padding: 20px 20px 0;
  }
  #grid-title-wrap {
    width: 100%;
    justify-content: center;
  }
}

#lb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  cursor: pointer;
}
#lb-img {
  max-width: 90%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  display: block;
  cursor: default;
}
