/* ================================================
   Bulka.team Photo Site — style.css
   Design system mirrors bulka.team
   ================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --gold:           #D4A76A;
  --gold-dark:      #b8894f;
  --bg-primary:     #FDF6E3;
  --bg-secondary:   #f0e6cc;
  --text-primary:   #3E2723;
  --text-secondary: #6d4c41;
  --white:          #ffffff;
  --footer-bg:      #2a1a17;
  --shadow:         0 4px 24px rgba(62, 39, 35, .12);
  --shadow-hover:   0 12px 40px rgba(62, 39, 35, .22);
  --radius:         6px;
  --transition:     0.25s ease;
  --container:      1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg-primary);
  color: var(--text-secondary);
}

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

/* ---------- Container ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(62, 39, 35, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar__logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar__logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}

.navbar__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ---------- Hero / Page Header ---------- */
.page-hero {
  padding: 140px 0 56px;
  background: var(--text-primary);
  text-align: center;
}

.page-hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.page-hero__subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  max-width: 560px;
  margin: 0 auto;
}

.page-hero__accent {
  display: inline-block;
  width: 56px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin-top: 20px;
}

/* ---------- Gallery Section ---------- */
.gallery-section {
  padding: 56px 0 80px;
  background: var(--bg-primary);
}

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

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 2;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

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

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42,26,23,.55) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__overlay-icon {
  width: 44px;
  height: 44px;
  background: rgba(212,167,106,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

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

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

.lightbox__backdrop {
  position: absolute;
  inset: 0;
}

.lightbox__content {
  position: relative;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  transition: opacity 0.2s ease;
}

.lightbox__img.is-loading {
  opacity: 0.2;
}

/* Spinner */
.lightbox__spinner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212,167,106,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.lightbox__img.is-loading ~ .lightbox__spinner,
.lightbox__spinner.is-visible {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Close button */
.lightbox__close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  background: rgba(62,39,35,.7);
  border: 1px solid rgba(212,167,106,.3);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 1010;
}

.lightbox__close:hover {
  background: var(--gold);
  transform: scale(1.1);
}

/* Nav arrows */
.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(62,39,35,.7);
  border: 1px solid rgba(212,167,106,.3);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 1010;
  user-select: none;
}

.lightbox__nav:hover {
  background: var(--gold);
  transform: translateY(-50%) scale(1.1);
}

.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

/* Download & counter bar */
.lightbox__bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(42,26,23,.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1010;
}

.lightbox__counter {
  font-size: 0.88rem;
  color: rgba(255,255,255,.55);
  letter-spacing: 0.06em;
}

.lightbox__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  background: var(--gold);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.lightbox__download:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.lightbox__download svg {
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  padding: 32px 0;
  text-align: center;
}

.site-footer__text {
  font-size: 0.82rem;
  color: rgba(255,255,255,.38);
  letter-spacing: 0.04em;
}

.site-footer__link {
  color: var(--gold);
  text-decoration: none;
}

.site-footer__link:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .navbar__logo-text { display: none; }
  .navbar__title    { display: none; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .lightbox__content {
    max-width: 100vw;
  }

  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }

  .lightbox__bar {
    padding: 0 12px;
  }
}

@media (max-width: 400px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
