:root {
  --bg: #fdf6f0;
  --text: #3a2b24;
  --muted: #8a7568;
  --accent: #c1694a;
  --card-bg: #ffffff;
  --border: #ecdfd3;
  --shadow: 0 10px 30px -12px rgba(58, 43, 36, 0.25);
  --shadow-hover: 0 16px 36px -14px rgba(58, 43, 36, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Jost", system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: -60px;
  z-index: -2;
  pointer-events: none;
  background-image: url("assets/background.jpeg");
  background-size: cover;
  background-position: center;
  filter: blur(16px) saturate(1.15);
  transform: scale(1.05);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(253, 246, 240, 0.45);
}

header {
  text-align: center;
  padding: 0.25rem 1.5rem 0.75rem;
  background: #ffffff;
  box-shadow: 0 8px 24px -12px rgba(58, 43, 36, 0.3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.logo {
  height: auto;
  width: auto;
  max-height: clamp(170px, 45vw, 220px);
  max-width: 90%;
  display: block;
  margin: 0 auto;
}

.tagline {
  color: var(--muted);
  font-family: "Italianno", cursive;
  font-weight: 400;
  font-size: min(4.8vw, 2.2rem);
  white-space: nowrap;
  letter-spacing: 0.02em;
  margin: 0;
}

@media (max-width: 600px) {
  header {
    padding: 0.1rem 1rem 0.35rem;
  }

  .tagline {
    margin-top: -0.4rem;
  }
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.gallery-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

@media (max-width: 600px) {
  .gallery-panel {
    padding: 1.25rem;
    border-radius: 16px;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.gallery-status {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
}

.gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--card-bg);
  display: block;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.skeleton {
  height: 280px;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--border) 30%, #f6ede4 50%, var(--border) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  .gallery img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
  }
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  text-align: center;
  color: var(--muted);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  margin-top: 2rem;
  background: #ffffff;
  box-shadow: 0 -8px 24px -16px rgba(58, 43, 36, 0.3);
}

footer p {
  margin: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.social-link svg {
  transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .social-link:hover {
    opacity: 0.7;
  }

  .social-link:hover svg {
    transform: scale(1.15);
  }
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20, 14, 11, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.lightbox.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 20;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
