/* Portfolio password gate — index + portfolio entry */
.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;
}

body.portfolio-gate-open {
  overflow: hidden;
}

.portfolio-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.portfolio-gate[hidden] {
  display: none;
}

.portfolio-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.28);
}

.portfolio-gate__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 2.25rem 2rem 2rem;
  background: #f5f2ec;
  border: 1px solid rgba(26, 26, 26, 0.08);
  box-shadow: 0 18px 48px rgba(26, 26, 26, 0.08);
  font-family: "Avenir Next", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.portfolio-gate__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: none;
  background: transparent;
  color: #9a9690;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
}

.portfolio-gate__close:hover {
  color: #1a1a1a;
}

.portfolio-gate__title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #1a1a1a;
}

.portfolio-gate__desc {
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  line-height: 1.65;
  font-weight: 300;
  color: #6f6f6f;
}

.portfolio-gate__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.portfolio-gate__field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  color: #1a1a1a;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.portfolio-gate__field input::placeholder {
  color: #9a9690;
}

.portfolio-gate__field input:focus {
  outline: none;
  border-color: rgba(26, 26, 26, 0.28);
  background: rgba(255, 255, 255, 0.85);
}

.portfolio-gate__error {
  margin: 0;
  font-size: 0.8rem;
  color: #8a6f6a;
}

.portfolio-gate__error[hidden] {
  display: none;
}

.portfolio-gate__submit {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.55rem 1.35rem;
  border: 1px solid rgba(26, 26, 26, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: #1a1a1a;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.portfolio-gate__submit:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(26, 26, 26, 0.22);
}
