/* Site access gate — styled like works .filtermenu-foldable */
html.password-gate-locked {
  overflow: hidden;
}

.password-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 1;
  transition: opacity 0.45s ease;
}

.password-gate-overlay.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.password-gate-modal {
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 48px);
  padding: 0;
  background-color: #141414;
  border-radius: 15px;
  border: 2px solid #c20000;
  color: #e7e7e7;
  font-family: DegularDisplay-Regular, sans-serif;
  text-align: center;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.password-gate-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.password-gate-cross {
  --cross-glow: 0;
  position: absolute;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%) scale(calc(1 + var(--cross-glow) * 0.2));
  opacity: calc(0.06 + var(--cross-glow) * 0.98);
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.password-gate-cross::before,
.password-gate-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: rgb(
    calc(70 + var(--cross-glow) * 185),
    calc(70 - var(--cross-glow) * 70),
    calc(70 - var(--cross-glow) * 70)
  );
  box-shadow:
    0 0 calc(4px + var(--cross-glow) * 22px)
      rgba(194, 0, 0, calc(var(--cross-glow) * 0.95)),
    0 0 calc(8px + var(--cross-glow) * 32px)
      rgba(255, 80, 80, calc(var(--cross-glow) * 0.45));
  transition: background-color 0.1s ease, box-shadow 0.1s ease;
}

.password-gate-cross::before {
  width: calc(10px + var(--cross-glow) * 2px);
  height: 1px;
}

.password-gate-cross::after {
  width: 1px;
  height: calc(10px + var(--cross-glow) * 2px);
}

.password-gate-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 36px;
}

.password-gate-overlay.is-hiding .password-gate-modal {
  transform: scale(0.96);
}

.password-gate-modal.is-success {
  border-color: #3dd68c;
  box-shadow: 0 0 32px rgba(61, 214, 140, 0.35);
}

.password-gate-title {
  margin: 0;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.password-gate-form {
  --password-gate-action-width: 50%;
  --password-gate-action-min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.password-gate-legal {
  box-sizing: border-box;
  margin: 4px 0 0;
  width: var(--password-gate-action-width);
  min-width: var(--password-gate-action-min-width);
  max-width: 100%;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(231, 231, 231, 0.55);
}

.password-gate-legal a {
  color: #e7e7e7;
  text-decoration: underline;
  text-decoration-color: #c20000;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.password-gate-legal a:hover {
  color: #ffffff;
}

.password-gate-contact {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(231, 231, 231, 0.72);
}

.password-gate-contact a {
  color: #e7e7e7;
  text-decoration: none;
  border-bottom: 1px solid rgba(194, 0, 0, 0.55);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.password-gate-contact a:hover {
  color: #ffffff;
  border-color: #c20000;
}

.password-gate-form.is-hidden {
  display: none;
}

.password-gate-input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 14px;
  background-color: #1a1a1a;
  border: 1px solid #e7e7e7;
  border-radius: 15px;
  color: #e7e7e7;
  font-family: DegularDisplay-Regular, sans-serif;
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.password-gate-input::placeholder {
  color: rgba(231, 231, 231, 0.45);
  text-transform: uppercase;
}

.password-gate-input:focus {
  border-color: #c20000;
  background-color: #141414;
}

/* Matches home page .portbutton */
.password-gate-submit {
  box-sizing: border-box;
  text-transform: uppercase;
  transition: all 0.3s ease;
  height: max-content;
  font-family: "Knockout", sans-serif;
  cursor: none;
  text-decoration: none;
  border-radius: 15px;
  color: #ffffff;
  border: 1px solid #ffffff;
  box-shadow: 0 0 10px #ffffff88;
  background-color: rgba(0, 0, 0, 0);
  padding: 10px 12px;
  text-align: center;
  display: block;
  font-size: 12px;
  margin: 8px 0 0;
  width: var(--password-gate-action-width);
  min-width: var(--password-gate-action-min-width);
  max-width: 100%;
}

.password-gate-submit:hover {
  background-color: #ffffff;
  transition: 0.3s;
  color: #c20000;
  border: 2px solid #ffffff;
}

.password-gate-submit span {
  cursor: none;
  display: inline-block;
  position: relative;
}

.password-gate-submit span::after {
  color: #ffffff;
  position: absolute;
  opacity: 0;
  top: 0;
  text-align: center;
}

.password-gate-submit:hover span::after {
  opacity: 1;
  right: 0;
}

.password-gate-error {
  min-height: 1.2em;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c20000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.password-gate-error.is-visible {
  opacity: 1;
}

.password-gate-modal.is-shake {
  animation: password-gate-shake 0.45s ease;
}

@keyframes password-gate-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

.password-gate-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.password-gate-success.is-visible {
  display: flex;
  animation: password-gate-success-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.password-gate-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #3dd68c;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  animation: password-gate-check-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.password-gate-check svg {
  width: 28px;
  height: 28px;
  stroke: #3dd68c;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-gate-check path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: password-gate-check-draw 0.4s ease 0.35s forwards;
}

.password-gate-success-text {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3dd68c;
  opacity: 0;
  animation: password-gate-text-in 0.4s ease 0.45s forwards;
}

@keyframes password-gate-success-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes password-gate-check-pop {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.12);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes password-gate-check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes password-gate-text-in {
  to {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .password-gate-modal {
    max-width: min(420px, calc(100vw - 32px));
  }

  .password-gate-content {
    padding: 32px 28px;
  }

  .password-gate-contact {
    font-size: 11px;
  }

  .password-gate-legal {
    font-size: 8.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .password-gate-overlay,
  .password-gate-modal,
  .password-gate-modal.is-shake,
  .password-gate-success.is-visible,
  .password-gate-check,
  .password-gate-check path,
  .password-gate-success-text,
  .password-gate-cross,
  .password-gate-cross::before,
  .password-gate-cross::after {
    animation: none !important;
    transition: none !important;
  }

  .password-gate-check {
    transform: scale(1);
  }

  .password-gate-check path {
    stroke-dashoffset: 0;
  }

  .password-gate-success-text {
    opacity: 1;
  }
}
