/* Page fade transitions on content container */
#container {
  opacity: 1;
  transition: opacity 400ms ease;
}

#container.page-fade-out {
  opacity: 0;
}

#container.page-fade-in {
  opacity: 0;
  animation: pageFadeIn 400ms ease forwards;
}

@keyframes pageFadeIn {
  to {
    opacity: 1;
  }
}

/* Hide broken Squarespace remnants */
.squarespace-social-buttons,
.ss-social-button,
.ss-social-list-wrapper {
  display: none !important;
}

/* All Work button on project detail pages */
#project .switcher {
  width: auto;
}

#project .switcher .switcher-content {
  display: inline-block;
}

#project .switcher .projectAll {
  display: inline-block;
  padding: 0 22px;
  height: 38px;
  line-height: 38px;
  background-color: #2e2e2e;
  color: #f0f0f0;
  text-decoration: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom-width: 0;
  transition: opacity 0.2s ease;
}

#project .switcher .projectAll:hover {
  opacity: .4;
  border: none;
  border-color: transparent;
}

/* Contact form validation states */
.form-validation-summary,
.form-response {
  padding: 12px 16px;
  margin-bottom: 20px;
  display: none;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.form-validation-summary,
.form-response-error {
  background-color: #bd3b2c;
  color: #fff;
}

.form-response-success {
  background-color: #2d7d32;
  color: #fff;
}

.form-validation-summary::before,
.form-response-error::before {
  content: "\24D8";
  font-size: 20px;
  line-height: 1.4;
  flex-shrink: 0;
}

.form-response-success::before {
  content: "\2713";
  font-size: 20px;
  line-height: 1.4;
  flex-shrink: 0;
}

.form-field-error {
  background-color: #bd3b2c;
  color: #fff;
  padding: 8px 12px;
  margin: 6px 0 10px;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.form-field-error::before {
  content: "\24D8";
  font-size: 16px;
  flex-shrink: 0;
}

.form-field-invalid input,
.form-field-invalid textarea {
  background-color: #fff0f0 !important;
  border-color: #bd3b2c !important;
}

/* Responsive homepage project grid (masonry.js) */
#grid.sqs-gallery-design-autocolumns {
  position: relative;
}

#grid.sqs-gallery-design-autocolumns .item {
  position: relative;
  width: 100%;
}

#grid.sqs-gallery-design-autocolumns .item a {
  height: auto;
}

#grid.sqs-gallery-design-autocolumns .item img {
  width: 100%;
  height: auto;
  display: block;
}

#grid.sqs-gallery-design-autocolumns .item.slide-stretched img {
  height: auto;
}

@media screen and (min-width: 640px) {
  #grid.sqs-gallery-design-autocolumns .item {
    width: 50%;
  }
}

@media screen and (min-width: 1024px) {
  #grid.sqs-gallery-design-autocolumns .item {
    width: 33.333%;
  }
}

@media screen and (min-width: 1440px) {
  #grid.sqs-gallery-design-autocolumns .item {
    width: 25%;
  }
}

@media screen and (min-width: 2010px) {
  #grid.sqs-gallery-design-autocolumns .item {
    width: 20%;
  }
}
