/* ==============================
   Reset
============================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  overflow-x: hidden;

  background: #fff;
  color: #666;

  font-family:
    Arial,
    "Microsoft YaHei",
    sans-serif;
}

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

img {
  display: block;
}

button,
select {
  font: inherit;
}


/* ==============================
   Accessibility
============================== */

.visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);
  white-space: nowrap;

  border: 0;
}


/* ==============================
   Header
============================== */

.project-header {
  width: 100%;

  background:
    rgba(255, 255, 255, 0.97);

  border-bottom:
    1px solid rgba(0, 0, 0, 0.1);
}

.project-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;

  width: min(1500px, 84%);
  min-height: 144px;
  margin: 0 auto;
}


/* ==============================
   Brand
============================== */

.project-brand {
  display: block;
  flex: 0 0 auto;

  width: 92px;
}

.project-brand img {
  width: 100%;
  height: 90px;

  object-fit: contain;
  object-position: left center;

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.project-brand:hover img {
  opacity: 0.75;
  transform: scale(1.025);
}


/* ==============================
   Navigation
============================== */

.project-navigation {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.5vw, 48px);
}

.project-navigation a {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;

  padding: 10px 0;

  color: #777;

  line-height: 1;
  text-align: center;

  transition:
    color 0.3s ease;
}

.project-navigation a span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.project-navigation a small {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.project-navigation a::after {
  content: "";

  position: absolute;
  bottom: 0;
  left: 50%;

  width: 24px;
  height: 1px;

  background: #78be3f;

  transform:
    translateX(-50%)
    scaleX(0);

  transform-origin: center;

  transition:
    transform 0.3s ease;
}

.project-navigation a:hover,
.project-navigation a.is-active {
  color: #78be3f;
}

.project-navigation a:hover::after,
.project-navigation a.is-active::after {
  transform:
    translateX(-50%)
    scaleX(1);
}


/* ==============================
   Main
============================== */

.project-main {
  width: min(1500px, 84%);
  margin: 0 auto;
  padding: 36px 0 70px;
}


/* ==============================
   Filters
============================== */

.project-filters {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 24px;

  margin-bottom: 34px;
}

.project-filters label {
  position: relative;
}

.project-filters label::after {
  content: "";

  position: absolute;
  top: 45%;
  right: 7px;

  width: 7px;
  height: 7px;

  border-right: 1px solid #888;
  border-bottom: 1px solid #888;

  pointer-events: none;

  transform:
    translateY(-50%)
    rotate(45deg);
}

.project-filters select {
  width: 100%;
  padding: 14px 32px 13px 0;

  border: 0;
  border-bottom:
    1px solid rgba(0, 0, 0, 0.12);

  border-radius: 0;
  outline: none;

  background: transparent;
  color: #777;

  font-size: 0.76rem;

  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;

  transition:
    color 0.3s ease,
    border-color 0.3s ease;
}

.project-filters select:hover,
.project-filters select:focus {
  color: #78be3f;

  border-color:
    rgba(120, 190, 63, 0.7);
}


/* ==============================
   Project Grid
============================== */

.project-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 30px 26px;
}


/* ==============================
   Project Card
============================== */

.project-card {
  position: relative;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: #e9e9e9;

  cursor: pointer;
}

.project-card[hidden] {
  display: none;
}

.project-card img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.75s
    cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;

  padding: 24px;

  background:
    rgba(5, 10, 8, 0.68);
  color: #fff;

  opacity: 0;

  transition:
    opacity 0.45s ease;
}

.project-card-overlay::before {
  content: "";

  position: absolute;
  top: 50%;
  left: 50%;

  width: 52px;
  height: 1px;

  background:
    rgba(120, 190, 63, 0.85);

  transform:
    translate(-50%, -38px)
    scaleX(0);

  transform-origin: center;

  transition:
    transform 0.55s
    cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card-overlay p,
.project-card-overlay span {
  position: relative;
  z-index: 1;

  text-align: center;

  transform: translateY(12px);

  transition:
    transform 0.5s
    cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card-overlay p {
  color: #78be3f;

  font-size:
    clamp(1.1rem, 1.7vw, 1.65rem);

  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.project-card-overlay span {
  color:
    rgba(255, 255, 255, 0.82);

  font-size: 0.76rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.project-card:hover img {
  transform: scale(1.055);
}

.project-card:hover
  .project-card-overlay {
  opacity: 1;
}

.project-card:hover
  .project-card-overlay::before {
  transform:
    translate(-50%, -38px)
    scaleX(1);
}

.project-card:hover
  .project-card-overlay p,
.project-card:hover
  .project-card-overlay span {
  transform: translateY(0);
}


/* ==============================
   Empty State
============================== */

.project-empty {
  margin: 5rem 0;

  color: #999;

  font-size: 0.85rem;
  text-align: center;
}


/* ==============================
   Bottom Mark
============================== */

.project-bottom-mark {
  position: relative;

  width: 38px;
  height: 24px;
  margin: 44px auto 0;
}

.project-bottom-mark span {
  position: absolute;
  top: 8px;

  width: 20px;
  height: 2px;

  background: #999;
}

.project-bottom-mark span:first-child {
  left: 2px;

  transform: rotate(32deg);
}

.project-bottom-mark span:last-child {
  right: 2px;

  transform: rotate(-32deg);
}


/* ==============================
   Tablet
============================== */

@media (max-width: 1000px) {
  .project-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;

    width:
      min(100% - 40px, 900px);
    padding: 24px 0;
  }

  .project-brand {
    width: 74px;
  }

  .project-brand img {
    height: 64px;
  }

  .project-navigation {
    width: 100%;
    gap: 0;

    overflow-x: auto;
  }

  .project-navigation a {
    flex: 1 0 auto;

    min-width: 100px;
  }

  .project-main {
    width:
      min(100% - 40px, 900px);
  }

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


/* ==============================
   Mobile
============================== */

@media (max-width: 620px) {
  .project-header-inner {
    width: calc(100% - 32px);
  }

  .project-navigation a {
    min-width: 88px;
  }

  .project-main {
    width: calc(100% - 32px);
    padding-top: 26px;
  }

  .project-filters {
    grid-template-columns: 1fr;
    gap: 8px;

    margin-bottom: 26px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-card:active
    .project-card-overlay {
    opacity: 1;
  }
}