@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: "Antique Legacy";
  src: url("../fonts/AntiqueLegacy-Regular.woff2") format("woff2"),
    url("../fonts/AntiqueLegacy-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Stellage";
  src: url("../fonts/Stellage-Regular.woff2") format("woff2"),
    url("../fonts/Stellage-Italic.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Stellage";
  src: url("../fonts/Stellage-Italic.woff") format("woff2"),
    url("../fonts/Stellage-Italic.woff") format("woff");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Monument Grotesk Mono";
  src: url("../fonts/MonumentGroteskMono.woff2") format("woff2"),
    url("../fonts/MonumentGroteskMono.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Mini Reset CSS */
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: normal;
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  margin: 0;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

img,
video {
  height: auto;
  max-width: 100%;
}

iframe {
  border: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
}

body {
  font-family: "Antique Legacy", sans-serif;
}

.font-serif {
  font-family: "Stellage", serif;
}

.font-mono {
  font-family: "Monument Grotesk Mono", monospace;
}

::selection {
  color: #ccc;
}

.font-mono {
  font-size: 0.8rem;
}

header svg path {
  transition: fill 0.3s ease;
}

/* slider */
.swiper-slide {
  width: auto !important;
}

/* home gallery */
.home-gallery_image-small {
  width: 160px;
}

.home-gallery_image-medium {
  width: 210px;
}

.home-gallery_image-large {
  width: 230px;
}

/* home accordion */

.project-card_content_credits a {
  text-decoration: underline;
}

.project-card_content_credits a:hover {
  text-decoration: none;
}

/* testimonials slider */
.testimonials-slider .swiper-pagination {
  position: static !important;
  width: fit-content !important;
}

.testimonials-slider .swiper-pagination-bullet-active {
  background-color: black;
}

.testimonials-slider .swiper-slide {
  width: 100% !important;
}

/* home gallery animation */
@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(5px, 5px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.home-gallery_image {
  position: absolute;
  z-index: 10;
  opacity: 0;
  cursor: pointer;
  transition: all 0.3s ease-out;
  animation: float 6s ease-in-out infinite;
  will-change: opacity, transform;
}

.home-gallery_image:hover {
  opacity: 0.4 !important;
}

.filter-wrapper {
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
  will-change: max-height, opacity;
}

.filter-wrapper.filters-visible {
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out 0.4s;
  opacity: 1;
}

.active-filter .filter-input,
.filter-label:hover .filter-input {
  background-color: #000;
  transition: background-color 0.1s ease-out;
  -webkit-transition: background-color 0.1s ease-out;
}

/* categories */
.categories-active {
  transition: opacity 0.3s ease-out;
  -webkit-transition: opacity 0.3s ease-out;
  -moz-transition: opacity 0.3s ease-out;
  -ms-transition: opacity 0.3s ease-out;
  -o-transition: opacity 0.3s ease-out;
}

.project-card_header:hover {
  background-color: var(--hover-bg);
}

.project-card_header:hover .project-title {
  color: var(--hover-text);
}

#lightbox {
  background-color: rgba(255, 255, 255, 0.9);
  transition: opacity 0.3s ease;
}

.home-gallery_image {
  transition: opacity 0.3s ease;
}

.home-gallery_image:hover {
  opacity: 0.4 !important;
}

/* gallery lightbox */
.swiper-slide img {
  cursor: pointer;
}

/* not mobile */
@media (min-width: 768px) {
  .project-card.closing .project-card_header:hover,
  .project-card.closing .project-card_header:hover .project-title {
    background-color: transparent !important;
    color: inherit !important;
  }

  /* Static project card colors */
  .project-card:nth-child(7n + 1) {
    --hover-bg: #7acc79;
    --hover-text: #000000;
  }

  .project-card:nth-child(7n + 2) {
    --hover-bg: #c6c2bb;
    --hover-text: #000000;
  }

  .project-card:nth-child(7n + 3) {
    --hover-bg: #743f17;
    --hover-text: #ffffff;
  }

  .project-card:nth-child(7n + 4) {
    --hover-bg: #ffff73;
    --hover-text: #000000;
  }

  .project-card:nth-child(7n + 5) {
    --hover-bg: #0003e0;
    --hover-text: #ffffff;
  }

  .project-card:nth-child(7n + 6) {
    --hover-bg: #80742d;
    --hover-text: #ffffff;
  }

  .project-card:nth-child(7n + 0),
  .project-card:nth-child(7n) {
    --hover-bg: #f09437;
    --hover-text: #000000;
  }

  /* home accordion */
  .home-accordion:not(.accordion-open):hover .home-accordion_header {
    padding-left: 1.5rem;
  }
}

/* Cross icon visibility */
.cross-icon {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.home-accordion.accordion-open .cross-icon {
  opacity: 1;
}
