:root {
  --bg: #2f2f2f;
  --bg-soft: #363636;
  --bg-header: #252525;
  --text: #f1f1f1;
  --text-soft: rgba(255, 255, 255, 0.82);
  --line: rgba(255, 255, 255, 0.22);
  --card-radius: 6px;
  --header-h: 72px;
  --footer-h: 46px;
  --wrap: min(1140px, calc(100vw - 64px));
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
}

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

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

.site-header,
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 100;
}

.site-header {
  background: var(--bg-header);
}

.site-header {
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.admin-bar .site-header {
  top: 32px;
}

body.admin-bar .social-links {
  bottom: calc(var(--footer-h) + 42px);
}

body.admin-bar .home-hero,
body.admin-bar .home-hero__content {
  height: calc(100svh - 32px);
  min-height: calc(100svh - 32px);
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  body.admin-bar .home-hero,
  body.admin-bar .home-hero__content {
    height: calc(100svh - 46px);
    min-height: calc(100svh - 46px);
  }
}

.site-footer {
  bottom: 0;
  background: var(--bg);
  border-top: 0;
}

body.home .site-footer {
  background: transparent;
}

body.home .site-footer__inner {
  color: rgba(255, 255, 255, 0.92);
}

.site-header__inner,
.site-footer__inner {
  width: var(--wrap);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer__inner {
  min-height: var(--footer-h);
  justify-content: center;
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
}
.site-footer__inner p {
  margin: 0;
}

.site-branding {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.primary-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  font-size: 16px;
  font-weight: 500;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px 0;
  background: #fff;
}

.page-main {
  width: var(--wrap);
  margin: 0 auto;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: calc(var(--footer-h) + 48px);
}

.home-hero {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  background: #111 center/cover no-repeat;
  background-image: var(--hero-image);
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.26) 0%,
    rgba(0, 0, 0, 0.38) 100%
  );
}

.home-hero__content {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 24px) 24px calc(var(--footer-h) + 120px);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 700;
}

.home-hero__excerpt {
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.75);
  width: min(100%, 520px);
  font-size: clamp(24px, 2vw, 28px);
  font-weight: 300;
}

.social-links {
  position: absolute;
  left: 50%;
  bottom: calc(var(--footer-h) + 42px);
  transform: translateX(-50%);
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 2;
}

.social-links a {
  width: 58px;
  height: 58px;
  display: block;
  background: transparent;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
}

.social-links img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.section-intro,
.album-intro {
  text-align: center;
  margin-bottom: 48px;
}

.section-intro h1,
.album-intro h1,
.content-page__title {
  margin: 0 0 60px;
  font-size: clamp(42px, 5vw, 54px);
  font-weight: 700;
  text-transform: uppercase;
}

.album-intro__description,
.content-page__body {
  max-width: 980px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.6;
}

.album-grid,
.photo-grid {
  display: grid;
  gap: 18px;
}

.album-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.album-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  min-height: 285px;
  background: #1a1a1a;
}

.album-card__media {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  transform: scale(1.01);
}

/*.album-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
}*/

.album-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.38) 100%
  );
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: scale(1);
}

.album-card__overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.38) 100%
  );
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.album-card:hover .album-card__overlay {
  transform: scale(1.01);
}

.album-card:hover .album-card__overlay::after {
  opacity: 0.3; /* overlay più scuro al passaggio del mouse */
}

.album-card__title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
}

.photo-grid__item {
  display: block;
  border-radius: var(--card-radius);
  overflow: visible;
  background: #1d1d1d;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center center;
  will-change: transform;
}

.photo-grid__item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--card-radius);
  display: block;
}

.photo-grid__item:hover {
  transform: scale(1.02);
  opacity: 0.96;
}

.content-page {
  max-width: 980px;
  margin: 0 auto;
}

.empty-state {
  text-align: center;
  color: var(--text-soft);
}

.pswp__custom-icon-image {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.pswp__barto-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  padding: 12px 24px 30px;
  text-align: center;
  color: #fff;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.78) 40%,
    rgba(0, 0, 0, 0.96) 100%
  );
}

.pswp__barto-caption-text {
  max-width: 900px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
  white-space: pre-line;
}

@media (max-width: 782px) {
  .pswp__barto-caption {
    padding: 10px 16px 22px;
  }

  .pswp__barto-caption-text {
    font-size: 13px;
    line-height: 1.45;
  }
}

@media (max-width: 782px) and (orientation: landscape) {
  .pswp__barto-caption {
    padding: 8px 16px 18px;
  }

  .pswp__barto-caption-text {
    font-size: 12px;
    line-height: 1.4;
  }
}

.pswp__button--zoom {
  display: none !important;
}

@media (max-width: 900px) {
  :root {
    --wrap: min(100vw - 32px, 1140px);
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 16px;
    background: rgba(22, 22, 22, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 18px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: 0.2s ease;
  }

  .primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 14px;
  }

  .album-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero h1 {
    font-size: 46px;
  }

  .home-hero__excerpt {
    font-size: 22px;
  }

  .social-links {
    left: 50%;
    bottom: calc(var(--footer-h) + 34px);
    transform: translateX(-50%);
    gap: 18px;
  }

  .social-links a {
    width: 52px;
    height: 52px;
  }

  .social-links img {
    width: 100%;
    height: 100%;
  }

  .site-footer__inner {
    justify-content: center;
    text-align: center;
    padding: 16px 12px 20px;
  }
}

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